/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./src/catchPage.ts": /*!**************************!*\ !*** ./src/catchPage.ts ***! \**************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.CatchPage = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst map_1 = __webpack_require__(/*! ./map */ \"./src/map.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst catchPageAddOrUpdate = (props) => {\n const { cordinateY, cordinateX, locationName, catchId, update, imageProps, catchName, flyUsed, } = props;\n const sec = (0, simpleFramework_1.section)().simpleId(\"catch-page-section\");\n const x = (0, simpleFramework_1.input)(\"x-location\").simpleId(\"x-cord\");\n x.value = cordinateX ? cordinateX : \"\";\n x.placeholder = \"Latidtue\";\n const y = (0, simpleFramework_1.input)(\"y-location\").simpleId(\"y-cord\");\n y.placeholder = \"Longitude\";\n y.value = cordinateY ? cordinateY : \"\";\n const cords = (0, simpleFramework_1.label)(\"Cordinates: \", x, y).simpleId(\"location-cords\");\n const locationInput = (0, simpleFramework_1.input)(\"catch-location\");\n locationInput.placeholder = \"Location Of Catch\";\n locationInput.value = locationName ? locationName : \"\";\n const inputLocationName = (0, simpleFramework_1.label)(`Location Name: `, locationInput);\n const name = catchName ? `Editing: ${catchName}` : \"Add a Catch\";\n const editCatchName = (0, simpleFramework_1.input)(\"catch-name\");\n editCatchName.value = catchName || \"\";\n editCatchName.placeholder = \"Catch Name\";\n const flyUsedInput = (0, simpleFramework_1.input)(\"fly-uesd\");\n flyUsedInput.value = flyUsed || \"\";\n flyUsedInput.placeholder = \"Fly Used for Catch\";\n const flyUsedSec = (0, simpleFramework_1.label)(\"Fly Used:\");\n const cancel = () => {\n history.back();\n };\n const save = () => {\n const newProps = {\n cordinateY: y.value,\n cordinateX: x.value,\n locationName: locationInput.value,\n catchId,\n update,\n imageProps,\n catchName: editCatchName.value,\n flyUsed: flyUsedInput.value,\n };\n fetch(config_1.ADD_CATCH_ENPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(newProps)\n })\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"Failed to save Fly\");\n }\n return resp.json();\n }).then((resp) => {\n const serverFlyId = resp.catchId;\n newProps.catchId = serverFlyId;\n })\n .catch(e => {\n console.error(e);\n });\n (0, simpleFramework_1.swapElements)(sec, catchPageStatic(newProps));\n };\n const cancelBtn = (0, simpleFramework_1.button)(\"click\", cancel, \"Cancel\").simpleClass(\"button\").simpleClass(\"button\");\n const saveBtn = (0, simpleFramework_1.button)(\"click\", save, \"Save\").simpleClass(\"button\").simpleClass(\"button is-link\");\n sec.append((0, simpleFramework_1.h2)(name), (0, simpleFramework_1.br)(), editCatchName, (0, simpleFramework_1.img)(imageProps), (0, simpleFramework_1.br)(), inputLocationName, cords, flyUsedSec, flyUsedInput, (0, simpleFramework_1.div)(saveBtn, cancelBtn));\n return sec;\n};\nconst catchPageStatic = (props) => {\n const buildStaticPage = (localProps) => {\n const { cordinateY, cordinateX, locationName, catchId, update, catchName, imageProps, flyUsed, } = localProps;\n const edit = (el, ev) => {\n (0, simpleFramework_1.swapElements)(sec, catchPageAddOrUpdate(localProps));\n };\n const mapDiv = (0, simpleFramework_1.div)().simpleId(\"map\")\n .simpleAttr(\"style\", \"width: 50%; height: 400px\");\n const sec = (0, simpleFramework_1.section)((0, simpleFramework_1.h2)(catchName), (0, simpleFramework_1.br)(), (0, simpleFramework_1.img)(imageProps), (0, simpleFramework_1.br)(), (0, simpleFramework_1.label)(\"Location Name\"), (locationName || \"\"), (0, simpleFramework_1.label)(\"Latidtue\"), (cordinateX || \"\"), (0, simpleFramework_1.label)(\"Longitude\"), (cordinateY || \"\"), mapDiv, (0, simpleFramework_1.label)(\"Fly Used: \"), (flyUsed || \"Edit To Add Fly\"), (0, simpleFramework_1.br)(), (0, simpleFramework_1.button)(\"click\", edit, \"Edit\").simpleClass(\"button\"))\n .simpleId(\"catch-page-section\");\n return sec;\n };\n const getCatch = () => {\n const imageProps = {\n figureClass: `image is-${5}by${4} is-128x128`,\n imgClass: \"\",\n src: \"test.jpg\"\n };\n const { catchId } = props;\n fetch(`${config_1.CATCH_ENDPOINT}?catchId=${catchId}`)\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"failed to load results\");\n }\n return resp.json();\n }).then((resp) => {\n const catchPage = buildStaticPage(resp);\n (0, simpleFramework_1.swapElements)(page, catchPage);\n const mapDiv = document.getElementById(\"map\");\n (0, map_1.mapSection)(0, 0, mapDiv || undefined);\n return;\n })\n .catch(e => {\n console.error(e);\n (0, simpleFramework_1.swapElements)(page, (0, simpleFramework_1.error)(\"Failed to load Catch data\"));\n });\n return (0, simpleFramework_1.createElem)(\"div\", \"Loading Your Catch.\");\n };\n const requriedToLoadWithoutFetch = (props.catchId && props.catchName) ? true : false;\n const page = requriedToLoadWithoutFetch ? buildStaticPage(props) : getCatch();\n return page;\n};\nconst catchPage = (props) => {\n if (props.update == true) {\n return catchPageAddOrUpdate(props);\n }\n return catchPageStatic(props);\n};\nexports.CatchPage = catchPage;\n\n\n//# sourceURL=webpack://flyguide/./src/catchPage.ts?"); /***/ }), /***/ "./src/catches.ts": /*!************************!*\ !*** ./src/catches.ts ***! \************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.CatchesPage = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst genericListPage_1 = __webpack_require__(/*! ./genericListPage */ \"./src/genericListPage.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst PAGE_TITLE = \"Catches\";\nconst catchesPage = (addLocationCb) => {\n const loadingYourFies = (0, simpleFramework_1.createElem)(\"div\", \"Loading Your Catches...\");\n const fetchFunc = () => {\n fetch(config_1.CATCHES_ENDPOINT)\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"failed to load results\");\n }\n return resp.json();\n })\n .then((resp) => {\n const elems = resp.map(f => {\n if (!f.catchId)\n console.error(\"Recieved Invalid Fly\");\n return (0, simpleFramework_1.link)(`?catch-id=${f.catchId || \"INVALID-FLY-ID\"}#catch`, f.catchName)\n .simpleId(f.catchId)\n .simpleClass(\"has-text-black\");\n ;\n });\n const lookUps = {\n uriId: () => \"catch-id\",\n id: (e) => e.catchId,\n itemName: (e) => e.catchName,\n link: () => \"catch\",\n };\n const listProps = {\n data: resp,\n pageTitle: PAGE_TITLE,\n returnData: () => { },\n dataLookup: lookUps,\n };\n const elms = (0, genericListPage_1.listPage)(listProps);\n (0, simpleFramework_1.swapElements)(loadingYourFies, elms);\n return;\n })\n .catch(e => {\n console.error(e);\n (0, simpleFramework_1.swapElements)(loadingYourFies, (0, simpleFramework_1.createElem)(\"div\", \"Failed to load available catches\"));\n });\n };\n fetchFunc();\n const addLocation = (0, simpleFramework_1.button)(\"click\", addLocationCb, \"Add Catch\")\n .simpleClass(\"button\");\n return (0, simpleFramework_1.createElem)(\"section\", (0, simpleFramework_1.br)(), loadingYourFies, (0, simpleFramework_1.br)(), addLocation);\n};\nexports.CatchesPage = catchesPage;\n\n\n//# sourceURL=webpack://flyguide/./src/catches.ts?"); /***/ }), /***/ "./src/config.ts": /*!***********************!*\ !*** ./src/config.ts ***! \***********************/ /***/ ((__unused_webpack_module, exports) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.GET_IMAGE_ENDPOINT = exports.ADD_IMAGE_ENDPOINT = exports.SIGN_UP_ENDPOINT = exports.LOGOUT_ENDPOINT = exports.LOGIN_ENDPOINT = exports.CATCH_ENDPOINT = exports.ADD_CATCH_ENPOINT = exports.CATCHES_ENDPOINT = exports.ADD_FLY_ENPOINT = exports.FLY_ENDPOINT = exports.FLIES_ENDPOINT = exports.PROD_BASE_URI = void 0;\nexports.PROD_BASE_URI = \"https://flyguide-backend.fly.dev\";\nexports.FLIES_ENDPOINT = `${exports.PROD_BASE_URI}/flies`;\nexports.FLY_ENDPOINT = `${exports.PROD_BASE_URI}/fly`;\nexports.ADD_FLY_ENPOINT = `${exports.PROD_BASE_URI}/addFly`;\nexports.CATCHES_ENDPOINT = `${exports.PROD_BASE_URI}/catches`;\nexports.ADD_CATCH_ENPOINT = `${exports.PROD_BASE_URI}/addCatch`;\nexports.CATCH_ENDPOINT = `${exports.PROD_BASE_URI}/catch`;\nexports.LOGIN_ENDPOINT = `${exports.PROD_BASE_URI}/login`;\nexports.LOGOUT_ENDPOINT = `${exports.PROD_BASE_URI}/logout`;\nexports.SIGN_UP_ENDPOINT = `${exports.PROD_BASE_URI}/signup`;\nexports.ADD_IMAGE_ENDPOINT = `${exports.PROD_BASE_URI}/putImage`;\nexports.GET_IMAGE_ENDPOINT = `${exports.PROD_BASE_URI}/getImage`;\n\n\n//# sourceURL=webpack://flyguide/./src/config.ts?"); /***/ }), /***/ "./src/fliesPage.ts": /*!**************************!*\ !*** ./src/fliesPage.ts ***! \**************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FliesPage = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst genericListPage_1 = __webpack_require__(/*! ./genericListPage */ \"./src/genericListPage.ts\");\nconst PAGE_TITLE = \"Flies\";\nconst fliesPage = (props) => {\n const loadingYourFies = (0, simpleFramework_1.createElem)(\"div\", \"Loading Your Flies...\");\n fetch(config_1.FLIES_ENDPOINT, {\n method: \"GET\",\n credentials: \"include\"\n })\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"failed to load results\");\n }\n return resp.json();\n })\n .then((resp) => {\n const elems = resp.map(f => {\n return (0, simpleFramework_1.link)(`?fly-id=${f.flyId || \"INVALID-FLY-ID\"}#fly`, f.flyName).simpleId(f.flyId);\n });\n const lookUps = {\n uriId: () => \"fly-id\",\n id: (e) => e.flyId,\n itemName: (e) => e.flyName,\n link: () => \"fly\",\n };\n const listProps = {\n data: resp,\n pageTitle: PAGE_TITLE,\n returnData: () => { },\n dataLookup: lookUps,\n };\n const addFly = (0, simpleFramework_1.button)(\"\", () => { }, \"Add Fly\")\n .simpleClass(\"button\")\n .simpleAttr(\"role\", \"link\")\n .simpleAttr(\"href\", \"flyPage\")\n .simpleId(\"route\");\n const elms = (0, genericListPage_1.listPage)(listProps)\n .appendChild((0, simpleFramework_1.br)()\n .appendChild(addFly));\n (0, simpleFramework_1.swapElements)(loadingYourFies, elms);\n return;\n })\n .catch(e => {\n const addFly = (0, simpleFramework_1.button)(\"click\", () => {\n window.app.router.goto(\"addFly\");\n }, \"Add Fly\")\n .simpleClass(\"button\")\n .simpleAttr(\"role\", \"link\");\n console.error(e);\n (0, simpleFramework_1.swapElements)(loadingYourFies, (0, simpleFramework_1.createElem)(\"div\", \"Failed to load available flies\", (0, simpleFramework_1.br)(), addFly));\n });\n return (0, simpleFramework_1.createElem)(\"section\", (0, simpleFramework_1.br)(), loadingYourFies);\n};\nexports.FliesPage = fliesPage;\n\n\n//# sourceURL=webpack://flyguide/./src/fliesPage.ts?"); /***/ }), /***/ "./src/flyPage.ts": /*!************************!*\ !*** ./src/flyPage.ts ***! \************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FlyPage = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst FLY_PAGE_SECTION_ID = \"fly-page-section\";\nconst RECIPE_LIST_ID = \"flypagerecipeList\";\nconst getImage = (flyName, imageName, doneCallback, errorCallback) => {\n const requestProps = {\n flyName: flyName,\n imageName: imageName,\n };\n fetch(config_1.GET_IMAGE_ENDPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(requestProps)\n })\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"Failed to load image\");\n }\n return resp.json();\n }).then((resp) => {\n const { data, flyName, imageName, } = resp;\n const image = {\n data,\n flyName,\n imageName,\n };\n doneCallback(image);\n })\n .catch(e => {\n console.error(e);\n errorCallback(e);\n });\n};\nconst buildStaticPage = (staticProps) => {\n const { recipeItems, flyName, flyId, images, } = staticProps;\n const flyImageClass = {\n figureClass: `image is-${5}by${4} is-128x128`,\n imgClass: \"\",\n src: \"test.jpg\"\n };\n if (flyId === \"\" || flyId == null || flyId == undefined) {\n console.error(\"FlyId was invalid\");\n }\n const handleError = (error) => {\n console.error(error);\n };\n const handleImage = (image) => {\n const currentImage = document.getElementById(\"image\");\n const binString = atob(image.data);\n const len = binString.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n bytes[i] = binString.charCodeAt(i);\n }\n const blob = new Blob([bytes.buffer], { type: \"image/png\" });\n const url = URL.createObjectURL(blob);\n const newImageProps = {\n figureClass: `image is-${5}by${4} is-128x128`,\n imgClass: \"\",\n src: url,\n };\n const newImage = (0, simpleFramework_1.img)(newImageProps).simpleId(\"userImage\");\n (0, simpleFramework_1.swapElements)(currentImage, newImage);\n };\n const imageToGet = images && images.length > 0 ? images[0] : \"\";\n getImage(flyName || \"\", imageToGet, handleImage, handleError);\n const edit = (el, ev) => {\n (0, simpleFramework_1.swapElements)(sec, flyPageUpdating(staticProps));\n };\n const sec = (0, simpleFramework_1.section)((0, simpleFramework_1.h2)(`${flyName || \"Fly Name Not Set\"}`)\n .simpleId(flyName || \"\"), (0, simpleFramework_1.img)(flyImageClass)\n .simpleAttr(\"alt\", `${flyName}-image`)\n .simpleId(\"image\"), (0, simpleFramework_1.br)(), (0, simpleFramework_1.label)(\"Recipe Items:\"), (0, simpleFramework_1.simpleListHelper)(recipeItems || []), (0, simpleFramework_1.br)(), (0, simpleFramework_1.label)(\"Fish Caught:\"), (0, simpleFramework_1.simpleListHelper)([\"\"]), (0, simpleFramework_1.br)(), (0, simpleFramework_1.button)(\"click\", edit, \"Edit\")\n .simpleClass(\"button\")).simpleId(FLY_PAGE_SECTION_ID);\n return sec;\n};\nconst flyPageStatic = (props) => {\n const { flyId, flyName } = props;\n if (flyId && flyName) {\n const sec = buildStaticPage(props);\n return sec;\n }\n const getFly = () => {\n fetch(`${config_1.FLY_ENDPOINT}?flyId=${flyId}`)\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"failed to load results\");\n }\n return resp.json();\n }).then((resp) => {\n const flyPage = buildStaticPage(resp);\n (0, simpleFramework_1.swapElements)(page, flyPage);\n return;\n })\n .catch(e => {\n console.error(e);\n (0, simpleFramework_1.swapElements)(page, (0, simpleFramework_1.error)(\"Failed to load Fly data\"));\n });\n return (0, simpleFramework_1.loading)(\"Loading Your Fly Data\");\n };\n const requiredToLoadWithoutFetch = (props.flyId && props.flyName)\n ? true\n : false;\n const page = requiredToLoadWithoutFetch ? buildStaticPage(props) : getFly();\n return page;\n};\nconst flyPageUpdating = (props) => {\n const { flyName, flyId, recipeItems } = props;\n if (flyId === \"\" || flyId == null || flyId == undefined) {\n console.error(\"FyId was invalid\");\n }\n const recipeItemsMarkedForDel = [];\n const sec = (0, simpleFramework_1.section)().simpleId(FLY_PAGE_SECTION_ID);\n const flyNameInput = (0, simpleFramework_1.input)(\"fly-name\").simpleClass(\"input\");\n flyNameInput.value = flyName || \"\";\n flyNameInput.placeholder = \"Fly Name\";\n const MARKD_FOR_DEL_BTN_CLASS = \"button is-danger is-selected\";\n const MARKD_FOR_DEL_INPUT_CLASS = \"input is-danger\";\n const deleteRecipeItem = (ev) => {\n recipeItemsMarkedForDel.push(ev.target.id);\n ev.target.simpleClass(MARKD_FOR_DEL_BTN_CLASS);\n const input = document.getElementById(`${ev.target.id}`);\n input.simpleClass(MARKD_FOR_DEL_INPUT_CLASS);\n };\n const INPUT_POS = 0;\n const recipeItemsMapper = (recipeItems, flyName) => {\n return Array.from(recipeItems).map((r, i) => {\n const id = `recipe-item-${i}`;\n const markedForDel = recipeItemsMarkedForDel.includes(id);\n const editClass = markedForDel ? MARKD_FOR_DEL_INPUT_CLASS : \"input\";\n const edit = (0, simpleFramework_1.input)(id);\n edit.value = r;\n edit.simpleClass(editClass);\n edit.simpleId(id);\n const btnClass = markedForDel ? MARKD_FOR_DEL_BTN_CLASS : \"button\";\n const deleteBtn = (0, simpleFramework_1.button)(\"click\", deleteRecipeItem, \"Remove Item\")\n .simpleId(id)\n .simpleClass(btnClass);\n const wrapper = (0, simpleFramework_1.div)(edit, deleteBtn);\n return wrapper;\n });\n };\n let recipeItemsInputs = recipeItemsMapper(recipeItems || [], flyName || \"Fly Name Not Set\");\n const rList = (0, simpleFramework_1.simpleListHelper)(recipeItemsInputs).simpleId(RECIPE_LIST_ID);\n const recipe = (0, simpleFramework_1.label)(\"Recipe Items:\");\n const flyImageClass = {\n figureClass: `image is-${5}by${4} is-128x128`,\n imgClass: \"\",\n src: \"test.jpg\"\n };\n const flyImage = (0, simpleFramework_1.img)(flyImageClass).simpleAttr(\"alt\", `${flyName}-image`);\n const save = (el, ev) => {\n const items = recipeItemsInputs.map(r => {\n return r.childNodes[INPUT_POS];\n });\n const filteredItems = items\n .filter(i => recipeItemsMarkedForDel.includes(i.id) == false)\n .filter(r => r.value != \"\");\n const stringValues = filteredItems.map(i => i.value);\n const recipeResults = stringValues.reduce((acc, r) => [...acc, r], []);\n const newFlyName = flyNameInput.value;\n if (!newFlyName && newFlyName == \"\") {\n flyNameInput.simpleClass(\"input is-danger\");\n flyNameInput.placeholder = \"Please Enter Fly Name\";\n return;\n }\n const newProps = {\n flyName: newFlyName,\n recipeItems: recipeResults,\n updateOrAdd: false,\n flyId: props.flyId\n };\n const imageInput = document.getElementById(\"imageEntry\");\n const firstFile = (imageInput.files && imageInput.files.length > 0) ? imageInput.files[0] : null;\n if (firstFile) {\n const reader = new FileReader();\n reader.onload = e => {\n if (reader.result instanceof ArrayBuffer) {\n const byteArray = new Uint8Array(reader.result);\n const imageProps = {\n flyName: newFlyName,\n imageName: newFlyName,\n data: Array.from(byteArray),\n };\n fetch(config_1.ADD_IMAGE_ENDPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(imageProps)\n })\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"Failed to upload image\");\n }\n return resp.json();\n }).then((resp) => {\n })\n .catch(e => {\n console.error(e);\n });\n }\n };\n reader.readAsArrayBuffer(firstFile);\n }\n fetch(config_1.ADD_FLY_ENPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(newProps)\n })\n .then(resp => {\n if (resp.ok == false) {\n throw new Error(\"Failed to save Fly\");\n }\n return resp.json();\n }).then((resp) => {\n const serverFlyId = resp.flyId;\n newProps.flyId = serverFlyId;\n })\n .catch(e => {\n console.error(e);\n });\n (0, simpleFramework_1.swapElements)(sec, flyPageStatic(newProps));\n };\n const cancelEdit = (el, ev) => {\n history.back();\n (0, simpleFramework_1.swapElements)(sec, flyPageStatic(props));\n };\n const addRecipeItem = () => {\n const items = recipeItemsInputs\n .filter(i => recipeItemsMarkedForDel.includes(i.id) == false)\n .map(r => {\n return r.childNodes[INPUT_POS].value;\n });\n const newRi = [...items, \"\"];\n const newItems = recipeItemsMapper(newRi, flyName || \"Fly-Name-Not-Set\");\n const newRecipeList = (0, simpleFramework_1.simpleListHelper)(newItems).simpleId(RECIPE_LIST_ID);\n const currentRecipeElement = (0, simpleFramework_1.getElemById)(RECIPE_LIST_ID);\n (0, simpleFramework_1.swapElements)(currentRecipeElement, newRecipeList);\n recipeItemsInputs = newItems;\n };\n const addRecipeItemButton = (0, simpleFramework_1.button)(\"click\", addRecipeItem, \"Add Recipe Item\").simpleClass(\"button\");\n const saveItemBtn = (0, simpleFramework_1.button)(\"click\", save, \"Save\").simpleClass(\"button is-link\");\n const cancelRecipeItemButton = (0, simpleFramework_1.button)(\"click\", cancelEdit, \"Cancel\").simpleClass(\"button\");\n const addImageBtn = (0, simpleFramework_1.input)(\"image-input\")\n .simpleAttr(\"type\", \"file\")\n .simpleId(\"imageEntry\")\n .simpleAttr(\"accept\", \"image/*\");\n const fishCaught = (0, simpleFramework_1.label)(\"Fish Caught:\");\n const fishCaughtList = (0, simpleFramework_1.simpleListHelper)([\"\"]);\n const pgHeading = flyId ? `Editing Fly ${flyName}` : \"Add New Fly\";\n sec.append((0, simpleFramework_1.br)(), (0, simpleFramework_1.h2)(pgHeading), flyNameInput, flyImage, addImageBtn, recipe, rList, addRecipeItemButton, (0, simpleFramework_1.br)(), fishCaught, fishCaughtList, (0, simpleFramework_1.br)(), (0, simpleFramework_1.br)(), (0, simpleFramework_1.div)(saveItemBtn, cancelRecipeItemButton));\n return sec;\n};\nconst flyPage = (props) => {\n const { updateOrAdd } = props;\n if (updateOrAdd) {\n return flyPageUpdating(props);\n }\n return flyPageStatic(props);\n};\nexports.FlyPage = flyPage;\n\n\n//# sourceURL=webpack://flyguide/./src/flyPage.ts?"); /***/ }), /***/ "./src/genericListPage.ts": /*!********************************!*\ !*** ./src/genericListPage.ts ***! \********************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.listPage = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst listPage = (props) => {\n const { data, pageTitle, dataLookup: dl, } = props;\n const stylizedElems = data.map(d => {\n const fmtSlug = `?${dl[\"uriId\"]()}=${dl[\"id\"](d) || \"invalid-id\"}#${dl[\"link\"]()}`;\n const itemName = dl[\"itemName\"](d);\n const itemId = dl[\"id\"](d) || \"invalid-id\";\n return (0, simpleFramework_1.link)(fmtSlug, (0, simpleFramework_1.div)(itemName).simpleClass(\"cell py-3 px-4 has-background-primary has-radius-normal\"))\n .simpleId(itemId)\n .simpleClass(\"has-text-black\");\n });\n const gridDiv = (0, simpleFramework_1.div)(...stylizedElems)\n .simpleClass(\"grid\");\n const heading = (0, simpleFramework_1.h2)(pageTitle);\n return (0, simpleFramework_1.div)(heading, gridDiv);\n};\nexports.listPage = listPage;\n\n\n//# sourceURL=webpack://flyguide/./src/genericListPage.ts?"); /***/ }), /***/ "./src/header.ts": /*!***********************!*\ !*** ./src/header.ts ***! \***********************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.headerId = exports.FlyHeader = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst headerId = \"flyHeader\";\nexports.headerId = headerId;\nconst signInOrLoginInElems = () => {\n return ((0, simpleFramework_1.div)((0, simpleFramework_1.div)((0, simpleFramework_1.div)((0, simpleFramework_1.link)(\"#signUp\", \"Sign Up\").simpleClass(\"button is-link\"), (0, simpleFramework_1.link)(\"#login\", \"Login\").simpleClass(\"button is-light\")).simpleClass(\"buttons\")).simpleClass(\"navbar-item\")).simpleClass(\"navbar-end\"));\n};\nconst userProfile = () => {\n return ((0, simpleFramework_1.div)((0, simpleFramework_1.div)((0, simpleFramework_1.div)((0, simpleFramework_1.link)(\"#account\", \"My Account\").simpleClass(\"button is-info\")).simpleClass(\"buttons\")).simpleClass(\"navbar-item\")).simpleClass(\"navbar-end\"));\n};\nconst flyHeader = (props) => {\n const imgProps = {\n figureClass: ``,\n imgClass: \"is-rounded\",\n src: \"fly-icon.png\"\n };\n document.addEventListener('DOMContentLoaded', () => {\n const burger = document.querySelector('.navbar-burger');\n const menu = document.querySelector(`#${burger === null || burger === void 0 ? void 0 : burger.dataset.target}`);\n burger === null || burger === void 0 ? void 0 : burger.addEventListener('click', () => {\n burger.classList.toggle('is-active');\n menu === null || menu === void 0 ? void 0 : menu.classList.toggle('is-active');\n });\n });\n const isUserLoggedIn = localStorage.getItem(\"is_logged_in\");\n const expiredSto = localStorage.getItem(\"session_expire\");\n const expired = expiredSto\n ? expiredSto\n : Date.now().toString();\n const isExpiredSession = Date.now().toString() >= expired;\n const accountOrUnAuthed = (isUserLoggedIn && !isExpiredSession)\n ? userProfile()\n : signInOrLoginInElems();\n return ((0, simpleFramework_1.header)((0, simpleFramework_1.createElem)(\"nav\", (0, simpleFramework_1.div)((0, simpleFramework_1.link)(\"#home\", (0, simpleFramework_1.img)(imgProps))\n .simpleClass(\"navbar-item navlink\"), (0, simpleFramework_1.createElem)(\"a\", (0, simpleFramework_1.createElem)(\"span\").simpleAttr(\"aria-hidden\", \"true\"), (0, simpleFramework_1.createElem)(\"span\").simpleAttr(\"aria-hidden\", \"true\"), (0, simpleFramework_1.createElem)(\"span\").simpleAttr(\"aria-hidden\", \"true\"), (0, simpleFramework_1.createElem)(\"span\").simpleAttr(\"aria-hidden\", \"true\"))\n .simpleAttr(\"role\", \"button\")\n .simpleAttr(\"aria-label\", \"menu\")\n .simpleAttr(\"aria-expanded\", \"false\")\n .simpleAttr(\"data-target\", \"flyNavbar\")\n .simpleClass(\"navbar-burger\"))\n .simpleClass(\"navbar-brand\"), (0, simpleFramework_1.div)((0, simpleFramework_1.div)((0, simpleFramework_1.link)(\"#home\", \"Home\")\n .simpleClass(\"navbar-item navlink\"), (0, simpleFramework_1.link)(\"flies\", \"Flies\")\n .simpleClass(\"navbar-item navlink\"), (0, simpleFramework_1.link)(\"#catches\", \"Catches\")\n .simpleClass(\"navbar-item navlink\"))\n .simpleClass(\"navbar-start\"))\n .simpleClass(\"navbar-menu\")\n .simpleId(\"flyNavbar\"), accountOrUnAuthed)\n .simpleClass(\"navbar is-primary\")\n .simpleAttr(\"role\", \"navigation\")\n .simpleAttr(\"aria-label\", \"main navigation\")).simpleId(headerId));\n};\nexports.FlyHeader = flyHeader;\n\n\n//# sourceURL=webpack://flyguide/./src/header.ts?"); /***/ }), /***/ "./src/homePage.ts": /*!*************************!*\ !*** ./src/homePage.ts ***! \*************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.HomePage = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst homePage = () => {\n const sec = (0, simpleFramework_1.section)();\n sec.append((0, simpleFramework_1.h2)(\"Fly Bible\"));\n return sec;\n};\nexports.HomePage = homePage;\n\n\n//# sourceURL=webpack://flyguide/./src/homePage.ts?"); /***/ }), /***/ "./src/login.ts": /*!**********************!*\ !*** ./src/login.ts ***! \**********************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Login = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst login = (headerRefresh) => {\n const usernameInputId = \"username-id\";\n const passwordInputId = \"password-id\";\n const loginSec = \"login-sec\";\n const loginBtn = \"login-btn \";\n const login = (event) => {\n const usernameData = document.getElementById(usernameInputId);\n const passwordData = document.getElementById(passwordInputId);\n const body = {\n userName: usernameData === null || usernameData === void 0 ? void 0 : usernameData.value,\n password: passwordData === null || passwordData === void 0 ? void 0 : passwordData.value\n };\n fetch(config_1.LOGIN_ENDPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(body)\n })\n .then(resp => {\n if (resp.ok == false) {\n const errorAppend = document.getElementById(loginSec);\n const errorLabel = (0, simpleFramework_1.createElem)(\"p\", \"Login Failed\").simpleClass(\"help is-danger\");\n errorAppend.append(errorLabel);\n throw new Error(\"Failed to login\");\n }\n else {\n const errorAppend = document.getElementById(loginSec);\n errorAppend === null || errorAppend === void 0 ? void 0 : errorAppend.remove();\n }\n return resp.json();\n })\n .then(resp => {\n window.userData = window.userData || {};\n const headerProps = {\n authed: true,\n };\n localStorage.setItem(\"is_logged_in\", \"true\");\n localStorage.setItem(\"session_expire\", new Date(Date.now() + 172800000).toString());\n headerRefresh(headerProps);\n window.location.href = \"#home\";\n })\n .catch(e => {\n console.error(e);\n });\n };\n const forgotPassword = () => {\n };\n const userNameOrEmailField = () => {\n const login = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Email or Uesrname\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(usernameInputId)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Username or Email\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-user\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n return login;\n };\n const passwordField = () => {\n const login = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Password\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(passwordInputId)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Password\")\n .simpleAttr(\"type\", \"password\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-lock\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n return login;\n };\n const page = (0, simpleFramework_1.section)((0, simpleFramework_1.h2)(\"Login\"), (0, simpleFramework_1.br)(), userNameOrEmailField(), passwordField(), (0, simpleFramework_1.multiEventBtn)([\"keydown\", \"click\"], login, \"Login\")\n .simpleClass(\"button is-primary\").simpleId(loginBtn)).simpleClass(\"container is-max-tablet\")\n .simpleId(loginSec);\n return page;\n};\nexports.Login = login;\n\n\n//# sourceURL=webpack://flyguide/./src/login.ts?"); /***/ }), /***/ "./src/loginOrSignup.ts": /*!******************************!*\ !*** ./src/loginOrSignup.ts ***! \******************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SignUp = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst signUp = () => {\n const usernameInputId = \"usernameid\";\n const passwordInputId = \"passwordid\";\n const passwordInputIdConfirm = \"passwordidconfirm\";\n const emailInputField = \"emailinputfield\";\n const signUpSec = \"singupsec\";\n const signUpBtn = \"loginbtn \";\n const firstNameInputId = \"firstnameid\";\n const lastNameInputId = \"lastnameid\";\n const login = (event) => {\n const usernameData = document.getElementById(usernameInputId);\n const passwordData = document.getElementById(passwordInputId);\n const firstName = document.getElementById(firstNameInputId);\n const lastName = document.getElementById(lastNameInputId);\n const email = document.getElementById(emailInputField);\n const confirmPassword = document.getElementById(passwordInputIdConfirm);\n const errorAppend = document.getElementById(signUpSec);\n const fieldEr = document.getElementById(\"fieldserror\");\n fieldEr === null || fieldEr === void 0 ? void 0 : fieldEr.remove();\n const passwordErr = document.getElementById(\"passworderror\");\n passwordErr === null || passwordErr === void 0 ? void 0 : passwordErr.remove();\n if ((confirmPassword === null || confirmPassword === void 0 ? void 0 : confirmPassword.value) != (passwordData === null || passwordData === void 0 ? void 0 : passwordData.value)) {\n const errorLabel = (0, simpleFramework_1.createElem)(\"p\", \"Passwords dont match\")\n .simpleClass(\"help is-danger\")\n .simpleId(\"passworderror\");\n errorAppend.append(errorLabel);\n }\n const notCheckedBody = {\n userName: usernameData.value,\n password: passwordData.value,\n firstName: firstName === null || firstName === void 0 ? void 0 : firstName.value,\n lastName: lastName === null || lastName === void 0 ? void 0 : lastName.value,\n email: email === null || email === void 0 ? void 0 : email.value,\n };\n const isInvalid = Object.values(notCheckedBody).filter(v => {\n return !v || v == \"\";\n });\n if (isInvalid.length > 0) {\n const errorLabel = (0, simpleFramework_1.createElem)(\"p\", \"One or more entires are not valid\")\n .simpleClass(\"help is-danger\")\n .simpleId(\"fieldserror\");\n errorAppend.append(errorLabel);\n return;\n }\n fetch(config_1.SIGN_UP_ENDPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(notCheckedBody)\n })\n .then(resp => {\n if (resp.ok == false) {\n const errorAppend = document.getElementById(signUpSec);\n const errorLabel = (0, simpleFramework_1.createElem)(\"p\", \"Sign Up Failed\").simpleClass(\"help is-danger\");\n errorAppend.append(errorLabel);\n throw new Error(\"Failed to login\");\n }\n else {\n const errorAppend = document.getElementById(signUpSec);\n errorAppend === null || errorAppend === void 0 ? void 0 : errorAppend.remove();\n }\n return resp.json();\n })\n .then(resp => {\n window.userData = window.userData || {};\n window.location.href = \"#home\";\n })\n .catch(e => {\n console.error(e);\n });\n };\n const userNameOrEmailField = () => {\n const login = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Username\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(usernameInputId)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Username\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-user\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n return login;\n };\n const emailField = () => {\n const login = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Email\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(emailInputField)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Email\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-envelope\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n return login;\n };\n const firstNameLastNameField = () => {\n const firstName = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"First Name\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(firstNameInputId)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"First Name\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-user\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n const lastName = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Last Name\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(lastNameInputId)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Last Name\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-user\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n return (0, simpleFramework_1.div)(firstName, lastName);\n };\n const passwordField = () => {\n const password = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Password\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(passwordInputId)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Password\")\n .simpleAttr(\"type\", \"password\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-lock\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n const passwordConfirm = (0, simpleFramework_1.div)((0, simpleFramework_1.label)(\"Confirm Password\"), (0, simpleFramework_1.div)((0, simpleFramework_1.input)(passwordInputIdConfirm)\n .simpleClass(\"input\")\n .simpleAttr(\"placeholder\", \"Confirm Password\")\n .simpleAttr(\"type\", \"password\"), (0, simpleFramework_1.createElem)(\"span\", (0, simpleFramework_1.createElem)(\"i\").simpleClass(\"fas fa-lock\")).simpleClass(\"icon is-small is-left\"))\n .simpleClass(\"control has-icons-left has-icons-right\")).simpleClass(\"field\");\n return (0, simpleFramework_1.div)(password, passwordConfirm);\n };\n const page = (0, simpleFramework_1.section)((0, simpleFramework_1.h2)(\"Sign UP\"), (0, simpleFramework_1.br)(), firstNameLastNameField(), (0, simpleFramework_1.br)(), emailField(), userNameOrEmailField(), (0, simpleFramework_1.br)(), passwordField(), (0, simpleFramework_1.br)(), (0, simpleFramework_1.multiEventBtn)([\"keydown\", \"click\"], login, \"Sign Up\")\n .simpleClass(\"button is-primary\").simpleId(signUpBtn)).simpleClass(\"container is-max-tablet\")\n .simpleId(signUpSec);\n return page;\n};\nexports.SignUp = signUp;\n\n\n//# sourceURL=webpack://flyguide/./src/loginOrSignup.ts?"); /***/ }), /***/ "./src/map.ts": /*!********************!*\ !*** ./src/map.ts ***! \********************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.mapSection = void 0;\nconst Map_1 = __importDefault(__webpack_require__(/*! ol/Map */ \"./node_modules/ol/Map.js\"));\nconst OSM_1 = __importDefault(__webpack_require__(/*! ol/source/OSM */ \"./node_modules/ol/source/OSM.js\"));\nconst Draw_1 = __importDefault(__webpack_require__(/*! ol/interaction/Draw */ \"./node_modules/ol/interaction/Draw.js\"));\nconst Vector_1 = __importDefault(__webpack_require__(/*! ol/source/Vector */ \"./node_modules/ol/source/Vector.js\"));\nconst layer_1 = __webpack_require__(/*! ol/layer */ \"./node_modules/ol/layer.js\");\nconst View_1 = __importDefault(__webpack_require__(/*! ol/View */ \"./node_modules/ol/View.js\"));\nconst Polygon_1 = __importDefault(__webpack_require__(/*! ol/geom/Polygon */ \"./node_modules/ol/geom/Polygon.js\"));\nconst Tile_1 = __importDefault(__webpack_require__(/*! ol/layer/Tile */ \"./node_modules/ol/layer/Tile.js\"));\nconst control_1 = __webpack_require__(/*! ol/control */ \"./node_modules/ol/control.js\");\nconst MousePosition_1 = __importDefault(__webpack_require__(/*! ol/control/MousePosition */ \"./node_modules/ol/control/MousePosition.js\"));\nconst coordinate_1 = __webpack_require__(/*! ol/coordinate */ \"./node_modules/ol/coordinate.js\");\nconst mapSection = (x, y, elemId) => {\n const logMousePos = new MousePosition_1.default({\n coordinateFormat: (0, coordinate_1.createStringXY)(4),\n projection: 'EPSG:4326',\n });\n const vectorSource = new Vector_1.default({ wrapX: false });\n const vector = new layer_1.Vector({\n source: vectorSource,\n });\n if (!elemId)\n console.error(\"Mount point for map was undefined or null\");\n const layer = new Tile_1.default();\n const map = new Map_1.default({\n controls: (0, control_1.defaults)().extend([logMousePos]),\n target: elemId,\n layers: [layer, vector],\n view: new View_1.default({\n center: [0, 0],\n zoom: 2\n })\n });\n const geometryFunction = function (coordinates, geometry) {\n if (!geometry) {\n geometry = new Polygon_1.default([coordinates]);\n }\n else {\n geometry.setCoordinates([coordinates]);\n }\n return geometry;\n };\n const draw = new Draw_1.default({\n source: vectorSource,\n type: \"Circle\",\n geometryFunction: geometryFunction,\n });\n map.addInteraction(draw);\n layer.setSource(new OSM_1.default());\n};\nexports.mapSection = mapSection;\n\n\n//# sourceURL=webpack://flyguide/./src/map.ts?"); /***/ }), /***/ "./src/myAccount.ts": /*!**************************!*\ !*** ./src/myAccount.ts ***! \**************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MyAccount = void 0;\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst config_1 = __webpack_require__(/*! ./config */ \"./src/config.ts\");\nconst myAccount = (headerRefresh) => {\n const userLogout = () => {\n localStorage.removeItem(\"is_logged_in\");\n localStorage.removeItem(\"session_expire\");\n fetch(config_1.LOGOUT_ENDPOINT)\n .then(resp => {\n if (resp.ok == false) {\n }\n return resp.json();\n })\n .then(resp => {\n })\n .catch(e => {\n console.error(e);\n });\n const headerProps = {\n authed: false,\n };\n headerRefresh(headerProps);\n window.location.href = \"#home\";\n };\n const logout = (0, simpleFramework_1.button)(\"click\", userLogout, \"Logout\")\n .simpleClass(\"button is-danger\");\n const page = (0, simpleFramework_1.section)((0, simpleFramework_1.h2)(\"My Account\"), (0, simpleFramework_1.br)(), logout).simpleClass(\"container is-max-tablet\");\n return page;\n};\nexports.MyAccount = myAccount;\n\n\n//# sourceURL=webpack://flyguide/./src/myAccount.ts?"); /***/ }), /***/ "./src/renderer.ts": /*!*************************!*\ !*** ./src/renderer.ts ***! \*************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { eval("\n'user strict';\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst header_1 = __webpack_require__(/*! ./header */ \"./src/header.ts\");\nconst flyPage_1 = __webpack_require__(/*! ./flyPage */ \"./src/flyPage.ts\");\nconst catches_1 = __webpack_require__(/*! ./catches */ \"./src/catches.ts\");\nconst catchPage_1 = __webpack_require__(/*! ./catchPage */ \"./src/catchPage.ts\");\nconst homePage_1 = __webpack_require__(/*! ./homePage */ \"./src/homePage.ts\");\nconst router_1 = __importDefault(__webpack_require__(/*! ./router */ \"./src/router.ts\"));\nconst login_1 = __webpack_require__(/*! ./login */ \"./src/login.ts\");\nconst loginOrSignup_1 = __webpack_require__(/*! ./loginOrSignup */ \"./src/loginOrSignup.ts\");\nconst myAccount_1 = __webpack_require__(/*! ./myAccount */ \"./src/myAccount.ts\");\nwindow.app = window.app || {};\nwindow.app.router = router_1.default;\nwindow.addEventListener(\"DOMContentLoaded\", () => __awaiter(void 0, void 0, void 0, function* () {\n window.app.router.init();\n}));\nconst entryPoint = document.getElementById(\"simpleFrameworkEntryPoint\");\nconst entryPointHeader = document.getElementById(\"simpleFrameworkHeaderEntryPoint\");\nconst rootBodyElem = entryPoint\n .appendChild((0, simpleFramework_1.section)((0, simpleFramework_1.section)()\n .simpleClass(\"hero\"))\n .simpleClass(\"container is-widescreen\")\n .simpleId(\"contentElement\"));\nconst flyName = \"Fly Name\";\nconst pageTitle = document.getElementById(\"title\");\npageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.setAttribute(\"title\", flyName);\nconst refreshHeader = (props) => {\n const currentFlyHeader = document.getElementById(header_1.headerId);\n const flyHeader = (0, header_1.FlyHeader)(props);\n entryPointHeader === null || entryPointHeader === void 0 ? void 0 : entryPointHeader.removeChild(currentFlyHeader);\n entryPointHeader === null || entryPointHeader === void 0 ? void 0 : entryPointHeader.appendChild(flyHeader);\n};\nconst addLocationCB = () => {\n const props = {\n update: true,\n };\n const addCatch = (0, simpleFramework_1.createElem)(\"div\", (0, catchPage_1.CatchPage)(props));\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(addCatch);\n};\nconst routerRefresh = () => {\n const hashLoc = document.location.hash.split(\"#\")[1];\n const queryParams = new URLSearchParams(document.location.search);\n if (hashLoc == \"home\") {\n const elms = (0, simpleFramework_1.createElem)(\"div\", (0, homePage_1.HomePage)());\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(elms);\n return true;\n }\n if (hashLoc == \"catches\") {\n const elms = (0, simpleFramework_1.createElem)(\"div\", (0, catches_1.CatchesPage)(addLocationCB));\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(elms);\n return true;\n }\n if (hashLoc == \"fly\") {\n const flyId = queryParams.get(\"fly-id\");\n const flyProps = {\n updateOrAdd: false,\n flyId: flyId || undefined,\n };\n const elms = (0, simpleFramework_1.createElem)(\"div\", (0, flyPage_1.FlyPage)(flyProps));\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(elms);\n return true;\n }\n if (hashLoc == \"signUp\") {\n const signUpPg = (0, loginOrSignup_1.SignUp)();\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(signUpPg);\n }\n if (hashLoc == \"login\") {\n const loginPg = (0, login_1.Login)(refreshHeader);\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(loginPg);\n }\n if (hashLoc == \"account\") {\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren((0, myAccount_1.MyAccount)(refreshHeader));\n }\n if (hashLoc == \"catch\") {\n const catchId = queryParams.get(\"catch-id\");\n if (catchId == null) {\n console.error(\"Recieved a null or bad catch id\");\n return false;\n }\n const props = {\n catchId,\n update: false,\n };\n const elms = (0, simpleFramework_1.createElem)(\"div\", (0, catchPage_1.CatchPage)(props));\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(elms);\n return true;\n }\n return false;\n};\nwindow.addEventListener(\"hashchange\", routerRefresh);\nif (routerRefresh() == false) {\n const elms = (0, simpleFramework_1.createElem)(\"div\", (0, homePage_1.HomePage)());\n rootBodyElem === null || rootBodyElem === void 0 ? void 0 : rootBodyElem.replaceChildren(elms);\n}\nconst flyHeader = (0, header_1.FlyHeader)({ authed: false });\nentryPointHeader === null || entryPointHeader === void 0 ? void 0 : entryPointHeader.appendChild(flyHeader);\n\n\n//# sourceURL=webpack://flyguide/./src/renderer.ts?"); /***/ }), /***/ "./src/router.ts": /*!***********************!*\ !*** ./src/router.ts ***! \***********************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst fliesPage_1 = __webpack_require__(/*! ./fliesPage */ \"./src/fliesPage.ts\");\nconst simpleFramework_1 = __webpack_require__(/*! ./simpleFramework */ \"./src/simpleFramework.ts\");\nconst flyPage_1 = __webpack_require__(/*! ./flyPage */ \"./src/flyPage.ts\");\nconst Router = {\n init: () => {\n document.querySelectorAll(\"a.navlink\").forEach(a => {\n a.addEventListener(\"click\", e => {\n e.preventDefault();\n const target = e.target;\n const link = target.getAttribute(\"href\");\n if (!link) {\n console.error(`Got invalid href for navigation: ${link}`);\n }\n Router.goto(link || \"\");\n });\n });\n document.querySelectorAll(\"#route\").forEach(b => {\n console.log(b);\n b.addEventListener(\"click\", e => {\n e.preventDefault();\n const target = e.target;\n const link = target.getAttribute(\"href\");\n if (!link) {\n console.error(`Got invalid href for navigation: ${link}`);\n }\n Router.goto(link || \"\");\n });\n });\n window.addEventListener(\"popstate\", (e) => {\n Router.goto(e.state.route, false);\n });\n Router.goto(location.pathname);\n },\n goto: (route, addToHistory = true) => {\n console.log(`Going to ${route}`);\n const queryParams = new URLSearchParams(document.location.search);\n const entryPoint = document.querySelector(\"#simpleFrameworkEntryPoint\");\n const innerContentElement = document.querySelector(\"#contentElement\");\n if (addToHistory) {\n history.pushState({ route }, \"\", route);\n }\n if (route == \"flies\") {\n const fliesPageProps = {\n addFlyCb: () => { },\n };\n const newElems = (0, simpleFramework_1.createElem)(\"div\", (0, fliesPage_1.FliesPage)(fliesPageProps));\n innerContentElement === null || innerContentElement === void 0 ? void 0 : innerContentElement.replaceChildren(newElems);\n }\n if (route == \"addFly\") {\n const flyProps = {\n updateOrAdd: true,\n flyId: undefined,\n };\n const newElems = (0, simpleFramework_1.createElem)(\"div\", (0, flyPage_1.FlyPage)(flyProps));\n innerContentElement === null || innerContentElement === void 0 ? void 0 : innerContentElement.replaceChildren(newElems);\n }\n window.scrollX = 0;\n window.scrollY = 0;\n }\n};\nexports[\"default\"] = Router;\n\n\n//# sourceURL=webpack://flyguide/./src/router.ts?"); /***/ }), /***/ "./src/simpleFramework.ts": /*!********************************!*\ !*** ./src/simpleFramework.ts ***! \********************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.simpleListHelper = exports.swapElements = void 0;\nexports.createElem = createElem;\nexports.div = div;\nexports.img = img;\nexports.input = input;\nexports.section = section;\nexports.table = table;\nexports.list = list;\nexports.header = header;\nexports.h2 = h2;\nexports.h3 = h3;\nexports.link = link;\nexports.button = button;\nexports.multiEventBtn = multiEventBtn;\nexports.br = br;\nexports.label = label;\nexports.loading = loading;\nexports.error = error;\nexports.getElemById = getElemById;\nconst simpleStyleFramework_1 = __webpack_require__(/*! ./simpleStyleFramework */ \"./src/simpleStyleFramework.ts\");\nconst swapElements = (old, replacement) => {\n old.replaceWith(replacement);\n};\nexports.swapElements = swapElements;\nfunction createElem(name, ...children) {\n const elem = document.createElement(name);\n children.forEach(c => {\n if (typeof (c) === \"string\") {\n elem.appendChild(document.createTextNode(c));\n }\n else {\n elem.appendChild(c);\n }\n });\n elem.simpleHashChangeCB = function (cb) {\n const HASH_CHANGE = \"hashchange\";\n this.addEventListener(HASH_CHANGE, (elem, ev) => {\n const loc = document.location.hash.split(\"#\")[1];\n cb(elem, ev, loc);\n });\n return this;\n };\n elem.simpleEventListener = function (type, cb) {\n this.addEventListener(type, (elem, ev) => {\n cb(elem, ev);\n });\n return this;\n };\n elem.simpleAttr = function (type, value) {\n this.setAttribute(type, value);\n return this;\n };\n elem.simpleOnClick = function (cb) {\n this.onclick = cb;\n return this;\n };\n elem.simpleAppendChild = function (...child) {\n child.forEach(c => {\n this.appendChild(c);\n });\n return this;\n };\n elem.simpleAppendAfter = function (afterElement, newElement) {\n this.insertBefore(newElement, afterElement.nextSibling);\n return this;\n };\n elem.simpleAppendBefore = function (beforeElement, newElement) {\n this.insertBefore(newElement, beforeElement);\n return this;\n };\n elem.simpleId = function (id) {\n this.setAttribute(\"id\", id);\n return this;\n };\n elem.simpleClass = function (className) {\n this.setAttribute(\"class\", className);\n return this;\n };\n elem.simpleFindElement = function (id) {\n if (id == elem.id)\n return elem;\n const children = Array.from(this.children);\n const foundArr = children.filter(c => c.id === id ? true : false);\n return foundArr.length > 0 ? foundArr[0] : null;\n };\n return elem;\n}\nfunction div(...children) {\n return createElem(\"div\", ...children);\n}\n;\nconst placeHolderImage = (height, width, src, imgClass, figureClass, alt) => {\n return {\n height: 100,\n width: 100,\n src: \"image.png\",\n imgClass: \"image\",\n figureClass: \"square\",\n alt: \"placeholder image\"\n };\n};\nfunction img(imageOptionProps, ...children) {\n const imageProps = imageOptionProps ? imageOptionProps : placeHolderImage();\n const { src, imgClass, figureClass, alt, } = imageProps;\n return createElem(\"figure\", createElem(\"img\", ...children)\n .simpleClass(imgClass)\n .simpleAttr(\"src\", src))\n .simpleAttr(\"alt\", alt || \"Image without alternative text\")\n .simpleClass(figureClass);\n}\n;\nfunction input(id, ...children) {\n return createElem(\"input\", ...children)\n .simpleId(id)\n .simpleClass(simpleStyleFramework_1.DEFAULT_STYLE[\"input\"]);\n}\n;\nfunction section(...children) {\n return createElem(\"section\", br(), ...children);\n}\n;\nfunction table(...children) {\n return createElem(\"table\", ...children);\n}\n;\nfunction list(...children) {\n return createElem(\"ul\", ...children);\n}\n;\nfunction header(...children) {\n return createElem(\"header\", ...children);\n}\n;\nfunction h2(...children) {\n return createElem(\"h2\", ...children).simpleClass(simpleStyleFramework_1.DEFAULT_STYLE[\"h2\"]);\n}\n;\nfunction h3(...children) {\n return createElem(\"h3\", ...children).simpleClass(simpleStyleFramework_1.DEFAULT_STYLE[\"h2\"]);\n}\n;\nfunction link(uri, ...children) {\n return createElem(\"a\", ...children).simpleAttr(\"href\", uri);\n}\n;\nfunction button(callBackTriggerEvent, callback, ...children) {\n return createElem(\"button\", ...children).simpleEventListener(callBackTriggerEvent, callback);\n}\n;\nfunction multiEventBtn(callBackTriggerEvent, callback, ...children) {\n const btn = createElem(\"button\", ...children);\n callBackTriggerEvent.forEach(t => {\n btn.simpleEventListener(t, callback);\n });\n return btn;\n}\n;\nfunction br(...children) {\n return createElem(\"br\", ...children);\n}\n;\nconst simpleListHelper = (items) => {\n const finalList = Array.from(items).map(i => {\n return createElem(\"li\", i);\n });\n return list(...finalList);\n};\nexports.simpleListHelper = simpleListHelper;\nfunction label(txt, ...children) {\n return createElem(\"label\", txt, ...children).simpleClass(simpleStyleFramework_1.DEFAULT_STYLE[\"label\"]);\n}\n;\nfunction loading(txt, ...children) {\n return createElem(\"div\", txt, ...children).simpleClass(simpleStyleFramework_1.DEFAULT_STYLE[\"loading\"]);\n}\n;\nfunction error(txt, ...children) {\n return createElem(\"div\", txt, ...children).simpleClass(simpleStyleFramework_1.DEFAULT_STYLE[\"error\"]);\n}\n;\nfunction getElemById(txt) {\n return document.getElementById(txt);\n}\n;\n\n\n//# sourceURL=webpack://flyguide/./src/simpleFramework.ts?"); /***/ }), /***/ "./src/simpleStyleFramework.ts": /*!*************************************!*\ !*** ./src/simpleStyleFramework.ts ***! \*************************************/ /***/ ((__unused_webpack_module, exports) => { eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DEFAULT_STYLE = void 0;\nexports.DEFAULT_STYLE = {\n input: \"input\",\n label: \"label\",\n h1: \"title is-2\",\n h2: \"title is-3\",\n h3: \"title is-4\",\n loading: \"\",\n error: \"\",\n};\n\n\n//# sourceURL=webpack://flyguide/./src/simpleStyleFramework.ts?"); /***/ }), /***/ "./node_modules/color-parse/index.js": /*!*******************************************!*\ !*** ./node_modules/color-parse/index.js ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var color_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! color-name */ \"./node_modules/color-parse/node_modules/color-name/index.js\");\n/**\n * @module color-parse\n */\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);\n\n/**\n * Base hues\n * http://dev.w3.org/csswg/css-color/#typedef-named-hue\n */\n//FIXME: use external hue detector\nvar baseHues = {\n\tred: 0,\n\torange: 60,\n\tyellow: 120,\n\tgreen: 180,\n\tblue: 240,\n\tpurple: 300\n}\n\n/**\n * Parse color from the string passed\n *\n * @return {Object} A space indicator `space`, an array `values` and `alpha`\n */\nfunction parse(cstr) {\n\tvar m, parts = [], alpha = 1, space\n\n\t//numeric case\n\tif (typeof cstr === 'number') {\n\t\treturn { space: 'rgb', values: [cstr >>> 16, (cstr & 0x00ff00) >>> 8, cstr & 0x0000ff], alpha: 1 }\n\t}\n\tif (typeof cstr === 'number') return { space: 'rgb', values: [cstr >>> 16, (cstr & 0x00ff00) >>> 8, cstr & 0x0000ff], alpha: 1 }\n\n\tcstr = String(cstr).toLowerCase();\n\n\t//keyword\n\tif (color_name__WEBPACK_IMPORTED_MODULE_0__[\"default\"][cstr]) {\n\t\tparts = color_name__WEBPACK_IMPORTED_MODULE_0__[\"default\"][cstr].slice()\n\t\tspace = 'rgb'\n\t}\n\n\t//reserved words\n\telse if (cstr === 'transparent') {\n\t\talpha = 0\n\t\tspace = 'rgb'\n\t\tparts = [0, 0, 0]\n\t}\n\n\t//hex\n\telse if (cstr[0] === '#') {\n\t\tvar base = cstr.slice(1)\n\t\tvar size = base.length\n\t\tvar isShort = size <= 4\n\t\talpha = 1\n\n\t\tif (isShort) {\n\t\t\tparts = [\n\t\t\t\tparseInt(base[0] + base[0], 16),\n\t\t\t\tparseInt(base[1] + base[1], 16),\n\t\t\t\tparseInt(base[2] + base[2], 16)\n\t\t\t]\n\t\t\tif (size === 4) {\n\t\t\t\talpha = parseInt(base[3] + base[3], 16) / 255\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tparts = [\n\t\t\t\tparseInt(base[0] + base[1], 16),\n\t\t\t\tparseInt(base[2] + base[3], 16),\n\t\t\t\tparseInt(base[4] + base[5], 16)\n\t\t\t]\n\t\t\tif (size === 8) {\n\t\t\t\talpha = parseInt(base[6] + base[7], 16) / 255\n\t\t\t}\n\t\t}\n\n\t\tif (!parts[0]) parts[0] = 0\n\t\tif (!parts[1]) parts[1] = 0\n\t\tif (!parts[2]) parts[2] = 0\n\n\t\tspace = 'rgb'\n\t}\n\n\t// color space\n\telse if (m = /^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\\s*\\(([^\\)]*)\\)/.exec(cstr)) {\n\t\tvar name = m[1]\n\t\tspace = name.replace(/a$/, '')\n\t\tvar dims = space === 'cmyk' ? 4 : space === 'gray' ? 1 : 3\n\t\tparts = m[2].trim().split(/\\s*[,\\/]\\s*|\\s+/)\n\n\t\t// color(srgb-linear x x x) -> srgb-linear(x x x)\n\t\tif (space === 'color') space = parts.shift()\n\n\t\tparts = parts.map(function (x, i) {\n\t\t\t//\n\t\t\tif (x[x.length - 1] === '%') {\n\t\t\t\tx = parseFloat(x) / 100\n\t\t\t\t// alpha -> 0..1\n\t\t\t\tif (i === 3) return x\n\t\t\t\t// rgb -> 0..255\n\t\t\t\tif (space === 'rgb') return x * 255\n\t\t\t\t// hsl, hwb H -> 0..100\n\t\t\t\tif (space[0] === 'h') return x * 100\n\t\t\t\t// lch, lab L -> 0..100\n\t\t\t\tif (space[0] === 'l' && !i) return x * 100\n\t\t\t\t// lab A B -> -125..125\n\t\t\t\tif (space === 'lab') return x * 125\n\t\t\t\t// lch C -> 0..150, H -> 0..360\n\t\t\t\tif (space === 'lch') return i < 2 ? x * 150 : x * 360\n\t\t\t\t// oklch/oklab L -> 0..1\n\t\t\t\tif (space[0] === 'o' && !i) return x\n\t\t\t\t// oklab A B -> -0.4..0.4\n\t\t\t\tif (space === 'oklab') return x * 0.4\n\t\t\t\t// oklch C -> 0..0.4, H -> 0..360\n\t\t\t\tif (space === 'oklch') return i < 2 ? x * 0.4 : x * 360\n\t\t\t\t// color(xxx) -> 0..1\n\t\t\t\treturn x\n\t\t\t}\n\n\t\t\t//hue\n\t\t\tif (space[i] === 'h' || (i === 2 && space[space.length - 1] === 'h')) {\n\t\t\t\t//\n\t\t\t\tif (baseHues[x] !== undefined) return baseHues[x]\n\t\t\t\t//\n\t\t\t\tif (x.endsWith('deg')) return parseFloat(x)\n\t\t\t\t//\n\t\t\t\tif (x.endsWith('turn')) return parseFloat(x) * 360\n\t\t\t\tif (x.endsWith('grad')) return parseFloat(x) * 360 / 400\n\t\t\t\tif (x.endsWith('rad')) return parseFloat(x) * 180 / Math.PI\n\t\t\t}\n\t\t\tif (x === 'none') return 0\n\t\t\treturn parseFloat(x)\n\t\t});\n\n\t\talpha = parts.length > dims ? parts.pop() : 1\n\t}\n\n\t//named channels case\n\telse if (/[0-9](?:\\s|\\/|,)/.test(cstr)) {\n\t\tparts = cstr.match(/([0-9]+)/g).map(function (value) {\n\t\t\treturn parseFloat(value)\n\t\t})\n\n\t\tspace = cstr.match(/([a-z])/ig)?.join('')?.toLowerCase() || 'rgb'\n\t}\n\n\treturn {\n\t\tspace,\n\t\tvalues: parts,\n\t\talpha\n\t}\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-parse/index.js?"); /***/ }), /***/ "./node_modules/color-parse/node_modules/color-name/index.js": /*!*******************************************************************!*\ !*** ./node_modules/color-parse/node_modules/color-name/index.js ***! \*******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\taliceblue: [240, 248, 255],\n\tantiquewhite: [250, 235, 215],\n\taqua: [0, 255, 255],\n\taquamarine: [127, 255, 212],\n\tazure: [240, 255, 255],\n\tbeige: [245, 245, 220],\n\tbisque: [255, 228, 196],\n\tblack: [0, 0, 0],\n\tblanchedalmond: [255, 235, 205],\n\tblue: [0, 0, 255],\n\tblueviolet: [138, 43, 226],\n\tbrown: [165, 42, 42],\n\tburlywood: [222, 184, 135],\n\tcadetblue: [95, 158, 160],\n\tchartreuse: [127, 255, 0],\n\tchocolate: [210, 105, 30],\n\tcoral: [255, 127, 80],\n\tcornflowerblue: [100, 149, 237],\n\tcornsilk: [255, 248, 220],\n\tcrimson: [220, 20, 60],\n\tcyan: [0, 255, 255],\n\tdarkblue: [0, 0, 139],\n\tdarkcyan: [0, 139, 139],\n\tdarkgoldenrod: [184, 134, 11],\n\tdarkgray: [169, 169, 169],\n\tdarkgreen: [0, 100, 0],\n\tdarkgrey: [169, 169, 169],\n\tdarkkhaki: [189, 183, 107],\n\tdarkmagenta: [139, 0, 139],\n\tdarkolivegreen: [85, 107, 47],\n\tdarkorange: [255, 140, 0],\n\tdarkorchid: [153, 50, 204],\n\tdarkred: [139, 0, 0],\n\tdarksalmon: [233, 150, 122],\n\tdarkseagreen: [143, 188, 143],\n\tdarkslateblue: [72, 61, 139],\n\tdarkslategray: [47, 79, 79],\n\tdarkslategrey: [47, 79, 79],\n\tdarkturquoise: [0, 206, 209],\n\tdarkviolet: [148, 0, 211],\n\tdeeppink: [255, 20, 147],\n\tdeepskyblue: [0, 191, 255],\n\tdimgray: [105, 105, 105],\n\tdimgrey: [105, 105, 105],\n\tdodgerblue: [30, 144, 255],\n\tfirebrick: [178, 34, 34],\n\tfloralwhite: [255, 250, 240],\n\tforestgreen: [34, 139, 34],\n\tfuchsia: [255, 0, 255],\n\tgainsboro: [220, 220, 220],\n\tghostwhite: [248, 248, 255],\n\tgold: [255, 215, 0],\n\tgoldenrod: [218, 165, 32],\n\tgray: [128, 128, 128],\n\tgreen: [0, 128, 0],\n\tgreenyellow: [173, 255, 47],\n\tgrey: [128, 128, 128],\n\thoneydew: [240, 255, 240],\n\thotpink: [255, 105, 180],\n\tindianred: [205, 92, 92],\n\tindigo: [75, 0, 130],\n\tivory: [255, 255, 240],\n\tkhaki: [240, 230, 140],\n\tlavender: [230, 230, 250],\n\tlavenderblush: [255, 240, 245],\n\tlawngreen: [124, 252, 0],\n\tlemonchiffon: [255, 250, 205],\n\tlightblue: [173, 216, 230],\n\tlightcoral: [240, 128, 128],\n\tlightcyan: [224, 255, 255],\n\tlightgoldenrodyellow: [250, 250, 210],\n\tlightgray: [211, 211, 211],\n\tlightgreen: [144, 238, 144],\n\tlightgrey: [211, 211, 211],\n\tlightpink: [255, 182, 193],\n\tlightsalmon: [255, 160, 122],\n\tlightseagreen: [32, 178, 170],\n\tlightskyblue: [135, 206, 250],\n\tlightslategray: [119, 136, 153],\n\tlightslategrey: [119, 136, 153],\n\tlightsteelblue: [176, 196, 222],\n\tlightyellow: [255, 255, 224],\n\tlime: [0, 255, 0],\n\tlimegreen: [50, 205, 50],\n\tlinen: [250, 240, 230],\n\tmagenta: [255, 0, 255],\n\tmaroon: [128, 0, 0],\n\tmediumaquamarine: [102, 205, 170],\n\tmediumblue: [0, 0, 205],\n\tmediumorchid: [186, 85, 211],\n\tmediumpurple: [147, 112, 219],\n\tmediumseagreen: [60, 179, 113],\n\tmediumslateblue: [123, 104, 238],\n\tmediumspringgreen: [0, 250, 154],\n\tmediumturquoise: [72, 209, 204],\n\tmediumvioletred: [199, 21, 133],\n\tmidnightblue: [25, 25, 112],\n\tmintcream: [245, 255, 250],\n\tmistyrose: [255, 228, 225],\n\tmoccasin: [255, 228, 181],\n\tnavajowhite: [255, 222, 173],\n\tnavy: [0, 0, 128],\n\toldlace: [253, 245, 230],\n\tolive: [128, 128, 0],\n\tolivedrab: [107, 142, 35],\n\torange: [255, 165, 0],\n\torangered: [255, 69, 0],\n\torchid: [218, 112, 214],\n\tpalegoldenrod: [238, 232, 170],\n\tpalegreen: [152, 251, 152],\n\tpaleturquoise: [175, 238, 238],\n\tpalevioletred: [219, 112, 147],\n\tpapayawhip: [255, 239, 213],\n\tpeachpuff: [255, 218, 185],\n\tperu: [205, 133, 63],\n\tpink: [255, 192, 203],\n\tplum: [221, 160, 221],\n\tpowderblue: [176, 224, 230],\n\tpurple: [128, 0, 128],\n\trebeccapurple: [102, 51, 153],\n\tred: [255, 0, 0],\n\trosybrown: [188, 143, 143],\n\troyalblue: [65, 105, 225],\n\tsaddlebrown: [139, 69, 19],\n\tsalmon: [250, 128, 114],\n\tsandybrown: [244, 164, 96],\n\tseagreen: [46, 139, 87],\n\tseashell: [255, 245, 238],\n\tsienna: [160, 82, 45],\n\tsilver: [192, 192, 192],\n\tskyblue: [135, 206, 235],\n\tslateblue: [106, 90, 205],\n\tslategray: [112, 128, 144],\n\tslategrey: [112, 128, 144],\n\tsnow: [255, 250, 250],\n\tspringgreen: [0, 255, 127],\n\tsteelblue: [70, 130, 180],\n\ttan: [210, 180, 140],\n\tteal: [0, 128, 128],\n\tthistle: [216, 191, 216],\n\ttomato: [255, 99, 71],\n\tturquoise: [64, 224, 208],\n\tviolet: [238, 130, 238],\n\twheat: [245, 222, 179],\n\twhite: [255, 255, 255],\n\twhitesmoke: [245, 245, 245],\n\tyellow: [255, 255, 0],\n\tyellowgreen: [154, 205, 50]\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-parse/node_modules/color-name/index.js?"); /***/ }), /***/ "./node_modules/color-rgba/index.js": /*!******************************************!*\ !*** ./node_modules/color-rgba/index.js ***! \******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ rgba)\n/* harmony export */ });\n/* harmony import */ var color_parse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! color-parse */ \"./node_modules/color-parse/index.js\");\n/* harmony import */ var color_space_rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! color-space/rgb.js */ \"./node_modules/color-space/rgb.js\");\n/* harmony import */ var color_space_hsl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! color-space/hsl.js */ \"./node_modules/color-space/hsl.js\");\n/** @module color-rgba */\n\n\n\n\nfunction rgba(color) {\n\t// template literals\n\tif (Array.isArray(color) && color.raw) color = String.raw(...arguments)\n\tif (color instanceof Number) color = +color\n\n\tvar values, i, l\n\n\t//attempt to parse non-array arguments\n\tvar parsed = (0,color_parse__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(color)\n\n\tif (!parsed.space) return []\n\n\tconst min = parsed.space[0] === 'h' ? color_space_hsl_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].min : color_space_rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].min\n\tconst max = parsed.space[0] === 'h' ? color_space_hsl_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].max : color_space_rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].max\n\n\tvalues = Array(3)\n\tvalues[0] = Math.min(Math.max(parsed.values[0], min[0]), max[0])\n\tvalues[1] = Math.min(Math.max(parsed.values[1], min[1]), max[1])\n\tvalues[2] = Math.min(Math.max(parsed.values[2], min[2]), max[2])\n\n\tif (parsed.space[0] === 'h') {\n\t\tvalues = color_space_hsl_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].rgb(values)\n\t}\n\n\tvalues.push(Math.min(Math.max(parsed.alpha, 0), 1))\n\n\treturn values\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-rgba/index.js?"); /***/ }), /***/ "./node_modules/color-space/hsl.js": /*!*****************************************!*\ !*** ./node_modules/color-space/hsl.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/color-space/rgb.js\");\n/**\n * @module color-space/hsl\n */\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\tname: 'hsl',\n\tmin: [0,0,0],\n\tmax: [360,100,100],\n\tchannel: ['hue', 'saturation', 'lightness'],\n\talias: ['HSL'],\n\n\trgb: function(hsl) {\n\t\tvar h = hsl[0]/360, s = hsl[1]/100, l = hsl[2]/100, t1, t2, t3, rgb, val, i=0;\n\n\t\tif (s === 0) return val = l * 255, [val, val, val];\n\n\t\tt2 = l < 0.5 ? l * (1 + s) : l + s - l * s;\n\t\tt1 = 2 * l - t2;\n\n\t\trgb = [0, 0, 0];\n\t\tfor (;i<3;) {\n\t\t\tt3 = h + 1 / 3 * - (i - 1);\n\t\t\tt3 < 0 ? t3++ : t3 > 1 && t3--;\n\t\t\tval = 6 * t3 < 1 ? t1 + (t2 - t1) * 6 * t3 :\n\t\t\t2 * t3 < 1 ? t2 :\n\t\t\t3 * t3 < 2 ? t1 + (t2 - t1) * (2 / 3 - t3) * 6 :\n\t\t\tt1;\n\t\t\trgb[i++] = val * 255;\n\t\t}\n\n\t\treturn rgb;\n\t}\n});\n\n\n//extend rgb\n_rgb_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hsl = function(rgb) {\n\tvar r = rgb[0]/255,\n\t\t\tg = rgb[1]/255,\n\t\t\tb = rgb[2]/255,\n\t\t\tmin = Math.min(r, g, b),\n\t\t\tmax = Math.max(r, g, b),\n\t\t\tdelta = max - min,\n\t\t\th, s, l;\n\n\tif (max === min) {\n\t\th = 0;\n\t}\n\telse if (r === max) {\n\t\th = (g - b) / delta;\n\t}\n\telse if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t}\n\telse if (b === max) {\n\t\th = 4 + (r - g)/ delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t}\n\telse if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t}\n\telse {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-space/hsl.js?"); /***/ }), /***/ "./node_modules/color-space/lchuv.js": /*!*******************************************!*\ !*** ./node_modules/color-space/lchuv.js ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _luv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./luv.js */ \"./node_modules/color-space/luv.js\");\n/* harmony import */ var _xyz_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xyz.js */ \"./node_modules/color-space/xyz.js\");\n/**\n * Cylindrical CIE LUV\n *\n * @module color-space/lchuv\n */\n\n\n\n//cylindrical luv\nvar lchuv = {\n\tname: 'lchuv',\n\tchannel: ['lightness', 'chroma', 'hue'],\n\talias: ['LCHuv', 'cielchuv'],\n\tmin: [0,0,0],\n\tmax: [100,100,360],\n\n\tluv: function(luv){\n\t\tvar l = luv[0],\n\t\tc = luv[1],\n\t\th = luv[2],\n\t\tu, v, hr;\n\n\t\thr = h / 360 * 2 * Math.PI;\n\t\tu = c * Math.cos(hr);\n\t\tv = c * Math.sin(hr);\n\t\treturn [l, u, v];\n\t},\n\n\txyz: function(arg) {\n\t\treturn _luv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].xyz(lchuv.luv(arg));\n\t}\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lchuv);\n\n_luv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lchuv = function(luv){\n\tvar l = luv[0], u = luv[1], v = luv[2];\n\n\tvar c = Math.sqrt(u*u + v*v);\n\tvar hr = Math.atan2(v,u);\n\tvar h = hr * 360 / 2 / Math.PI;\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\treturn [l,c,h]\n};\n\n_xyz_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].lchuv = function(arg){\n return _luv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lchuv(_xyz_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].luv(arg));\n};\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-space/lchuv.js?"); /***/ }), /***/ "./node_modules/color-space/luv.js": /*!*****************************************!*\ !*** ./node_modules/color-space/luv.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _xyz_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./xyz.js */ \"./node_modules/color-space/xyz.js\");\n/**\n * CIE LUV (C'est la vie)\n *\n * @module color-space/luv\n */\n \n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\tname: 'luv',\n\t//NOTE: luv has no rigidly defined limits\n\t//easyrgb fails to get proper coords\n\t//boronine states no rigid limits\n\t//colorMine refers this ones:\n\tmin: [0,-134,-140],\n\tmax: [100,224,122],\n\tchannel: ['lightness', 'u', 'v'],\n\talias: ['LUV', 'cieluv', 'cie1976'],\n\n\txyz: function(arg, i, o){\n\t\tvar _u, _v, l, u, v, x, y, z, xn, yn, zn, un, vn;\n\t\tl = arg[0], u = arg[1], v = arg[2];\n\n\t\tif (l === 0) return [0,0,0];\n\n\t\t//get constants\n\t\t//var e = 0.008856451679035631; //(6/29)^3\n\t\tvar k = 0.0011070564598794539; //(3/29)^3\n\n\t\t//get illuminant/observer\n\t\ti = i || 'D65';\n\t\to = o || 2;\n\n\t\txn = _xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].whitepoint[o][i][0];\n\t\tyn = _xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].whitepoint[o][i][1];\n\t\tzn = _xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].whitepoint[o][i][2];\n\n\t\tun = (4 * xn) / (xn + (15 * yn) + (3 * zn));\n\t\tvn = (9 * yn) / (xn + (15 * yn) + (3 * zn));\n\t\t// un = 0.19783000664283;\n\t\t// vn = 0.46831999493879;\n\n\n\t\t_u = u / (13 * l) + un || 0;\n\t\t_v = v / (13 * l) + vn || 0;\n\n\t\ty = l > 8 ? yn * Math.pow( (l + 16) / 116 , 3) : yn * l * k;\n\n\t\t//wikipedia method\n\t\tx = y * 9 * _u / (4 * _v) || 0;\n\t\tz = y * (12 - 3 * _u - 20 * _v) / (4 * _v) || 0;\n\n\t\t//boronine method\n\t\t//https://github.com/boronine/husl/blob/master/husl.coffee#L201\n\t\t// x = 0 - (9 * y * _u) / ((_u - 4) * _v - _u * _v);\n\t\t// z = (9 * y - (15 * _v * y) - (_v * x)) / (3 * _v);\n\n\t\treturn [x, y, z];\n\t}\n});\n\n// http://www.brucelindbloom.com/index.html?Equations.html\n// https://github.com/boronine/husl/blob/master/husl.coffee\n//i - illuminant\n//o - observer\n_xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].luv = function(arg, i, o) {\n\tvar _u, _v, l, u, v, x, y, z, xn, yn, zn, un, vn;\n\n\t//get constants\n\tvar e = 0.008856451679035631; //(6/29)^3\n\tvar k = 903.2962962962961; //(29/3)^3\n\n\t//get illuminant/observer coords\n\ti = i || 'D65';\n\to = o || 2;\n\n\txn = _xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].whitepoint[o][i][0];\n\tyn = _xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].whitepoint[o][i][1];\n\tzn = _xyz_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].whitepoint[o][i][2];\n\n\tun = (4 * xn) / (xn + (15 * yn) + (3 * zn));\n\tvn = (9 * yn) / (xn + (15 * yn) + (3 * zn));\n\n\n\tx = arg[0], y = arg[1], z = arg[2];\n\n\n\t_u = (4 * x) / (x + (15 * y) + (3 * z)) || 0;\n\t_v = (9 * y) / (x + (15 * y) + (3 * z)) || 0;\n\n\tvar yr = y/yn;\n\n\tl = yr <= e ? k * yr : 116 * Math.pow(yr, 1/3) - 16;\n\n\tu = 13 * l * (_u - un);\n\tv = 13 * l * (_v - vn);\n\n\treturn [l, u, v];\n};\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-space/luv.js?"); /***/ }), /***/ "./node_modules/color-space/rgb.js": /*!*****************************************!*\ !*** ./node_modules/color-space/rgb.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * RGB space.\n *\n * @module color-space/rgb\n */\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\tname: 'rgb',\n\tmin: [0,0,0],\n\tmax: [255,255,255],\n\tchannel: ['red', 'green', 'blue'],\n\talias: ['RGB']\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-space/rgb.js?"); /***/ }), /***/ "./node_modules/color-space/xyz.js": /*!*****************************************!*\ !*** ./node_modules/color-space/xyz.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/color-space/rgb.js\");\n/**\n * CIE XYZ\n *\n * @module color-space/xyz\n */\n\n\nvar xyz = {\n\tname: 'xyz',\n\tmin: [0,0,0],\n\tchannel: ['X','Y','Z'],\n\talias: ['XYZ', 'ciexyz', 'cie1931']\n};\n\n\n/**\n * Whitepoint reference values with observer/illuminant\n *\n * http://en.wikipedia.org/wiki/Standard_illuminant\n */\nxyz.whitepoint = {\n\t//1931 2°\n\t2: {\n\t\t//incadescent\n\t\tA:[109.85, 100, 35.585],\n\t\t// B:[],\n\t\tC: [98.074, 100, 118.232],\n\t\tD50: [96.422, 100, 82.521],\n\t\tD55: [95.682, 100, 92.149],\n\t\t//daylight\n\t\tD65: [95.045592705167, 100, 108.9057750759878],\n\t\tD75: [94.972, 100, 122.638],\n\t\t//flourescent\n\t\t// F1: [],\n\t\tF2: [99.187, 100, 67.395],\n\t\t// F3: [],\n\t\t// F4: [],\n\t\t// F5: [],\n\t\t// F6:[],\n\t\tF7: [95.044, 100, 108.755],\n\t\t// F8: [],\n\t\t// F9: [],\n\t\t// F10: [],\n\t\tF11: [100.966, 100, 64.370],\n\t\t// F12: [],\n\t\tE: [100,100,100]\n\t},\n\n\t//1964 10°\n\t10: {\n\t\t//incadescent\n\t\tA:[111.144, 100, 35.200],\n\t\tC: [97.285, 100, 116.145],\n\t\tD50: [96.720, 100, 81.427],\n\t\tD55: [95.799, 100, 90.926],\n\t\t//daylight\n\t\tD65: [94.811, 100, 107.304],\n\t\tD75: [94.416, 100, 120.641],\n\t\t//flourescent\n\t\tF2: [103.280, 100, 69.026],\n\t\tF7: [95.792, 100, 107.687],\n\t\tF11: [103.866, 100, 65.627],\n\t\tE: [100,100,100]\n\t}\n};\n\n\n/**\n * Top values are the whitepoint’s top values, default are D65\n */\nxyz.max = xyz.whitepoint[2].D65;\n\n\n/**\n * Transform xyz to rgb\n *\n * @param {Array} xyz Array of xyz values\n *\n * @return {Array} RGB values\n */\nxyz.rgb = function (_xyz, white) {\n\t//FIXME: make sure we have to divide like this. Probably we have to replace matrix as well then\n\twhite = white || xyz.whitepoint[2].E;\n\n\tvar x = _xyz[0] / white[0],\n\t\ty = _xyz[1] / white[1],\n\t\tz = _xyz[2] / white[2],\n\t\tr, g, b;\n\n\t// assume sRGB\n\t// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n\tr = (x * 3.240969941904521) + (y * -1.537383177570093) + (z * -0.498610760293);\n\tg = (x * -0.96924363628087) + (y * 1.87596750150772) + (z * 0.041555057407175);\n\tb = (x * 0.055630079696993) + (y * -0.20397695888897) + (z * 1.056971514242878);\n\n\tr = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r = (r * 12.92);\n\n\tg = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g = (g * 12.92);\n\n\tb = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b = (b * 12.92);\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n}\n\n\n\n/**\n * RGB to XYZ\n *\n * @param {Array} rgb RGB channels\n *\n * @return {Array} XYZ channels\n */\n_rgb_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].xyz = function(rgb, white) {\n\tvar r = rgb[0] / 255,\n\t\t\tg = rgb[1] / 255,\n\t\t\tb = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.41239079926595) + (g * 0.35758433938387) + (b * 0.18048078840183);\n\tvar y = (r * 0.21263900587151) + (g * 0.71516867876775) + (b * 0.072192315360733);\n\tvar z = (r * 0.019330818715591) + (g * 0.11919477979462) + (b * 0.95053215224966);\n\n\twhite = white || xyz.whitepoint[2].E;\n\n\treturn [x * white[0], y * white[1], z * white[2]];\n};\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (xyz);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/color-space/xyz.js?"); /***/ }), /***/ "./node_modules/earcut/src/earcut.js": /*!*******************************************!*\ !*** ./node_modules/earcut/src/earcut.js ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ earcut),\n/* harmony export */ deviation: () => (/* binding */ deviation),\n/* harmony export */ flatten: () => (/* binding */ flatten)\n/* harmony export */ });\n\nfunction earcut(data, holeIndices, dim = 2) {\n\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n let outerNode = linkedList(data, 0, outerLen, dim, true);\n const triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n let minX, minY, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = Infinity;\n minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = dim; i < outerLen; i += dim) {\n const x = data[i];\n const y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n let last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (let i = start; i < end; i += dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);\n } else {\n for (let i = end - dim; i >= start; i -= dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n let p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n let stop = ear;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n const prev = ear.prev;\n const next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n triangles.push(prev.i, ear.i, next.i); // cut off the triangle\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n const a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox\n const x0 = Math.min(ax, bx, cx),\n y0 = Math.min(ay, by, cy),\n x1 = Math.max(ax, bx, cx),\n y1 = Math.max(ay, by, cy);\n\n let p = c.next;\n while (p !== a) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n const a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n // triangle bbox\n const x0 = Math.min(ax, bx, cx),\n y0 = Math.min(ay, by, cy),\n x1 = Math.max(ax, bx, cx),\n y1 = Math.max(ay, by, cy);\n\n // z-order range for the current triangle bbox;\n const minZ = zOrder(x0, y0, minX, minY, invSize),\n maxZ = zOrder(x1, y1, minX, minY, invSize);\n\n let p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles) {\n let p = start;\n do {\n const a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i, p.i, b.i);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n let a = start;\n do {\n let b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n let c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize, 0);\n earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n const queue = [];\n\n for (let i = 0, len = holeIndices.length; i < len; i++) {\n const start = holeIndices[i] * dim;\n const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n const list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareXYSlope);\n\n // process holes from left to right\n for (let i = 0; i < queue.length; i++) {\n outerNode = eliminateHole(queue[i], outerNode);\n }\n\n return outerNode;\n}\n\nfunction compareXYSlope(a, b) {\n let result = a.x - b.x;\n // when the left-most point of 2 holes meet at a vertex, sort the holes counterclockwise so that when we find\n // the bridge to the outer shell is always the point that they meet at.\n if (result === 0) {\n result = a.y - b.y;\n if (result === 0) {\n const aSlope = (a.next.y - a.y) / (a.next.x - a.x);\n const bSlope = (b.next.y - b.y) / (b.next.x - b.x);\n result = aSlope - bSlope;\n }\n }\n return result;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n const bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n const bridgeReverse = splitPolygon(bridge, hole);\n\n // filter collinear points around the cuts\n filterPoints(bridgeReverse, bridgeReverse.next);\n return filterPoints(bridge, bridge.next);\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n let p = outerNode;\n const hx = hole.x;\n const hy = hole.y;\n let qx = -Infinity;\n let m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n // unless they intersect at a vertex, then choose the vertex\n if (equals(hole, p)) return p;\n do {\n if (equals(hole, p.next)) return p.next;\n else if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n const stop = m;\n const mx = m.x;\n const my = m.y;\n let tanMin = Infinity;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n const tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n let p = start;\n do {\n if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n let numMerges;\n let inSize = 1;\n\n do {\n let p = list;\n let e;\n list = null;\n let tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n let q = p;\n let pSize = 0;\n for (let i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n let qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n let p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&\n (ax - px) * (by - py) >= (bx - px) * (ay - py) &&\n (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n\n// check if a point lies within a convex triangle but false if its equal to the first point of the triangle\nfunction pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {\n return !(ax === px && ay === py) && pointInTriangle(ax, ay, bx, by, cx, cy, px, py);\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n const o1 = sign(area(p1, q1, p2));\n const o2 = sign(area(p1, q1, q2));\n const o3 = sign(area(p2, q2, p1));\n const o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n let p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n let p = a;\n let inside = false;\n const px = (a.x + b.x) / 2;\n const py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n const a2 = createNode(a.i, a.x, a.y),\n b2 = createNode(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n const p = createNode(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction createNode(i, x, y) {\n return {\n i, // vertex index in coordinates array\n x, y, // vertex coordinates\n prev: null, // previous and next vertex nodes in a polygon ring\n next: null,\n z: 0, // z-order curve value\n prevZ: null, // previous and next nodes in z-order\n nextZ: null,\n steiner: false // indicates whether this is a steiner point\n };\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nfunction deviation(data, holeIndices, dim, triangles) {\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n let polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (let i = 0, len = holeIndices.length; i < len; i++) {\n const start = holeIndices[i] * dim;\n const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n let trianglesArea = 0;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = triangles[i] * dim;\n const b = triangles[i + 1] * dim;\n const c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n}\n\nfunction signedArea(data, start, end, dim) {\n let sum = 0;\n for (let i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nfunction flatten(data) {\n const vertices = [];\n const holes = [];\n const dimensions = data[0][0].length;\n let holeIndex = 0;\n let prevLen = 0;\n\n for (const ring of data) {\n for (const p of ring) {\n for (let d = 0; d < dimensions; d++) vertices.push(p[d]);\n }\n if (prevLen) {\n holeIndex += prevLen;\n holes.push(holeIndex);\n }\n prevLen = ring.length;\n }\n return {vertices, holes, dimensions};\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/earcut/src/earcut.js?"); /***/ }), /***/ "./node_modules/ol/Collection.js": /*!***************************************!*\ !*** ./node_modules/ol/Collection.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CollectionEvent: () => (/* binding */ CollectionEvent),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CollectionEventType.js */ \"./node_modules/ol/CollectionEventType.js\");\n/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n/**\n * @module ol/Collection\n */\n\n\n\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LENGTH: 'length',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n * @template T\n */\nclass CollectionEvent extends _events_Event_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"./CollectionEventType.js\").default} type Type.\n * @param {T} element Element.\n * @param {number} index The index of the added or removed element.\n */\n constructor(type, element, index) {\n super(type);\n\n /**\n * The element that is added to or removed from the collection.\n * @type {T}\n * @api\n */\n this.element = element;\n\n /**\n * The index of the added or removed element.\n * @type {number}\n * @api\n */\n this.index = index;\n }\n}\n\n/***\n * @template T\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature<'add'|'remove', CollectionEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature} CollectionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nclass Collection extends _Object_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Array} [array] Array.\n * @param {Options} [options] Collection options.\n */\n constructor(array, options) {\n super();\n\n /***\n * @type {CollectionOnSignature}\n */\n this.on;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.once;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.un;\n\n options = options || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.unique_ = !!options.unique;\n\n /**\n * @private\n * @type {!Array}\n */\n this.array_ = array ? array : [];\n\n if (this.unique_) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n this.assertUnique_(this.array_[i], i);\n }\n }\n\n this.updateLength_();\n }\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n clear() {\n while (this.getLength() > 0) {\n this.pop();\n }\n }\n\n /**\n * Add elements to the collection. This pushes each item in the provided array\n * to the end of the collection.\n * @param {!Array} arr Array.\n * @return {Collection} This collection.\n * @api\n */\n extend(arr) {\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n }\n\n /**\n * Iterate over each element, calling the provided callback.\n * @param {function(T, number, Array): *} f The function to call\n * for every element. This function takes 3 arguments (the element, the\n * index and the array). The return value is ignored.\n * @api\n */\n forEach(f) {\n const array = this.array_;\n for (let i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\n }\n\n /**\n * Get a reference to the underlying Array object. Warning: if the array\n * is mutated, no events will be dispatched by the collection, and the\n * collection's \"length\" property won't be in sync with the actual length\n * of the array.\n * @return {!Array} Array.\n * @api\n */\n getArray() {\n return this.array_;\n }\n\n /**\n * Get the element at the provided index.\n * @param {number} index Index.\n * @return {T} Element.\n * @api\n */\n item(index) {\n return this.array_[index];\n }\n\n /**\n * Get the length of this collection.\n * @return {number} The length of the array.\n * @observable\n * @api\n */\n getLength() {\n return this.get(Property.LENGTH);\n }\n\n /**\n * Insert an element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n insertAt(index, elem) {\n if (index < 0 || index > this.getLength()) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ADD, elem, index),\n );\n }\n\n /**\n * Remove the last element of the collection and return it.\n * Return `undefined` if the collection is empty.\n * @return {T|undefined} Element.\n * @api\n */\n pop() {\n return this.removeAt(this.getLength() - 1);\n }\n\n /**\n * Insert the provided element at the end of the collection.\n * @param {T} elem Element.\n * @return {number} New length of the collection.\n * @api\n */\n push(elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n const n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n }\n\n /**\n * Remove the first occurrence of an element from the collection.\n * @param {T} elem Element.\n * @return {T|undefined} The removed element or undefined if none found.\n * @api\n */\n remove(elem) {\n const arr = this.array_;\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n if (arr[i] === elem) {\n return this.removeAt(i);\n }\n }\n return undefined;\n }\n\n /**\n * Remove the element at the provided index and return it.\n * Return `undefined` if the collection does not contain this index.\n * @param {number} index Index.\n * @return {T|undefined} Value.\n * @api\n */\n removeAt(index) {\n if (index < 0 || index >= this.getLength()) {\n return undefined;\n }\n const prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].REMOVE, prev, index)\n ),\n );\n return prev;\n }\n\n /**\n * Set the element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n setAt(index, elem) {\n const n = this.getLength();\n if (index >= n) {\n this.insertAt(index, elem);\n return;\n }\n if (index < 0) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n const prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].REMOVE, prev, index)\n ),\n );\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ADD, elem, index)\n ),\n );\n }\n\n /**\n * @private\n */\n updateLength_() {\n this.set(Property.LENGTH, this.array_.length);\n }\n\n /**\n * @private\n * @param {T} elem Element.\n * @param {number} [except] Optional index to ignore.\n */\n assertUnique_(elem, except) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== except) {\n throw new Error('Duplicate item added to a unique collection');\n }\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Collection);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Collection.js?"); /***/ }), /***/ "./node_modules/ol/CollectionEventType.js": /*!************************************************!*\ !*** ./node_modules/ol/CollectionEventType.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/CollectionEventType\n */\n\n/**\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n /**\n * Triggered when an item is added to the collection.\n * @event module:ol/Collection.CollectionEvent#add\n * @api\n */\n ADD: 'add',\n /**\n * Triggered when an item is removed from the collection.\n * @event module:ol/Collection.CollectionEvent#remove\n * @api\n */\n REMOVE: 'remove',\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/CollectionEventType.js?"); /***/ }), /***/ "./node_modules/ol/DataTile.js": /*!*************************************!*\ !*** ./node_modules/ol/DataTile.js ***! \*************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ asArrayLike: () => (/* binding */ asArrayLike),\n/* harmony export */ asImageLike: () => (/* binding */ asImageLike),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ disposedError: () => (/* binding */ disposedError),\n/* harmony export */ toArray: () => (/* binding */ toArray)\n/* harmony export */ });\n/* harmony import */ var _Tile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Tile.js */ \"./node_modules/ol/Tile.js\");\n/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n/**\n * @module ol/DataTile\n */\n\n\n\n\n/**\n * @typedef {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|ImageBitmap} ImageLike\n */\n\n/**\n * @typedef {Uint8Array|Uint8ClampedArray|Float32Array|DataView} ArrayLike\n */\n\n/**\n * Data that can be used with a DataTile.\n * @typedef {ArrayLike|ImageLike} Data\n */\n\n/**\n * @param {Data} data Tile data.\n * @return {ImageLike|null} The image-like data.\n */\nfunction asImageLike(data) {\n return data instanceof Image ||\n data instanceof HTMLCanvasElement ||\n data instanceof HTMLVideoElement ||\n data instanceof ImageBitmap\n ? data\n : null;\n}\n\n/**\n * @param {Data} data Tile data.\n * @return {ArrayLike|null} The array-like data.\n */\nfunction asArrayLike(data) {\n return data instanceof Uint8Array ||\n data instanceof Uint8ClampedArray ||\n data instanceof Float32Array ||\n data instanceof DataView\n ? data\n : null;\n}\n\n/**\n * This is set as the cancellation reason when a tile is disposed.\n */\nconst disposedError = new Error('disposed');\n\n/**\n * @type {CanvasRenderingContext2D|null}\n */\nlet sharedContext = null;\n\n/**\n * @param {ImageLike} image The image.\n * @return {Uint8ClampedArray} The data.\n */\nfunction toArray(image) {\n if (!sharedContext) {\n sharedContext = (0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.createCanvasContext2D)(\n image.width,\n image.height,\n undefined,\n {willReadFrequently: true},\n );\n }\n const canvas = sharedContext.canvas;\n const width = image.width;\n if (canvas.width !== width) {\n canvas.width = width;\n }\n const height = image.height;\n if (canvas.height !== height) {\n canvas.height = height;\n }\n sharedContext.clearRect(0, 0, width, height);\n sharedContext.drawImage(image, 0, 0);\n return sharedContext.getImageData(0, 0, width, height).data;\n}\n\n/**\n * @type {import('./size.js').Size}\n */\nconst defaultSize = [256, 256];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @property {function(): Promise} loader Data loader. For loaders that generate images,\n * the promise should not resolve until the image is loaded.\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @property {import('./size.js').Size} [size=[256, 256]] Tile size.\n * @property {AbortController} [controller] An abort controller.\n * @api\n */\n\nclass DataTile extends _Tile_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Options} options Tile options.\n */\n constructor(options) {\n const state = _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].IDLE;\n\n super(options.tileCoord, state, {\n transition: options.transition,\n interpolate: options.interpolate,\n });\n\n /**\n * @type {function(): Promise}\n * @private\n */\n this.loader_ = options.loader;\n\n /**\n * @type {Data}\n * @private\n */\n this.data_ = null;\n\n /**\n * @type {Error}\n * @private\n */\n this.error_ = null;\n\n /**\n * @type {import('./size.js').Size|null}\n * @private\n */\n this.size_ = options.size || null;\n\n /**\n * @type {AbortController|null}\n * @private\n */\n this.controller_ = options.controller || null;\n }\n\n /**\n * Get the tile size.\n * @return {import('./size.js').Size} Tile size.\n */\n getSize() {\n if (this.size_) {\n return this.size_;\n }\n const imageData = asImageLike(this.data_);\n if (imageData) {\n return [imageData.width, imageData.height];\n }\n return defaultSize;\n }\n\n /**\n * Get the data for the tile.\n * @return {Data} Tile data.\n * @api\n */\n getData() {\n return this.data_;\n }\n\n /**\n * Get any loading error.\n * @return {Error} Loading error.\n * @api\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Load the tile data.\n * @api\n * @override\n */\n load() {\n if (this.state !== _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].IDLE && this.state !== _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR) {\n return;\n }\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LOADING;\n this.changed();\n\n const self = this;\n this.loader_()\n .then(function (data) {\n self.data_ = data;\n self.state = _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LOADED;\n self.changed();\n })\n .catch(function (error) {\n self.error_ = error;\n self.state = _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR;\n self.changed();\n });\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n if (this.controller_) {\n this.controller_.abort(disposedError);\n this.controller_ = null;\n }\n super.disposeInternal();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DataTile);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/DataTile.js?"); /***/ }), /***/ "./node_modules/ol/Disposable.js": /*!***************************************!*\ !*** ./node_modules/ol/Disposable.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n constructor() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n\n /**\n * Clean up.\n */\n dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n }\n\n /**\n * Extension point for disposable objects.\n * @protected\n */\n disposeInternal() {}\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Disposable);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Disposable.js?"); /***/ }), /***/ "./node_modules/ol/Feature.js": /*!************************************!*\ !*** ./node_modules/ol/Feature.js ***! \************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createStyleFunction: () => (/* binding */ createStyleFunction),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n/**\n * @module ol/Feature\n */\n\n\n\n\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} FeatureOnSignature\n */\n\n/***\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @typedef {Object & { geometry?: Geometry }} ObjectWithGeometry\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature. For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const feature = new Feature({\n * geometry: new Polygon(polyCoords),\n * labelPoint: new Point(labelCoords),\n * name: 'My Polygon',\n * });\n *\n * // get the polygon geometry\n * const poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n */\nclass Feature extends _Object_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Geometry|ObjectWithGeometry} [geometryOrProperties]\n * You may pass a Geometry object directly, or an object literal containing\n * properties. If you pass an object literal, you may include a Geometry\n * associated with a `geometry` key.\n */\n constructor(geometryOrProperties) {\n super();\n\n /***\n * @type {FeatureOnSignature}\n */\n this.on;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.once;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = undefined;\n\n /**\n * @type {string}\n * @private\n */\n this.geometryName_ = 'geometry';\n\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n this.style_ = null;\n\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction_ = undefined;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.geometryChangeKey_ = null;\n\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n if (geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {Object} */\n const properties = geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\n\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature} The clone.\n * @api\n */\n clone() {\n const clone = /** @type {Feature} */ (\n new Feature(this.hasProperties() ? this.getProperties() : null)\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(/** @type {Geometry} */ (geometry.clone()));\n }\n const style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n }\n\n /**\n * Get the feature's default geometry. A feature may have any number of named\n * geometries. The \"default\" geometry (the one that is rendered by default) is\n * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n * @return {Geometry|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n getGeometry() {\n return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is either set when reading data from a remote source or set explicitly by\n * calling {@link module:ol/Feature~Feature#setId}.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * Get the name of the feature's default geometry. By default, the default\n * geometry is named `geometry`.\n * @return {string} Get the property name associated with the default geometry\n * for this feature.\n * @api\n */\n getGeometryName() {\n return this.geometryName_;\n }\n\n /**\n * Get the feature's style. Will return what was provided to the\n * {@link module:ol/Feature~Feature#setStyle} method.\n * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the feature's style function.\n * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n * representing the current style of this feature.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @private\n */\n handleGeometryChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleGeometryChanged_() {\n if (this.geometryChangeKey_) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n const geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(\n geometry,\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CHANGE,\n this.handleGeometryChange_,\n this,\n );\n }\n this.changed();\n }\n\n /**\n * Set the default geometry for the feature. This will update the property\n * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n * @param {Geometry|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n setGeometry(geometry) {\n this.set(this.geometryName_, geometry);\n }\n\n /**\n * Set the style for the feature to override the layer style. This can be a\n * single style object, an array of styles, or a function that takes a\n * resolution and returns an array of styles. To unset the feature style, call\n * `setStyle()` without arguments or a falsey value.\n * @param {import(\"./style/Style.js\").StyleLike} [style] Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n this.changed();\n }\n\n /**\n * Set the feature id. The feature id is considered stable and may be used when\n * requesting features or comparing identifiers returned from a remote source.\n * The feature id can be used with the\n * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n * @param {number|string|undefined} id The feature id.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setId(id) {\n this.id_ = id;\n this.changed();\n }\n\n /**\n * Set the property name to be used when getting the feature's default geometry.\n * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n * this name will be returned.\n * @param {string} name The property name of the default geometry.\n * @api\n */\n setGeometryName(name) {\n this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.handleGeometryChanged_();\n }\n}\n\n/**\n * Convert the provided object into a feature style function. Functions passed\n * through unchanged. Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array|!import(\"./style/Style.js\").default} obj\n * A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nfunction createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n }\n /**\n * @type {Array}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(\n typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n 'Expected an `ol/style/Style` or an array of `ol/style/Style.js`',\n );\n const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function () {\n return styles;\n };\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Feature);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Feature.js?"); /***/ }), /***/ "./node_modules/ol/Image.js": /*!**********************************!*\ !*** ./node_modules/ol/Image.js ***! \**********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ decodeFallback: () => (/* binding */ decodeFallback),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ listenImage: () => (/* binding */ listenImage),\n/* harmony export */ load: () => (/* binding */ load)\n/* harmony export */ });\n/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _ImageState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ImageState.js */ \"./node_modules/ol/ImageState.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./functions.js */ \"./node_modules/ol/functions.js\");\n/**\n * @module ol/Image\n */\n\n\n\n\n\n\n\n/**\n * A function that takes an {@link module:ol/Image~ImageWrapper} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~ImageWrapper#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n * function(image, src) {\n * image.getImage().src = src;\n * }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(import(\"./Image.js\").default, string): void} LoadFunction\n * @api\n */\n\n/**\n * @typedef {Object} ImageObject\n * @property {import(\"./extent.js\").Extent} [extent] Extent, if different from the requested one.\n * @property {import(\"./resolution.js\").ResolutionLike} [resolution] Resolution, if different from the requested one.\n * When x and y resolution are different, use the array type (`[xResolution, yResolution]`).\n * @property {number} [pixelRatio] Pixel ratio, if different from the requested one.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * For images that cover any extent and resolution (static images), the loader function should not accept\n * any arguments. The function returns an {@link import(\"./DataTile.js\").ImageLike image}, an\n * {@link import(\"./Image.js\").ImageObject image object}, or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * If the returned image does not match the extent, resolution or pixel ratio passed to the loader,\n * it has to return an {@link import(\"./Image.js\").ImageObject image object} with the `image` and the\n * correct `extent`, `resolution` and `pixelRatio`.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise} Loader\n * @api\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * The function returns a promise for an {@link import(\"./Image.js\").ImageObject image object}.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise} ImageObjectPromiseLoader\n */\n\nclass ImageWrapper extends _events_Target_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|Array|undefined} resolution Resolution. If provided as array, x and y\n * resolution will be assumed.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./ImageState.js\").default|import(\"./Image.js\").Loader} stateOrLoader State.\n */\n constructor(extent, resolution, pixelRatio, stateOrLoader) {\n super();\n\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = extent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @protected\n * @type {number|Array|undefined}\n */\n this.resolution = resolution;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state =\n typeof stateOrLoader === 'function' ? _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].IDLE : stateOrLoader;\n\n /**\n * @private\n * @type {import('./DataTile.js').ImageLike|null}\n */\n this.image_ = null;\n\n /**\n * @protected\n * @type {import(\"./Image.js\").Loader}\n */\n this.loader = typeof stateOrLoader === 'function' ? stateOrLoader : null;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CHANGE);\n }\n\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n getExtent() {\n return this.extent;\n }\n\n /**\n * @return {import('./DataTile.js').ImageLike} Image.\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * @return {number} PixelRatio.\n */\n getPixelRatio() {\n return this.pixelRatio_;\n }\n\n /**\n * @return {number|Array} Resolution.\n */\n getResolution() {\n return /** @type {number} */ (this.resolution);\n }\n\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].IDLE) {\n if (this.loader) {\n this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADING;\n this.changed();\n const resolution = this.getResolution();\n const requestResolution = Array.isArray(resolution)\n ? resolution[0]\n : resolution;\n (0,_functions_js__WEBPACK_IMPORTED_MODULE_3__.toPromise)(() =>\n this.loader(\n this.getExtent(),\n requestResolution,\n this.getPixelRatio(),\n ),\n )\n .then((image) => {\n if ('image' in image) {\n this.image_ = image.image;\n }\n if ('extent' in image) {\n this.extent = image.extent;\n }\n if ('resolution' in image) {\n this.resolution = image.resolution;\n }\n if ('pixelRatio' in image) {\n this.pixelRatio_ = image.pixelRatio;\n }\n if (\n image instanceof HTMLImageElement ||\n image instanceof ImageBitmap ||\n image instanceof HTMLCanvasElement ||\n image instanceof HTMLVideoElement\n ) {\n this.image_ = image;\n }\n this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADED;\n })\n .catch((error) => {\n this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERROR;\n console.error(error); // eslint-disable-line no-console\n })\n .finally(() => this.changed());\n }\n }\n }\n\n /**\n * @param {import('./DataTile.js').ImageLike} image The image.\n */\n setImage(image) {\n this.image_ = image;\n }\n\n /**\n * @param {number|Array} resolution Resolution.\n */\n setResolution(resolution) {\n this.resolution = resolution;\n }\n}\n\n/**\n * @param {import('./DataTile.js').ImageLike} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nfunction listenImage(image, loadHandler, errorHandler) {\n const img = /** @type {HTMLImageElement} */ (image);\n let listening = true;\n let decoding = false;\n let loaded = false;\n\n const listenerKeys = [\n (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listenOnce)(img, _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LOAD, function () {\n loaded = true;\n if (!decoding) {\n loadHandler();\n }\n }),\n ];\n\n if (img.src && _has_js__WEBPACK_IMPORTED_MODULE_5__.IMAGE_DECODE) {\n decoding = true;\n img\n .decode()\n .then(function () {\n if (listening) {\n loadHandler();\n }\n })\n .catch(function (error) {\n if (listening) {\n if (loaded) {\n loadHandler();\n } else {\n errorHandler();\n }\n }\n });\n } else {\n listenerKeys.push((0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listenOnce)(img, _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR, errorHandler));\n }\n\n return function unlisten() {\n listening = false;\n listenerKeys.forEach(_events_js__WEBPACK_IMPORTED_MODULE_4__.unlistenByKey);\n };\n}\n\n/**\n * Loads an image.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise} Promise resolving to an `HTMLImageElement`.\n * @api\n */\nfunction load(image, src) {\n return new Promise((resolve, reject) => {\n function handleLoad() {\n unlisten();\n resolve(image);\n }\n function handleError() {\n unlisten();\n reject(new Error('Image load error'));\n }\n function unlisten() {\n image.removeEventListener('load', handleLoad);\n image.removeEventListener('error', handleError);\n }\n image.addEventListener('load', handleLoad);\n image.addEventListener('error', handleError);\n if (src) {\n image.src = src;\n }\n });\n}\n\n/**\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise} Promise resolving to an `HTMLImageElement`.\n */\nfunction decodeFallback(image, src) {\n if (src) {\n image.src = src;\n }\n return image.src && _has_js__WEBPACK_IMPORTED_MODULE_5__.IMAGE_DECODE\n ? new Promise((resolve, reject) =>\n image\n .decode()\n .then(() => resolve(image))\n .catch((e) =>\n image.complete && image.width ? resolve(image) : reject(e),\n ),\n )\n : load(image);\n}\n\n/**\n * Loads an image and decodes it to an `ImageBitmap` if `createImageBitmap()` is supported. Returns\n * the loaded image otherwise.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise} Promise resolving to an `ImageBitmap` or an\n * `HTMLImageElement` if `createImageBitmap()` is not supported.\n * @api\n */\nfunction decode(image, src) {\n if (src) {\n image.src = src;\n }\n return image.src && _has_js__WEBPACK_IMPORTED_MODULE_5__.IMAGE_DECODE && _has_js__WEBPACK_IMPORTED_MODULE_5__.CREATE_IMAGE_BITMAP\n ? image\n .decode()\n .then(() => createImageBitmap(image))\n .catch((e) => {\n if (image.complete && image.width) {\n return image;\n }\n throw e;\n })\n : decodeFallback(image);\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ImageWrapper);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Image.js?"); /***/ }), /***/ "./node_modules/ol/ImageCanvas.js": /*!****************************************!*\ !*** ./node_modules/ol/ImageCanvas.js ***! \****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ImageState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ImageState.js */ \"./node_modules/ol/ImageState.js\");\n/* harmony import */ var _Image_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Image.js */ \"./node_modules/ol/Image.js\");\n/**\n * @module ol/ImageCanvas\n */\n\n\n\n/**\n * A function that is called to trigger asynchronous canvas drawing. It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\n\nclass ImageCanvas extends _Image_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Loader} [loader] Optional loader function to\n * support asynchronous canvas drawing.\n */\n constructor(extent, resolution, pixelRatio, canvas, loader) {\n const state = loader !== undefined ? _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].IDLE : _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADED;\n\n super(extent, resolution, pixelRatio, state);\n\n /**\n * Optional canvas loader function.\n * @type {?Loader}\n * @private\n */\n this.loader_ = loader !== undefined ? loader : null;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = canvas;\n\n /**\n * @private\n * @type {?Error}\n */\n this.error_ = null;\n }\n\n /**\n * Get any error associated with asynchronous rendering.\n * @return {?Error} Any error that occurred during rendering.\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Handle async drawing complete.\n * @param {Error} [err] Any error during drawing.\n * @private\n */\n handleLoad_(err) {\n if (err) {\n this.error_ = err;\n this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERROR;\n } else {\n this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n * @override\n */\n load() {\n if (this.state == _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].IDLE) {\n this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADING;\n this.changed();\n this.loader_(this.handleLoad_.bind(this));\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas element.\n * @override\n */\n getImage() {\n return this.canvas_;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ImageCanvas);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/ImageCanvas.js?"); /***/ }), /***/ "./node_modules/ol/ImageState.js": /*!***************************************!*\ !*** ./node_modules/ol/ImageState.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n ERROR: 3,\n EMPTY: 4,\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/ImageState.js?"); /***/ }), /***/ "./node_modules/ol/ImageTile.js": /*!**************************************!*\ !*** ./node_modules/ol/ImageTile.js ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Tile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tile.js */ \"./node_modules/ol/Tile.js\");\n/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n/* harmony import */ var _Image_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Image.js */ \"./node_modules/ol/Image.js\");\n/**\n * @module ol/ImageTile\n */\n\n\n\n\n\nclass ImageTile extends _Tile_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [options] Tile options.\n */\n constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n this.key = src;\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.image_ = new Image();\n if (crossOrigin !== null) {\n this.image_.crossOrigin = crossOrigin;\n }\n\n /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n }\n\n /**\n * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n */\n setImage(element) {\n this.image_ = element;\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADED;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADED;\n } else {\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n *\n * To retry loading tiles on failed requests, use a custom `tileLoadFunction`\n * that checks for error status codes and reloads only when the status code is\n * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been\n * made already:\n *\n * ```js\n * const retryCodes = [408, 429, 500, 502, 503, 504];\n * const retries = {};\n * source.setTileLoadFunction((tile, src) => {\n * const image = tile.getImage();\n * fetch(src)\n * .then((response) => {\n * if (retryCodes.includes(response.status)) {\n * retries[src] = (retries[src] || 0) + 1;\n * if (retries[src] <= 3) {\n * setTimeout(() => tile.load(), retries[src] * 1000);\n * }\n * return Promise.reject();\n * }\n * return response.blob();\n * })\n * .then((blob) => {\n * const imageUrl = URL.createObjectURL(blob);\n * image.src = imageUrl;\n * setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);\n * })\n * .catch(() => tile.setState(3)); // error\n * });\n * ```\n * @api\n * @override\n */\n load() {\n if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERROR) {\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].IDLE) {\n this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = (0,_Image_js__WEBPACK_IMPORTED_MODULE_2__.listenImage)(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this),\n );\n }\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n\n /**\n * @override\n */\n disposeInternal() {\n this.unlistenImage_();\n this.image_ = null;\n super.disposeInternal();\n }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n const ctx = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.createCanvasContext2D)(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ImageTile);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/ImageTile.js?"); /***/ }), /***/ "./node_modules/ol/Kinetic.js": /*!************************************!*\ !*** ./node_modules/ol/Kinetic.js ***! \************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nclass Kinetic {\n /**\n * @param {number} decay Rate of decay (must be negative).\n * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n * @param {number} delay Delay to consider to calculate the kinetic\n * initial values (milliseconds).\n */\n constructor(decay, minVelocity, delay) {\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n\n /**\n * @private\n * @type {Array}\n */\n this.points_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n begin() {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n */\n update(x, y) {\n this.points_.push(x, y, Date.now());\n }\n\n /**\n * @return {boolean} Whether we should do kinetic animation.\n */\n end() {\n if (this.points_.length < 6) {\n // at least 2 points are required (i.e. there must be at least 6 elements\n // in the array)\n return false;\n }\n const delay = Date.now() - this.delay_;\n const lastIndex = this.points_.length - 3;\n if (this.points_[lastIndex + 2] < delay) {\n // the last tracked point is too old, which means that the user stopped\n // panning before releasing the map\n return false;\n }\n\n // get the first point which still falls into the delay time\n let firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n\n const duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n // we don't want a duration of 0 (divide by zero)\n // we also make sure the user panned for a duration of at least one frame\n // (1/60s) to compute sane displacement values\n if (duration < 1000 / 60) {\n return false;\n }\n\n const dx = this.points_[lastIndex] - this.points_[firstIndex];\n const dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n this.angle_ = Math.atan2(dy, dx);\n this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n return this.initialVelocity_ > this.minVelocity_;\n }\n\n /**\n * @return {number} Total distance travelled (pixels).\n */\n getDistance() {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n }\n\n /**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\n getAngle() {\n return this.angle_;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Kinetic);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Kinetic.js?"); /***/ }), /***/ "./node_modules/ol/Map.js": /*!********************************!*\ !*** ./node_modules/ol/Map.js ***! \********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Collection.js */ \"./node_modules/ol/Collection.js\");\n/* harmony import */ var _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CollectionEventType.js */ \"./node_modules/ol/CollectionEventType.js\");\n/* harmony import */ var _renderer_Composite_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./renderer/Composite.js */ \"./node_modules/ol/renderer/Composite.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _layer_Layer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layer/Layer.js */ \"./node_modules/ol/layer/Layer.js\");\n/* harmony import */ var _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layer/Group.js */ \"./node_modules/ol/layer/Group.js\");\n/* harmony import */ var _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./MapBrowserEvent.js */ \"./node_modules/ol/MapBrowserEvent.js\");\n/* harmony import */ var _MapBrowserEventHandler_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./MapBrowserEventHandler.js */ \"./node_modules/ol/MapBrowserEventHandler.js\");\n/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n/* harmony import */ var _MapEvent_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MapEvent.js */ \"./node_modules/ol/MapEvent.js\");\n/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n/* harmony import */ var _MapProperty_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MapProperty.js */ \"./node_modules/ol/MapProperty.js\");\n/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./ObjectEventType.js */ \"./node_modules/ol/ObjectEventType.js\");\n/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n/* harmony import */ var _render_EventType_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./render/EventType.js */ \"./node_modules/ol/render/EventType.js\");\n/* harmony import */ var _TileQueue_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TileQueue.js */ \"./node_modules/ol/TileQueue.js\");\n/* harmony import */ var _View_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./View.js */ \"./node_modules/ol/View.js\");\n/* harmony import */ var _ViewHint_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ViewHint.js */ \"./node_modules/ol/ViewHint.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/ol/transform.js\");\n/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _control_defaults_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./control/defaults.js */ \"./node_modules/ol/control/defaults.js\");\n/* harmony import */ var _interaction_defaults_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./interaction/defaults.js */ \"./node_modules/ol/interaction/defaults.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./size.js */ \"./node_modules/ol/size.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _console_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./console.js */ \"./node_modules/ol/console.js\");\n/**\n * @module ol/Map\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate Animate.\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform CoordinateToPixelTransform.\n * @property {Object>|null} declutter\n * Declutter trees by declutter group.\n * When null, no decluttering is needed because no layers have decluttering enabled.\n * @property {null|import(\"./extent.js\").Extent} extent Extent (in view projection coordinates).\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object>} usedTiles UsedTiles.\n * @property {Array} viewHints ViewHints.\n * @property {!Object>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object} renderTargets Identifiers of previously rendered elements.\n */\n\n/**\n * @typedef {function(Map, FrameState): any} PostRenderFunction\n */\n\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in css pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for wrapped geometries inside the range of\n * +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection} [controls] Controls.\n * @property {Collection} [interactions] Interactions.\n * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection} overlays Overlays.\n * @property {Object} values Values.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} MapEventHandler\n */\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection|Array} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control/defaults.defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection|Array} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction/defaults.defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array|Collection|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection|Array} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered. If passed by element, the container can be in a secondary document.\n * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n * properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n * `tabindex` atribute must be set on the custom element's host element.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise} [view] The map's view. No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n */\nfunction removeLayerMapProperty(layer) {\n if (layer instanceof _layer_Layer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n layer.setMapInternal(null);\n return;\n }\n if (layer instanceof _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n layer.getLayers().forEach(removeLayerMapProperty);\n }\n}\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @param {Map} map Map.\n */\nfunction setLayerMapProperty(layer, map) {\n if (layer instanceof _layer_Layer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n layer.setMapInternal(map);\n return;\n }\n if (layer instanceof _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n const layers = layer.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n setLayerMapProperty(layers[i], map);\n }\n }\n}\n\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n * import Map from 'ol/Map.js';\n * import View from 'ol/View.js';\n * import TileLayer from 'ol/layer/Tile.js';\n * import OSM from 'ol/source/OSM.js';\n *\n * const map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1,\n * }),\n * layers: [\n * new TileLayer({\n * source: new OSM(),\n * }),\n * ],\n * target: 'map',\n * });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile~TileLayer} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~LayerGroup}\n * is a subclass of {@link module:ol/layer/Base~BaseLayer}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nclass Map extends _Object_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"] {\n /**\n * @param {MapOptions} [options] Map options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /***\n * @type {MapEventHandler}\n */\n this.on;\n\n /***\n * @type {MapEventHandler}\n */\n this.once;\n\n /***\n * @type {MapEventHandler}\n */\n this.un;\n\n const optionsInternal = createOptionsInternal(options);\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderComplete_ = false;\n\n /**\n * @private\n * @type {boolean}\n */\n this.loaded_ = true;\n\n /** @private */\n this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ =\n options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ =\n options.pixelRatio !== undefined\n ? options.pixelRatio\n : _has_js__WEBPACK_IMPORTED_MODULE_4__.DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {ReturnType}\n */\n this.postRenderTimeoutHandle_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = this.animationDelay_.bind(this);\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.coordinateToPixelTransform_ = (0,_transform_js__WEBPACK_IMPORTED_MODULE_5__.create)();\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.pixelToCoordinateTransform_ = (0,_transform_js__WEBPACK_IMPORTED_MODULE_5__.create)();\n\n /**\n * @private\n * @type {number}\n */\n this.frameIndex_ = 0;\n\n /**\n * @private\n * @type {?FrameState}\n */\n this.frameState_ = null;\n\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n this.previousExtent_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewPropertyListenerKey_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewChangeListenerKey_ = null;\n\n /**\n * @private\n * @type {?Array}\n */\n this.layerGroupPropertyListenerKeys_ = null;\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.viewport_ = document.createElement('div');\n this.viewport_.className =\n 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n this.viewport_.style.position = 'relative';\n this.viewport_.style.overflow = 'hidden';\n this.viewport_.style.width = '100%';\n this.viewport_.style.height = '100%';\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainer_ = document.createElement('div');\n this.overlayContainer_.style.position = 'absolute';\n this.overlayContainer_.style.zIndex = '0';\n this.overlayContainer_.style.width = '100%';\n this.overlayContainer_.style.height = '100%';\n this.overlayContainer_.style.pointerEvents = 'none';\n this.overlayContainer_.className = 'ol-overlaycontainer';\n this.viewport_.appendChild(this.overlayContainer_);\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainerStopEvent_ = document.createElement('div');\n this.overlayContainerStopEvent_.style.position = 'absolute';\n this.overlayContainerStopEvent_.style.zIndex = '0';\n this.overlayContainerStopEvent_.style.width = '100%';\n this.overlayContainerStopEvent_.style.height = '100%';\n this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n this.viewport_.appendChild(this.overlayContainerStopEvent_);\n\n /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.moveTolerance_ = options.moveTolerance;\n\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n /**\n * @private\n * @type {?Array}\n */\n this.targetChangeHandlerKeys_ = null;\n\n /**\n * @private\n * @type {HTMLElement|null}\n */\n this.targetElement_ = null;\n\n /**\n * @private\n * @type {ResizeObserver}\n */\n this.resizeObserver_ = new ResizeObserver(() => this.updateSize());\n\n /**\n * @type {Collection}\n * @protected\n */\n this.controls = optionsInternal.controls || (0,_control_defaults_js__WEBPACK_IMPORTED_MODULE_6__.defaults)();\n\n /**\n * @type {Collection}\n * @protected\n */\n this.interactions =\n optionsInternal.interactions ||\n (0,_interaction_defaults_js__WEBPACK_IMPORTED_MODULE_7__.defaults)({\n onFocusOnly: true,\n });\n\n /**\n * @type {Collection}\n * @private\n */\n this.overlays_ = optionsInternal.overlays;\n\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object}\n */\n this.overlayIdIndex_ = {};\n\n /**\n * @type {import(\"./renderer/Map.js\").default|null}\n * @private\n */\n this.renderer_ = null;\n\n /**\n * @private\n * @type {!Array}\n */\n this.postRenderFunctions_ = [];\n\n /**\n * @private\n * @type {TileQueue}\n */\n this.tileQueue_ = new _TileQueue_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\n this.getTilePriority.bind(this),\n this.handleTileChange_.bind(this),\n );\n\n this.addChangeListener(\n _MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].LAYERGROUP,\n this.handleLayerGroupChanged_,\n );\n this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].VIEW, this.handleViewChanged_);\n this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].SIZE, this.handleSizeChanged_);\n this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].TARGET, this.handleTargetChanged_);\n\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n this.setProperties(optionsInternal.values);\n\n const map = this;\n if (options.view && !(options.view instanceof _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])) {\n options.view.then(function (viewOptions) {\n map.setView(new _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"](viewOptions));\n });\n }\n\n this.controls.addEventListener(\n _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"].ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent\n */\n (event) => {\n event.element.setMap(this);\n },\n );\n\n this.controls.addEventListener(\n _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"].REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n },\n );\n\n this.interactions.addEventListener(\n _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"].ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(this);\n },\n );\n\n this.interactions.addEventListener(\n _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"].REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n },\n );\n\n this.overlays_.addEventListener(\n _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"].ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n this.addOverlayInternal_(event.element);\n },\n );\n\n this.overlays_.addEventListener(\n _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"].REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n const id = event.element.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n },\n );\n\n this.controls.forEach(\n /**\n * @param {import(\"./control/Control.js\").default} control Control.\n */\n (control) => {\n control.setMap(this);\n },\n );\n\n this.interactions.forEach(\n /**\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n */\n (interaction) => {\n interaction.setMap(this);\n },\n );\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n }\n\n /**\n * Add the given control to the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @api\n */\n addControl(control) {\n this.getControls().push(control);\n }\n\n /**\n * Add the given interaction to the map. If you want to add an interaction\n * at another point of the collection use `getInteractions()` and the methods\n * available on {@link module:ol/Collection~Collection}. This can be used to\n * stop the event propagation from the handleEvent function. The interactions\n * get to handle the events in the reverse order of this collection.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n * @api\n */\n addInteraction(interaction) {\n this.getInteractions().push(interaction);\n }\n\n /**\n * Adds the given layer to the top of this map. If you want to add a layer\n * elsewhere in the stack, use `getLayers()` and the methods available on\n * {@link module:ol/Collection~Collection}.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @api\n */\n addLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer add event.\n * @private\n */\n handleLayerAdd_(event) {\n setLayerMapProperty(event.layer, this);\n }\n\n /**\n * Add the given overlay to the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @api\n */\n addOverlay(overlay) {\n this.getOverlays().push(overlay);\n }\n\n /**\n * This deals with map's overlay collection changes.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @private\n */\n addOverlayInternal_(overlay) {\n const id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n }\n\n /**\n *\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.controls.clear();\n this.interactions.clear();\n this.overlays_.clear();\n this.resizeObserver_.disconnect();\n this.setTarget(null);\n super.disposeInternal();\n }\n\n /**\n * Detect features that intersect a pixel on the viewport, and execute a\n * callback with each intersecting feature. Layers included in the detection can\n * be configured through the `layerFilter` option in `options`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default, import(\"./geom/SimpleGeometry.js\").default): T} callback Feature callback. The callback will be\n * called with two arguments. The first argument is one\n * {@link module:ol/Feature~Feature feature} or\n * {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is\n * the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. To stop detection, callback functions can return a\n * truthy value.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template T\n * @api\n */\n forEachFeatureAtPixel(pixel, callback, options) {\n if (!this.frameState_ || !this.renderer_) {\n return;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : _functions_js__WEBPACK_IMPORTED_MODULE_12__.TRUE;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n callback,\n null,\n layerFilter,\n null,\n );\n }\n\n /**\n * Get all features that intersect a pixel on the viewport.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {Array} The detected features or\n * an empty array if none were found.\n * @api\n */\n getFeaturesAtPixel(pixel, options) {\n const features = [];\n this.forEachFeatureAtPixel(\n pixel,\n function (feature) {\n features.push(feature);\n },\n options,\n );\n return features;\n }\n\n /**\n * Get all layers from all layer groups.\n * @return {Array} Layers.\n * @api\n */\n getAllLayers() {\n const layers = [];\n function addLayersFrom(layerGroup) {\n layerGroup.forEach(function (layer) {\n if (layer instanceof _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n addLayersFrom(layer.getLayers());\n } else {\n layers.push(layer);\n }\n });\n }\n addLayersFrom(this.getLayers());\n return layers;\n }\n\n /**\n * Detect if features intersect a pixel on the viewport. Layers included in the\n * detection can be configured through the `layerFilter` option.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {boolean} Is there a feature at the given pixel?\n * @api\n */\n hasFeatureAtPixel(pixel, options) {\n if (!this.frameState_ || !this.renderer_) {\n return false;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : _functions_js__WEBPACK_IMPORTED_MODULE_12__.TRUE;\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n layerFilter,\n null,\n );\n }\n\n /**\n * Returns the coordinate in user projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n getEventCoordinate(event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n }\n\n /**\n * Returns the coordinate in view projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n */\n getEventCoordinateInternal(event) {\n return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n }\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {UIEvent|{clientX: number, clientY: number}} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n getEventPixel(event) {\n const viewport = this.viewport_;\n const viewportPosition = viewport.getBoundingClientRect();\n const viewportSize = this.getSize();\n const scaleX = viewportPosition.width / viewportSize[0];\n const scaleY = viewportPosition.height / viewportSize[1];\n const eventPosition =\n //FIXME Are we really calling this with a TouchEvent anywhere?\n 'changedTouches' in event\n ? /** @type {TouchEvent} */ (event).changedTouches[0]\n : /** @type {MouseEvent} */ (event);\n\n return [\n (eventPosition.clientX - viewportPosition.left) / scaleX,\n (eventPosition.clientY - viewportPosition.top) / scaleY,\n ];\n }\n\n /**\n * Get the target in which this map is rendered.\n * Note that this returns what is entered as an option or in setTarget:\n * if that was an element, it returns an element; if a string, it returns that.\n * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n * map is rendered in.\n * @observable\n * @api\n */\n getTarget() {\n return /** @type {HTMLElement|string|undefined} */ (\n this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].TARGET)\n );\n }\n\n /**\n * Get the DOM element into which this map is rendered. In contrast to\n * `getTarget` this method always return an `Element`, or `null` if the\n * map has no target.\n * @return {HTMLElement} The element that the map is rendered in.\n * @api\n */\n getTargetElement() {\n return this.targetElement_;\n }\n\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * user projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n * @api\n */\n getCoordinateFromPixel(pixel) {\n return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate)(\n this.getCoordinateFromPixelInternal(pixel),\n this.getView().getProjection(),\n );\n }\n\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * map view projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n */\n getCoordinateFromPixelInternal(pixel) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return (0,_transform_js__WEBPACK_IMPORTED_MODULE_5__.apply)(frameState.pixelToCoordinateTransform, pixel.slice());\n }\n\n /**\n * Get the map controls. Modifying this collection changes the controls\n * associated with the map.\n * @return {Collection} Controls.\n * @api\n */\n getControls() {\n return this.controls;\n }\n\n /**\n * Get the map overlays. Modifying this collection changes the overlays\n * associated with the map.\n * @return {Collection} Overlays.\n * @api\n */\n getOverlays() {\n return this.overlays_;\n }\n\n /**\n * Get an overlay by its identifier (the value returned by overlay.getId()).\n * Note that the index treats string and numeric identifiers as the same. So\n * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n * @param {string|number} id Overlay identifier.\n * @return {import(\"./Overlay.js\").default|null} Overlay.\n * @api\n */\n getOverlayById(id) {\n const overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n }\n\n /**\n * Get the map interactions. Modifying this collection changes the interactions\n * associated with the map.\n *\n * Interactions are used for e.g. pan, zoom and rotate.\n * @return {Collection} Interactions.\n * @api\n */\n getInteractions() {\n return this.interactions;\n }\n\n /**\n * Get the layergroup associated with this map.\n * @return {LayerGroup} A layer group containing the layers in this map.\n * @observable\n * @api\n */\n getLayerGroup() {\n return /** @type {LayerGroup} */ (this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].LAYERGROUP));\n }\n\n /**\n * Clear any existing layers and add layers to the map.\n * @param {Array|Collection} layers The layers to be added to the map.\n * @api\n */\n setLayers(layers) {\n const group = this.getLayerGroup();\n if (layers instanceof _Collection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]) {\n group.setLayers(layers);\n return;\n }\n\n const collection = group.getLayers();\n collection.clear();\n collection.extend(layers);\n }\n\n /**\n * Get the collection of layers associated with this map.\n * @return {!Collection} Layers.\n * @api\n */\n getLayers() {\n const layers = this.getLayerGroup().getLayers();\n return layers;\n }\n\n /**\n * @return {boolean} Layers have sources that are still loading.\n */\n getLoadingOrNotReady() {\n const layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const state = layerStatesArray[i];\n if (!state.visible) {\n continue;\n }\n const renderer = state.layer.getRenderer();\n if (renderer && !renderer.ready) {\n return true;\n }\n const source = state.layer.getSource();\n if (source && source.loading) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the user\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n * @api\n */\n getPixelFromCoordinate(coordinate) {\n const viewCoordinate = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(\n coordinate,\n this.getView().getProjection(),\n );\n return this.getPixelFromCoordinateInternal(viewCoordinate);\n }\n\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the map view\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n */\n getPixelFromCoordinateInternal(coordinate) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return (0,_transform_js__WEBPACK_IMPORTED_MODULE_5__.apply)(\n frameState.coordinateToPixelTransform,\n coordinate.slice(0, 2),\n );\n }\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default|null} Renderer\n */\n getRenderer() {\n return this.renderer_;\n }\n\n /**\n * Get the size of this map.\n * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n getSize() {\n return /** @type {import(\"./size.js\").Size|undefined} */ (\n this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].SIZE)\n );\n }\n\n /**\n * Get the view associated with this map. A view manages properties such as\n * center and resolution.\n * @return {View} The view that controls this map.\n * @observable\n * @api\n */\n getView() {\n return /** @type {View} */ (this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].VIEW));\n }\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n getViewport() {\n return this.viewport_;\n }\n\n /**\n * Get the element that serves as the container for overlays. Elements added to\n * this container will let mousedown and touchstart events through to the map,\n * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n * events.\n * @return {!HTMLElement} The map's overlay container.\n */\n getOverlayContainer() {\n return this.overlayContainer_;\n }\n\n /**\n * Get the element that serves as a container for overlays that don't allow\n * event propagation. Elements added to this container won't let mousedown and\n * touchstart events through to the map, so clicks and gestures on an overlay\n * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n * @return {!HTMLElement} The map's overlay container that stops events.\n */\n getOverlayContainerStopEvent() {\n return this.overlayContainerStopEvent_;\n }\n\n /**\n * @return {!Document} The document where the map is displayed.\n */\n getOwnerDocument() {\n const targetElement = this.getTargetElement();\n return targetElement ? targetElement.ownerDocument : document;\n }\n\n /**\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\n getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n return (0,_TileQueue_js__WEBPACK_IMPORTED_MODULE_8__.getTilePriority)(\n this.frameState_,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution,\n );\n }\n\n /**\n * @param {UIEvent} browserEvent Browser event.\n * @param {string} [type] Type.\n */\n handleBrowserEvent(browserEvent, type) {\n type = type || browserEvent.type;\n const mapBrowserEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"](type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n }\n\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n handleMapBrowserEvent(mapBrowserEvent) {\n if (!this.frameState_) {\n // With no view defined, we cannot translate pixels into geographical\n // coordinates so interactions cannot be used.\n return;\n }\n const originalEvent = /** @type {PointerEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const eventType = originalEvent.type;\n if (\n eventType === _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"].POINTERDOWN ||\n eventType === _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].WHEEL ||\n eventType === _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].KEYDOWN\n ) {\n const doc = this.getOwnerDocument();\n const rootNode = this.viewport_.getRootNode\n ? this.viewport_.getRootNode()\n : doc;\n const target = /** @type {Node} */ (originalEvent.target);\n\n const currentDoc =\n rootNode instanceof ShadowRoot\n ? rootNode.host === target\n ? rootNode.host.ownerDocument\n : rootNode\n : rootNode === doc\n ? doc.documentElement\n : rootNode;\n if (\n // Abort if the target is a child of the container for elements whose events are not meant\n // to be handled by map interactions.\n this.overlayContainerStopEvent_.contains(target) ||\n // Abort if the event target is a child of the container that is no longer in the page.\n // It's possible for the target to no longer be in the page if it has been removed in an\n // event listener, this might happen in a Control that recreates it's content based on\n // user interaction either manually or via a render in something like https://reactjs.org/\n !currentDoc.contains(target)\n ) {\n return;\n }\n }\n mapBrowserEvent.frameState = this.frameState_;\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n const interactionsArray = this.getInteractions().getArray().slice();\n for (let i = interactionsArray.length - 1; i >= 0; i--) {\n const interaction = interactionsArray[i];\n if (\n interaction.getMap() !== this ||\n !interaction.getActive() ||\n !this.getTargetElement()\n ) {\n continue;\n }\n const cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont || mapBrowserEvent.propagationStopped) {\n break;\n }\n }\n }\n }\n\n /**\n * @protected\n */\n handlePostRender() {\n const frameState = this.frameState_;\n\n // Manage the tile queue\n // Image loads are expensive and a limited resource, so try to use them\n // efficiently:\n // * When the view is static we allow a large number of parallel tile loads\n // to complete the frame as quickly as possible.\n // * When animating or interacting, image loads can cause janks, so we reduce\n // the maximum number of loads per frame and limit the number of parallel\n // tile loads to remain reactive to view changes and to reduce the chance of\n // loading tiles that will quickly disappear from view.\n const tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n let maxTotalLoading = this.maxTilesLoading_;\n let maxNewLoads = maxTotalLoading;\n if (frameState) {\n const hints = frameState.viewHints;\n if (hints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].ANIMATING] || hints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].INTERACTING]) {\n const lowOnFrameBudget = Date.now() - frameState.time > 8;\n maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n maxNewLoads = lowOnFrameBudget ? 0 : 2;\n }\n }\n if (tileQueue.getTilesLoading() < maxTotalLoading) {\n tileQueue.reprioritize(); // FIXME only call if view has changed\n tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n }\n }\n\n if (frameState && this.renderer_ && !frameState.animate) {\n if (this.renderComplete_) {\n if (this.hasListener(_render_EventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].RENDERCOMPLETE)) {\n this.renderer_.dispatchRenderEvent(\n _render_EventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].RENDERCOMPLETE,\n frameState,\n );\n }\n if (this.loaded_ === false) {\n this.loaded_ = true;\n this.dispatchEvent(\n new _MapEvent_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].LOADEND, this, frameState),\n );\n }\n } else if (this.loaded_ === true) {\n this.loaded_ = false;\n this.dispatchEvent(\n new _MapEvent_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].LOADSTART, this, frameState),\n );\n }\n }\n\n const postRenderFunctions = this.postRenderFunctions_;\n if (frameState) {\n for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n }\n postRenderFunctions.length = 0;\n }\n\n /**\n * @private\n */\n handleSizeChanged_() {\n if (this.getView() && !this.getView().getAnimating()) {\n this.getView().resolveConstraints(0);\n }\n\n this.render();\n }\n\n /**\n * @private\n */\n handleTargetChanged_() {\n if (this.mapBrowserEventHandler_) {\n for (let i = 0, ii = this.targetChangeHandlerKeys_.length; i < ii; ++i) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.unlistenByKey)(this.targetChangeHandlerKeys_[i]);\n }\n this.targetChangeHandlerKeys_ = null;\n this.viewport_.removeEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].CONTEXTMENU,\n this.boundHandleBrowserEvent_,\n );\n this.viewport_.removeEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].WHEEL,\n this.boundHandleBrowserEvent_,\n );\n this.mapBrowserEventHandler_.dispose();\n this.mapBrowserEventHandler_ = null;\n this.viewport_.remove();\n }\n\n if (this.targetElement_) {\n this.resizeObserver_.unobserve(this.targetElement_);\n const rootNode = this.targetElement_.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.unobserve(rootNode.host);\n }\n this.setSize(undefined);\n }\n\n // target may be undefined, null, a string or an Element.\n // If it's a string we convert it to an Element before proceeding.\n // If it's not now an Element we remove the viewport from the DOM.\n // If it's an Element we append the viewport element to it.\n\n const target = this.getTarget();\n const targetElement =\n typeof target === 'string' ? document.getElementById(target) : target;\n this.targetElement_ = targetElement;\n if (!targetElement) {\n if (this.renderer_) {\n clearTimeout(this.postRenderTimeoutHandle_);\n this.postRenderTimeoutHandle_ = undefined;\n this.postRenderFunctions_.length = 0;\n this.renderer_.dispose();\n this.renderer_ = null;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n if (!this.renderer_) {\n this.renderer_ = new _renderer_Composite_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"](this);\n }\n\n this.mapBrowserEventHandler_ = new _MapBrowserEventHandler_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"](\n this,\n this.moveTolerance_,\n );\n for (const key in _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]) {\n this.mapBrowserEventHandler_.addEventListener(\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"][key],\n this.handleMapBrowserEvent.bind(this),\n );\n }\n this.viewport_.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].CONTEXTMENU,\n this.boundHandleBrowserEvent_,\n false,\n );\n this.viewport_.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].WHEEL,\n this.boundHandleBrowserEvent_,\n _has_js__WEBPACK_IMPORTED_MODULE_4__.PASSIVE_EVENT_LISTENERS ? {passive: false} : false,\n );\n\n let keyboardEventTarget;\n if (!this.keyboardEventTarget_) {\n // check if map target is in shadowDOM, if yes use host element as target\n const targetRoot = targetElement.getRootNode();\n const targetCandidate =\n targetRoot instanceof ShadowRoot ? targetRoot.host : targetElement;\n keyboardEventTarget = targetCandidate;\n } else {\n keyboardEventTarget = this.keyboardEventTarget_;\n }\n\n this.targetChangeHandlerKeys_ = [\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(\n keyboardEventTarget,\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].KEYDOWN,\n this.handleBrowserEvent,\n this,\n ),\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(\n keyboardEventTarget,\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].KEYPRESS,\n this.handleBrowserEvent,\n this,\n ),\n ];\n const rootNode = targetElement.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.observe(rootNode.host);\n }\n this.resizeObserver_.observe(targetElement);\n }\n\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n }\n\n /**\n * @private\n */\n handleTileChange_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewPropertyChanged_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewChanged_() {\n if (this.viewPropertyListenerKey_) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.unlistenByKey)(this.viewPropertyListenerKey_);\n this.viewPropertyListenerKey_ = null;\n }\n if (this.viewChangeListenerKey_) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.unlistenByKey)(this.viewChangeListenerKey_);\n this.viewChangeListenerKey_ = null;\n }\n const view = this.getView();\n if (view) {\n this.updateViewportSize_(this.getSize());\n\n this.viewPropertyListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(\n view,\n _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"].PROPERTYCHANGE,\n this.handleViewPropertyChanged_,\n this,\n );\n this.viewChangeListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(\n view,\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].CHANGE,\n this.handleViewPropertyChanged_,\n this,\n );\n\n view.resolveConstraints(0);\n }\n this.render();\n }\n\n /**\n * @private\n */\n handleLayerGroupChanged_() {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_21__.unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n const layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.handleLayerAdd_(new _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__.GroupEvent('addlayer', layerGroup));\n this.layerGroupPropertyListenerKeys_ = [\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(layerGroup, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"].PROPERTYCHANGE, this.render, this),\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(layerGroup, _events_EventType_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].CHANGE, this.render, this),\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(layerGroup, 'addlayer', this.handleLayerAdd_, this),\n (0,_events_js__WEBPACK_IMPORTED_MODULE_21__.listen)(layerGroup, 'removelayer', this.handleLayerRemove_, this),\n ];\n }\n this.render();\n }\n\n /**\n * @return {boolean} Is rendered.\n */\n isRendered() {\n return !!this.frameState_;\n }\n\n /**\n * @private\n */\n animationDelay_() {\n this.animationDelayKey_ = undefined;\n this.renderFrame_(Date.now());\n }\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n renderSync() {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n }\n\n /**\n * Redraws all text after new fonts have loaded\n */\n redrawText() {\n const layerStates = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n const layer = layerStates[i].layer;\n if (layer.hasRenderer()) {\n layer.getRenderer().handleFontsChanged();\n }\n }\n }\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n render() {\n if (this.renderer_ && this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\n }\n\n /**\n * Remove the given control from the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n * if the control was not found).\n * @api\n */\n removeControl(control) {\n return this.getControls().remove(control);\n }\n\n /**\n * Remove the given interaction from the map.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n * undefined if the interaction was not found).\n * @api\n */\n removeInteraction(interaction) {\n return this.getInteractions().remove(interaction);\n }\n\n /**\n * Removes the given layer from the map.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n * layer was not found).\n * @api\n */\n removeLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer remove event.\n * @private\n */\n handleLayerRemove_(event) {\n removeLayerMapProperty(event.layer);\n }\n\n /**\n * Remove the given overlay from the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n * if the overlay was not found).\n * @api\n */\n removeOverlay(overlay) {\n return this.getOverlays().remove(overlay);\n }\n\n /**\n * @param {number} time Time.\n * @private\n */\n renderFrame_(time) {\n const size = this.getSize();\n const view = this.getView();\n const previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n let frameState = null;\n if (size !== undefined && (0,_size_js__WEBPACK_IMPORTED_MODULE_26__.hasArea)(size) && view && view.isDef()) {\n const viewHints = view.getHints(\n this.frameState_ ? this.frameState_.viewHints : undefined,\n );\n const viewState = view.getState();\n frameState = {\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n declutter: null,\n extent: (0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.getForViewAndSize)(\n viewState.center,\n viewState.resolution,\n viewState.rotation,\n size,\n ),\n index: this.frameIndex_++,\n layerIndex: 0,\n layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n pixelRatio: this.pixelRatio_,\n pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n postRenderFunctions: [],\n size: size,\n tileQueue: this.tileQueue_,\n time: time,\n usedTiles: {},\n viewState: viewState,\n viewHints: viewHints,\n wantedTiles: {},\n mapId: (0,_util_js__WEBPACK_IMPORTED_MODULE_28__.getUid)(this),\n renderTargets: {},\n };\n if (viewState.nextCenter && viewState.nextResolution) {\n const rotation = isNaN(viewState.nextRotation)\n ? viewState.rotation\n : viewState.nextRotation;\n\n frameState.nextExtent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.getForViewAndSize)(\n viewState.nextCenter,\n viewState.nextResolution,\n rotation,\n size,\n );\n }\n }\n\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(\n this.postRenderFunctions_,\n frameState.postRenderFunctions,\n );\n\n if (previousFrameState) {\n const moveStart =\n !this.previousExtent_ ||\n (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.isEmpty)(this.previousExtent_) &&\n !(0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.equals)(frameState.extent, this.previousExtent_));\n if (moveStart) {\n this.dispatchEvent(\n new _MapEvent_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].MOVESTART, this, previousFrameState),\n );\n this.previousExtent_ = (0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.createOrUpdateEmpty)(this.previousExtent_);\n }\n }\n\n const idle =\n this.previousExtent_ &&\n !frameState.viewHints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].ANIMATING] &&\n !frameState.viewHints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].INTERACTING] &&\n !(0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.equals)(frameState.extent, this.previousExtent_);\n\n if (idle) {\n this.dispatchEvent(\n new _MapEvent_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].MOVEEND, this, frameState),\n );\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_27__.clone)(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new _MapEvent_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].POSTRENDER, this, frameState));\n\n this.renderComplete_ =\n (this.hasListener(_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].LOADSTART) ||\n this.hasListener(_MapEventType_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"].LOADEND) ||\n this.hasListener(_render_EventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].RENDERCOMPLETE)) &&\n !this.tileQueue_.getTilesLoading() &&\n !this.tileQueue_.getCount() &&\n !this.getLoadingOrNotReady();\n\n if (!this.postRenderTimeoutHandle_) {\n this.postRenderTimeoutHandle_ = setTimeout(() => {\n this.postRenderTimeoutHandle_ = undefined;\n this.handlePostRender();\n }, 0);\n }\n }\n\n /**\n * Sets the layergroup of this map.\n * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n * @observable\n * @api\n */\n setLayerGroup(layerGroup) {\n const oldLayerGroup = this.getLayerGroup();\n if (oldLayerGroup) {\n this.handleLayerRemove_(new _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__.GroupEvent('removelayer', oldLayerGroup));\n }\n this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].LAYERGROUP, layerGroup);\n }\n\n /**\n * Set the size of this map.\n * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n setSize(size) {\n this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].SIZE, size);\n }\n\n /**\n * Set the target element to render this map into.\n * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n * properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n * `tabindex` atribute must be set on the custom element's host element.\n * @param {HTMLElement|string} [target] The Element or id of the Element\n * that the map is rendered in.\n * @observable\n * @api\n */\n setTarget(target) {\n this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].TARGET, target);\n }\n\n /**\n * Set the view for this map.\n * @param {View|Promise} view The view that controls this map.\n * It is also possible to pass a promise that resolves to options for constructing a view. This\n * alternative allows view properties to be resolved by sources or other components that load\n * view-related metadata.\n * @observable\n * @api\n */\n setView(view) {\n if (!view || view instanceof _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]) {\n this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].VIEW, view);\n return;\n }\n this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].VIEW, new _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]());\n\n const map = this;\n view.then(function (viewOptions) {\n map.setView(new _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"](viewOptions));\n });\n }\n\n /**\n * Force a recalculation of the map viewport size. This should be called when\n * third-party code changes the size of the map viewport.\n * @api\n */\n updateSize() {\n const targetElement = this.getTargetElement();\n\n let size = undefined;\n if (targetElement) {\n const computedStyle = getComputedStyle(targetElement);\n const width =\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']);\n const height =\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth']);\n if (!isNaN(width) && !isNaN(height)) {\n size = [Math.max(0, width), Math.max(0, height)];\n if (\n !(0,_size_js__WEBPACK_IMPORTED_MODULE_26__.hasArea)(size) &&\n !!(\n targetElement.offsetWidth ||\n targetElement.offsetHeight ||\n targetElement.getClientRects().length\n )\n ) {\n (0,_console_js__WEBPACK_IMPORTED_MODULE_29__.warn)(\n \"No map visible because the map container's width or height are 0.\",\n );\n }\n }\n }\n\n const oldSize = this.getSize();\n if (size && (!oldSize || !(0,_array_js__WEBPACK_IMPORTED_MODULE_30__.equals)(size, oldSize))) {\n this.setSize(size);\n this.updateViewportSize_(size);\n }\n }\n\n /**\n * Recomputes the viewport size and save it on the view object (if any)\n * @param {import(\"./size.js\").Size|undefined} size The size.\n * @private\n */\n updateViewportSize_(size) {\n const view = this.getView();\n if (view) {\n view.setViewportSize(size);\n }\n }\n}\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n /**\n * @type {HTMLElement|Document}\n */\n let keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget =\n typeof options.keyboardEventTarget === 'string'\n ? document.getElementById(options.keyboardEventTarget)\n : options.keyboardEventTarget;\n }\n\n /**\n * @type {Object}\n */\n const values = {};\n\n const layerGroup =\n options.layers &&\n typeof (/** @type {?} */ (options.layers).getLayers) === 'function'\n ? /** @type {LayerGroup} */ (options.layers)\n : new _layer_Group_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n layers:\n /** @type {Collection|Array} */ (\n options.layers\n ),\n });\n values[_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].LAYERGROUP] = layerGroup;\n\n values[_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].TARGET] = options.target;\n\n values[_MapProperty_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"].VIEW] =\n options.view instanceof _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"] ? options.view : new _View_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]();\n\n /** @type {Collection} */\n let controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new _Collection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"](options.controls.slice());\n } else {\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_31__.assert)(\n typeof (/** @type {?} */ (options.controls).getArray) === 'function',\n 'Expected `controls` to be an array or an `ol/Collection.js`',\n );\n controls = options.controls;\n }\n }\n\n /** @type {Collection} */\n let interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new _Collection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"](options.interactions.slice());\n } else {\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_31__.assert)(\n typeof (/** @type {?} */ (options.interactions).getArray) ===\n 'function',\n 'Expected `interactions` to be an array or an `ol/Collection.js`',\n );\n interactions = options.interactions;\n }\n }\n\n /** @type {Collection} */\n let overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new _Collection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"](options.overlays.slice());\n } else {\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_31__.assert)(\n typeof (/** @type {?} */ (options.overlays).getArray) === 'function',\n 'Expected `overlays` to be an array or an `ol/Collection.js`',\n );\n overlays = options.overlays;\n }\n } else {\n overlays = new _Collection_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]();\n }\n\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values,\n };\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Map);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Map.js?"); /***/ }), /***/ "./node_modules/ol/MapBrowserEvent.js": /*!********************************************!*\ !*** ./node_modules/ol/MapBrowserEvent.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _MapEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MapEvent.js */ \"./node_modules/ol/MapEvent.js\");\n/**\n * @module ol/MapBrowserEvent\n */\n\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nclass MapBrowserEvent extends _MapEvent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {EVENT} originalEvent Original event.\n * @param {boolean} [dragging] Is the map currently being dragged?\n * @param {import(\"./Map.js\").FrameState} [frameState] Frame state.\n * @param {Array} [activePointers] Active pointers.\n */\n constructor(type, map, originalEvent, dragging, frameState, activePointers) {\n super(type, map, frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {EVENT}\n * @api\n */\n this.originalEvent = originalEvent;\n\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {?import(\"./pixel.js\").Pixel}\n * @private\n */\n this.pixel_ = null;\n\n /**\n * The coordinate in the user projection corresponding to the original browser event.\n * @type {?import(\"./coordinate.js\").Coordinate}\n * @private\n */\n this.coordinate_ = null;\n\n /**\n * Indicates if the map is currently being dragged. Only set for\n * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n *\n * @type {boolean}\n * @api\n */\n this.dragging = dragging !== undefined ? dragging : false;\n\n /**\n * @type {Array|undefined}\n */\n this.activePointers = activePointers;\n }\n\n /**\n * The map pixel relative to the viewport corresponding to the original event.\n * @type {import(\"./pixel.js\").Pixel}\n * @api\n */\n get pixel() {\n if (!this.pixel_) {\n this.pixel_ = this.map.getEventPixel(this.originalEvent);\n }\n return this.pixel_;\n }\n set pixel(pixel) {\n this.pixel_ = pixel;\n }\n\n /**\n * The coordinate corresponding to the original browser event. This will be in the user\n * projection if one is set. Otherwise it will be in the view projection.\n * @type {import(\"./coordinate.js\").Coordinate}\n * @api\n */\n get coordinate() {\n if (!this.coordinate_) {\n this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n }\n return this.coordinate_;\n }\n set coordinate(coordinate) {\n this.coordinate_ = coordinate;\n }\n\n /**\n * Prevents the default browser action.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n * @api\n * @override\n */\n preventDefault() {\n super.preventDefault();\n if ('preventDefault' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).preventDefault();\n }\n }\n\n /**\n * Prevents further propagation of the current event.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n * @api\n * @override\n */\n stopPropagation() {\n super.stopPropagation();\n if ('stopPropagation' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).stopPropagation();\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MapBrowserEvent);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/MapBrowserEvent.js?"); /***/ }), /***/ "./node_modules/ol/MapBrowserEventHandler.js": /*!***************************************************!*\ !*** ./node_modules/ol/MapBrowserEventHandler.js ***! \***************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MapBrowserEvent.js */ \"./node_modules/ol/MapBrowserEvent.js\");\n/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n/**\n * @module ol/MapBrowserEventHandler\n */\n\n\n\n\n\n\n\n\n\nclass MapBrowserEventHandler extends _events_Target_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"./Map.js\").default} map The map with the viewport to listen to events on.\n * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.\n */\n constructor(map, moveTolerance) {\n super(map);\n\n /**\n * This is the element that we will listen to the real events on.\n * @type {import(\"./Map.js\").default}\n * @private\n */\n this.map_ = map;\n\n /**\n * @type {ReturnType}\n * @private\n */\n this.clickTimeoutId_;\n\n /**\n * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n * @type {boolean}\n */\n this.emulateClicks_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n /**\n * @type {!Array}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * @type {number}\n * @private\n */\n this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {PointerEvent|null}\n * @private\n */\n this.down_ = null;\n\n const element = this.map_.getViewport();\n\n /**\n * @type {Array}\n * @private\n */\n this.activePointers_ = [];\n\n /**\n * @type {!Object}\n * @private\n */\n this.trackedTouches_ = {};\n\n /**\n * @private\n */\n this.element_ = element;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(\n element,\n _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERDOWN,\n this.handlePointerDown_,\n this,\n );\n\n /**\n * @type {PointerEvent}\n * @private\n */\n this.originalPointerMoveEvent_;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(\n element,\n _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERMOVE,\n this.relayMoveEvent_,\n this,\n );\n\n /**\n * @private\n */\n this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n this.element_.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].TOUCHMOVE,\n this.boundHandleTouchMove_,\n _has_js__WEBPACK_IMPORTED_MODULE_4__.PASSIVE_EVENT_LISTENERS ? {passive: false} : false,\n );\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n emulateClick_(pointerEvent) {\n let newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].CLICK,\n this.map_,\n pointerEvent,\n );\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].DBLCLICK,\n this.map_,\n pointerEvent,\n );\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(() => {\n this.clickTimeoutId_ = undefined;\n const newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].SINGLECLICK,\n this.map_,\n pointerEvent,\n );\n this.dispatchEvent(newEvent);\n }, 250);\n }\n }\n\n /**\n * Keeps track on how many pointers are currently active.\n *\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n updateActivePointers_(pointerEvent) {\n const event = pointerEvent;\n const id = event.pointerId;\n\n if (\n event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERUP ||\n event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERCANCEL\n ) {\n delete this.trackedTouches_[id];\n for (const pointerId in this.trackedTouches_) {\n if (this.trackedTouches_[pointerId].target !== event.target) {\n // Some platforms assign a new pointerId when the target changes.\n // If this happens, delete one tracked pointer. If there is more\n // than one tracked pointer for the old target, it will be cleared\n // by subsequent POINTERUP events from other pointers.\n delete this.trackedTouches_[pointerId];\n break;\n }\n }\n } else if (\n event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERDOWN ||\n event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERMOVE\n ) {\n this.trackedTouches_[id] = event;\n }\n this.activePointers_ = Object.values(this.trackedTouches_);\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerUp_(pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n const newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERUP,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_,\n );\n this.dispatchEvent(newEvent);\n\n // We emulate click events on left mouse button click, touch contact, and pen\n // contact. isMouseActionButton returns true in these cases (evt.button is set\n // to 0).\n // See http://www.w3.org/TR/pointerevents/#button-states\n // We only fire click, singleclick, and doubleclick if nobody has called\n // event.preventDefault().\n if (\n this.emulateClicks_ &&\n !newEvent.defaultPrevented &&\n !this.dragging_ &&\n this.isMouseActionButton_(pointerEvent)\n ) {\n this.emulateClick_(this.down_);\n }\n\n if (this.activePointers_.length === 0) {\n this.dragListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.dragging_ = false;\n this.down_ = null;\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n isMouseActionButton_(pointerEvent) {\n return pointerEvent.button === 0;\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerDown_(pointerEvent) {\n this.emulateClicks_ = this.activePointers_.length === 0;\n this.updateActivePointers_(pointerEvent);\n const newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERDOWN,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_,\n );\n this.dispatchEvent(newEvent);\n\n this.down_ = new PointerEvent(pointerEvent.type, pointerEvent);\n Object.defineProperty(this.down_, 'target', {\n writable: false,\n value: pointerEvent.target,\n });\n\n if (this.dragListenerKeys_.length === 0) {\n const doc = this.map_.getOwnerDocument();\n this.dragListenerKeys_.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(\n doc,\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERMOVE,\n this.handlePointerMove_,\n this,\n ),\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(doc, _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERUP, this.handlePointerUp_, this),\n /* Note that the listener for `pointercancel is set up on\n * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n * the `pointerup` and `pointermove` listeners.\n *\n * The reason for this is the following: `TouchSource.vacuumTouches_()`\n * issues `pointercancel` events, when there was no `touchend` for a\n * `touchstart`. Now, let's say a first `touchstart` is registered on\n * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n * But `documentPointerEventHandler_` doesn't know about the first\n * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n * only registered there.\n */\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(\n this.element_,\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERCANCEL,\n this.handlePointerUp_,\n this,\n ),\n );\n if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n this.dragListenerKeys_.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(\n this.element_.getRootNode(),\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERUP,\n this.handlePointerUp_,\n this,\n ),\n );\n }\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerMove_(pointerEvent) {\n // Between pointerdown and pointerup, pointermove events are triggered.\n // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n // moved a significant distance.\n if (this.isMoving_(pointerEvent)) {\n this.updateActivePointers_(pointerEvent);\n this.dragging_ = true;\n const newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERDRAG,\n this.map_,\n pointerEvent,\n this.dragging_,\n undefined,\n this.activePointers_,\n );\n this.dispatchEvent(newEvent);\n }\n }\n\n /**\n * Wrap and relay a pointermove event.\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n relayMoveEvent_(pointerEvent) {\n this.originalPointerMoveEvent_ = pointerEvent;\n const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(\n new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].POINTERMOVE,\n this.map_,\n pointerEvent,\n dragging,\n ),\n );\n }\n\n /**\n * Flexible handling of a `touch-action: none` css equivalent: because calling\n * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n * when an interaction (currently `DragPan` handles the event.\n * @param {TouchEvent} event Event.\n * @private\n */\n handleTouchMove_(event) {\n // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n // may not be initialized yet when we get here on a platform without native pointer events,\n // when elm-pep is used as pointer events polyfill.\n const originalEvent = this.originalPointerMoveEvent_;\n if (\n (!originalEvent || originalEvent.defaultPrevented) &&\n (typeof event.cancelable !== 'boolean' || event.cancelable === true)\n ) {\n event.preventDefault();\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n isMoving_(pointerEvent) {\n return (\n this.dragging_ ||\n Math.abs(pointerEvent.clientX - this.down_.clientX) >\n this.moveTolerance_ ||\n Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_\n );\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n if (this.relayedListenerKey_) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n this.element_.removeEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].TOUCHMOVE,\n this.boundHandleTouchMove_,\n );\n\n if (this.pointerdownListenerKey_) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n\n this.dragListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey);\n this.dragListenerKeys_.length = 0;\n\n this.element_ = null;\n super.disposeInternal();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MapBrowserEventHandler);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/MapBrowserEventHandler.js?"); /***/ }), /***/ "./node_modules/ol/MapBrowserEventType.js": /*!************************************************!*\ !*** ./node_modules/ol/MapBrowserEventType.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/**\n * @module ol/MapBrowserEventType\n */\n\n\n/**\n * Constants for event names.\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n /**\n * A true single click with no dragging and no double click. Note that this\n * event is delayed by 250 ms to ensure that it is not a double click.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n * @api\n */\n SINGLECLICK: 'singleclick',\n\n /**\n * A click with no dragging. A double click will fire two of this.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n * @api\n */\n CLICK: _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].CLICK,\n\n /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].DBLCLICK,\n\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n\n /**\n * Triggered when a pointer is moved. Note that on touch devices this is\n * triggered when the map is panned, so is not the same as mousemove.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n * @api\n */\n POINTERMOVE: 'pointermove',\n\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n});\n\n/***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/MapBrowserEventType.js?"); /***/ }), /***/ "./node_modules/ol/MapEvent.js": /*!*************************************!*\ !*** ./node_modules/ol/MapEvent.js ***! \*************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n/**\n * @module ol/MapEvent\n */\n\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map event.\n */\nclass MapEvent extends _events_Event_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {?import(\"./Map.js\").FrameState} [frameState] Frame state.\n */\n constructor(type, map, frameState) {\n super(type);\n\n /**\n * The map where the event occurred.\n * @type {import(\"./Map.js\").default}\n * @api\n */\n this.map = map;\n\n /**\n * The frame state at the time of the event.\n * @type {?import(\"./Map.js\").FrameState}\n * @api\n */\n this.frameState = frameState !== undefined ? frameState : null;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MapEvent);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/MapEvent.js?"); /***/ }), /***/ "./node_modules/ol/MapEventType.js": /*!*****************************************!*\ !*** ./node_modules/ol/MapEventType.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n /**\n * Triggered after a map frame is rendered.\n * @event module:ol/MapEvent~MapEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n\n /**\n * Triggered when loading of additional map data (tiles, images, features) starts.\n * @event module:ol/MapEvent~MapEvent#loadstart\n * @api\n */\n LOADSTART: 'loadstart',\n\n /**\n * Triggered when loading of additional map data has completed.\n * @event module:ol/MapEvent~MapEvent#loadend\n * @api\n */\n LOADEND: 'loadend',\n});\n\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/MapEventType.js?"); /***/ }), /***/ "./node_modules/ol/MapProperty.js": /*!****************************************!*\ !*** ./node_modules/ol/MapProperty.js ***! \****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view',\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/MapProperty.js?"); /***/ }), /***/ "./node_modules/ol/Object.js": /*!***********************************!*\ !*** ./node_modules/ol/Object.js ***! \***********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ObjectEvent: () => (/* binding */ ObjectEvent),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Event.js */ \"./node_modules/ol/events/Event.js\");\n/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ObjectEventType.js */ \"./node_modules/ol/ObjectEventType.js\");\n/* harmony import */ var _Observable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable.js */ \"./node_modules/ol/Observable.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./obj.js */ \"./node_modules/ol/obj.js\");\n/**\n * @module ol/Object\n */\n\n\n\n\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nclass ObjectEvent extends _events_Event_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {string} type The event type.\n * @param {string} key The property name.\n * @param {*} oldValue The old value for `key`.\n */\n constructor(type, key, oldValue) {\n super(type);\n\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n this.key = key;\n\n /**\n * The old value. To get the new value use `e.target.get(e.key)` where\n * `e` is the event object.\n * @type {*}\n * @api\n */\n this.oldValue = oldValue;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ObjectOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable~Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nclass BaseObject extends _Observable_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Object} [values] An object with key-value pairs.\n */\n constructor(values) {\n super();\n\n /***\n * @type {ObjectOnSignature}\n */\n this.on;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.once;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.un;\n\n // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is\n // the same as the order in which they were created. This also helps to\n // ensure that object properties are always added in the same order, which\n // helps many JavaScript engines generate faster code.\n (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.getUid)(this);\n\n /**\n * @private\n * @type {Object|null}\n */\n this.values_ = null;\n\n if (values !== undefined) {\n this.setProperties(values);\n }\n }\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n get(key) {\n let value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n }\n\n /**\n * Get a list of object property names.\n * @return {Array} List of property names.\n * @api\n */\n getKeys() {\n return (this.values_ && Object.keys(this.values_)) || [];\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object} Object.\n * @api\n */\n getProperties() {\n return (this.values_ && Object.assign({}, this.values_)) || {};\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object?} Object.\n */\n getPropertiesInternal() {\n return this.values_;\n }\n\n /**\n * @return {boolean} The object has properties.\n */\n hasProperties() {\n return !!this.values_;\n }\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n notify(key, oldValue) {\n let eventType;\n eventType = `change:${key}`;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n eventType = _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].PROPERTYCHANGE;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n addChangeListener(key, listener) {\n this.addEventListener(`change:${key}`, listener);\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n removeChangeListener(key, listener) {\n this.removeEventListener(`change:${key}`, listener);\n }\n\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n set(key, value, silent) {\n const values = this.values_ || (this.values_ = {});\n if (silent) {\n values[key] = value;\n } else {\n const oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\n }\n }\n\n /**\n * Sets a collection of key-value pairs. Note that this changes any existing\n * properties and adds new ones (it does not remove any existing properties).\n * @param {Object} values Values.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n setProperties(values, silent) {\n for (const key in values) {\n this.set(key, values[key], silent);\n }\n }\n\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n applyProperties(source) {\n if (!source.values_) {\n return;\n }\n Object.assign(this.values_ || (this.values_ = {}), source.values_);\n }\n\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean} [silent] Unset without triggering an event.\n * @api\n */\n unset(key, silent) {\n if (this.values_ && key in this.values_) {\n const oldValue = this.values_[key];\n delete this.values_[key];\n if ((0,_obj_js__WEBPACK_IMPORTED_MODULE_4__.isEmpty)(this.values_)) {\n this.values_ = null;\n }\n if (!silent) {\n this.notify(key, oldValue);\n }\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseObject);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Object.js?"); /***/ }), /***/ "./node_modules/ol/ObjectEventType.js": /*!********************************************!*\ !*** ./node_modules/ol/ObjectEventType.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n /**\n * Triggered when a property is changed.\n * @event module:ol/Object.ObjectEvent#propertychange\n * @api\n */\n PROPERTYCHANGE: 'propertychange',\n});\n\n/**\n * @typedef {'propertychange'} Types\n */\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/ObjectEventType.js?"); /***/ }), /***/ "./node_modules/ol/Observable.js": /*!***************************************!*\ !*** ./node_modules/ol/Observable.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ unByKey: () => (/* binding */ unByKey)\n/* harmony export */ });\n/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n/**\n * @module ol/Observable\n */\n\n\n\n\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nclass Observable extends _events_Target_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n constructor() {\n super();\n\n this.on =\n /** @type {ObservableOnSignature} */ (\n this.onInternal\n );\n\n this.once =\n /** @type {ObservableOnSignature} */ (\n this.onceInternal\n );\n\n this.un = /** @type {ObservableOnSignature} */ (this.unInternal);\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n }\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n changed() {\n ++this.revision_;\n this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CHANGE);\n }\n\n /**\n * Get the version number for this object. Each time the object is modified,\n * its version number will be incremented.\n * @return {number} Revision.\n * @api\n */\n getRevision() {\n return this.revision_;\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onInternal(type, listener) {\n if (Array.isArray(type)) {\n const len = type.length;\n const keys = new Array(len);\n for (let i = 0; i < len; ++i) {\n keys[i] = (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listen)(this, type[i], listener);\n }\n return keys;\n }\n return (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listen)(this, /** @type {string} */ (type), listener);\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onceInternal(type, listener) {\n let key;\n if (Array.isArray(type)) {\n const len = type.length;\n key = new Array(len);\n for (let i = 0; i < len; ++i) {\n key[i] = (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listenOnce)(this, type[i], listener);\n }\n } else {\n key = (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listenOnce)(this, /** @type {string} */ (type), listener);\n }\n /** @type {Object} */ (listener).ol_key = key;\n return key;\n }\n\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @protected\n */\n unInternal(type, listener) {\n const key = /** @type {Object} */ (listener).ol_key;\n if (key) {\n unByKey(key);\n } else if (Array.isArray(type)) {\n for (let i = 0, ii = type.length; i < ii; ++i) {\n this.removeEventListener(type[i], listener);\n }\n } else {\n this.removeEventListener(type, listener);\n }\n }\n}\n\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array} key The key returned by `on()`\n * or `once()` (or an array of keys).\n * @api\n */\nfunction unByKey(key) {\n if (Array.isArray(key)) {\n for (let i = 0, ii = key.length; i < ii; ++i) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.unlistenByKey)(key[i]);\n }\n } else {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.unlistenByKey)(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Observable);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Observable.js?"); /***/ }), /***/ "./node_modules/ol/Overlay.js": /*!************************************!*\ !*** ./node_modules/ol/Overlay.js ***! \************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n/**\n * @module ol/Overlay\n */\n\n\n\n\n\n\n\n/**\n * @typedef {'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right'} Positioning\n * The overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, or `'top-right'`.\n */\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {Positioning} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing.inAndOut}.\n */\n\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n\n/**\n * @enum {string}\n * @protected\n */\nconst Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning',\n};\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:element'|'change:map'|'change:offset'|'change:position'|\n * 'change:positioning'} OverlayObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} OverlayOnSignature\n */\n\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay.js';\n *\n * // ...\n * const popup = new Overlay({\n * element: document.getElementById('popup'),\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nclass Overlay extends _Object_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} options Overlay options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {OverlayOnSignature}\n */\n this.on;\n\n /***\n * @type {OverlayOnSignature}\n */\n this.once;\n\n /***\n * @type {OverlayOnSignature}\n */\n this.un;\n\n /**\n * @protected\n * @type {Options}\n */\n this.options = options;\n\n /**\n * @protected\n * @type {number|string|undefined}\n */\n this.id = options.id;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.insertFirst =\n options.insertFirst !== undefined ? options.insertFirst : true;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = document.createElement('div');\n this.element.className =\n options.className !== undefined\n ? options.className\n : 'ol-overlay-container ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_SELECTABLE;\n this.element.style.position = 'absolute';\n this.element.style.pointerEvents = 'auto';\n\n /**\n * @protected\n * @type {PanIntoViewOptions|undefined}\n */\n this.autoPan = options.autoPan === true ? {} : options.autoPan || undefined;\n\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n this.rendered = {\n transform_: '',\n visible: true,\n };\n\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.mapPostrenderListenerKey = null;\n\n this.addChangeListener(Property.ELEMENT, this.handleElementChanged);\n this.addChangeListener(Property.MAP, this.handleMapChanged);\n this.addChangeListener(Property.OFFSET, this.handleOffsetChanged);\n this.addChangeListener(Property.POSITION, this.handlePositionChanged);\n this.addChangeListener(Property.POSITIONING, this.handlePositioningChanged);\n\n if (options.element !== undefined) {\n this.setElement(options.element);\n }\n\n this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n\n this.setPositioning(options.positioning || 'top-left');\n\n if (options.position !== undefined) {\n this.setPosition(options.position);\n }\n }\n\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n getElement() {\n return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n }\n\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id;\n }\n\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./Map.js\").default|null} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n getMap() {\n return /** @type {import(\"./Map.js\").default|null} */ (\n this.get(Property.MAP) || null\n );\n }\n\n /**\n * Get the offset of this overlay.\n * @return {Array} The offset.\n * @observable\n * @api\n */\n getOffset() {\n return /** @type {Array} */ (this.get(Property.OFFSET));\n }\n\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(Property.POSITION)\n );\n }\n\n /**\n * Get the current positioning of this overlay.\n * @return {Positioning} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n getPositioning() {\n return /** @type {Positioning} */ (this.get(Property.POSITIONING));\n }\n\n /**\n * @protected\n */\n handleElementChanged() {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.removeChildren)(this.element);\n const element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n }\n\n /**\n * @protected\n */\n handleMapChanged() {\n if (this.mapPostrenderListenerKey) {\n this.element?.remove();\n (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey)(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n const map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(\n map,\n _MapEventType_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].POSTRENDER,\n this.render,\n this,\n );\n this.updatePixelPosition();\n const container = this.stopEvent\n ? map.getOverlayContainerStopEvent()\n : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n }\n\n /**\n * @protected\n */\n render() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handleOffsetChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handlePositionChanged() {\n this.updatePixelPosition();\n this.performAutoPan();\n }\n\n /**\n * @protected\n */\n handlePositioningChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n setElement(element) {\n this.set(Property.ELEMENT, element);\n }\n\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./Map.js\").default|null} map The map that the\n * overlay is part of. Pass `null` to just remove the overlay from the current map.\n * @observable\n * @api\n */\n setMap(map) {\n this.set(Property.MAP, map);\n }\n\n /**\n * Set the offset for this overlay.\n * @param {Array} offset Offset.\n * @observable\n * @api\n */\n setOffset(offset) {\n this.set(Property.OFFSET, offset);\n }\n\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n setPosition(position) {\n this.set(Property.POSITION, position);\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n performAutoPan() {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions} [panIntoViewOptions] Options for the pan action\n * @api\n */\n panIntoView(panIntoViewOptions) {\n const map = this.getMap();\n\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n\n const mapRect = this.getRect(map.getTargetElement(), map.getSize());\n const element = this.getElement();\n const overlayRect = this.getRect(element, [\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.outerWidth)(element),\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.outerHeight)(element),\n ]);\n\n panIntoViewOptions = panIntoViewOptions || {};\n\n const myMargin =\n panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_5__.containsExtent)(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n const offsetLeft = overlayRect[0] - mapRect[0];\n const offsetRight = mapRect[2] - overlayRect[2];\n const offsetTop = overlayRect[1] - mapRect[1];\n const offsetBottom = mapRect[3] - overlayRect[3];\n\n const delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n\n if (delta[0] !== 0 || delta[1] !== 0) {\n const center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n map.getView().getCenterInternal()\n );\n const centerPx = map.getPixelFromCoordinateInternal(center);\n if (!centerPx) {\n return;\n }\n const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n\n const panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing,\n });\n }\n }\n }\n\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n getRect(element, size) {\n const box = element.getBoundingClientRect();\n const offsetX = box.left + window.pageXOffset;\n const offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n }\n\n /**\n * Set the positioning for this overlay.\n * @param {Positioning} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n setPositioning(positioning) {\n this.set(Property.POSITIONING, positioning);\n }\n\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n setVisible(visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n }\n\n /**\n * Update pixel position.\n * @protected\n */\n updatePixelPosition() {\n const map = this.getMap();\n const position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n\n const pixel = map.getPixelFromCoordinate(position);\n const mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n }\n\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n updateRenderedPosition(pixel, mapSize) {\n const style = this.element.style;\n const offset = this.getOffset();\n\n const positioning = this.getPositioning();\n\n this.setVisible(true);\n\n const x = Math.round(pixel[0] + offset[0]) + 'px';\n const y = Math.round(pixel[1] + offset[1]) + 'px';\n let posX = '0%';\n let posY = '0%';\n if (\n positioning == 'bottom-right' ||\n positioning == 'center-right' ||\n positioning == 'top-right'\n ) {\n posX = '-100%';\n } else if (\n positioning == 'bottom-center' ||\n positioning == 'center-center' ||\n positioning == 'top-center'\n ) {\n posX = '-50%';\n }\n if (\n positioning == 'bottom-left' ||\n positioning == 'bottom-center' ||\n positioning == 'bottom-right'\n ) {\n posY = '-100%';\n } else if (\n positioning == 'center-left' ||\n positioning == 'center-center' ||\n positioning == 'center-right'\n ) {\n posY = '-50%';\n }\n const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`;\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n }\n }\n\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n getOptions() {\n return this.options;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Overlay);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Overlay.js?"); /***/ }), /***/ "./node_modules/ol/Tile.js": /*!*********************************!*\ !*** ./node_modules/ol/Tile.js ***! \*********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Target.js */ \"./node_modules/ol/events/Target.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util.js */ \"./node_modules/ol/util.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./easing.js */ \"./node_modules/ol/easing.js\");\n/**\n * @module ol/Tile\n */\n\n\n\n\n\n\n/**\n * A function that takes a {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * const xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * const data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes a {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection~Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends _events_Target_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [options] Tile options.\n */\n constructor(tileCoord, state, options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\n /**\n * A key assigned to the tile. This is used in conjunction with a source key\n * to determine if a cached version of this tile may be used by the renderer.\n * @type {string}\n */\n this.key = '';\n\n /**\n * The duration for the opacity transition.\n * @private\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @private\n * @type {Object}\n */\n this.transitionStarts_ = {};\n\n /**\n * @type {boolean}\n */\n this.interpolate = !!options.interpolate;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {\n if (this.state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR) {\n // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].EMPTY);\n }\n }\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\n\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n * the tile queue and will block other requests.\n * @param {import(\"./TileState.js\").default} state State.\n * @api\n */\n setState(state) {\n if (this.state !== _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @abstract\n * @api\n */\n load() {\n (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.abstract)();\n }\n\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n\n const delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return (0,_easing_js__WEBPACK_IMPORTED_MODULE_4__.easeIn)(delta / this.transition_);\n }\n\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n\n /**\n * @override\n */\n disposeInternal() {\n this.release();\n super.disposeInternal();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tile);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/Tile.js?"); /***/ }), /***/ "./node_modules/ol/TileQueue.js": /*!**************************************!*\ !*** ./node_modules/ol/TileQueue.js ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ getTilePriority: () => (/* binding */ getTilePriority)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./structs/PriorityQueue.js */ \"./node_modules/ol/structs/PriorityQueue.js\");\n/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TileState.js */ \"./node_modules/ol/TileState.js\");\n/**\n * @module ol/TileQueue\n */\n\n\n\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\nclass TileQueue extends _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n */\n constructor(tilePriorityFunction, tileChangeCallback) {\n super(\n /**\n * @param {Array} element Element.\n * @return {number} Priority.\n */\n function (element) {\n return tilePriorityFunction.apply(null, element);\n },\n /**\n * @param {Array} element Element.\n * @return {string} Key.\n */\n function (element) {\n return /** @type {import(\"./Tile.js\").default} */ (element[0]).getKey();\n },\n );\n\n /** @private */\n this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n\n /**\n * @private\n * @type {function(): ?}\n */\n this.tileChangeCallback_ = tileChangeCallback;\n\n /**\n * @private\n * @type {number}\n */\n this.tilesLoading_ = 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.tilesLoadingKeys_ = {};\n }\n\n /**\n * @param {Array} element Element.\n * @return {boolean} The element was added to the queue.\n * @override\n */\n enqueue(element) {\n const added = super.enqueue(element);\n if (added) {\n const tile = element[0];\n tile.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CHANGE, this.boundHandleTileChange_);\n }\n return added;\n }\n\n /**\n * @return {number} Number of tiles loading.\n */\n getTilesLoading() {\n return this.tilesLoading_;\n }\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n const state = tile.getState();\n if (\n state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LOADED ||\n state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR ||\n state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].EMPTY\n ) {\n if (state !== _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ERROR) {\n tile.removeEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CHANGE, this.boundHandleTileChange_);\n }\n const tileKey = tile.getKey();\n if (tileKey in this.tilesLoadingKeys_) {\n delete this.tilesLoadingKeys_[tileKey];\n --this.tilesLoading_;\n }\n this.tileChangeCallback_();\n }\n }\n\n /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n loadMoreTiles(maxTotalLoading, maxNewLoads) {\n let newLoads = 0;\n while (\n this.tilesLoading_ < maxTotalLoading &&\n newLoads < maxNewLoads &&\n this.getCount() > 0\n ) {\n /**\n * @type {import(\"./Tile.js\").default}\n */\n const tile = this.dequeue()[0];\n const tileKey = tile.getKey();\n const state = tile.getState();\n if (state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TileQueue);\n\n/**\n * @param {import('./Map.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\nfunction getTilePriority(\n frameState,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution,\n) {\n // Filter out tiles at higher zoom levels than the current zoom level, or that\n // are outside the visible extent.\n if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n return _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_0__.DROP;\n }\n if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n return _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_0__.DROP;\n }\n // Prioritize the highest zoom level tiles closest to the focus.\n // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n // Within a zoom level, tiles are prioritized by the distance in pixels between\n // the center of the tile and the center of the viewport. The factor of 65536\n // means that the prioritization should behave as desired for tiles up to\n // 65536 * Math.log(2) = 45426 pixels from the focus.\n const center = frameState.viewState.center;\n const deltaX = tileCenter[0] - center[0];\n const deltaY = tileCenter[1] - center[1];\n return (\n 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution\n );\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/TileQueue.js?"); /***/ }), /***/ "./node_modules/ol/TileRange.js": /*!**************************************!*\ !*** ./node_modules/ol/TileRange.js ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createOrUpdate: () => (/* binding */ createOrUpdate),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/TileRange\n */\n\n/**\n * A representation of a contiguous block of tiles. A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nclass TileRange {\n /**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n */\n constructor(minX, maxX, minY, maxY) {\n /**\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\n contains(tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\n containsTileRange(tileRange) {\n return (\n this.minX <= tileRange.minX &&\n tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY &&\n tileRange.maxY <= this.maxY\n );\n }\n\n /**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\n containsXY(x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\n equals(tileRange) {\n return (\n this.minX == tileRange.minX &&\n this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX &&\n this.maxY == tileRange.maxY\n );\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n */\n extend(tileRange) {\n if (tileRange.minX < this.minX) {\n this.minX = tileRange.minX;\n }\n if (tileRange.maxX > this.maxX) {\n this.maxX = tileRange.maxX;\n }\n if (tileRange.minY < this.minY) {\n this.minY = tileRange.minY;\n }\n if (tileRange.maxY > this.maxY) {\n this.maxY = tileRange.maxY;\n }\n }\n\n /**\n * @return {number} Height.\n */\n getHeight() {\n return this.maxY - this.minY + 1;\n }\n\n /**\n * @return {import(\"./size.js\").Size} Size.\n */\n getSize() {\n return [this.getWidth(), this.getHeight()];\n }\n\n /**\n * @return {number} Width.\n */\n getWidth() {\n return this.maxX - this.minX + 1;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\n intersects(tileRange) {\n return (\n this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY\n );\n }\n}\n\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange} [tileRange] TileRange.\n * @return {TileRange} Tile range.\n */\nfunction createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n if (tileRange !== undefined) {\n tileRange.minX = minX;\n tileRange.maxX = maxX;\n tileRange.minY = minY;\n tileRange.maxY = maxY;\n return tileRange;\n }\n return new TileRange(minX, maxX, minY, maxY);\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TileRange);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/TileRange.js?"); /***/ }), /***/ "./node_modules/ol/TileState.js": /*!**************************************!*\ !*** ./node_modules/ol/TileState.js ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n /**\n * Indicates that tile loading failed\n * @type {number}\n */\n ERROR: 3,\n EMPTY: 4,\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/TileState.js?"); /***/ }), /***/ "./node_modules/ol/View.js": /*!*********************************!*\ !*** ./node_modules/ol/View.js ***! \*********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createCenterConstraint: () => (/* binding */ createCenterConstraint),\n/* harmony export */ createResolutionConstraint: () => (/* binding */ createResolutionConstraint),\n/* harmony export */ createRotationConstraint: () => (/* binding */ createRotationConstraint),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ isNoopAnimation: () => (/* binding */ isNoopAnimation)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _ViewHint_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ViewHint.js */ \"./node_modules/ol/ViewHint.js\");\n/* harmony import */ var _ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ViewProperty.js */ \"./node_modules/ol/ViewProperty.js\");\n/* harmony import */ var _tilegrid_common_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./tilegrid/common.js */ \"./node_modules/ol/tilegrid/common.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./coordinate.js */ \"./node_modules/ol/coordinate.js\");\n/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./asserts.js */ \"./node_modules/ol/asserts.js\");\n/* harmony import */ var _centerconstraint_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./centerconstraint.js */ \"./node_modules/ol/centerconstraint.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n/* harmony import */ var _resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./resolutionconstraint.js */ \"./node_modules/ol/resolutionconstraint.js\");\n/* harmony import */ var _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./rotationconstraint.js */ \"./node_modules/ol/rotationconstraint.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./easing.js */ \"./node_modules/ol/easing.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n/**\n * @module ol/View\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter] Source center.\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter] Target center.\n * @property {number} [sourceResolution] Source resolution.\n * @property {number} [targetResolution] Target resolution.\n * @property {number} [sourceRotation] Source rotation.\n * @property {number} [targetRotation] Target rotation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Anchor.\n * @property {number} start Start.\n * @property {number} duration Duration.\n * @property {boolean} complete Complete.\n * @property {function(number):number} easing Easing.\n * @property {function(boolean):void} callback Callback.\n */\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center Center.\n * @property {import(\"./resolutionconstraint.js\").Type} resolution Resolution.\n * @property {import(\"./rotationconstraint.js\").Type} rotation Rotation.\n */\n\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to\n * fit the extent into. Defaults to the size of the map the view is associated with.\n * If no map or multiple maps are connected to the view, provide the desired box size\n * (e.g. `map.getSize()`).\n * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint. It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`. If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`. Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`. Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge. If `true` the map\n * may show multiple worlds at low zoom levels. Only used if the `projection` is\n * global. Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array} [resolutions] Resolutions that determine the\n * zoom levels if specified. The index in the array corresponds to the zoom level,\n * therefore the resolution values have to be in descending order. It also constrains\n * the resolution by the minimum and maximum value. If set the `maxResolution`,\n * `minResolution`, `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\n\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation. If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center (in view projection coordinates).\n * @property {import(\"./proj/Projection.js\").default} projection Projection.\n * @property {number} resolution Resolution.\n * @property {import(\"./coordinate.js\").Coordinate} [nextCenter] The next center during an animation series.\n * @property {number} [nextResolution] The next resolution during an animation series.\n * @property {number} [nextRotation] The next rotation during an animation series.\n * @property {number} rotation Rotation.\n * @property {number} zoom Zoom.\n */\n\n/**\n * Like {@link import(\"./Map.js\").FrameState}, but just `viewState` and `extent`.\n * @typedef {Object} ViewStateLayerStateExtent\n * @property {State} viewState View state.\n * @property {import(\"./extent.js\").Extent} extent Extent (in user projection coordinates).\n * @property {Array} [layerStatesArray] Layer states.\n */\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nconst DEFAULT_MIN_ZOOM = 0;\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ViewOnSignature\n */\n\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Web Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nclass View extends _Object_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {ViewOptions} [options] View options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {ViewOnSignature}\n */\n this.on;\n\n /***\n * @type {ViewOnSignature}\n */\n this.once;\n\n /***\n * @type {ViewOnSignature}\n */\n this.un;\n\n options = Object.assign({}, options);\n\n /**\n * @private\n * @type {Array}\n */\n this.hints_ = [0, 0];\n\n /**\n * @private\n * @type {Array>}\n */\n this.animations_ = [];\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.updateAnimationKey_;\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection)(options.projection, 'EPSG:3857');\n\n /**\n * @private\n * @type {import(\"./size.js\").Size}\n */\n this.viewportSize_ = [100, 100];\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.targetCenter_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetResolution_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate}\n */\n this.nextCenter_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.nextResolution_;\n\n /**\n * @private\n * @type {number}\n */\n this.nextRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.cancelAnchor_ = undefined;\n\n if (options.projection) {\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.disableCoordinateWarning)();\n }\n if (options.center) {\n options.center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(options.center, this.projection_);\n }\n if (options.extent) {\n options.extent = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(options.extent, this.projection_);\n }\n\n this.applyOptions_(options);\n }\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n applyOptions_(options) {\n const properties = Object.assign({}, options);\n for (const key in _ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n delete properties[key];\n }\n this.setProperties(properties, true);\n\n const resolutionConstraintInfo = createResolutionConstraint(options);\n\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n /**\n * @private\n * @type {Array|undefined}\n */\n this.resolutions_ = options.resolutions;\n\n /**\n * @type {Array|undefined}\n * @private\n */\n this.padding_ = options.padding;\n\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n const centerConstraint = createCenterConstraint(options);\n const resolutionConstraint = resolutionConstraintInfo.constraint;\n const rotationConstraint = createRotationConstraint(options);\n\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint,\n };\n\n this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n this.setCenterInternal(\n options.center !== undefined ? options.center : null,\n );\n if (options.resolution !== undefined) {\n this.setResolution(options.resolution);\n } else if (options.zoom !== undefined) {\n this.setZoom(options.zoom);\n }\n }\n\n /**\n * Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from that\n * content. The order of the values in the array is top, right, bottom, left.\n * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n * @type {Array|undefined}\n * @api\n */\n get padding() {\n return this.padding_;\n }\n set padding(padding) {\n let oldPadding = this.padding_;\n this.padding_ = padding;\n const center = this.getCenterInternal();\n if (center) {\n const newPadding = padding || [0, 0, 0, 0];\n oldPadding = oldPadding || [0, 0, 0, 0];\n const resolution = this.getResolution();\n const offsetX =\n (resolution / 2) *\n (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n const offsetY =\n (resolution / 2) *\n (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]);\n }\n }\n\n /**\n * Get an updated version of the view options used to construct the view. The\n * current resolution (or zoom), center, and rotation are applied to any stored\n * options. The provided options can be used to apply new min/max zoom or\n * resolution limits.\n * @param {ViewOptions} newOptions New options to be applied.\n * @return {ViewOptions} New options updated with the current view state.\n */\n getUpdatedOptions_(newOptions) {\n const options = this.getProperties();\n\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n\n // preserve center\n options.center = this.getCenterInternal();\n\n // preserve rotation\n options.rotation = this.getRotation();\n\n return Object.assign({}, options, newOptions);\n }\n\n /**\n * Animate the view. The view's center, zoom (or resolution), and rotation\n * can be animated for smooth transitions between view states. For example,\n * to animate the view to a new zoom level:\n *\n * view.animate({zoom: view.getZoom() + 1});\n *\n * By default, the animation lasts one second and uses in-and-out easing. You\n * can customize this behavior by including `duration` (in milliseconds) and\n * `easing` options (see {@link module:ol/easing}).\n *\n * To chain together multiple animations, call the method with multiple\n * animation objects. For example, to first zoom and then pan:\n *\n * view.animate({zoom: 10}, {center: [0, 0]});\n *\n * If you provide a function as the last argument to the animate method, it\n * will get called at the end of an animation series. The callback will be\n * called with `true` if the animation series completed on its own or `false`\n * if it was cancelled.\n *\n * Animations are cancelled by user interactions (e.g. dragging the map) or by\n * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n * (or another method that calls one of these).\n *\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n * options. Multiple animations can be run in series by passing multiple\n * options objects. To run multiple animations in parallel, call the method\n * multiple times. An optional callback can be provided as a final\n * argument. The callback will be called with a boolean indicating whether\n * the animation completed without being cancelled.\n * @api\n */\n animate(var_args) {\n if (this.isDef() && !this.getAnimating()) {\n this.resolveConstraints(0);\n }\n const args = new Array(arguments.length);\n for (let i = 0; i < args.length; ++i) {\n let options = arguments[i];\n if (options.center) {\n options = Object.assign({}, options);\n options.center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(\n options.center,\n this.getProjection(),\n );\n }\n if (options.anchor) {\n options = Object.assign({}, options);\n options.anchor = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(\n options.anchor,\n this.getProjection(),\n );\n }\n args[i] = options;\n }\n this.animateInternal.apply(this, args);\n }\n\n /**\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n */\n animateInternal(var_args) {\n let animationCount = arguments.length;\n let callback;\n if (\n animationCount > 1 &&\n typeof arguments[animationCount - 1] === 'function'\n ) {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n\n let i = 0;\n for (; i < animationCount && !this.isDef(); ++i) {\n // if view properties are not yet set, shortcut to the final state\n const state = arguments[i];\n if (state.center) {\n this.setCenterInternal(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n } else if (state.resolution) {\n this.setResolution(state.resolution);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n }\n if (i === animationCount) {\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n\n let start = Date.now();\n let center = this.targetCenter_.slice();\n let resolution = this.targetResolution_;\n let rotation = this.targetRotation_;\n const series = [];\n for (; i < animationCount; ++i) {\n const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n const animation = {\n start: start,\n complete: false,\n anchor: options.anchor,\n duration: options.duration !== undefined ? options.duration : 1000,\n easing: options.easing || _easing_js__WEBPACK_IMPORTED_MODULE_3__.inAndOut,\n callback: callback,\n };\n\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center.slice();\n center = animation.targetCenter;\n }\n\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.getResolutionForZoom(options.zoom);\n resolution = animation.targetResolution;\n } else if (options.resolution) {\n animation.sourceResolution = resolution;\n animation.targetResolution = options.resolution;\n resolution = animation.targetResolution;\n }\n\n if (options.rotation !== undefined) {\n animation.sourceRotation = rotation;\n const delta =\n (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.modulo)(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\n\n // check if animation is a no-op\n if (isNoopAnimation(animation)) {\n animation.complete = true;\n // we still push it onto the series for callback handling\n } else {\n start += animation.duration;\n }\n series.push(animation);\n }\n this.animations_.push(series);\n this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ANIMATING, 1);\n this.updateAnimations_();\n }\n\n /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n getAnimating() {\n return this.hints_[_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ANIMATING] > 0;\n }\n\n /**\n * Determine if the user is interacting with the view, such as panning or zooming.\n * @return {boolean} The view is being interacted with.\n * @api\n */\n getInteracting() {\n return this.hints_[_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].INTERACTING] > 0;\n }\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n cancelAnimations() {\n this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ANIMATING, -this.hints_[_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ANIMATING]);\n let anchor;\n for (let i = 0, ii = this.animations_.length; i < ii; ++i) {\n const series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n if (!anchor) {\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (!animation.complete) {\n anchor = animation.anchor;\n break;\n }\n }\n }\n }\n this.animations_.length = 0;\n this.cancelAnchor_ = anchor;\n this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n }\n\n /**\n * Update all animations.\n */\n updateAnimations_() {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n const now = Date.now();\n let more = false;\n for (let i = this.animations_.length - 1; i >= 0; --i) {\n const series = this.animations_[i];\n let seriesComplete = true;\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (animation.complete) {\n continue;\n }\n const elapsed = now - animation.start;\n let fraction =\n animation.duration > 0 ? elapsed / animation.duration : 1;\n if (fraction >= 1) {\n animation.complete = true;\n fraction = 1;\n } else {\n seriesComplete = false;\n }\n const progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n const x0 = animation.sourceCenter[0];\n const y0 = animation.sourceCenter[1];\n const x1 = animation.targetCenter[0];\n const y1 = animation.targetCenter[1];\n this.nextCenter_ = animation.targetCenter;\n const x = x0 + progress * (x1 - x0);\n const y = y0 + progress * (y1 - y0);\n this.targetCenter_ = [x, y];\n }\n if (animation.sourceResolution && animation.targetResolution) {\n const resolution =\n progress === 1\n ? animation.targetResolution\n : animation.sourceResolution +\n progress *\n (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n const size = this.getViewportSize_(this.getRotation());\n const constrainedResolution = this.constraints_.resolution(\n resolution,\n 0,\n size,\n true,\n );\n this.targetCenter_ = this.calculateCenterZoom(\n constrainedResolution,\n animation.anchor,\n );\n }\n this.nextResolution_ = animation.targetResolution;\n this.targetResolution_ = resolution;\n this.applyTargetState_(true);\n }\n if (\n animation.sourceRotation !== undefined &&\n animation.targetRotation !== undefined\n ) {\n const rotation =\n progress === 1\n ? (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.modulo)(animation.targetRotation + Math.PI, 2 * Math.PI) -\n Math.PI\n : animation.sourceRotation +\n progress *\n (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n const constrainedRotation = this.constraints_.rotation(\n rotation,\n true,\n );\n this.targetCenter_ = this.calculateCenterRotate(\n constrainedRotation,\n animation.anchor,\n );\n }\n this.nextRotation_ = animation.targetRotation;\n this.targetRotation_ = rotation;\n }\n this.applyTargetState_(true);\n more = true;\n if (!animation.complete) {\n break;\n }\n }\n if (seriesComplete) {\n this.animations_[i] = null;\n this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ANIMATING, -1);\n this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n const callback = series[0].callback;\n if (callback) {\n animationCallback(callback, true);\n }\n }\n }\n // prune completed series\n this.animations_ = this.animations_.filter(Boolean);\n if (more && this.updateAnimationKey_ === undefined) {\n this.updateAnimationKey_ = requestAnimationFrame(\n this.updateAnimations_.bind(this),\n );\n }\n }\n\n /**\n * @param {number} rotation Target rotation.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n */\n calculateCenterRotate(rotation, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n if (currentCenter !== undefined) {\n center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_6__.rotate)(center, rotation - this.getRotation());\n (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_6__.add)(center, anchor);\n }\n return center;\n }\n\n /**\n * @param {number} resolution Target resolution.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n */\n calculateCenterZoom(resolution, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n const currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n const x =\n anchor[0] -\n (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n const y =\n anchor[1] -\n (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n center = [x, y];\n }\n return center;\n }\n\n /**\n * Returns the current viewport size.\n * @private\n * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n */\n getViewportSize_(rotation) {\n const size = this.viewportSize_;\n if (rotation) {\n const w = size[0];\n const h = size[1];\n return [\n Math.abs(w * Math.cos(rotation)) + Math.abs(h * Math.sin(rotation)),\n Math.abs(w * Math.sin(rotation)) + Math.abs(h * Math.cos(rotation)),\n ];\n }\n return size;\n }\n\n /**\n * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n * to avoid performance hit and layout reflow.\n * This should be done on map size change.\n * Note: the constraints are not resolved during an animation to avoid stopping it\n * @param {import(\"./size.js\").Size} [size] Viewport size; if undefined, [100, 100] is assumed\n */\n setViewportSize(size) {\n this.viewportSize_ = Array.isArray(size) ? size.slice() : [100, 100];\n if (!this.getAnimating()) {\n this.resolveConstraints(0);\n }\n }\n\n /**\n * Get the view center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n * @observable\n * @api\n */\n getCenter() {\n const center = this.getCenterInternal();\n if (!center) {\n return center;\n }\n return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate)(center, this.getProjection());\n }\n\n /**\n * Get the view center without transforming to user projection.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n */\n getCenterInternal() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CENTER)\n );\n }\n\n /**\n * @return {Constraints} Constraints.\n */\n getConstraints() {\n return this.constraints_;\n }\n\n /**\n * @return {boolean} Resolution constraint is set\n */\n getConstrainResolution() {\n return this.get('constrainResolution');\n }\n\n /**\n * @param {Array} [hints] Destination array.\n * @return {Array} Hint.\n */\n getHints(hints) {\n if (hints !== undefined) {\n hints[0] = this.hints_[0];\n hints[1] = this.hints_[1];\n return hints;\n }\n return this.hints_.slice();\n }\n\n /**\n * Calculate the extent for the current view state and the passed box size.\n * @param {import(\"./size.js\").Size} [size] The pixel dimensions of the box\n * into which the calculated extent should fit. Defaults to the size of the\n * map the view is associated with.\n * If no map or multiple maps are connected to the view, provide the desired\n * box size (e.g. `map.getSize()`).\n * @return {import(\"./extent.js\").Extent} Extent.\n * @api\n */\n calculateExtent(size) {\n const extent = this.calculateExtentInternal(size);\n return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserExtent)(extent, this.getProjection());\n }\n\n /**\n * @param {import(\"./size.js\").Size} [size] Box pixel size. If not provided,\n * the map's last known viewport size will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n calculateExtentInternal(size) {\n size = size || this.getViewportSizeMinusPadding_();\n const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(center, 'The view center is not defined');\n const resolution = /** @type {!number} */ (this.getResolution());\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(resolution !== undefined, 'The view resolution is not defined');\n const rotation = /** @type {!number} */ (this.getRotation());\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(rotation !== undefined, 'The view rotation is not defined');\n\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getForViewAndSize)(center, resolution, rotation, size);\n }\n\n /**\n * Get the maximum resolution of the view.\n * @return {number} The maximum resolution of the view.\n * @api\n */\n getMaxResolution() {\n return this.maxResolution_;\n }\n\n /**\n * Get the minimum resolution of the view.\n * @return {number} The minimum resolution of the view.\n * @api\n */\n getMinResolution() {\n return this.minResolution_;\n }\n\n /**\n * Get the maximum zoom level for the view.\n * @return {number} The maximum zoom level.\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.minResolution_)\n );\n }\n\n /**\n * Set a new maximum zoom level for the view.\n * @param {number} zoom The maximum zoom level.\n * @api\n */\n setMaxZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n }\n\n /**\n * Get the minimum zoom level for the view.\n * @return {number} The minimum zoom level.\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.maxResolution_)\n );\n }\n\n /**\n * Set a new minimum zoom level for the view.\n * @param {number} zoom The minimum zoom level.\n * @api\n */\n setMinZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n }\n\n /**\n * Set whether the view should allow intermediary zoom levels.\n * @param {boolean} enabled Whether the resolution is constrained.\n * @api\n */\n setConstrainResolution(enabled) {\n this.applyOptions_(this.getUpdatedOptions_({constrainResolution: enabled}));\n }\n\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n getProjection() {\n return this.projection_;\n }\n\n /**\n * Get the view resolution.\n * @return {number|undefined} The resolution of the view.\n * @observable\n * @api\n */\n getResolution() {\n return /** @type {number|undefined} */ (this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].RESOLUTION));\n }\n\n /**\n * Get the resolutions for the view. This returns the array of resolutions\n * passed to the constructor of the View, or undefined if none were given.\n * @return {Array|undefined} The resolutions of the view.\n * @api\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size} [size] Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n * @api\n */\n getResolutionForExtent(extent, size) {\n return this.getResolutionForExtentInternal(\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(extent, this.getProjection()),\n size,\n );\n }\n\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size} [size] Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n */\n getResolutionForExtentInternal(extent, size) {\n size = size || this.getViewportSizeMinusPadding_();\n const xResolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getWidth)(extent) / size[0];\n const yResolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getHeight)(extent) / size[1];\n return Math.max(xResolution, yResolution);\n }\n\n /**\n * Return a function that returns a value between 0 and 1 for a\n * resolution. Exponential scaling is assumed.\n * @param {number} [power] Power.\n * @return {function(number): number} Resolution for value function.\n */\n getResolutionForValueFunction(power) {\n power = power || 2;\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} value Value.\n * @return {number} Resolution.\n */\n function (value) {\n const resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n }\n );\n }\n\n /**\n * Get the view rotation.\n * @return {number} The rotation of the view in radians.\n * @observable\n * @api\n */\n getRotation() {\n return /** @type {number} */ (this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ROTATION));\n }\n\n /**\n * Return a function that returns a resolution for a value between\n * 0 and 1. Exponential scaling is assumed.\n * @param {number} [power] Power.\n * @return {function(number): number} Value for resolution function.\n */\n getValueForResolutionFunction(power) {\n const logPower = Math.log(power || 2);\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / logPower;\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function (resolution) {\n const value = Math.log(maxResolution / resolution) / logPower / max;\n return value;\n }\n );\n }\n\n /**\n * Returns the size of the viewport minus padding.\n * @private\n * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n */\n getViewportSizeMinusPadding_(rotation) {\n let size = this.getViewportSize_(rotation);\n const padding = this.padding_;\n if (padding) {\n size = [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ];\n }\n return size;\n }\n\n /**\n * @return {State} View state.\n */\n getState() {\n const projection = this.getProjection();\n const resolution = this.getResolution();\n const rotation = this.getRotation();\n let center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n const padding = this.padding_;\n if (padding) {\n const reducedSize = this.getViewportSizeMinusPadding_();\n center = calculateCenterOn(\n center,\n this.getViewportSize_(),\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation,\n );\n }\n return {\n center: center.slice(0),\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n nextCenter: this.nextCenter_,\n nextResolution: this.nextResolution_,\n nextRotation: this.nextRotation_,\n rotation: rotation,\n zoom: this.getZoom(),\n };\n }\n\n /**\n * @return {ViewStateLayerStateExtent} Like `FrameState`, but just `viewState` and `extent`.\n */\n getViewStateAndExtent() {\n return {\n viewState: this.getState(),\n extent: this.calculateExtent(),\n };\n }\n\n /**\n * Get the current zoom level. This method may return non-integer zoom levels\n * if the view does not constrain the resolution, or if an interaction or\n * animation is underway.\n * @return {number|undefined} Zoom.\n * @api\n */\n getZoom() {\n let zoom;\n const resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n }\n\n /**\n * Get the zoom level for a resolution.\n * @param {number} resolution The resolution.\n * @return {number|undefined} The zoom level for the provided resolution.\n * @api\n */\n getZoomForResolution(resolution) {\n let offset = this.minZoom_ || 0;\n let max, zoomFactor;\n if (this.resolutions_) {\n const nearest = (0,_array_js__WEBPACK_IMPORTED_MODULE_9__.linearFindNearest)(this.resolutions_, resolution, 1);\n offset = nearest;\n max = this.resolutions_[nearest];\n if (nearest == this.resolutions_.length - 1) {\n zoomFactor = 2;\n } else {\n zoomFactor = max / this.resolutions_[nearest + 1];\n }\n } else {\n max = this.maxResolution_;\n zoomFactor = this.zoomFactor_;\n }\n return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n }\n\n /**\n * Get the resolution for a zoom level.\n * @param {number} zoom Zoom level.\n * @return {number} The view resolution for the provided zoom level.\n * @api\n */\n getResolutionForZoom(zoom) {\n if (this.resolutions_?.length) {\n if (this.resolutions_.length === 1) {\n return this.resolutions_[0];\n }\n const baseLevel = (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(\n Math.floor(zoom),\n 0,\n this.resolutions_.length - 2,\n );\n const zoomFactor =\n this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n return (\n this.resolutions_[baseLevel] /\n Math.pow(zoomFactor, (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(zoom - baseLevel, 0, 1))\n );\n }\n return (\n this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_)\n );\n }\n\n /**\n * Fit the given geometry or extent based on the given map size and border.\n * The size is pixel dimensions of the box to fit the extent into.\n * In most cases you will want to use the map size, that is `map.getSize()`.\n * Takes care of the map angle.\n * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n * extent to fit the view to.\n * @param {FitOptions} [options] Options.\n * @api\n */\n fit(geometryOrExtent, options) {\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n let geometry;\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(\n Array.isArray(geometryOrExtent) ||\n typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) ===\n 'function',\n 'Invalid extent or geometry provided as `geometry`',\n );\n if (Array.isArray(geometryOrExtent)) {\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(\n !(0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.isEmpty)(geometryOrExtent),\n 'Cannot fit empty extent provided as `geometry`',\n );\n const extent = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(geometryOrExtent, this.getProjection());\n geometry = (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_10__.fromExtent)(extent);\n } else if (geometryOrExtent.getType() === 'Circle') {\n const extent = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(\n geometryOrExtent.getExtent(),\n this.getProjection(),\n );\n geometry = (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_10__.fromExtent)(extent);\n geometry.rotate(this.getRotation(), (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getCenter)(extent));\n } else {\n const userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();\n if (userProjection) {\n geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometryOrExtent\n .clone()\n .transform(userProjection, this.getProjection())\n );\n } else {\n geometry = geometryOrExtent;\n }\n }\n\n this.fitInternal(geometry, options);\n }\n\n /**\n * Calculate rotated extent\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @return {import(\"./extent\").Extent} The rotated extent for the geometry.\n */\n rotatedExtentForGeometry(geometry) {\n const rotation = this.getRotation();\n const cosAngle = Math.cos(rotation);\n const sinAngle = Math.sin(-rotation);\n const coords = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n let minRotX = +Infinity;\n let minRotY = +Infinity;\n let maxRotX = -Infinity;\n let maxRotY = -Infinity;\n for (let i = 0, ii = coords.length; i < ii; i += stride) {\n const rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n const rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n minRotX = Math.min(minRotX, rotX);\n minRotY = Math.min(minRotY, rotY);\n maxRotX = Math.max(maxRotX, rotX);\n maxRotY = Math.max(maxRotY, rotY);\n }\n return [minRotX, minRotY, maxRotX, maxRotY];\n }\n\n /**\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @param {FitOptions} [options] Options.\n */\n fitInternal(geometry, options) {\n options = options || {};\n let size = options.size;\n if (!size) {\n size = this.getViewportSizeMinusPadding_();\n }\n const padding =\n options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n const nearest = options.nearest !== undefined ? options.nearest : false;\n let minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.getResolutionForZoom(options.maxZoom);\n } else {\n minResolution = 0;\n }\n\n const rotatedExtent = this.rotatedExtentForGeometry(geometry);\n\n // calculate resolution\n let resolution = this.getResolutionForExtentInternal(rotatedExtent, [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ]);\n resolution = isNaN(resolution)\n ? minResolution\n : Math.max(resolution, minResolution);\n resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n\n // calculate center\n const rotation = this.getRotation();\n const sinAngle = Math.sin(rotation);\n const cosAngle = Math.cos(rotation);\n const centerRot = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getCenter)(rotatedExtent);\n centerRot[0] += ((padding[1] - padding[3]) / 2) * resolution;\n centerRot[1] += ((padding[0] - padding[2]) / 2) * resolution;\n const centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle;\n const centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle;\n const center = this.getConstrainedCenter([centerX, centerY], resolution);\n const callback = options.callback ? options.callback : _functions_js__WEBPACK_IMPORTED_MODULE_11__.VOID;\n\n if (options.duration !== undefined) {\n this.animateInternal(\n {\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing,\n },\n callback,\n );\n } else {\n this.targetResolution_ = resolution;\n this.targetCenter_ = center;\n this.applyTargetState_(false, true);\n animationCallback(callback, true);\n }\n }\n\n /**\n * Center on coordinate and view position.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @api\n */\n centerOn(coordinate, size, position) {\n this.centerOnInternal(\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(coordinate, this.getProjection()),\n size,\n position,\n );\n }\n\n /**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n */\n centerOnInternal(coordinate, size, position) {\n this.setCenterInternal(\n calculateCenterOn(\n coordinate,\n size,\n position,\n this.getResolution(),\n this.getRotation(),\n ),\n );\n }\n\n /**\n * Calculates the shift between map and viewport center.\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array|undefined} Center shift.\n */\n calculateCenterShift(center, resolution, rotation, size) {\n let centerShift;\n const padding = this.padding_;\n if (padding && center) {\n const reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n const shiftedCenter = calculateCenterOn(\n center,\n size,\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation,\n );\n centerShift = [\n center[0] - shiftedCenter[0],\n center[1] - shiftedCenter[1],\n ];\n }\n return centerShift;\n }\n\n /**\n * @return {boolean} Is defined.\n */\n isDef() {\n return !!this.getCenterInternal() && this.getResolution() !== undefined;\n }\n\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n * @api\n */\n adjustCenter(deltaCoordinates) {\n const center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate)(this.targetCenter_, this.getProjection());\n this.setCenter([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\n\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n */\n adjustCenterInternal(deltaCoordinates) {\n const center = this.targetCenter_;\n this.setCenterInternal([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\n\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n adjustResolution(ratio, anchor) {\n anchor = anchor && (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(anchor, this.getProjection());\n this.adjustResolutionInternal(ratio, anchor);\n }\n\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n adjustResolutionInternal(ratio, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const size = this.getViewportSize_(this.getRotation());\n const newResolution = this.constraints_.resolution(\n this.targetResolution_ * ratio,\n 0,\n size,\n isMoving,\n );\n\n if (anchor) {\n this.targetCenter_ = this.calculateCenterZoom(newResolution, anchor);\n }\n\n this.targetResolution_ *= ratio;\n this.applyTargetState_();\n }\n\n /**\n * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom level.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n adjustZoom(delta, anchor) {\n this.adjustResolution(Math.pow(this.zoomFactor_, -delta), anchor);\n }\n\n /**\n * Adds a value to the view rotation, optionally using an anchor. Any rotation\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n * @api\n */\n adjustRotation(delta, anchor) {\n if (anchor) {\n anchor = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(anchor, this.getProjection());\n }\n this.adjustRotationInternal(delta, anchor);\n }\n\n /**\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n */\n adjustRotationInternal(delta, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const newRotation = this.constraints_.rotation(\n this.targetRotation_ + delta,\n isMoving,\n );\n if (anchor) {\n this.targetCenter_ = this.calculateCenterRotate(newRotation, anchor);\n }\n this.targetRotation_ += delta;\n this.applyTargetState_();\n }\n\n /**\n * Set the center of the current view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n * @observable\n * @api\n */\n setCenter(center) {\n this.setCenterInternal(\n center ? (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(center, this.getProjection()) : center,\n );\n }\n\n /**\n * Set the center using the view projection (not the user projection).\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n */\n setCenterInternal(center) {\n this.targetCenter_ = center;\n this.applyTargetState_();\n }\n\n /**\n * @param {import(\"./ViewHint.js\").default} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n setHint(hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n }\n\n /**\n * Set the resolution for this view. Any resolution constraint will apply.\n * @param {number|undefined} resolution The resolution of the view.\n * @observable\n * @api\n */\n setResolution(resolution) {\n this.targetResolution_ = resolution;\n this.applyTargetState_();\n }\n\n /**\n * Set the rotation for this view. Any rotation constraint will apply.\n * @param {number} rotation The rotation of the view in radians.\n * @observable\n * @api\n */\n setRotation(rotation) {\n this.targetRotation_ = rotation;\n this.applyTargetState_();\n }\n\n /**\n * Zoom to a specific zoom level. Any resolution constrain will apply.\n * @param {number} zoom Zoom level.\n * @api\n */\n setZoom(zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n }\n\n /**\n * Recompute rotation/resolution/center based on target values.\n * Note: we have to compute rotation first, then resolution and center considering that\n * parameters can influence one another in case a view extent constraint is present.\n * @param {boolean} [doNotCancelAnims] Do not cancel animations.\n * @param {boolean} [forceMoving] Apply constraints as if the view is moving.\n * @private\n */\n applyTargetState_(doNotCancelAnims, forceMoving) {\n const isMoving =\n this.getAnimating() || this.getInteracting() || forceMoving;\n\n // compute rotation\n const newRotation = this.constraints_.rotation(\n this.targetRotation_,\n isMoving,\n );\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n 0,\n size,\n isMoving,\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n isMoving,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size,\n ),\n );\n\n if (this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ROTATION) !== newRotation) {\n this.set(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].ROTATION, newRotation);\n }\n if (this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].RESOLUTION) !== newResolution) {\n this.set(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].RESOLUTION, newResolution);\n this.set('zoom', this.getZoom(), true);\n }\n if (\n !newCenter ||\n !this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CENTER) ||\n !(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_6__.equals)(this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CENTER), newCenter)\n ) {\n this.set(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CENTER, newCenter);\n }\n\n if (this.getAnimating() && !doNotCancelAnims) {\n this.cancelAnimations();\n }\n this.cancelAnchor_ = undefined;\n }\n\n /**\n * If any constraints need to be applied, an animation will be triggered.\n * This is typically done on interaction end.\n * Note: calling this with a duration of 0 will apply the constrained values straight away,\n * without animation.\n * @param {number} [duration] The animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n resolveConstraints(duration, resolutionDirection, anchor) {\n duration = duration !== undefined ? duration : 200;\n const direction = resolutionDirection || 0;\n\n const newRotation = this.constraints_.rotation(this.targetRotation_);\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n direction,\n size,\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n false,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size,\n ),\n );\n\n if (duration === 0 && !this.cancelAnchor_) {\n this.targetResolution_ = newResolution;\n this.targetRotation_ = newRotation;\n this.targetCenter_ = newCenter;\n this.applyTargetState_();\n return;\n }\n\n anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n this.cancelAnchor_ = undefined;\n\n if (\n this.getResolution() !== newResolution ||\n this.getRotation() !== newRotation ||\n !this.getCenterInternal() ||\n !(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_6__.equals)(this.getCenterInternal(), newCenter)\n ) {\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n\n this.animateInternal({\n rotation: newRotation,\n center: newCenter,\n resolution: newResolution,\n duration: duration,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_3__.easeOut,\n anchor: anchor,\n });\n }\n }\n\n /**\n * Notify the View that an interaction has started.\n * The view state will be resolved to a stable one if needed\n * (depending on its constraints).\n * @api\n */\n beginInteraction() {\n this.resolveConstraints(0);\n\n this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].INTERACTING, 1);\n }\n\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n endInteraction(duration, resolutionDirection, anchor) {\n anchor = anchor && (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(anchor, this.getProjection());\n this.endInteractionInternal(duration, resolutionDirection, anchor);\n }\n\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n endInteractionInternal(duration, resolutionDirection, anchor) {\n if (!this.getInteracting()) {\n return;\n }\n this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].INTERACTING, -1);\n this.resolveConstraints(duration, resolutionDirection, anchor);\n }\n\n /**\n * Get a valid position for the view center according to the current constraints.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n * @param {number} [targetResolution] Target resolution. If not supplied, the current one will be used.\n * This is useful to guess a valid center position at a different zoom level.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n */\n getConstrainedCenter(targetCenter, targetResolution) {\n const size = this.getViewportSize_(this.getRotation());\n return this.constraints_.center(\n targetCenter,\n targetResolution || this.getResolution(),\n size,\n );\n }\n\n /**\n * Get a valid zoom level according to the current view constraints.\n * @param {number|undefined} targetZoom Target zoom.\n * @param {number} [direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid zoom level.\n */\n getConstrainedZoom(targetZoom, direction) {\n const targetRes = this.getResolutionForZoom(targetZoom);\n return this.getZoomForResolution(\n this.getConstrainedResolution(targetRes, direction),\n );\n }\n\n /**\n * Get a valid resolution according to the current view constraints.\n * @param {number|undefined} targetResolution Target resolution.\n * @param {number} [direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid resolution.\n */\n getConstrainedResolution(targetResolution, direction) {\n direction = direction || 0;\n const size = this.getViewportSize_(this.getRotation());\n\n return this.constraints_.resolution(targetResolution, direction, size);\n }\n}\n\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n setTimeout(function () {\n callback(returnValue);\n }, 0);\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nfunction createCenterConstraint(options) {\n if (options.extent !== undefined) {\n const smooth =\n options.smoothExtentConstraint !== undefined\n ? options.smoothExtentConstraint\n : true;\n return (0,_centerconstraint_js__WEBPACK_IMPORTED_MODULE_12__.createExtent)(options.extent, options.constrainOnlyCenter, smooth);\n }\n\n const projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection)(options.projection, 'EPSG:3857');\n if (options.multiWorld !== true && projection.isGlobal()) {\n const extent = projection.getExtent().slice();\n extent[0] = -Infinity;\n extent[2] = Infinity;\n return (0,_centerconstraint_js__WEBPACK_IMPORTED_MODULE_12__.createExtent)(extent, false, false);\n }\n\n return _centerconstraint_js__WEBPACK_IMPORTED_MODULE_12__.none;\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n * minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nfunction createResolutionConstraint(options) {\n let resolutionConstraint;\n let maxResolution;\n let minResolution;\n\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n const defaultMaxZoom = 28;\n const defaultZoomFactor = 2;\n\n let minZoom =\n options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n\n let maxZoom =\n options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n\n const zoomFactor =\n options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n\n const multiWorld =\n options.multiWorld !== undefined ? options.multiWorld : false;\n\n const smooth =\n options.smoothResolutionConstraint !== undefined\n ? options.smoothResolutionConstraint\n : true;\n\n const showFullExtent =\n options.showFullExtent !== undefined ? options.showFullExtent : false;\n\n const projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection)(options.projection, 'EPSG:3857');\n const projExtent = projection.getExtent();\n let constrainOnlyCenter = options.constrainOnlyCenter;\n let extent = options.extent;\n if (!multiWorld && !extent && projection.isGlobal()) {\n constrainOnlyCenter = false;\n extent = projExtent;\n }\n\n if (options.resolutions !== undefined) {\n const resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution =\n resolutions[maxZoom] !== undefined\n ? resolutions[maxZoom]\n : resolutions[resolutions.length - 1];\n\n if (options.constrainResolution) {\n resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_13__.createSnapToResolutions)(\n resolutions,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent,\n );\n } else {\n resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_13__.createMinMaxResolution)(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent,\n );\n }\n } else {\n // calculate the default min and max resolution\n const size = !projExtent\n ? // use an extent that can fit the whole world if need be\n (360 * _proj_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT.degrees) / projection.getMetersPerUnit()\n : Math.max((0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getWidth)(projExtent), (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getHeight)(projExtent));\n\n const defaultMaxResolution =\n size / _tilegrid_common_js__WEBPACK_IMPORTED_MODULE_14__.DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n const defaultMinResolution =\n defaultMaxResolution /\n Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n // user provided maxResolution takes precedence\n maxResolution = options.maxResolution;\n if (maxResolution !== undefined) {\n minZoom = 0;\n } else {\n maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n }\n\n // user provided minResolution takes precedence\n minResolution = options.minResolution;\n if (minResolution === undefined) {\n if (options.maxZoom !== undefined) {\n if (options.maxResolution !== undefined) {\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n } else {\n minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n }\n } else {\n minResolution = defaultMinResolution;\n }\n }\n\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom =\n minZoom +\n Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor),\n );\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n if (options.constrainResolution) {\n resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_13__.createSnapToPower)(\n zoomFactor,\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent,\n );\n } else {\n resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_13__.createMinMaxResolution)(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent,\n );\n }\n }\n return {\n constraint: resolutionConstraint,\n maxResolution: maxResolution,\n minResolution: minResolution,\n minZoom: minZoom,\n zoomFactor: zoomFactor,\n };\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nfunction createRotationConstraint(options) {\n const enableRotation =\n options.enableRotation !== undefined ? options.enableRotation : true;\n if (enableRotation) {\n const constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return (0,_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_15__.createSnapToZero)();\n }\n if (constrainRotation === false) {\n return _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_15__.none;\n }\n if (typeof constrainRotation === 'number') {\n return (0,_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_15__.createSnapToN)(constrainRotation);\n }\n return _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_15__.none;\n }\n return _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_15__.disable;\n}\n\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nfunction isNoopAnimation(animation) {\n if (animation.sourceCenter && animation.targetCenter) {\n if (!(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_6__.equals)(animation.sourceCenter, animation.targetCenter)) {\n return false;\n }\n }\n if (animation.sourceResolution !== animation.targetResolution) {\n return false;\n }\n if (animation.sourceRotation !== animation.targetRotation) {\n return false;\n }\n return true;\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n // calculate rotated position\n const cosAngle = Math.cos(-rotation);\n let sinAngle = Math.sin(-rotation);\n let rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n let rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n const centerX = rotX * cosAngle - rotY * sinAngle;\n const centerY = rotY * cosAngle + rotX * sinAngle;\n\n return [centerX, centerY];\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (View);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/View.js?"); /***/ }), /***/ "./node_modules/ol/ViewHint.js": /*!*************************************!*\ !*** ./node_modules/ol/ViewHint.js ***! \*************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n ANIMATING: 0,\n INTERACTING: 1,\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/ViewHint.js?"); /***/ }), /***/ "./node_modules/ol/ViewProperty.js": /*!*****************************************!*\ !*** ./node_modules/ol/ViewProperty.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation',\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/ViewProperty.js?"); /***/ }), /***/ "./node_modules/ol/array.js": /*!**********************************!*\ !*** ./node_modules/ol/array.js ***! \**********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ascending: () => (/* binding */ ascending),\n/* harmony export */ binarySearch: () => (/* binding */ binarySearch),\n/* harmony export */ descending: () => (/* binding */ descending),\n/* harmony export */ equals: () => (/* binding */ equals),\n/* harmony export */ extend: () => (/* binding */ extend),\n/* harmony export */ isSorted: () => (/* binding */ isSorted),\n/* harmony export */ linearFindNearest: () => (/* binding */ linearFindNearest),\n/* harmony export */ remove: () => (/* binding */ remove),\n/* harmony export */ reverseSubArray: () => (/* binding */ reverseSubArray),\n/* harmony export */ stableSort: () => (/* binding */ stableSort)\n/* harmony export */ });\n/**\n * @module ol/array\n */\n\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function} [comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nfunction binarySearch(haystack, needle, comparator) {\n let mid, cmp;\n comparator = comparator || ascending;\n let low = 0;\n let high = haystack.length;\n let found = false;\n\n while (low < high) {\n /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n * to double (which gives the wrong results). */\n mid = low + ((high - low) >> 1);\n cmp = +comparator(haystack[mid], needle);\n\n if (cmp < 0.0) {\n /* Too low. */\n low = mid + 1;\n } else {\n /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n\n /* Key not found. */\n return found ? low : ~low;\n}\n\n/**\n * Compare function sorting arrays in ascending order. Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is less than, equal to, or greater than the second.\n */\nfunction ascending(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * Compare function sorting arrays in descending order. Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is greater than, equal to, or less than the second.\n */\nfunction descending(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\n\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n\n/**\n * @param {Array} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n * 0 means return the nearest,\n * > 0 means return the largest nearest,\n * < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nfunction linearFindNearest(arr, target, direction) {\n if (arr[0] <= target) {\n return 0;\n }\n\n const n = arr.length;\n if (target <= arr[n - 1]) {\n return n - 1;\n }\n\n if (typeof direction === 'function') {\n for (let i = 1; i < n; ++i) {\n const candidate = arr[i];\n if (candidate === target) {\n return i;\n }\n if (candidate < target) {\n if (direction(target, arr[i - 1], candidate) > 0) {\n return i - 1;\n }\n return i;\n }\n }\n return n - 1;\n }\n\n if (direction > 0) {\n for (let i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\n }\n }\n return n - 1;\n }\n\n if (direction < 0) {\n for (let i = 1; i < n; ++i) {\n if (arr[i] <= target) {\n return i;\n }\n }\n return n - 1;\n }\n\n for (let i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n }\n if (arr[i] < target) {\n if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n }\n return i;\n }\n }\n return n - 1;\n}\n\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nfunction reverseSubArray(arr, begin, end) {\n while (begin < end) {\n const tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {!Array|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nfunction extend(arr, data) {\n const extension = Array.isArray(data) ? data : [data];\n const length = extension.length;\n for (let i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nfunction remove(arr, obj) {\n const i = arr.indexOf(obj);\n const found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nfunction equals(arr1, arr2) {\n const len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (let i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preserved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nfunction stableSort(arr, compareFnc) {\n const length = arr.length;\n const tmp = Array(arr.length);\n let i;\n for (i = 0; i < length; i++) {\n tmp[i] = {index: i, value: arr[i]};\n }\n tmp.sort(function (a, b) {\n return compareFnc(a.value, b.value) || a.index - b.index;\n });\n for (i = 0; i < arr.length; i++) {\n arr[i] = tmp[i].value;\n }\n}\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [func] Comparison function.\n * @param {boolean} [strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nfunction isSorted(arr, func, strict) {\n const compare = func || ascending;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n const res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (strict && res === 0));\n });\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/array.js?"); /***/ }), /***/ "./node_modules/ol/asserts.js": /*!************************************!*\ !*** ./node_modules/ol/asserts.js ***! \************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ assert: () => (/* binding */ assert)\n/* harmony export */ });\n/**\n * @module ol/asserts\n */\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {string} errorMessage Error message.\n */\nfunction assert(assertion, errorMessage) {\n if (!assertion) {\n throw new Error(errorMessage);\n }\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/asserts.js?"); /***/ }), /***/ "./node_modules/ol/centerconstraint.js": /*!*********************************************!*\ !*** ./node_modules/ol/centerconstraint.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createExtent: () => (/* binding */ createExtent),\n/* harmony export */ none: () => (/* binding */ none)\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/centerconstraint\n */\n\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nfunction createExtent(extent, onlyCenter, smooth) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @param {number|undefined} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @param {Array} [centerShift] Shift between map center and viewport center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, isMoving, centerShift) {\n if (!center) {\n return undefined;\n }\n if (!resolution && !onlyCenter) {\n return center;\n }\n const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n const shiftX = centerShift ? centerShift[0] : 0;\n const shiftY = centerShift ? centerShift[1] : 0;\n let minX = extent[0] + viewWidth / 2 + shiftX;\n let maxX = extent[2] - viewWidth / 2 + shiftX;\n let minY = extent[1] + viewHeight / 2 + shiftY;\n let maxY = extent[3] - viewHeight / 2 + shiftY;\n\n // note: when zooming out of bounds, min and max values for x and y may\n // end up inverted (min > max); this has to be accounted for\n if (minX > maxX) {\n minX = (maxX + minX) / 2;\n maxX = minX;\n }\n if (minY > maxY) {\n minY = (maxY + minY) / 2;\n maxY = minY;\n }\n\n let x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.clamp)(center[0], minX, maxX);\n let y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.clamp)(center[1], minY, maxY);\n\n // during an interaction, allow some overscroll\n if (isMoving && smooth && resolution) {\n const ratio = 30 * resolution;\n x +=\n -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n y +=\n -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n\n return [x, y];\n }\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} [center] Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nfunction none(center) {\n return center;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/centerconstraint.js?"); /***/ }), /***/ "./node_modules/ol/color.js": /*!**********************************!*\ !*** ./node_modules/ol/color.js ***! \**********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NO_COLOR: () => (/* binding */ NO_COLOR),\n/* harmony export */ asArray: () => (/* binding */ asArray),\n/* harmony export */ asString: () => (/* binding */ asString),\n/* harmony export */ fromString: () => (/* binding */ fromString),\n/* harmony export */ isStringColor: () => (/* binding */ isStringColor),\n/* harmony export */ lchaToRgba: () => (/* binding */ lchaToRgba),\n/* harmony export */ normalize: () => (/* binding */ normalize),\n/* harmony export */ rgbaToLcha: () => (/* binding */ rgbaToLcha),\n/* harmony export */ toString: () => (/* binding */ toString),\n/* harmony export */ withAlpha: () => (/* binding */ withAlpha)\n/* harmony export */ });\n/* harmony import */ var color_space_lchuv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! color-space/lchuv.js */ \"./node_modules/color-space/lchuv.js\");\n/* harmony import */ var color_rgba__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! color-rgba */ \"./node_modules/color-rgba/index.js\");\n/* harmony import */ var color_space_rgb_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! color-space/rgb.js */ \"./node_modules/color-space/rgb.js\");\n/* harmony import */ var color_space_xyz_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! color-space/xyz.js */ \"./node_modules/color-space/xyz.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/color\n */\n\n\n\n\n\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array} Color\n * @api\n */\n\n/**\n * Color to indicate that no color should be rendered. This is meant to be used for per-reference\n * comparisons only.\n * @type {Color}\n */\nconst NO_COLOR = [NaN, NaN, NaN, 0];\n\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nfunction asString(color) {\n if (typeof color === 'string') {\n return color;\n }\n return toString(color);\n}\n\n/**\n * @type {number}\n */\nconst MAX_CACHE_SIZE = 1024;\n\n/**\n * We maintain a small cache of parsed strings. Whenever the cache grows too large,\n * we delete an arbitrary set of the entries.\n *\n * @type {Object}\n */\nconst cache = {};\n\n/**\n * @type {number}\n */\nlet cacheSize = 0;\n\n/**\n * @param {Color} color A color that may or may not have an alpha channel.\n * @return {Color} The input color with an alpha channel. If the input color has\n * an alpha channel, the input color will be returned unchanged. Otherwise, a new\n * array will be returned with the input color and an alpha channel of 1.\n */\nfunction withAlpha(color) {\n if (color.length === 4) {\n return color;\n }\n const output = color.slice();\n output[3] = 1;\n return output;\n}\n\n/**\n * @param {Color} color RGBA color.\n * @return {Color} LCHuv color with alpha.\n */\nfunction rgbaToLcha(color) {\n const output = color_space_xyz_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].lchuv(color_space_rgb_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].xyz(color));\n output[3] = color[3];\n return output;\n}\n\n/**\n * @param {Color} color LCHuv color with alpha.\n * @return {Color} RGBA color.\n */\nfunction lchaToRgba(color) {\n const output = color_space_xyz_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].rgb(color_space_lchuv_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].xyz(color));\n output[3] = color[3];\n return output;\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nfunction fromString(s) {\n if (s === 'none') {\n return NO_COLOR;\n }\n if (cache.hasOwnProperty(s)) {\n return cache[s];\n }\n if (cacheSize >= MAX_CACHE_SIZE) {\n let i = 0;\n for (const key in cache) {\n if ((i++ & 3) === 0) {\n delete cache[key];\n --cacheSize;\n }\n }\n }\n\n const color = (0,color_rgba__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(s);\n if (color.length !== 4) {\n throw new Error('failed to parse \"' + s + '\" as color');\n }\n for (const c of color) {\n if (isNaN(c)) {\n throw new Error('failed to parse \"' + s + '\" as color');\n }\n }\n normalize(color);\n cache[s] = color;\n ++cacheSize;\n return color;\n}\n\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nfunction asArray(color) {\n if (Array.isArray(color)) {\n return color;\n }\n return fromString(color);\n}\n\n/**\n * Exported for the tests.\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nfunction normalize(color) {\n color[0] = (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)((color[0] + 0.5) | 0, 0, 255);\n color[1] = (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)((color[1] + 0.5) | 0, 0, 255);\n color[2] = (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)((color[2] + 0.5) | 0, 0, 255);\n color[3] = (0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(color[3], 0, 1);\n return color;\n}\n\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nfunction toString(color) {\n let r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n let g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n let b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n const a = color[3] === undefined ? 1 : Math.round(color[3] * 1000) / 1000;\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nfunction isStringColor(s) {\n try {\n fromString(s);\n return true;\n } catch (_) {\n return false;\n }\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/color.js?"); /***/ }), /***/ "./node_modules/ol/colorlike.js": /*!**************************************!*\ !*** ./node_modules/ol/colorlike.js ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ asColorLike: () => (/* binding */ asColorLike)\n/* harmony export */ });\n/* harmony import */ var _ImageState_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ImageState.js */ \"./node_modules/ol/ImageState.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/ol/dom.js\");\n/* harmony import */ var _style_IconImage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style/IconImage.js */ \"./node_modules/ol/style/IconImage.js\");\n/* harmony import */ var _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style/IconImageCache.js */ \"./node_modules/ol/style/IconImageCache.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/ol/color.js\");\n/**\n * @module ol/colorlike\n */\n\n\n\n\n\n\n/**\n * @typedef {Object} PatternDescriptor\n * @property {string} src Pattern image URL\n * @property {import(\"./color.js\").Color|string} [color] Color to tint the pattern with.\n * @property {import(\"./size.js\").Size} [size] Size of the desired slice from the pattern image.\n * Use this together with `offset` when the pattern image is a sprite sheet.\n * @property {import(\"./size.js\").Size} [offset] Offset of the desired slice from the pattern image.\n * Use this together with `size` when the pattern image is a sprite sheet.\n */\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, [CanvasPattern](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern),\n * or [CanvasGradient](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient). The origin for\n * patterns and gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n\n/**\n * @param {import(\"./color.js\").Color|ColorLike|PatternDescriptor|null} color Color.\n * @return {ColorLike|null} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nfunction asColorLike(color) {\n if (!color) {\n return null;\n }\n if (Array.isArray(color)) {\n return (0,_color_js__WEBPACK_IMPORTED_MODULE_0__.toString)(color);\n }\n if (typeof color === 'object' && 'src' in color) {\n return asCanvasPattern(color);\n }\n return color;\n}\n\n/**\n * @param {PatternDescriptor} pattern Pattern descriptor.\n * @return {CanvasPattern|null} Canvas pattern or null if the pattern referenced in the\n * PatternDescriptor was not found in the icon image cache.\n */\nfunction asCanvasPattern(pattern) {\n if (!pattern.offset || !pattern.size) {\n return _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_1__.shared.getPattern(pattern.src, 'anonymous', pattern.color);\n }\n\n const cacheKey = pattern.src + ':' + pattern.offset;\n\n const canvasPattern = _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_1__.shared.getPattern(\n cacheKey,\n undefined,\n pattern.color,\n );\n if (canvasPattern) {\n return canvasPattern;\n }\n\n const iconImage = _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_1__.shared.get(pattern.src, 'anonymous', null);\n if (iconImage.getImageState() !== _ImageState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LOADED) {\n return null;\n }\n const patternCanvasContext = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.createCanvasContext2D)(\n pattern.size[0],\n pattern.size[1],\n );\n patternCanvasContext.drawImage(\n iconImage.getImage(1),\n pattern.offset[0],\n pattern.offset[1],\n pattern.size[0],\n pattern.size[1],\n 0,\n 0,\n pattern.size[0],\n pattern.size[1],\n );\n (0,_style_IconImage_js__WEBPACK_IMPORTED_MODULE_4__.get)(\n patternCanvasContext.canvas,\n cacheKey,\n undefined,\n _ImageState_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LOADED,\n pattern.color,\n true,\n );\n return _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_1__.shared.getPattern(cacheKey, undefined, pattern.color);\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/colorlike.js?"); /***/ }), /***/ "./node_modules/ol/console.js": /*!************************************!*\ !*** ./node_modules/ol/console.js ***! \************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ error: () => (/* binding */ error),\n/* harmony export */ log: () => (/* binding */ log),\n/* harmony export */ setLevel: () => (/* binding */ setLevel),\n/* harmony export */ warn: () => (/* binding */ warn)\n/* harmony export */ });\n/**\n * @module ol/console\n */\n\n/**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */\n\n/**\n * @type {Object}\n */\nconst levels = {\n info: 1,\n warn: 2,\n error: 3,\n none: 4,\n};\n\n/**\n * @type {number}\n */\nlet level = levels.info;\n\n/**\n * Set the logging level. By default, the level is set to 'info' and all\n * messages will be logged. Set to 'warn' to only display warnings and errors.\n * Set to 'error' to only display errors. Set to 'none' to silence all messages.\n *\n * @param {Level} l The new level.\n */\nfunction setLevel(l) {\n level = levels[l];\n}\n\n/**\n * @param {...any} args Arguments to log\n */\nfunction log(...args) {\n if (level > levels.info) {\n return;\n }\n console.log(...args); // eslint-disable-line no-console\n}\n\n/**\n * @param {...any} args Arguments to log\n */\nfunction warn(...args) {\n if (level > levels.warn) {\n return;\n }\n console.warn(...args); // eslint-disable-line no-console\n}\n\n/**\n * @param {...any} args Arguments to log\n */\nfunction error(...args) {\n if (level > levels.error) {\n return;\n }\n console.error(...args); // eslint-disable-line no-console\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/console.js?"); /***/ }), /***/ "./node_modules/ol/control.js": /*!************************************!*\ !*** ./node_modules/ol/control.js ***! \************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Attribution: () => (/* reexport safe */ _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ Control: () => (/* reexport safe */ _control_Control_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ FullScreen: () => (/* reexport safe */ _control_FullScreen_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ MousePosition: () => (/* reexport safe */ _control_MousePosition_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ OverviewMap: () => (/* reexport safe */ _control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n/* harmony export */ Rotate: () => (/* reexport safe */ _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]),\n/* harmony export */ ScaleLine: () => (/* reexport safe */ _control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]),\n/* harmony export */ Zoom: () => (/* reexport safe */ _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]),\n/* harmony export */ ZoomSlider: () => (/* reexport safe */ _control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]),\n/* harmony export */ ZoomToExtent: () => (/* reexport safe */ _control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ defaults: () => (/* reexport safe */ _control_defaults_js__WEBPACK_IMPORTED_MODULE_10__.defaults)\n/* harmony export */ });\n/* harmony import */ var _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./control/Attribution.js */ \"./node_modules/ol/control/Attribution.js\");\n/* harmony import */ var _control_Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./control/Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _control_FullScreen_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control/FullScreen.js */ \"./node_modules/ol/control/FullScreen.js\");\n/* harmony import */ var _control_MousePosition_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control/MousePosition.js */ \"./node_modules/ol/control/MousePosition.js\");\n/* harmony import */ var _control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./control/OverviewMap.js */ \"./node_modules/ol/control/OverviewMap.js\");\n/* harmony import */ var _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./control/Rotate.js */ \"./node_modules/ol/control/Rotate.js\");\n/* harmony import */ var _control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./control/ScaleLine.js */ \"./node_modules/ol/control/ScaleLine.js\");\n/* harmony import */ var _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./control/Zoom.js */ \"./node_modules/ol/control/Zoom.js\");\n/* harmony import */ var _control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./control/ZoomSlider.js */ \"./node_modules/ol/control/ZoomSlider.js\");\n/* harmony import */ var _control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./control/ZoomToExtent.js */ \"./node_modules/ol/control/ZoomToExtent.js\");\n/* harmony import */ var _control_defaults_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./control/defaults.js */ \"./node_modules/ol/control/defaults.js\");\n/**\n * @module ol/control\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control.js?"); /***/ }), /***/ "./node_modules/ol/control/Attribution.js": /*!************************************************!*\ !*** ./node_modules/ol/control/Attribution.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/**\n * @module ol/control/Attribution\n */\n\n\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string|HTMLElement} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\n * @property {string|HTMLElement} [collapseLabel='›'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {string|Array|undefined} [attributions] Optional attribution(s) that will always be\n * displayed regardless of the layers rendered\n */\n\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nclass Attribution extends _Control_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Attribution options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.ulElement_ = document.createElement('ul');\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.userCollapsed_ = this.collapsed_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overrideCollapsible_ = options.collapsible !== undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n /**\n * @private\n * @type {string | Array | undefined}\n */\n this.attributions_ = options.attributions;\n\n const className =\n options.className !== undefined ? options.className : 'ol-attribution';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n const expandClassName =\n options.expandClassName !== undefined\n ? options.expandClassName\n : className + '-expand';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n\n const collapseClassName =\n options.collapseClassName !== undefined\n ? options.collapseClassName\n : className + '-collapse';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n this.collapseLabel_.className = collapseClassName;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : 'i';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n this.label_.className = expandClassName;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.toggleButton_ = document.createElement('button');\n this.toggleButton_.setAttribute('type', 'button');\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n this.toggleButton_.title = tipLabel;\n this.toggleButton_.appendChild(activeLabel);\n\n this.toggleButton_.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n const cssClasses =\n className +\n ' ' +\n _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSELECTABLE +\n ' ' +\n _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.toggleButton_);\n element.appendChild(this.ulElement_);\n\n /**\n * A list of currently rendered resolutions.\n * @type {Array}\n * @private\n */\n this.renderedAttributions_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @return {Array} Attributions.\n * @private\n */\n collectSourceAttributions_(frameState) {\n const layers = this.getMap().getAllLayers();\n const visibleAttributions = new Set(\n layers.flatMap((layer) => layer.getAttributions(frameState)),\n );\n if (this.attributions_ !== undefined) {\n Array.isArray(this.attributions_)\n ? this.attributions_.forEach((item) => visibleAttributions.add(item))\n : visibleAttributions.add(this.attributions_);\n }\n\n if (!this.overrideCollapsible_) {\n const collapsible = !layers.some(\n (layer) => layer.getSource()?.getAttributionsCollapsible() === false,\n );\n this.setCollapsible(collapsible);\n }\n return Array.from(visibleAttributions);\n }\n\n /**\n * @private\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n async updateElement_(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const attributions = await Promise.all(\n this.collectSourceAttributions_(frameState).map((attribution) =>\n (0,_functions_js__WEBPACK_IMPORTED_MODULE_3__.toPromise)(() => attribution),\n ),\n );\n\n const visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n\n if ((0,_array_js__WEBPACK_IMPORTED_MODULE_4__.equals)(attributions, this.renderedAttributions_)) {\n return;\n }\n\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_5__.removeChildren)(this.ulElement_);\n\n // append the attributions\n for (let i = 0, ii = attributions.length; i < ii; ++i) {\n const element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n\n this.renderedAttributions_ = attributions;\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n this.userCollapsed_ = this.collapsed_;\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_COLLAPSED);\n if (this.collapsed_) {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_5__.replaceNode)(this.collapseLabel_, this.label_);\n } else {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_5__.replaceNode)(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n }\n\n /**\n * Return `true` if the attribution is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (this.userCollapsed_) {\n this.handleToggle_();\n }\n }\n\n /**\n * Collapse or expand the attribution according to the passed parameter. Will\n * not do anything if the attribution isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n this.userCollapsed_ = collapsed;\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\n\n /**\n * Return `true` when the attribution is currently collapsed or `false`\n * otherwise.\n * @return {boolean} True if the widget is collapsed.\n * @api\n */\n getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Attribution);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/Attribution.js?"); /***/ }), /***/ "./node_modules/ol/control/Control.js": /*!********************************************!*\ !*** ./node_modules/ol/control/Control.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n/**\n * @module ol/control/Control\n */\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * const myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nclass Control extends _Object_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} options Control options.\n */\n constructor(options) {\n super();\n\n const element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = element ? element : null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target_ = null;\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @protected\n * @type {!Array}\n */\n this.listenerKeys = [];\n\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.target) {\n this.setTarget(options.target);\n }\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.element?.remove();\n super.disposeInternal();\n }\n\n /**\n * Get the map associated with this control.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n */\n setMap(map) {\n if (this.map_) {\n this.element?.remove();\n }\n for (let i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (map) {\n const target = this.target_ ?? map.getOverlayContainerStopEvent();\n if (this.element) {\n target.appendChild(this.element);\n }\n if (this.render !== _functions_js__WEBPACK_IMPORTED_MODULE_2__.VOID) {\n this.listenerKeys.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(map, _MapEventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].POSTRENDER, this.render, this),\n );\n }\n map.render();\n }\n }\n\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n render(mapEvent) {}\n\n /**\n * This function is used to set a target element for the control. It has no\n * effect if it is called after the control has been added to the map (i.e.\n * after `setMap` is called on the control). If no `target` is set in the\n * options passed to the control constructor and if `setTarget` is not called\n * then the control is added to the map's overlay container.\n * @param {HTMLElement|string} target Target.\n * @api\n */\n setTarget(target) {\n this.target_ =\n typeof target === 'string' ? document.getElementById(target) : target;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Control);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/Control.js?"); /***/ }), /***/ "./node_modules/ol/control/FullScreen.js": /*!***********************************************!*\ !*** ./node_modules/ol/control/FullScreen.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _MapProperty_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../MapProperty.js */ \"./node_modules/ol/MapProperty.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n/**\n * @module ol/control/FullScreen\n */\n\n\n\n\n\n\n\nconst events = [\n 'fullscreenchange',\n 'webkitfullscreenchange',\n 'MSFullscreenChange',\n];\n\n/**\n * @enum {string}\n */\nconst FullScreenEventType = {\n /**\n * Triggered after the map entered fullscreen.\n * @event FullScreenEventType#enterfullscreen\n * @api\n */\n ENTERFULLSCREEN: 'enterfullscreen',\n\n /**\n * Triggered after the map leave fullscreen.\n * @event FullScreenEventType#leavefullscreen\n * @api\n */\n LEAVEFULLSCREEN: 'leavefullscreen',\n};\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} FullScreenOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text|HTMLElement} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text|HTMLElement} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [activeClassName=className + '-true'] CSS class name for the button\n * when full-screen is active.\n * @property {string} [inactiveClassName=className + '-false'] CSS class name for the button\n * when full-screen is inactive.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](https://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nclass FullScreen extends _Control_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /***\n * @type {FullScreenOnSignature}\n */\n this.on;\n\n /***\n * @type {FullScreenOnSignature}\n */\n this.once;\n\n /***\n * @type {FullScreenOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {boolean}\n */\n this.keys_ = options.keys !== undefined ? options.keys : false;\n\n /**\n * @private\n * @type {HTMLElement|string|undefined}\n */\n this.source_ = options.source;\n\n /**\n * @type {boolean}\n * @private\n */\n this.isInFullscreen_ = false;\n\n /**\n * @private\n */\n this.boundHandleMapTargetChange_ = this.handleMapTargetChange_.bind(this);\n\n /**\n * @private\n * @type {string}\n */\n this.cssClassName_ =\n options.className !== undefined ? options.className : 'ol-full-screen';\n\n /**\n * @private\n * @type {Array}\n */\n this.documentListeners_ = [];\n\n /**\n * @private\n * @type {Array}\n */\n this.activeClassName_ =\n options.activeClassName !== undefined\n ? options.activeClassName.split(' ')\n : [this.cssClassName_ + '-true'];\n\n /**\n * @private\n * @type {Array}\n */\n this.inactiveClassName_ =\n options.inactiveClassName !== undefined\n ? options.inactiveClassName.split(' ')\n : [this.cssClassName_ + '-false'];\n\n const label = options.label !== undefined ? options.label : '\\u2922';\n\n /**\n * @private\n * @type {Text|HTMLElement}\n */\n this.labelNode_ =\n typeof label === 'string' ? document.createTextNode(label) : label;\n\n const labelActive =\n options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n\n /**\n * @private\n * @type {Text|HTMLElement}\n */\n this.labelActiveNode_ =\n typeof labelActive === 'string'\n ? document.createTextNode(labelActive)\n : labelActive;\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.button_ = document.createElement('button');\n this.button_.title = tipLabel;\n this.button_.setAttribute('type', 'button');\n this.button_.appendChild(this.labelNode_);\n this.button_.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK,\n this.handleClick_.bind(this),\n false,\n );\n this.setClassName_(this.button_, this.isInFullscreen_);\n\n this.element.className = `${this.cssClassName_} ${_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSELECTABLE} ${_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_CONTROL}`;\n this.element.appendChild(this.button_);\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleFullScreen_();\n }\n\n /**\n * @private\n */\n handleFullScreen_() {\n const map = this.getMap();\n if (!map) {\n return;\n }\n const doc = map.getOwnerDocument();\n if (!isFullScreenSupported(doc)) {\n return;\n }\n if (isFullScreen(doc)) {\n exitFullScreen(doc);\n } else {\n let element;\n if (this.source_) {\n element =\n typeof this.source_ === 'string'\n ? doc.getElementById(this.source_)\n : this.source_;\n } else {\n element = map.getTargetElement();\n }\n if (this.keys_) {\n requestFullScreenWithKeys(element);\n } else {\n requestFullScreen(element);\n }\n }\n }\n\n /**\n * @private\n */\n handleFullScreenChange_() {\n const map = this.getMap();\n if (!map) {\n return;\n }\n const wasInFullscreen = this.isInFullscreen_;\n this.isInFullscreen_ = isFullScreen(map.getOwnerDocument());\n if (wasInFullscreen !== this.isInFullscreen_) {\n this.setClassName_(this.button_, this.isInFullscreen_);\n if (this.isInFullscreen_) {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.replaceNode)(this.labelActiveNode_, this.labelNode_);\n this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n } else {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.replaceNode)(this.labelNode_, this.labelActiveNode_);\n this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n }\n map.updateSize();\n }\n }\n\n /**\n * @param {HTMLElement} element Target element\n * @param {boolean} fullscreen True if fullscreen class name should be active\n * @private\n */\n setClassName_(element, fullscreen) {\n if (fullscreen) {\n element.classList.remove(...this.inactiveClassName_);\n element.classList.add(...this.activeClassName_);\n } else {\n element.classList.remove(...this.activeClassName_);\n element.classList.add(...this.inactiveClassName_);\n }\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (oldMap) {\n oldMap.removeChangeListener(\n _MapProperty_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TARGET,\n this.boundHandleMapTargetChange_,\n );\n }\n\n super.setMap(map);\n\n this.handleMapTargetChange_();\n if (map) {\n map.addChangeListener(\n _MapProperty_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TARGET,\n this.boundHandleMapTargetChange_,\n );\n }\n }\n\n /**\n * @private\n */\n handleMapTargetChange_() {\n const listeners = this.documentListeners_;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n (0,_events_js__WEBPACK_IMPORTED_MODULE_5__.unlistenByKey)(listeners[i]);\n }\n listeners.length = 0;\n\n const map = this.getMap();\n if (map) {\n const doc = map.getOwnerDocument();\n if (isFullScreenSupported(doc)) {\n this.element.classList.remove(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSUPPORTED);\n } else {\n this.element.classList.add(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSUPPORTED);\n }\n\n for (let i = 0, ii = events.length; i < ii; ++i) {\n listeners.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_5__.listen)(doc, events[i], this.handleFullScreenChange_, this),\n );\n }\n this.handleFullScreenChange_();\n }\n }\n}\n\n/**\n * @param {Document} doc The root document to check.\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported(doc) {\n const body = doc.body;\n return !!(\n body['webkitRequestFullscreen'] ||\n (body.requestFullscreen && doc.fullscreenEnabled)\n );\n}\n\n/**\n * @param {Document} doc The root document to check.\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen(doc) {\n return !!(doc['webkitIsFullScreen'] || doc.fullscreenElement);\n}\n\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n }\n}\n\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n } else {\n requestFullScreen(element);\n }\n}\n\n/**\n * Exit fullscreen.\n * @param {Document} doc The document to exit fullscren from\n */\nfunction exitFullScreen(doc) {\n if (doc.exitFullscreen) {\n doc.exitFullscreen();\n } else if (doc['webkitExitFullscreen']) {\n doc['webkitExitFullscreen']();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FullScreen);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/FullScreen.js?"); /***/ }), /***/ "./node_modules/ol/control/MousePosition.js": /*!**************************************************!*\ !*** ./node_modules/ol/control/MousePosition.js ***! \**************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../coordinate.js */ \"./node_modules/ol/coordinate.js\");\n/**\n * @module ol/control/MousePosition\n */\n\n\n\n\n\n\n\n/**\n * @type {string}\n */\nconst PROJECTION = 'projection';\n\n/**\n * @type {string}\n */\nconst COORDINATE_FORMAT = 'coordinateFormat';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} MousePositionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [placeholder] Markup to show when the mouse position is not\n * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered\n * initially and the last position is retained when the mouse leaves the viewport.\n * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a\n * placeholder.\n * @property {boolean} [wrapX=true] Wrap the world horizontally on the projection's antimeridian, if it\n * is a global projection.\n */\n\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nclass MousePosition extends _Control_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Options} [options] Mouse position options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n\n super({\n element: element,\n render: options.render,\n target: options.target,\n });\n\n /***\n * @type {MousePositionOnSignature}\n */\n this.on;\n\n /***\n * @type {MousePositionOnSignature}\n */\n this.once;\n\n /***\n * @type {MousePositionOnSignature}\n */\n this.un;\n\n this.addChangeListener(PROJECTION, this.handleProjectionChanged_);\n\n if (options.coordinateFormat) {\n this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n this.setProjection(options.projection);\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderOnMouseOut_ = options.placeholder !== undefined;\n\n /**\n * @private\n * @type {string}\n */\n this.placeholder_ = this.renderOnMouseOut_ ? options.placeholder : ' ';\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = element.innerHTML;\n\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n this.mapProjection_ = null;\n\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n this.transform_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX === false ? false : true;\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n this.transform_ = null;\n }\n\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n getCoordinateFormat() {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (\n this.get(COORDINATE_FORMAT)\n );\n }\n\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (\n this.get(PROJECTION)\n );\n }\n\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n handleMouseMove(event) {\n const map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n }\n\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n handleMouseOut(event) {\n this.updateHTML_(null);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n const viewport = map.getViewport();\n this.listenerKeys.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listen)(viewport, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].POINTERMOVE, this.handleMouseMove, this),\n );\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listen)(viewport, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].POINTEROUT, this.handleMouseOut, this),\n );\n }\n this.updateHTML_(null);\n }\n }\n\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n setCoordinateFormat(format) {\n this.set(COORDINATE_FORMAT, format);\n }\n\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(PROJECTION, (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(projection));\n }\n\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n updateHTML_(pixel) {\n let html = this.placeholder_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)(\n this.mapProjection_,\n projection,\n );\n } else {\n this.transform_ = _proj_js__WEBPACK_IMPORTED_MODULE_0__.identityTransform;\n }\n }\n const map = this.getMap();\n const coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n const userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();\n if (userProjection) {\n this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)(\n this.mapProjection_,\n userProjection,\n );\n }\n this.transform_(coordinate, coordinate);\n if (this.wrapX_) {\n const projection =\n userProjection || this.getProjection() || this.mapProjection_;\n (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_4__.wrapX)(coordinate, projection);\n }\n const coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n } else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n }\n\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n } else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MousePosition);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/MousePosition.js?"); /***/ }), /***/ "./node_modules/ol/control/OverviewMap.js": /*!************************************************!*\ !*** ./node_modules/ol/control/OverviewMap.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Collection.js */ \"./node_modules/ol/Collection.js\");\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _Map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Map.js */ \"./node_modules/ol/Map.js\");\n/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../MapEventType.js */ \"./node_modules/ol/MapEventType.js\");\n/* harmony import */ var _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../MapProperty.js */ \"./node_modules/ol/MapProperty.js\");\n/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ObjectEventType.js */ \"./node_modules/ol/ObjectEventType.js\");\n/* harmony import */ var _Overlay_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Overlay.js */ \"./node_modules/ol/Overlay.js\");\n/* harmony import */ var _View_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../View.js */ \"./node_modules/ol/View.js\");\n/* harmony import */ var _ViewProperty_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ViewProperty.js */ \"./node_modules/ol/ViewProperty.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../dom.js */ \"./node_modules/ol/dom.js\");\n/**\n * @module ol/control/OverviewMap\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nconst MAX_RATIO = 0.75;\n\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nconst MIN_RATIO = 0.1;\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='‹'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='›'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array|import(\"../Collection.js\").default} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nclass OverviewMap extends _Control_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] OverviewMap options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n */\n this.boundHandleRotationChanged_ = this.handleRotationChanged_.bind(this);\n\n /**\n * @type {boolean}\n * @private\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.viewExtent_ = undefined;\n\n const className =\n options.className !== undefined ? options.className : 'ol-overviewmap';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u2039';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : '\\u203A';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n button.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.ovmapDiv_ = document.createElement('div');\n this.ovmapDiv_.className = 'ol-overviewmap-map';\n\n /**\n * Explicitly given view to be used instead of a view derived from the main map.\n * @type {View}\n * @private\n */\n this.view_ = options.view;\n\n const ovmap = new _Map_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n view: options.view,\n controls: new _Collection_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](),\n interactions: new _Collection_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](),\n });\n\n /**\n * @type {Map}\n * @private\n */\n this.ovmap_ = ovmap;\n\n if (options.layers) {\n options.layers.forEach(function (layer) {\n ovmap.addLayer(layer);\n });\n }\n\n const box = document.createElement('div');\n box.className = 'ol-overviewmap-box';\n box.style.boxSizing = 'border-box';\n\n /**\n * @type {import(\"../Overlay.js\").default}\n * @private\n */\n this.boxOverlay_ = new _Overlay_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n position: [0, 0],\n positioning: 'center-center',\n element: box,\n });\n this.ovmap_.addOverlay(this.boxOverlay_);\n\n const cssClasses =\n className +\n ' ' +\n _css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_UNSELECTABLE +\n ' ' +\n _css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + _css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.ovmapDiv_);\n element.appendChild(button);\n\n /* Interactive map */\n\n const scope = this;\n\n const overlay = this.boxOverlay_;\n const overlayBox = this.boxOverlay_.getElement();\n\n /* Functions definition */\n\n const computeDesiredMousePosition = function (mousePosition) {\n return {\n clientX: mousePosition.clientX,\n clientY: mousePosition.clientY,\n };\n };\n\n const move = function (event) {\n const position = /** @type {?} */ (computeDesiredMousePosition(event));\n const coordinates = ovmap.getEventCoordinate(\n /** @type {MouseEvent} */ (position),\n );\n\n overlay.setPosition(coordinates);\n };\n\n const endMoving = function (event) {\n const coordinates = ovmap.getEventCoordinateInternal(event);\n\n scope.getMap().getView().setCenterInternal(coordinates);\n\n window.removeEventListener('pointermove', move);\n window.removeEventListener('pointerup', endMoving);\n };\n\n /* Binding */\n\n this.ovmapDiv_.addEventListener('pointerdown', function () {\n if (event.target === overlayBox) {\n window.addEventListener('pointermove', move);\n }\n window.addEventListener('pointerup', endMoving);\n });\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (map === oldMap) {\n return;\n }\n if (oldMap) {\n const oldView = oldMap.getView();\n if (oldView) {\n this.unbindView_(oldView);\n }\n this.ovmap_.setTarget(null);\n }\n super.setMap(map);\n\n if (map) {\n this.ovmap_.setTarget(this.ovmapDiv_);\n this.listenerKeys.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_6__.listen)(\n map,\n _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].PROPERTYCHANGE,\n this.handleMapPropertyChange_,\n this,\n ),\n );\n\n const view = map.getView();\n if (view) {\n this.bindView_(view);\n }\n\n if (!this.ovmap_.isRendered()) {\n this.updateBoxAfterOvmapIsRendered_();\n }\n }\n }\n\n /**\n * Handle map property changes. This only deals with changes to the map's view.\n * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n * @private\n */\n handleMapPropertyChange_(event) {\n if (event.key === _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"].VIEW) {\n const oldView = /** @type {import(\"../View.js\").default} */ (\n event.oldValue\n );\n if (oldView) {\n this.unbindView_(oldView);\n }\n const newView = this.getMap().getView();\n this.bindView_(newView);\n } else if (\n !this.ovmap_.isRendered() &&\n (event.key === _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"].TARGET || event.key === _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"].SIZE)\n ) {\n this.ovmap_.updateSize();\n }\n }\n\n /**\n * Register listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n bindView_(view) {\n if (!this.view_) {\n // Unless an explicit view definition was given, derive default from whatever main map uses.\n const newView = new _View_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]({\n projection: view.getProjection(),\n });\n this.ovmap_.setView(newView);\n }\n\n view.addChangeListener(\n _ViewProperty_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"].ROTATION,\n this.boundHandleRotationChanged_,\n );\n // Sync once with the new view\n this.handleRotationChanged_();\n\n if (view.isDef()) {\n this.ovmap_.updateSize();\n this.resetExtent_();\n }\n }\n\n /**\n * Unregister listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n unbindView_(view) {\n view.removeChangeListener(\n _ViewProperty_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"].ROTATION,\n this.boundHandleRotationChanged_,\n );\n }\n\n /**\n * Handle rotation changes to the main map.\n * @private\n */\n handleRotationChanged_() {\n if (this.rotateWithView_) {\n this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n }\n }\n\n /**\n * Reset the overview map extent if the box size (width or\n * height) is less than the size of the overview map size times minRatio\n * or is greater than the size of the overview size times maxRatio.\n *\n * If the map extent was not reset, the box size can fits in the defined\n * ratio sizes. This method then checks if is contained inside the overview\n * map current extent. If not, recenter the overview map to the current\n * main map center location.\n * @private\n */\n validateExtent_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n if (this.viewExtent_ && (0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.equals)(extent, this.viewExtent_)) {\n // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n return;\n }\n this.viewExtent_ = extent;\n\n const ovmapSize = /** @type {import(\"../size.js\").Size} */ (\n ovmap.getSize()\n );\n\n const ovview = ovmap.getView();\n const ovextent = ovview.calculateExtentInternal(ovmapSize);\n\n const topLeftPixel = ovmap.getPixelFromCoordinateInternal(\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.getTopLeft)(extent),\n );\n const bottomRightPixel = ovmap.getPixelFromCoordinateInternal(\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.getBottomRight)(extent),\n );\n\n const boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n const boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n\n const ovmapWidth = ovmapSize[0];\n const ovmapHeight = ovmapSize[1];\n\n if (\n boxWidth < ovmapWidth * MIN_RATIO ||\n boxHeight < ovmapHeight * MIN_RATIO ||\n boxWidth > ovmapWidth * MAX_RATIO ||\n boxHeight > ovmapHeight * MAX_RATIO\n ) {\n this.resetExtent_();\n } else if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.containsExtent)(ovextent, extent)) {\n this.recenter_();\n }\n }\n\n /**\n * Reset the overview map extent to half calculated min and max ratio times\n * the extent of the main map.\n * @private\n */\n resetExtent_() {\n if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n return;\n }\n\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n const ovview = ovmap.getView();\n\n // get how many times the current map overview could hold different\n // box sizes using the min and max ratio, pick the step in the middle used\n // to calculate the extent from the main map to set it to the overview map,\n const steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n const ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.scaleFromCenter)(extent, ratio);\n ovview.fitInternal((0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_12__.fromExtent)(extent));\n }\n\n /**\n * Set the center of the overview map to the map center without changing its\n * resolution.\n * @private\n */\n recenter_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n ovview.setCenterInternal(view.getCenterInternal());\n }\n\n /**\n * Update the box using the main map extent\n * @private\n */\n updateBox_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n const rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n\n const overlay = this.boxOverlay_;\n const box = this.boxOverlay_.getElement();\n const center = view.getCenter();\n const resolution = view.getResolution();\n const ovresolution = ovview.getResolution();\n const width = (mapSize[0] * resolution) / ovresolution;\n const height = (mapSize[1] * resolution) / ovresolution;\n\n // set position using center coordinates\n overlay.setPosition(center);\n\n // set box size calculated from map extent size and overview map resolution\n if (box) {\n box.style.width = width + 'px';\n box.style.height = height + 'px';\n const transform = 'rotate(' + rotation + 'rad)';\n box.style.transform = transform;\n }\n }\n\n /**\n * @private\n */\n updateBoxAfterOvmapIsRendered_() {\n if (this.ovmapPostrenderKey_) {\n return;\n }\n this.ovmapPostrenderKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_6__.listenOnce)(\n this.ovmap_,\n _MapEventType_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"].POSTRENDER,\n (event) => {\n delete this.ovmapPostrenderKey_;\n this.updateBox_();\n },\n );\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(_css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_COLLAPSED);\n if (this.collapsed_) {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_14__.replaceNode)(this.collapseLabel_, this.label_);\n } else {\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_14__.replaceNode)(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n\n // manage overview map if it had not been rendered before and control\n // is expanded\n const ovmap = this.ovmap_;\n if (!this.collapsed_) {\n if (ovmap.isRendered()) {\n this.viewExtent_ = undefined;\n ovmap.render();\n return;\n }\n ovmap.updateSize();\n this.resetExtent_();\n this.updateBoxAfterOvmapIsRendered_();\n }\n }\n\n /**\n * Return `true` if the overview map is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the overview map should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (!collapsible && this.collapsed_) {\n this.handleToggle_();\n }\n }\n\n /**\n * Collapse or expand the overview map according to the passed parameter. Will\n * not do anything if the overview map isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\n\n /**\n * Determine if the overview map is collapsed.\n * @return {boolean} The overview map is collapsed.\n * @api\n */\n getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Return `true` if the overview map view can rotate, `false` otherwise.\n * @return {boolean} True if the control view can rotate.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Set whether the overview map view should rotate with the main map view.\n * @param {boolean} rotateWithView True if the control view should rotate.\n * @api\n */\n setRotateWithView(rotateWithView) {\n if (this.rotateWithView_ === rotateWithView) {\n return;\n }\n this.rotateWithView_ = rotateWithView;\n if (this.getMap().getView().getRotation() !== 0) {\n if (this.rotateWithView_) {\n this.handleRotationChanged_();\n } else {\n this.ovmap_.getView().setRotation(0);\n }\n this.viewExtent_ = undefined;\n this.validateExtent_();\n this.updateBox_();\n }\n }\n\n /**\n * Return the overview map.\n * @return {import(\"../Map.js\").default} Overview map.\n * @api\n */\n getOverviewMap() {\n return this.ovmap_;\n }\n\n /**\n * Update the overview map element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.validateExtent_();\n this.updateBox_();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OverviewMap);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/OverviewMap.js?"); /***/ }), /***/ "./node_modules/ol/control/Rotate.js": /*!*******************************************!*\ !*** ./node_modules/ol/control/Rotate.js ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n/**\n * @module ol/control/Rotate\n */\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {string} [compassClassName='ol-compass'] CSS class name for the compass.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nclass Rotate extends _Control_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Rotate options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-rotate';\n\n const label = options.label !== undefined ? options.label : '\\u21E7';\n\n const compassClassName =\n options.compassClassName !== undefined\n ? options.compassClassName\n : 'ol-compass';\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.label_ = null;\n\n if (typeof label === 'string') {\n this.label_ = document.createElement('span');\n this.label_.className = compassClassName;\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add(compassClassName);\n }\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n const button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(this.label_);\n\n button.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n const cssClasses =\n className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n\n /**\n * @private\n */\n this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @type {boolean}\n * @private\n */\n this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n if (this.autoHide_) {\n this.element.classList.add(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_HIDDEN);\n }\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n }\n\n /**\n * @private\n */\n resetNorth_() {\n const map = this.getMap();\n const view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n const rotation = view.getRotation();\n if (rotation !== undefined) {\n if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n view.animate({\n rotation: 0,\n duration: this.duration_,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_3__.easeOut,\n });\n } else {\n view.setRotation(0);\n }\n }\n }\n\n /**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n const rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n const transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n const contains = this.element.classList.contains(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_HIDDEN);\n } else if (contains && rotation !== 0) {\n this.element.classList.remove(_css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_HIDDEN);\n }\n }\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Rotate);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/Rotate.js?"); /***/ }), /***/ "./node_modules/ol/control/ScaleLine.js": /*!**********************************************!*\ !*** ./node_modules/ol/control/ScaleLine.js ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n/**\n * @module ol/control/ScaleLine\n */\n\n\n\n\n/**\n * @type {string}\n */\nconst UNITS_PROP = 'units';\n\n/**\n * @typedef {'degrees' | 'imperial' | 'nautical' | 'metric' | 'us'} Units\n * Units for the scale line.\n */\n\n/**\n * @const\n * @type {Array}\n */\nconst LEADING_DIGITS = [1, 2, 5];\n\n/**\n * @const\n * @type {number}\n */\nconst DEFAULT_DPI = 25.4 / 0.28;\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} ScaleLineOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className] CSS class name. The default is `ol-scale-bar` when configured with\n * `bar: true`. Otherwise the default is `ol-scale-line`.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {number} [maxWidth] Maximum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {Units} [units='metric'] Units.\n * @property {boolean} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n * For cartesian measurements of the scaleline, you need to set the\n * `getPointResolution` method of your projection to simply return the input\n * value, e.g. `projection.setGetPointResolution(r => r);`\n *\n * @api\n */\nclass ScaleLine extends _Control_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Options} [options] Scale line options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const element = document.createElement('div');\n element.style.pointerEvents = 'none';\n\n super({\n element: element,\n render: options.render,\n target: options.target,\n });\n\n /***\n * @type {ScaleLineOnSignature}\n */\n this.on;\n\n /***\n * @type {ScaleLineOnSignature}\n */\n this.once;\n\n /***\n * @type {ScaleLineOnSignature}\n */\n this.un;\n\n const className =\n options.className !== undefined\n ? options.className\n : options.bar\n ? 'ol-scale-bar'\n : 'ol-scale-line';\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.innerElement_ = document.createElement('div');\n this.innerElement_.className = className + '-inner';\n\n this.element.className = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSELECTABLE;\n this.element.appendChild(this.innerElement_);\n\n /**\n * @private\n * @type {?import(\"../View.js\").State}\n */\n this.viewState_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.maxWidth_ = options.maxWidth;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = false;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.renderedWidth_ = undefined;\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = '';\n\n this.addChangeListener(UNITS_PROP, this.handleUnitsChanged_);\n\n this.setUnits(options.units || 'metric');\n\n /**\n * @private\n * @type {boolean}\n */\n this.scaleBar_ = options.bar || false;\n\n /**\n * @private\n * @type {number}\n */\n this.scaleBarSteps_ = options.steps || 4;\n\n /**\n * @private\n * @type {boolean}\n */\n this.scaleBarText_ = options.text || false;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.dpi_ = options.dpi || undefined;\n }\n\n /**\n * Return the units to use in the scale line.\n * @return {Units} The units\n * to use in the scale line.\n * @observable\n * @api\n */\n getUnits() {\n return this.get(UNITS_PROP);\n }\n\n /**\n * @private\n */\n handleUnitsChanged_() {\n this.updateElement_();\n }\n\n /**\n * Set the units to use in the scale line.\n * @param {Units} units The units to use in the scale line.\n * @observable\n * @api\n */\n setUnits(units) {\n this.set(UNITS_PROP, units);\n }\n\n /**\n * Specify the dpi of output device such as printer.\n * @param {number|undefined} dpi The dpi of output device.\n * @api\n */\n setDpi(dpi) {\n this.dpi_ = dpi;\n }\n\n /**\n * @private\n */\n updateElement_() {\n const viewState = this.viewState_;\n\n if (!viewState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const center = viewState.center;\n const projection = viewState.projection;\n const units = this.getUnits();\n const pointResolutionUnits = units == 'degrees' ? 'degrees' : 'm';\n let pointResolution = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getPointResolution)(\n projection,\n viewState.resolution,\n center,\n pointResolutionUnits,\n );\n\n const minWidth =\n (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI;\n\n const maxWidth =\n this.maxWidth_ !== undefined\n ? (this.maxWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI\n : undefined;\n\n let nominalCount = minWidth * pointResolution;\n let suffix = '';\n if (units == 'degrees') {\n const metersPerDegree = _proj_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT.degrees;\n nominalCount *= metersPerDegree;\n if (nominalCount < metersPerDegree / 60) {\n suffix = '\\u2033'; // seconds\n pointResolution *= 3600;\n } else if (nominalCount < metersPerDegree) {\n suffix = '\\u2032'; // minutes\n pointResolution *= 60;\n } else {\n suffix = '\\u00b0'; // degrees\n }\n } else if (units == 'imperial') {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution /= 0.0254;\n } else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.3048;\n } else {\n suffix = 'mi';\n pointResolution /= 1609.344;\n }\n } else if (units == 'nautical') {\n pointResolution /= 1852;\n suffix = 'NM';\n } else if (units == 'metric') {\n if (nominalCount < 1e-6) {\n suffix = 'nm';\n pointResolution *= 1e9;\n } else if (nominalCount < 0.001) {\n suffix = 'μm';\n pointResolution *= 1000000;\n } else if (nominalCount < 1) {\n suffix = 'mm';\n pointResolution *= 1000;\n } else if (nominalCount < 1000) {\n suffix = 'm';\n } else {\n suffix = 'km';\n pointResolution /= 1000;\n }\n } else if (units == 'us') {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution *= 39.37;\n } else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.30480061;\n } else {\n suffix = 'mi';\n pointResolution /= 1609.3472;\n }\n } else {\n throw new Error('Invalid units');\n }\n\n let i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n let count, width, decimalCount;\n let previousCount, previousWidth, previousDecimalCount;\n while (true) {\n decimalCount = Math.floor(i / 3);\n const decimal = Math.pow(10, decimalCount);\n count = LEADING_DIGITS[((i % 3) + 3) % 3] * decimal;\n width = Math.round(count / pointResolution);\n if (isNaN(width)) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n return;\n }\n if (maxWidth !== undefined && width >= maxWidth) {\n count = previousCount;\n width = previousWidth;\n decimalCount = previousDecimalCount;\n break;\n } else if (width >= minWidth) {\n break;\n }\n previousCount = count;\n previousWidth = width;\n previousDecimalCount = decimalCount;\n ++i;\n }\n const html = this.scaleBar_\n ? this.createScaleBar(width, count, suffix)\n : count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n\n if (this.renderedHTML_ != html) {\n this.innerElement_.innerHTML = html;\n this.renderedHTML_ = html;\n }\n\n if (this.renderedWidth_ != width) {\n this.innerElement_.style.width = width + 'px';\n this.renderedWidth_ = width;\n }\n\n if (!this.renderedVisible_) {\n this.element.style.display = '';\n this.renderedVisible_ = true;\n }\n }\n\n /**\n * @private\n * @param {number} width The current width of the scalebar.\n * @param {number} scale The current scale.\n * @param {string} suffix The suffix to append to the scale text.\n * @return {string} The stringified HTML of the scalebar.\n */\n createScaleBar(width, scale, suffix) {\n const resolutionScale = this.getScaleForResolution();\n const mapScale =\n resolutionScale < 1\n ? Math.round(1 / resolutionScale).toLocaleString() + ' : 1'\n : '1 : ' + Math.round(resolutionScale).toLocaleString();\n const steps = this.scaleBarSteps_;\n const stepWidth = width / steps;\n const scaleSteps = [this.createMarker('absolute')];\n for (let i = 0; i < steps; ++i) {\n const cls =\n i % 2 === 0 ? 'ol-scale-singlebar-odd' : 'ol-scale-singlebar-even';\n scaleSteps.push(\n '
' +\n '
' +\n '
' +\n this.createMarker('relative') +\n // render text every second step, except when only 2 steps\n (i % 2 === 0 || steps === 2\n ? this.createStepText(i, width, false, scale, suffix)\n : '') +\n '
',\n );\n }\n // render text at the end\n scaleSteps.push(this.createStepText(steps, width, true, scale, suffix));\n\n const scaleBarText = this.scaleBarText_\n ? `
` +\n mapScale +\n '
'\n : '';\n return scaleBarText + scaleSteps.join('');\n }\n\n /**\n * Creates a marker at given position\n * @param {'absolute'|'relative'} position The position, absolute or relative\n * @return {string} The stringified div containing the marker\n */\n createMarker(position) {\n const top = position === 'absolute' ? 3 : -10;\n return (\n '
'\n );\n }\n\n /**\n * Creates the label for a marker marker at given position\n * @param {number} i The iterator\n * @param {number} width The width the scalebar will currently use\n * @param {boolean} isLast Flag indicating if we add the last step text\n * @param {number} scale The current scale for the whole scalebar\n * @param {string} suffix The suffix for the scale\n * @return {string} The stringified div containing the step text\n */\n createStepText(i, width, isLast, scale, suffix) {\n const length =\n i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100;\n const lengthString = length + (i === 0 ? '' : ' ' + suffix);\n const margin = i === 0 ? -3 : (width / this.scaleBarSteps_) * -1;\n const minWidth = i === 0 ? 0 : (width / this.scaleBarSteps_) * 2;\n return (\n '
' +\n lengthString +\n '
'\n );\n }\n\n /**\n * Returns the appropriate scale for the given resolution and units.\n * @return {number} The appropriate scale.\n */\n getScaleForResolution() {\n const resolution = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getPointResolution)(\n this.viewState_.projection,\n this.viewState_.resolution,\n this.viewState_.center,\n 'm',\n );\n const dpi = this.dpi_ || DEFAULT_DPI;\n const inchesPerMeter = 1000 / 25.4;\n return resolution * inchesPerMeter * dpi;\n }\n\n /**\n * Update the scale line element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.viewState_ = null;\n } else {\n this.viewState_ = frameState.viewState;\n }\n this.updateElement_();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ScaleLine);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/ScaleLine.js?"); /***/ }), /***/ "./node_modules/ol/control/Zoom.js": /*!*****************************************!*\ !*** ./node_modules/ol/control/Zoom.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n/**\n * @module ol/control/Zoom\n */\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='–'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nclass Zoom extends _Control_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Zoom options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom';\n\n const delta = options.delta !== undefined ? options.delta : 1;\n\n const zoomInClassName =\n options.zoomInClassName !== undefined\n ? options.zoomInClassName\n : className + '-in';\n\n const zoomOutClassName =\n options.zoomOutClassName !== undefined\n ? options.zoomOutClassName\n : className + '-out';\n\n const zoomInLabel =\n options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n const zoomOutLabel =\n options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n\n const zoomInTipLabel =\n options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n const zoomOutTipLabel =\n options.zoomOutTipLabel !== undefined\n ? options.zoomOutTipLabel\n : 'Zoom out';\n\n const inElement = document.createElement('button');\n inElement.className = zoomInClassName;\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string'\n ? document.createTextNode(zoomInLabel)\n : zoomInLabel,\n );\n\n inElement.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK,\n this.handleClick_.bind(this, delta),\n false,\n );\n\n const outElement = document.createElement('button');\n outElement.className = zoomOutClassName;\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string'\n ? document.createTextNode(zoomOutLabel)\n : zoomOutLabel,\n );\n\n outElement.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK,\n this.handleClick_.bind(this, -delta),\n false,\n );\n\n const cssClasses =\n className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_2__.CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n zoomByDelta_(delta) {\n const map = this.getMap();\n const view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n const currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n if (this.duration_ > 0) {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n zoom: newZoom,\n duration: this.duration_,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_3__.easeOut,\n });\n } else {\n view.setZoom(newZoom);\n }\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Zoom);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/Zoom.js?"); /***/ }), /***/ "./node_modules/ol/control/ZoomSlider.js": /*!***********************************************!*\ !*** ./node_modules/ol/control/ZoomSlider.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pointer/EventType.js */ \"./node_modules/ol/pointer/EventType.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../events/Event.js */ \"./node_modules/ol/events/Event.js\");\n/**\n * @module ol/control/ZoomSlider\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * The enum for available directions.\n *\n * @enum {number}\n */\nconst Direction = {\n VERTICAL: 0,\n HORIZONTAL: 1,\n};\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n * map.addControl(new ZoomSlider());\n *\n * @api\n */\nclass ZoomSlider extends _Control_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Zoom slider options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n target: options.target,\n element: document.createElement('div'),\n render: options.render,\n });\n\n /**\n * @type {!Array}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * Will hold the current resolution of the view.\n *\n * @type {number|undefined}\n * @private\n */\n this.currentResolution_ = undefined;\n\n /**\n * The direction of the slider. Will be determined from actual display of the\n * container and defaults to Direction.VERTICAL.\n *\n * @type {Direction}\n * @private\n */\n this.direction_ = Direction.VERTICAL;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_;\n\n /**\n * @type {number}\n * @private\n */\n this.heightLimit_ = 0;\n\n /**\n * @type {number}\n * @private\n */\n this.widthLimit_ = 0;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.startX_;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.startY_;\n\n /**\n * The calculated thumb size (border box plus margins). Set when initSlider_\n * is called.\n * @type {import(\"../size.js\").Size}\n * @private\n */\n this.thumbSize_ = null;\n\n /**\n * Whether the slider is initialized.\n * @type {boolean}\n * @private\n */\n this.sliderInitialized_ = false;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoomslider';\n const thumbElement = document.createElement('button');\n thumbElement.setAttribute('type', 'button');\n thumbElement.className = className + '-thumb ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE;\n const containerElement = this.element;\n containerElement.className =\n className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_CONTROL;\n containerElement.appendChild(thumbElement);\n\n containerElement.addEventListener(\n _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERDOWN,\n this.handleDraggerStart_.bind(this),\n false,\n );\n containerElement.addEventListener(\n _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERMOVE,\n this.handleDraggerDrag_.bind(this),\n false,\n );\n containerElement.addEventListener(\n _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERUP,\n this.handleDraggerEnd_.bind(this),\n false,\n );\n\n containerElement.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].CLICK,\n this.handleContainerClick_.bind(this),\n false,\n );\n thumbElement.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].CLICK, _events_Event_js__WEBPACK_IMPORTED_MODULE_4__.stopPropagation, false);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n map.render();\n }\n }\n\n /**\n * Initializes the slider element. This will determine and set this controls\n * direction_ and also constrain the dragging of the thumb to always be within\n * the bounds of the container.\n *\n * @return {boolean} Initialization successful\n * @private\n */\n initSlider_() {\n const container = this.element;\n let containerWidth = container.offsetWidth;\n let containerHeight = container.offsetHeight;\n if (containerWidth === 0 && containerHeight === 0) {\n return (this.sliderInitialized_ = false);\n }\n\n const containerStyle = getComputedStyle(container);\n containerWidth -=\n parseFloat(containerStyle['paddingRight']) +\n parseFloat(containerStyle['paddingLeft']);\n containerHeight -=\n parseFloat(containerStyle['paddingTop']) +\n parseFloat(containerStyle['paddingBottom']);\n const thumb = /** @type {HTMLElement} */ (container.firstElementChild);\n const thumbStyle = getComputedStyle(thumb);\n const thumbWidth =\n thumb.offsetWidth +\n parseFloat(thumbStyle['marginRight']) +\n parseFloat(thumbStyle['marginLeft']);\n const thumbHeight =\n thumb.offsetHeight +\n parseFloat(thumbStyle['marginTop']) +\n parseFloat(thumbStyle['marginBottom']);\n this.thumbSize_ = [thumbWidth, thumbHeight];\n\n if (containerWidth > containerHeight) {\n this.direction_ = Direction.HORIZONTAL;\n this.widthLimit_ = containerWidth - thumbWidth;\n } else {\n this.direction_ = Direction.VERTICAL;\n this.heightLimit_ = containerHeight - thumbHeight;\n }\n return (this.sliderInitialized_ = true);\n }\n\n /**\n * @param {PointerEvent} event The browser event to handle.\n * @private\n */\n handleContainerClick_(event) {\n const view = this.getMap().getView();\n\n const relativePosition = this.getRelativePosition_(\n event.offsetX - this.thumbSize_[0] / 2,\n event.offsetY - this.thumbSize_[1] / 2,\n );\n\n const resolution = this.getResolutionForPosition_(relativePosition);\n const zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution));\n\n view.animateInternal({\n zoom: zoom,\n duration: this.duration_,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_5__.easeOut,\n });\n }\n\n /**\n * Handle dragger start events.\n * @param {PointerEvent} event The drag event.\n * @private\n */\n handleDraggerStart_(event) {\n if (!this.dragging_ && event.target === this.element.firstElementChild) {\n const element = /** @type {HTMLElement} */ (\n this.element.firstElementChild\n );\n this.getMap().getView().beginInteraction();\n this.startX_ = event.clientX - parseFloat(element.style.left);\n this.startY_ = event.clientY - parseFloat(element.style.top);\n this.dragging_ = true;\n\n if (this.dragListenerKeys_.length === 0) {\n const drag = this.handleDraggerDrag_;\n const end = this.handleDraggerEnd_;\n const doc = this.getMap().getOwnerDocument();\n this.dragListenerKeys_.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_6__.listen)(doc, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERMOVE, drag, this),\n (0,_events_js__WEBPACK_IMPORTED_MODULE_6__.listen)(doc, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].POINTERUP, end, this),\n );\n }\n }\n }\n\n /**\n * Handle dragger drag events.\n *\n * @param {PointerEvent} event The drag event.\n * @private\n */\n handleDraggerDrag_(event) {\n if (this.dragging_) {\n const deltaX = event.clientX - this.startX_;\n const deltaY = event.clientY - this.startY_;\n const relativePosition = this.getRelativePosition_(deltaX, deltaY);\n this.currentResolution_ =\n this.getResolutionForPosition_(relativePosition);\n this.getMap().getView().setResolution(this.currentResolution_);\n }\n }\n\n /**\n * Handle dragger end events.\n * @param {PointerEvent} event The drag event.\n * @private\n */\n handleDraggerEnd_(event) {\n if (this.dragging_) {\n const view = this.getMap().getView();\n view.endInteraction();\n\n this.dragging_ = false;\n this.startX_ = undefined;\n this.startY_ = undefined;\n this.dragListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_6__.unlistenByKey);\n this.dragListenerKeys_.length = 0;\n }\n }\n\n /**\n * Positions the thumb inside its container according to the given resolution.\n *\n * @param {number} res The res.\n * @private\n */\n setThumbPosition_(res) {\n const position = this.getPositionForResolution_(res);\n const thumb = /** @type {HTMLElement} */ (this.element.firstElementChild);\n\n if (this.direction_ == Direction.HORIZONTAL) {\n thumb.style.left = this.widthLimit_ * position + 'px';\n } else {\n thumb.style.top = this.heightLimit_ * position + 'px';\n }\n }\n\n /**\n * Calculates the relative position of the thumb given x and y offsets. The\n * relative position scales from 0 to 1. The x and y offsets are assumed to be\n * in pixel units within the dragger limits.\n *\n * @param {number} x Pixel position relative to the left of the slider.\n * @param {number} y Pixel position relative to the top of the slider.\n * @return {number} The relative position of the thumb.\n * @private\n */\n getRelativePosition_(x, y) {\n let amount;\n if (this.direction_ === Direction.HORIZONTAL) {\n amount = x / this.widthLimit_;\n } else {\n amount = y / this.heightLimit_;\n }\n return (0,_math_js__WEBPACK_IMPORTED_MODULE_7__.clamp)(amount, 0, 1);\n }\n\n /**\n * Calculates the corresponding resolution of the thumb given its relative\n * position (where 0 is the minimum and 1 is the maximum).\n *\n * @param {number} position The relative position of the thumb.\n * @return {number} The corresponding resolution.\n * @private\n */\n getResolutionForPosition_(position) {\n const fn = this.getMap().getView().getResolutionForValueFunction();\n return fn(1 - position);\n }\n\n /**\n * Determines the relative position of the slider for the given resolution. A\n * relative position of 0 corresponds to the minimum view resolution. A\n * relative position of 1 corresponds to the maximum view resolution.\n *\n * @param {number} res The resolution.\n * @return {number} The relative position value (between 0 and 1).\n * @private\n */\n getPositionForResolution_(res) {\n const fn = this.getMap().getView().getValueForResolutionFunction();\n return (0,_math_js__WEBPACK_IMPORTED_MODULE_7__.clamp)(1 - fn(res), 0, 1);\n }\n\n /**\n * Update the zoomslider element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n if (!mapEvent.frameState) {\n return;\n }\n if (!this.sliderInitialized_ && !this.initSlider_()) {\n return;\n }\n const res = mapEvent.frameState.viewState.resolution;\n this.currentResolution_ = res;\n this.setThumbPosition_(res);\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ZoomSlider);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/ZoomSlider.js?"); /***/ }), /***/ "./node_modules/ol/control/ZoomToExtent.js": /*!*************************************************!*\ !*** ./node_modules/ol/control/ZoomToExtent.js ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Control.js */ \"./node_modules/ol/control/Control.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css.js */ \"./node_modules/ol/css.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n/**\n * @module ol/control/ZoomToExtent\n */\n\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nclass ZoomToExtent extends _Control_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /**\n * @type {?import(\"../extent.js\").Extent|null}\n * @protected\n */\n this.extent = options.extent ? options.extent : null;\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom-extent';\n\n const label = options.label !== undefined ? options.label : 'E';\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(\n typeof label === 'string' ? document.createTextNode(label) : label,\n );\n\n button.addEventListener(\n _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n const cssClasses =\n className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_3__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_3__.CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleZoomToExtent();\n }\n\n /**\n * @protected\n */\n handleZoomToExtent() {\n const map = this.getMap();\n const view = map.getView();\n const extent = !this.extent\n ? view.getProjection().getExtent()\n : (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(this.extent, view.getProjection());\n view.fitInternal((0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_4__.fromExtent)(extent));\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ZoomToExtent);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/ZoomToExtent.js?"); /***/ }), /***/ "./node_modules/ol/control/defaults.js": /*!*********************************************!*\ !*** ./node_modules/ol/control/defaults.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ defaults: () => (/* binding */ defaults)\n/* harmony export */ });\n/* harmony import */ var _Attribution_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Attribution.js */ \"./node_modules/ol/control/Attribution.js\");\n/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Collection.js */ \"./node_modules/ol/Collection.js\");\n/* harmony import */ var _Rotate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Rotate.js */ \"./node_modules/ol/control/Rotate.js\");\n/* harmony import */ var _Zoom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Zoom.js */ \"./node_modules/ol/control/Zoom.js\");\n/**\n * @module ol/control/defaults\n */\n\n\n\n\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n */\n\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions} [options] Options for the default controls.\n * @return {Collection} A collection of controls\n * to be used with the {@link module:ol/Map~Map} constructor's `controls` option.\n * @api\n */\nfunction defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const controls = new _Collection_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\n const zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new _Zoom_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](options.zoomOptions));\n }\n\n const rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new _Rotate_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"](options.rotateOptions));\n }\n\n const attributionControl =\n options.attribution !== undefined ? options.attribution : true;\n if (attributionControl) {\n controls.push(new _Attribution_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](options.attributionOptions));\n }\n\n return controls;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/control/defaults.js?"); /***/ }), /***/ "./node_modules/ol/coordinate.js": /*!***************************************!*\ !*** ./node_modules/ol/coordinate.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ add: () => (/* binding */ add),\n/* harmony export */ closestOnCircle: () => (/* binding */ closestOnCircle),\n/* harmony export */ closestOnSegment: () => (/* binding */ closestOnSegment),\n/* harmony export */ createStringXY: () => (/* binding */ createStringXY),\n/* harmony export */ degreesToStringHDMS: () => (/* binding */ degreesToStringHDMS),\n/* harmony export */ distance: () => (/* binding */ distance),\n/* harmony export */ equals: () => (/* binding */ equals),\n/* harmony export */ format: () => (/* binding */ format),\n/* harmony export */ getWorldsAway: () => (/* binding */ getWorldsAway),\n/* harmony export */ rotate: () => (/* binding */ rotate),\n/* harmony export */ scale: () => (/* binding */ scale),\n/* harmony export */ squaredDistance: () => (/* binding */ squaredDistance),\n/* harmony export */ squaredDistanceToSegment: () => (/* binding */ squaredDistanceToSegment),\n/* harmony export */ toStringHDMS: () => (/* binding */ toStringHDMS),\n/* harmony export */ toStringXY: () => (/* binding */ toStringXY),\n/* harmony export */ wrapX: () => (/* binding */ wrapX)\n/* harmony export */ });\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/ol/math.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./string.js */ \"./node_modules/ol/string.js\");\n/**\n * @module ol/coordinate\n */\n\n\n\n\n/**\n * An array of numbers representing an `xy`, `xyz` or `xyzm` coordinate.\n * Example: `[16, 48]`.\n * @typedef {Array} Coordinate\n * @api\n */\n\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {add} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * add(coord, [-2, 4]);\n * // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nfunction add(coordinate, delta) {\n coordinate[0] += +delta[0];\n coordinate[1] += +delta[1];\n return coordinate;\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nfunction closestOnCircle(coordinate, circle) {\n const r = circle.getRadius();\n const center = circle.getCenter();\n const x0 = center[0];\n const y0 = center[1];\n const x1 = coordinate[0];\n const y1 = coordinate[1];\n\n let dx = x1 - x0;\n const dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n const d = Math.sqrt(dx * dx + dy * dy);\n\n const x = x0 + (r * dx) / d;\n const y = y0 + (r * dy) / d;\n\n return [x, y];\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nfunction closestOnSegment(coordinate, segment) {\n const x0 = coordinate[0];\n const y0 = coordinate[1];\n const start = segment[0];\n const end = segment[1];\n const x1 = start[0];\n const y1 = start[1];\n const x2 = end[0];\n const y2 = end[1];\n const dx = x2 - x1;\n const dy = y2 - y1;\n const along =\n dx === 0 && dy === 0\n ? 0\n : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n let x, y;\n if (along <= 0) {\n x = x1;\n y = y1;\n } else if (along >= 1) {\n x = x2;\n y = y2;\n } else {\n x = x1 + along * dx;\n y = y1 + along * dy;\n }\n return [x, y];\n}\n\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY();\n * const out = stringifyFunc(coord);\n * // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY(2);\n * const out = stringifyFunc(coord);\n * // out is now '7.85, 47.98'\n *\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nfunction createStringXY(fractionDigits) {\n return (\n /**\n * @param {Coordinate} coordinate Coordinate.\n * @return {string} String XY.\n */\n function (coordinate) {\n return toStringXY(coordinate, fractionDigits);\n }\n );\n}\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} String.\n */\nfunction degreesToStringHDMS(hemispheres, degrees, fractionDigits) {\n const normalizedDegrees = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.modulo)(degrees + 180, 360) - 180;\n const x = Math.abs(3600 * normalizedDegrees);\n const decimals = fractionDigits || 0;\n\n let deg = Math.floor(x / 3600);\n let min = Math.floor((x - deg * 3600) / 60);\n let sec = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toFixed)(x - deg * 3600 - min * 60, decimals);\n\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n\n let hdms = deg + '\\u00b0';\n if (min !== 0 || sec !== 0) {\n hdms += ' ' + (0,_string_js__WEBPACK_IMPORTED_MODULE_1__.padNumber)(min, 2) + '\\u2032';\n }\n if (sec !== 0) {\n hdms += ' ' + (0,_string_js__WEBPACK_IMPORTED_MODULE_1__.padNumber)(sec, 2, decimals) + '\\u2033';\n }\n if (normalizedDegrees !== 0) {\n hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n }\n\n return hdms;\n}\n\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const out = format(coord, template);\n * // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const out = format(coord, template, 2);\n * // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n * that will be replaced by first and second coordinate values.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nfunction format(coordinate, template, fractionDigits) {\n if (coordinate) {\n return template\n .replace('{x}', coordinate[0].toFixed(fractionDigits))\n .replace('{y}', coordinate[1].toFixed(fractionDigits));\n }\n return '';\n}\n\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nfunction equals(coordinate1, coordinate2) {\n let equals = true;\n for (let i = coordinate1.length - 1; i >= 0; --i) {\n if (coordinate1[i] != coordinate2[i]) {\n equals = false;\n break;\n }\n }\n return equals;\n}\n\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n * import {rotate} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const rotateRadians = Math.PI / 2; // 90 degrees\n * rotate(coord, rotateRadians);\n * // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nfunction rotate(coordinate, angle) {\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n const x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n const y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\n\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {scale as scaleCoordinate} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const scale = 1.2;\n * scaleCoordinate(coord, scale);\n * // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nfunction scale(coordinate, scale) {\n coordinate[0] *= scale;\n coordinate[1] *= scale;\n return coordinate;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nfunction squaredDistance(coord1, coord2) {\n const dx = coord1[0] - coord2[0];\n const dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nfunction distance(coord1, coord2) {\n return Math.sqrt(squaredDistance(coord1, coord2));\n}\n\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nfunction squaredDistanceToSegment(coordinate, segment) {\n return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringHDMS} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringHDMS(coord);\n * // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringHDMS} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringHDMS(coord, 1);\n * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nfunction toStringHDMS(coordinate, fractionDigits) {\n if (coordinate) {\n return (\n degreesToStringHDMS('NS', coordinate[1], fractionDigits) +\n ' ' +\n degreesToStringHDMS('EW', coordinate[0], fractionDigits)\n );\n }\n return '';\n}\n\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord);\n * // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord, 1);\n * // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nfunction toStringXY(coordinate, fractionDigits) {\n return format(coordinate, '{x}, {y}', fractionDigits);\n}\n\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nfunction wrapX(coordinate, projection) {\n if (projection.canWrapX()) {\n const worldWidth = (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getWidth)(projection.getExtent());\n const worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n if (worldsAway) {\n coordinate[0] -= worldsAway * worldWidth;\n }\n }\n return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} [sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nfunction getWorldsAway(coordinate, projection, sourceExtentWidth) {\n const projectionExtent = projection.getExtent();\n let worldsAway = 0;\n if (\n projection.canWrapX() &&\n (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])\n ) {\n sourceExtentWidth = sourceExtentWidth || (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getWidth)(projectionExtent);\n worldsAway = Math.floor(\n (coordinate[0] - projectionExtent[0]) / sourceExtentWidth,\n );\n }\n return worldsAway;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/coordinate.js?"); /***/ }), /***/ "./node_modules/ol/css.js": /*!********************************!*\ !*** ./node_modules/ol/css.js ***! \********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CLASS_COLLAPSED: () => (/* binding */ CLASS_COLLAPSED),\n/* harmony export */ CLASS_CONTROL: () => (/* binding */ CLASS_CONTROL),\n/* harmony export */ CLASS_HIDDEN: () => (/* binding */ CLASS_HIDDEN),\n/* harmony export */ CLASS_SELECTABLE: () => (/* binding */ CLASS_SELECTABLE),\n/* harmony export */ CLASS_UNSELECTABLE: () => (/* binding */ CLASS_UNSELECTABLE),\n/* harmony export */ CLASS_UNSUPPORTED: () => (/* binding */ CLASS_UNSUPPORTED),\n/* harmony export */ getFontParameters: () => (/* binding */ getFontParameters)\n/* harmony export */ });\n/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array} families Families.\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nconst CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nconst CLASS_SELECTABLE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nconst CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nconst CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nconst CLASS_CONTROL = 'ol-control';\n\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nconst CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n [\n '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n ].join(''),\n 'i',\n);\n/** @type {Array<'style'|'variant'|'weight'|'size'|'lineHeight'|'family'>} */\nconst fontRegExMatchIndex = [\n 'style',\n 'variant',\n 'weight',\n 'size',\n 'lineHeight',\n 'family',\n];\n\n/**\n * Get the list of font families from a font spec. Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters|null} The font parameters (or null if the input spec is invalid).\n */\nconst getFontParameters = function (fontSpec) {\n const match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n const style = /** @type {FontParameters} */ ({\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: 'normal',\n variant: 'normal',\n });\n for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n const value = match[i + 1];\n if (value !== undefined) {\n style[fontRegExMatchIndex[i]] = value;\n }\n }\n style.families = style.family.split(/,\\s?/);\n return style;\n};\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/css.js?"); /***/ }), /***/ "./node_modules/ol/dom.js": /*!********************************!*\ !*** ./node_modules/ol/dom.js ***! \********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createCanvasContext2D: () => (/* binding */ createCanvasContext2D),\n/* harmony export */ getSharedCanvasContext2D: () => (/* binding */ getSharedCanvasContext2D),\n/* harmony export */ outerHeight: () => (/* binding */ outerHeight),\n/* harmony export */ outerWidth: () => (/* binding */ outerWidth),\n/* harmony export */ releaseCanvas: () => (/* binding */ releaseCanvas),\n/* harmony export */ removeChildren: () => (/* binding */ removeChildren),\n/* harmony export */ replaceChildren: () => (/* binding */ replaceChildren),\n/* harmony export */ replaceNode: () => (/* binding */ replaceNode)\n/* harmony export */ });\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./has.js */ \"./node_modules/ol/has.js\");\n\n\n/**\n * @module ol/dom\n */\n\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number} [width] Canvas width.\n * @param {number} [height] Canvas height.\n * @param {Array} [canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [settings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D} The context.\n */\nfunction createCanvasContext2D(width, height, canvasPool, settings) {\n /** @type {HTMLCanvasElement|OffscreenCanvas} */\n let canvas;\n if (canvasPool && canvasPool.length) {\n canvas = /** @type {HTMLCanvasElement} */ (canvasPool.shift());\n } else if (_has_js__WEBPACK_IMPORTED_MODULE_0__.WORKER_OFFSCREEN_CANVAS) {\n canvas = new OffscreenCanvas(width || 300, height || 300);\n } else {\n canvas = document.createElement('canvas');\n }\n if (width) {\n canvas.width = width;\n }\n if (height) {\n canvas.height = height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d', settings)\n );\n}\n\n/** @type {CanvasRenderingContext2D} */\nlet sharedCanvasContext;\n\n/**\n * @return {CanvasRenderingContext2D} Shared canvas context.\n */\nfunction getSharedCanvasContext2D() {\n if (!sharedCanvasContext) {\n sharedCanvasContext = createCanvasContext2D(1, 1);\n }\n return sharedCanvasContext;\n}\n\n/**\n * Releases canvas memory to avoid exceeding memory limits in Safari.\n * See https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction releaseCanvas(context) {\n const canvas = context.canvas;\n canvas.width = 1;\n canvas.height = 1;\n context.clearRect(0, 0, 1, 1);\n}\n\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nfunction outerWidth(element) {\n let width = element.offsetWidth;\n const style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n return width;\n}\n\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nfunction outerHeight(element) {\n let height = element.offsetHeight;\n const style = getComputedStyle(element);\n height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n return height;\n}\n\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nfunction replaceNode(newNode, oldNode) {\n const parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n}\n\n/**\n * @param {Node} node The node to remove the children from.\n */\nfunction removeChildren(node) {\n while (node.lastChild) {\n node.lastChild.remove();\n }\n}\n\n/**\n * Transform the children of a parent node so they match the\n * provided list of children. This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array} children The desired children.\n */\nfunction replaceChildren(node, children) {\n const oldChildren = node.childNodes;\n\n for (let i = 0; true; ++i) {\n const oldChild = oldChildren[i];\n const newChild = children[i];\n\n // check if our work is done\n if (!oldChild && !newChild) {\n break;\n }\n\n // check if children match\n if (oldChild === newChild) {\n continue;\n }\n\n // check if a new child needs to be added\n if (!oldChild) {\n node.appendChild(newChild);\n continue;\n }\n\n // check if an old child needs to be removed\n if (!newChild) {\n node.removeChild(oldChild);\n --i;\n continue;\n }\n\n // reorder\n node.insertBefore(newChild, oldChild);\n }\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/dom.js?"); /***/ }), /***/ "./node_modules/ol/easing.js": /*!***********************************!*\ !*** ./node_modules/ol/easing.js ***! \***********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ easeIn: () => (/* binding */ easeIn),\n/* harmony export */ easeOut: () => (/* binding */ easeOut),\n/* harmony export */ inAndOut: () => (/* binding */ inAndOut),\n/* harmony export */ linear: () => (/* binding */ linear),\n/* harmony export */ upAndDown: () => (/* binding */ upAndDown)\n/* harmony export */ });\n/**\n * @module ol/easing\n */\n\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction easeIn(t) {\n return Math.pow(t, 3);\n}\n\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction easeOut(t) {\n return 1 - easeIn(1 - t);\n}\n\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n}\n\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction linear(t) {\n return t;\n}\n\n/**\n * Start slow, speed up, and at the very end slow down again. This has the\n * same general behavior as {@link module:ol/easing.inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nfunction upAndDown(t) {\n if (t < 0.5) {\n return inAndOut(2 * t);\n }\n return 1 - inAndOut(2 * (t - 0.5));\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/easing.js?"); /***/ }), /***/ "./node_modules/ol/events.js": /*!***********************************!*\ !*** ./node_modules/ol/events.js ***! \***********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ listen: () => (/* binding */ listen),\n/* harmony export */ listenOnce: () => (/* binding */ listenOnce),\n/* harmony export */ unlistenByKey: () => (/* binding */ unlistenByKey)\n/* harmony export */ });\n/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./obj.js */ \"./node_modules/ol/obj.js\");\n/**\n * @module ol/events\n */\n\n\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\n\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events.unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean} [once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nfunction listen(target, type, listener, thisArg, once) {\n if (once) {\n const originalListener = listener;\n /**\n * @this {typeof target}\n */\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener.apply(thisArg ?? this, arguments);\n };\n } else if (thisArg && thisArg !== target) {\n listener = listener.bind(thisArg);\n }\n const eventsKey = {\n target: target,\n type: type,\n listener: listener,\n };\n target.addEventListener(type, listener);\n return eventsKey;\n}\n\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events.unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events.listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nfunction listenOnce(target, type, listener, thisArg) {\n return listen(target, type, listener, thisArg, true);\n}\n\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nfunction unlistenByKey(key) {\n if (key && key.target) {\n key.target.removeEventListener(key.type, key.listener);\n (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.clear)(key);\n }\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/events.js?"); /***/ }), /***/ "./node_modules/ol/events/Event.js": /*!*****************************************!*\ !*** ./node_modules/ol/events/Event.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ preventDefault: () => (/* binding */ preventDefault),\n/* harmony export */ stopPropagation: () => (/* binding */ stopPropagation)\n/* harmony export */ });\n/**\n * @module ol/events/Event\n */\n\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nclass BaseEvent {\n /**\n * @param {string} type Type.\n */\n constructor(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n\n /**\n * @type {boolean}\n */\n this.defaultPrevented;\n\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n\n /**\n * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n * will be fired.\n * @api\n */\n preventDefault() {\n this.defaultPrevented = true;\n }\n\n /**\n * Stop event propagation.\n * @api\n */\n stopPropagation() {\n this.propagationStopped = true;\n }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nfunction stopPropagation(evt) {\n evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nfunction preventDefault(evt) {\n evt.preventDefault();\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseEvent);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/events/Event.js?"); /***/ }), /***/ "./node_modules/ol/events/EventType.js": /*!*********************************************!*\ !*** ./node_modules/ol/events/EventType.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n /**\n * Generic change event. Triggered when the revision counter is increased.\n * @event module:ol/events/Event~BaseEvent#change\n * @api\n */\n CHANGE: 'change',\n\n /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n\n BLUR: 'blur',\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n FOCUS: 'focus',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n RESIZE: 'resize',\n TOUCHMOVE: 'touchmove',\n WHEEL: 'wheel',\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/events/EventType.js?"); /***/ }), /***/ "./node_modules/ol/events/Key.js": /*!***************************************!*\ !*** ./node_modules/ol/events/Key.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/events/Key\n */\n\n/**\n * @enum {string}\n * @const\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n LEFT: 'ArrowLeft',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n DOWN: 'ArrowDown',\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/events/Key.js?"); /***/ }), /***/ "./node_modules/ol/events/Target.js": /*!******************************************!*\ !*** ./node_modules/ol/events/Target.js ***! \******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Disposable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Disposable.js */ \"./node_modules/ol/Disposable.js\");\n/* harmony import */ var _Event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Event.js */ \"./node_modules/ol/events/Event.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../obj.js */ \"./node_modules/ol/obj.js\");\n/**\n * @module ol/events/Target\n */\n\n\n\n\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n * `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n * There is no event target hierarchy. When a listener calls\n * `stopPropagation` or `preventDefault` on an event object, it means that no\n * more listeners after this one will be called. Same as when the listener\n * returns false.\n */\nclass Target extends _Disposable_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {*} [target] Default event target for dispatched events.\n */\n constructor(target) {\n super();\n\n /**\n * @private\n * @type {*}\n */\n this.eventTarget_ = target;\n\n /**\n * @private\n * @type {Object|null}\n */\n this.pendingRemovals_ = null;\n\n /**\n * @private\n * @type {Object|null}\n */\n this.dispatching_ = null;\n\n /**\n * @private\n * @type {Object>|null}\n */\n this.listeners_ = null;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n addEventListener(type, listener) {\n if (!type || !listener) {\n return;\n }\n const listeners = this.listeners_ || (this.listeners_ = {});\n const listenersForType = listeners[type] || (listeners[type] = []);\n if (!listenersForType.includes(listener)) {\n listenersForType.push(listener);\n }\n }\n\n /**\n * Dispatches an event and calls all listeners listening for events\n * of this type. The event parameter can either be a string or an\n * Object with a `type` property.\n *\n * @param {import(\"./Event.js\").default|string} event Event object.\n * @return {boolean|undefined} `false` if anyone called preventDefault on the\n * event object or if any of the listeners returned false.\n * @api\n */\n dispatchEvent(event) {\n const isString = typeof event === 'string';\n const type = isString ? event : event.type;\n const listeners = this.listeners_ && this.listeners_[type];\n if (!listeners) {\n return;\n }\n\n const evt = isString ? new _Event_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](event) : /** @type {Event} */ (event);\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n const dispatching = this.dispatching_ || (this.dispatching_ = {});\n const pendingRemovals =\n this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n let propagate;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (\n listeners[i]\n ).handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (\n listeners[i]\n ).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n if (--dispatching[type] === 0) {\n let pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, _functions_js__WEBPACK_IMPORTED_MODULE_2__.VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.listeners_ && (0,_obj_js__WEBPACK_IMPORTED_MODULE_3__.clear)(this.listeners_);\n }\n\n /**\n * Get the listeners for a specified event type. Listeners are returned in the\n * order that they will be called in.\n *\n * @param {string} type Type.\n * @return {Array|undefined} Listeners.\n */\n getListeners(type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n }\n\n /**\n * @param {string} [type] Type. If not provided,\n * `true` will be returned if this event target has any listeners.\n * @return {boolean} Has listeners.\n */\n hasListener(type) {\n if (!this.listeners_) {\n return false;\n }\n return type\n ? type in this.listeners_\n : Object.keys(this.listeners_).length > 0;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n removeEventListener(type, listener) {\n if (!this.listeners_) {\n return;\n }\n const listeners = this.listeners_[type];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n // make listener a no-op, and remove later in #dispatchEvent()\n listeners[index] = _functions_js__WEBPACK_IMPORTED_MODULE_2__.VOID;\n ++this.pendingRemovals_[type];\n } else {\n listeners.splice(index, 1);\n if (listeners.length === 0) {\n delete this.listeners_[type];\n }\n }\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Target);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/events/Target.js?"); /***/ }), /***/ "./node_modules/ol/events/condition.js": /*!*********************************************!*\ !*** ./node_modules/ol/events/condition.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ all: () => (/* binding */ all),\n/* harmony export */ altKeyOnly: () => (/* binding */ altKeyOnly),\n/* harmony export */ altShiftKeysOnly: () => (/* binding */ altShiftKeysOnly),\n/* harmony export */ always: () => (/* binding */ always),\n/* harmony export */ click: () => (/* binding */ click),\n/* harmony export */ doubleClick: () => (/* binding */ doubleClick),\n/* harmony export */ focus: () => (/* binding */ focus),\n/* harmony export */ focusWithTabindex: () => (/* binding */ focusWithTabindex),\n/* harmony export */ mouseActionButton: () => (/* binding */ mouseActionButton),\n/* harmony export */ mouseOnly: () => (/* binding */ mouseOnly),\n/* harmony export */ never: () => (/* binding */ never),\n/* harmony export */ noModifierKeys: () => (/* binding */ noModifierKeys),\n/* harmony export */ penOnly: () => (/* binding */ penOnly),\n/* harmony export */ platformModifierKey: () => (/* binding */ platformModifierKey),\n/* harmony export */ platformModifierKeyOnly: () => (/* binding */ platformModifierKeyOnly),\n/* harmony export */ pointerMove: () => (/* binding */ pointerMove),\n/* harmony export */ primaryAction: () => (/* binding */ primaryAction),\n/* harmony export */ shiftKeyOnly: () => (/* binding */ shiftKeyOnly),\n/* harmony export */ singleClick: () => (/* binding */ singleClick),\n/* harmony export */ targetNotEditable: () => (/* binding */ targetNotEditable),\n/* harmony export */ touchOnly: () => (/* binding */ touchOnly)\n/* harmony export */ });\n/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../has.js */ \"./node_modules/ol/has.js\");\n/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../asserts.js */ \"./node_modules/ol/asserts.js\");\n/**\n * @module ol/events/condition\n */\n\n\n\n\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nfunction all(var_args) {\n const conditions = arguments;\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} All conditions passed.\n */\n return function (event) {\n let pass = true;\n for (let i = 0, ii = conditions.length; i < ii; ++i) {\n pass = pass && conditions[i](event);\n if (!pass) {\n break;\n }\n }\n return pass;\n };\n}\n\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nconst altKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nconst altShiftKeysOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `
`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nconst focus = function (event) {\n const targetElement = event.map.getTargetElement();\n const rootNode = targetElement.getRootNode();\n const activeElement = event.map.getOwnerDocument().activeElement;\n\n return rootNode instanceof ShadowRoot\n ? rootNode.host.contains(activeElement)\n : targetElement.contains(activeElement);\n};\n\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nconst focusWithTabindex = function (event) {\n const targetElement = event.map.getTargetElement();\n const rootNode = targetElement.getRootNode();\n const tabIndexCandidate =\n rootNode instanceof ShadowRoot ? rootNode.host : targetElement;\n\n return tabIndexCandidate.hasAttribute('tabindex') ? focus(event) : true;\n};\n\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nconst always = _functions_js__WEBPACK_IMPORTED_MODULE_0__.TRUE;\n\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nconst click = function (mapBrowserEvent) {\n return mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].CLICK;\n};\n\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nconst mouseActionButton = function (mapBrowserEvent) {\n const originalEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return originalEvent.button == 0 && !(_has_js__WEBPACK_IMPORTED_MODULE_2__.WEBKIT && _has_js__WEBPACK_IMPORTED_MODULE_2__.MAC && originalEvent.ctrlKey);\n};\n\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nconst never = _functions_js__WEBPACK_IMPORTED_MODULE_0__.FALSE;\n\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nconst pointerMove = function (mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\n\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nconst singleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].SINGLECLICK;\n};\n\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nconst doubleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].DBLCLICK;\n};\n\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nconst noModifierKeys = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nconst platformModifierKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n (_has_js__WEBPACK_IMPORTED_MODULE_2__.MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the platform modifier key is pressed.\n * @api\n */\nconst platformModifierKey = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return _has_js__WEBPACK_IMPORTED_MODULE_2__.MAC ? originalEvent.metaKey : originalEvent.ctrlKey;\n};\n\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nconst shiftKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the target element is not editable, i.e. not an `input`,\n * `select`, or `textarea` element and no `contenteditable` attribute is\n * set or inherited, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nconst targetNotEditable = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const tagName = /** @type {Element} */ (originalEvent.target).tagName;\n return (\n tagName !== 'INPUT' &&\n tagName !== 'SELECT' &&\n tagName !== 'TEXTAREA' &&\n // `isContentEditable` is only available on `HTMLElement`, but it may also be a\n // different type like `SVGElement`.\n // @ts-ignore\n !originalEvent.target.isContentEditable\n );\n};\n\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nconst mouseOnly = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(\n pointerEvent !== undefined,\n 'mapBrowserEvent must originate from a pointer event',\n );\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvent.pointerType == 'mouse';\n};\n\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nconst touchOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(\n pointerEvt !== undefined,\n 'mapBrowserEvent must originate from a pointer event',\n );\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'touch';\n};\n\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nconst penOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(\n pointerEvt !== undefined,\n 'mapBrowserEvent must originate from a pointer event',\n );\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'pen';\n};\n\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See https://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nconst primaryAction = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(\n pointerEvent !== undefined,\n 'mapBrowserEvent must originate from a pointer event',\n );\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/events/condition.js?"); /***/ }), /***/ "./node_modules/ol/expr/cpu.js": /*!*************************************!*\ !*** ./node_modules/ol/expr/cpu.js ***! \*************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buildExpression: () => (/* binding */ buildExpression),\n/* harmony export */ newEvaluationContext: () => (/* binding */ newEvaluationContext)\n/* harmony export */ });\n/* harmony import */ var _expression_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./expression.js */ \"./node_modules/ol/expr/expression.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../color.js */ \"./node_modules/ol/color.js\");\n/**\n * @module ol/expr/cpu\n */\n\n\n\n\n/**\n * @fileoverview This module includes functions to build expressions for evaluation on the CPU.\n * Building is composed of two steps: parsing and compiling. The parsing step takes an encoded\n * expression and returns an instance of one of the expression classes. The compiling step takes\n * the expression instance and returns a function that can be evaluated in to return a literal\n * value. The evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {Object} EvaluationContext\n * @property {Object} properties The values for properties used in 'get' expressions.\n * @property {Object} variables The values for variables used in 'var' expressions.\n * @property {number} resolution The map resolution.\n * @property {string|number|null} featureId The feature id.\n * @property {string} geometryType Geometry type of the current object.\n */\n\n/**\n * @return {EvaluationContext} A new evaluation context.\n */\nfunction newEvaluationContext() {\n return {\n variables: {},\n properties: {},\n resolution: NaN,\n featureId: null,\n geometryType: '',\n };\n}\n\n/**\n * @typedef {function(EvaluationContext):import(\"./expression.js\").LiteralValue} ExpressionEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):boolean} BooleanEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):number} NumberEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):string} StringEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array|string)} ColorLikeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array} NumberArrayEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array} CoordinateEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array)} SizeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array|number)} SizeLikeEvaluator\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {number} type The expected type.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The expression evaluator.\n */\nfunction buildExpression(encoded, type, context) {\n const expression = (0,_expression_js__WEBPACK_IMPORTED_MODULE_0__.parse)(encoded, type, context);\n return compileExpression(expression, context);\n}\n\n/**\n * @param {import(\"./expression.js\").Expression} expression The expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileExpression(expression, context) {\n if (expression instanceof _expression_js__WEBPACK_IMPORTED_MODULE_0__.LiteralExpression) {\n // convert colors to array if possible\n if (expression.type === _expression_js__WEBPACK_IMPORTED_MODULE_0__.ColorType && typeof expression.value === 'string') {\n const colorValue = (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.fromString)(expression.value);\n return function () {\n return colorValue;\n };\n }\n return function () {\n return expression.value;\n };\n }\n const operator = expression.operator;\n switch (operator) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Number:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.String:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Coalesce: {\n return compileAssertionExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Get:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Var:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Has: {\n return compileAccessorExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Id: {\n return (context) => context.featureId;\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.GeometryType: {\n return (context) => context.geometryType;\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Concat: {\n const args = expression.args.map((e) => compileExpression(e, context));\n return (context) =>\n ''.concat(...args.map((arg) => arg(context).toString()));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Resolution: {\n return (context) => context.resolution;\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Any:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.All:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Between:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.In:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Not: {\n return compileLogicalExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Equal:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.NotEqual:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.LessThan:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.LessThanOrEqualTo:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.GreaterThan:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.GreaterThanOrEqualTo: {\n return compileComparisonExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Multiply:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Divide:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Add:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Subtract:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Clamp:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Mod:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Pow:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Abs:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Floor:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Ceil:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Round:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Sin:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Cos:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Atan:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Sqrt: {\n return compileNumericExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Case: {\n return compileCaseExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Match: {\n return compileMatchExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Interpolate: {\n return compileInterpolateExpression(expression, context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.ToString: {\n return compileConvertExpression(expression, context);\n }\n default: {\n throw new Error(`Unsupported operator ${operator}`);\n }\n // TODO: unimplemented\n // Ops.Zoom\n // Ops.Time\n // Ops.Array\n // Ops.Color\n // Ops.Band\n // Ops.Palette\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAssertionExpression(expression, context) {\n const type = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (type) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Coalesce: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n const value = args[i](context);\n if (typeof value !== 'undefined' && value !== null) {\n return value;\n }\n }\n throw new Error('Expected one of the values to be non-null');\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Number:\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.String: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n const value = args[i](context);\n if (typeof value === type) {\n return value;\n }\n }\n throw new Error(`Expected one of the values to be a ${type}`);\n };\n }\n default: {\n throw new Error(`Unsupported assertion operator ${type}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAccessorExpression(expression, context) {\n const nameExpression = /** @type {LiteralExpression} */ (expression.args[0]);\n const name = /** @type {string} */ (nameExpression.value);\n switch (expression.operator) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Get: {\n return (context) => {\n const args = expression.args;\n let value = context.properties[name];\n for (let i = 1, ii = args.length; i < ii; ++i) {\n const keyExpression = /** @type {LiteralExpression} */ (args[i]);\n const key = /** @type {string|number} */ (keyExpression.value);\n value = value[key];\n }\n return value;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Var: {\n return (context) => context.variables[name];\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Has: {\n return (context) => {\n const args = expression.args;\n if (!(name in context.properties)) {\n return false;\n }\n let value = context.properties[name];\n for (let i = 1, ii = args.length; i < ii; ++i) {\n const keyExpression = /** @type {LiteralExpression} */ (args[i]);\n const key = /** @type {string|number} */ (keyExpression.value);\n if (!value || !Object.hasOwn(value, key)) {\n return false;\n }\n value = value[key];\n }\n return true;\n };\n }\n default: {\n throw new Error(`Unsupported accessor operator ${expression.operator}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileComparisonExpression(expression, context) {\n const op = expression.operator;\n const left = compileExpression(expression.args[0], context);\n const right = compileExpression(expression.args[1], context);\n switch (op) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Equal: {\n return (context) => left(context) === right(context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.NotEqual: {\n return (context) => left(context) !== right(context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.LessThan: {\n return (context) => left(context) < right(context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.LessThanOrEqualTo: {\n return (context) => left(context) <= right(context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.GreaterThan: {\n return (context) => left(context) > right(context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.GreaterThanOrEqualTo: {\n return (context) => left(context) >= right(context);\n }\n default: {\n throw new Error(`Unsupported comparison operator ${op}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileLogicalExpression(expression, context) {\n const op = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (op) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Any: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n if (args[i](context)) {\n return true;\n }\n }\n return false;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.All: {\n return (context) => {\n for (let i = 0; i < length; ++i) {\n if (!args[i](context)) {\n return false;\n }\n }\n return true;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Between: {\n return (context) => {\n const value = args[0](context);\n const min = args[1](context);\n const max = args[2](context);\n return value >= min && value <= max;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.In: {\n return (context) => {\n const value = args[0](context);\n for (let i = 1; i < length; ++i) {\n if (value === args[i](context)) {\n return true;\n }\n }\n return false;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Not: {\n return (context) => !args[0](context);\n }\n default: {\n throw new Error(`Unsupported logical operator ${op}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberEvaluator} The evaluator function.\n */\nfunction compileNumericExpression(expression, context) {\n const op = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (op) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Multiply: {\n return (context) => {\n let value = 1;\n for (let i = 0; i < length; ++i) {\n value *= args[i](context);\n }\n return value;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Divide: {\n return (context) => args[0](context) / args[1](context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Add: {\n return (context) => {\n let value = 0;\n for (let i = 0; i < length; ++i) {\n value += args[i](context);\n }\n return value;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Subtract: {\n return (context) => args[0](context) - args[1](context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Clamp: {\n return (context) => {\n const value = args[0](context);\n const min = args[1](context);\n if (value < min) {\n return min;\n }\n const max = args[2](context);\n if (value > max) {\n return max;\n }\n return value;\n };\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Mod: {\n return (context) => args[0](context) % args[1](context);\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Pow: {\n return (context) => Math.pow(args[0](context), args[1](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Abs: {\n return (context) => Math.abs(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Floor: {\n return (context) => Math.floor(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Ceil: {\n return (context) => Math.ceil(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Round: {\n return (context) => Math.round(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Sin: {\n return (context) => Math.sin(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Cos: {\n return (context) => Math.cos(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Atan: {\n if (length === 2) {\n return (context) => Math.atan2(args[0](context), args[1](context));\n }\n return (context) => Math.atan(args[0](context));\n }\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.Sqrt: {\n return (context) => Math.sqrt(args[0](context));\n }\n default: {\n throw new Error(`Unsupported numeric operator ${op}`);\n }\n }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileCaseExpression(expression, context) {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n return (context) => {\n for (let i = 0; i < length - 1; i += 2) {\n const condition = args[i](context);\n if (condition) {\n return args[i + 1](context);\n }\n }\n return args[length - 1](context);\n };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileMatchExpression(expression, context) {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n return (context) => {\n const value = args[0](context);\n for (let i = 1; i < length; i += 2) {\n if (value === args[i](context)) {\n return args[i + 1](context);\n }\n }\n return args[length - 1](context);\n };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileInterpolateExpression(expression, context) {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n return (context) => {\n const base = args[0](context);\n const value = args[1](context);\n\n let previousInput;\n let previousOutput;\n for (let i = 2; i < length; i += 2) {\n const input = args[i](context);\n let output = args[i + 1](context);\n const isColor = Array.isArray(output);\n if (isColor) {\n output = (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.withAlpha)(output);\n }\n if (input >= value) {\n if (i === 2) {\n return output;\n }\n if (isColor) {\n return interpolateColor(\n base,\n value,\n previousInput,\n previousOutput,\n input,\n output,\n );\n }\n return interpolateNumber(\n base,\n value,\n previousInput,\n previousOutput,\n input,\n output,\n );\n }\n previousInput = input;\n previousOutput = output;\n }\n return previousOutput;\n };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileConvertExpression(expression, context) {\n const op = expression.operator;\n const length = expression.args.length;\n\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compileExpression(expression.args[i], context);\n }\n switch (op) {\n case _expression_js__WEBPACK_IMPORTED_MODULE_0__.Ops.ToString: {\n return (context) => {\n const value = args[0](context);\n if (expression.args[0].type === _expression_js__WEBPACK_IMPORTED_MODULE_0__.ColorType) {\n return (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.toString)(value);\n }\n return value.toString();\n };\n }\n default: {\n throw new Error(`Unsupported convert operator ${op}`);\n }\n }\n}\n\n/**\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {number} output1 The first output value.\n * @param {number} input2 The second input value.\n * @param {number} output2 The second output value.\n * @return {number} The interpolated value.\n */\nfunction interpolateNumber(base, value, input1, output1, input2, output2) {\n const delta = input2 - input1;\n if (delta === 0) {\n return output1;\n }\n const along = value - input1;\n const factor =\n base === 1\n ? along / delta\n : (Math.pow(base, along) - 1) / (Math.pow(base, delta) - 1);\n return output1 + factor * (output2 - output1);\n}\n\n/**\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {import('../color.js').Color} rgba1 The first output value.\n * @param {number} input2 The second input value.\n * @param {import('../color.js').Color} rgba2 The second output value.\n * @return {import('../color.js').Color} The interpolated color.\n */\nfunction interpolateColor(base, value, input1, rgba1, input2, rgba2) {\n const delta = input2 - input1;\n if (delta === 0) {\n return rgba1;\n }\n const lcha1 = (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.rgbaToLcha)(rgba1);\n const lcha2 = (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.rgbaToLcha)(rgba2);\n let deltaHue = lcha2[2] - lcha1[2];\n if (deltaHue > 180) {\n deltaHue -= 360;\n } else if (deltaHue < -180) {\n deltaHue += 360;\n }\n\n const lcha = [\n interpolateNumber(base, value, input1, lcha1[0], input2, lcha2[0]),\n interpolateNumber(base, value, input1, lcha1[1], input2, lcha2[1]),\n lcha1[2] + interpolateNumber(base, value, input1, 0, input2, deltaHue),\n interpolateNumber(base, value, input1, rgba1[3], input2, rgba2[3]),\n ];\n return (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.normalize)((0,_color_js__WEBPACK_IMPORTED_MODULE_1__.lchaToRgba)(lcha));\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/expr/cpu.js?"); /***/ }), /***/ "./node_modules/ol/expr/expression.js": /*!********************************************!*\ !*** ./node_modules/ol/expr/expression.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AnyType: () => (/* binding */ AnyType),\n/* harmony export */ BooleanType: () => (/* binding */ BooleanType),\n/* harmony export */ CallExpression: () => (/* binding */ CallExpression),\n/* harmony export */ ColorType: () => (/* binding */ ColorType),\n/* harmony export */ LiteralExpression: () => (/* binding */ LiteralExpression),\n/* harmony export */ NoneType: () => (/* binding */ NoneType),\n/* harmony export */ NumberArrayType: () => (/* binding */ NumberArrayType),\n/* harmony export */ NumberType: () => (/* binding */ NumberType),\n/* harmony export */ Ops: () => (/* binding */ Ops),\n/* harmony export */ SizeType: () => (/* binding */ SizeType),\n/* harmony export */ StringType: () => (/* binding */ StringType),\n/* harmony export */ computeGeometryType: () => (/* binding */ computeGeometryType),\n/* harmony export */ includesType: () => (/* binding */ includesType),\n/* harmony export */ isType: () => (/* binding */ isType),\n/* harmony export */ newParsingContext: () => (/* binding */ newParsingContext),\n/* harmony export */ overlapsType: () => (/* binding */ overlapsType),\n/* harmony export */ parse: () => (/* binding */ parse),\n/* harmony export */ typeName: () => (/* binding */ typeName)\n/* harmony export */ });\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../color.js */ \"./node_modules/ol/color.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../size.js */ \"./node_modules/ol/size.js\");\n/**\n * @module ol/expr/expression\n */\n\n\n\n\n/**\n * @fileoverview This module includes types and functions for parsing array encoded expressions.\n * The result of parsing an encoded expression is one of the specific expression classes.\n * During parsing, information is added to the parsing context about the data accessed by the\n * expression.\n */\n\n/**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link import(\"./expression.js\").ExpressionValue} arguments.\n *\n * See below for details on the available operators (with notes for those that are WebGL or Canvas only).\n *\n * * Reading operators:\n * * `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band\n * `bandIndex` of the source's data. The first `bandIndex` of the source data is `1`. Fetched values\n * are in the 0..1 range. {@link import(\"../source/TileImage.js\").default} sources have 4 bands: red,\n * green, blue and alpha. {@link import(\"../source/DataTile.js\").default} sources can have any number\n * of bands, depending on the underlying data source and\n * {@link import(\"../source/GeoTIFF.js\").Options configuration}. `xOffset` and `yOffset` are optional\n * and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).\n * * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.\n * * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a\n * feature property. The result is `undefined` when there is nothing at the specified key or index.\n * * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'\n * `Multi*` values are returned as their singular equivalent\n * `Circle` geometries are returned as 'Polygon'\n * `GeometryCollection` geometries are returned as the type of the first geometry found in the collection (WebGL only).\n * * `['resolution']` returns the current resolution\n * * `['time']` The time in seconds since the creation of the layer (WebGL only).\n * * `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined\n * * `['zoom']` The current zoom level (WebGL only).\n * * `['line-metric']` returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line\n * does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.\n * Please note that the M component will be linearly interpolated between the two points composing a segment.\n *\n * * Math operators:\n * * `['*', value1, value2, ...]` multiplies the values (either numbers or colors)\n * * `['/', value1, value2]` divides `value1` by `value2`\n * * `['+', value1, value2, ...]` adds the values\n * * `['-', value1, value2]` subtracts `value2` from `value1`\n * * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n * * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n * * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n * * `['abs', value1]` returns the absolute value of `value1`\n * * `['floor', value1]` returns the nearest integer less than or equal to `value1`\n * * `['round', value1]` returns the nearest integer to `value1`\n * * `['ceil', value1]` returns the nearest integer greater than or equal to `value1`\n * * `['sin', value1]` returns the sine of `value1`\n * * `['cos', value1]` returns the cosine of `value1`\n * * `['atan', value1, value2]` returns `atan2(value1, value2)`. If `value2` is not provided, returns `atan(value1)`\n * * `['sqrt', value1]` returns the square root of `value1`\n *\n * * Transform operators:\n * * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n * condition evaluates to `true`. If no match is found, returns the `fallback` value.\n * All conditions should be `boolean`, output and fallback can be any kind.\n * * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n * provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n * returns the `fallback` value.\n * `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n * `fallback` values must be of the same type, and can be of any kind.\n * * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n * pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n * the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n * of 1 is equivalent to `['linear']`.\n * `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n * Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n * between `output1` and `outputN`.\n * * `['string', value1, value2, ...]` returns the first value in the list that evaluates to a string.\n * An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 'default value']]`\n * (Canvas only).\n * * `['number', value1, value2, ...]` returns the first value in the list that evaluates to a number.\n * An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 42]]`\n * (Canvas only).\n * * `['coalesce', value1, value2, ...]` returns the first value in the list which is not null or undefined.\n * An example would be to provide a default value for get: `['coalesce', ['get','propertyname'], 'default value']]`\n * (Canvas only).\n *\n * * Logical operators:\n * * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n * * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n * * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n * * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n * * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n * * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n * * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n * * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n * * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n * * `['has', attributeName, keyOrArrayIndex, ...]` returns `true` if feature properties include the (nested) key `attributeName`,\n * `false` otherwise.\n * * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n * (inclusively), or `false` otherwise.\n * * `['in', needle, haystack]` returns `true` if `needle` is found in `haystack`, and\n * `false` otherwise.\n * This operator has the following limitations:\n * * `haystack` has to be an array of numbers or strings (searching for a substring in a string is not supported yet)\n * * Only literal arrays are supported as `haystack` for now; this means that `haystack` cannot be the result of an\n * expression. If `haystack` is an array of strings, use the `literal` operator to disambiguate from an expression:\n * `['literal', ['abc', 'def', 'ghi']]`\n *\n * * Conversion operators:\n * * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n * values can currently only be 2, 3 or 4 (WebGL only).\n * * `['color', red, green, blue, alpha]` or `['color', shade, alpha]` creates a `color` value from `number` values;\n * the `alpha` parameter is optional; if not specified, it will be set to 1 (WebGL only).\n * Note: `red`, `green` and `blue` or `shade` components must be values between 0 and 255; `alpha` between 0 and 1.\n * * `['palette', index, colors]` picks a `color` value from an array of colors using the given index; the `index`\n * expression must evaluate to a number; the items in the `colors` array must be strings with hex colors\n * (e.g. `'#86A136'`), colors using the rgba[a] functional notation (e.g. `'rgb(134, 161, 54)'` or `'rgba(134, 161, 54, 1)'`),\n * named colors (e.g. `'red'`), or array literals with 3 ([r, g, b]) or 4 ([r, g, b, a]) values (with r, g, and b\n * in the 0-255 range and a in the 0-1 range) (WebGL only).\n * * `['to-string', value]` converts the input value to a string. If the input is a boolean, the result is \"true\" or \"false\".\n * If the input is a number, it is converted to a string as specified by the \"NumberToString\" algorithm of the ECMAScript\n * Language Specification. If the input is a color, it is converted to a string of the form \"rgba(r,g,b,a)\". (Canvas only)\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `number[]` (number arrays can only have a length of 2, 3 or 4)\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n * @api\n */\n\nlet numTypes = 0;\nconst NoneType = 0;\nconst BooleanType = 1 << numTypes++;\nconst NumberType = 1 << numTypes++;\nconst StringType = 1 << numTypes++;\nconst ColorType = 1 << numTypes++;\nconst NumberArrayType = 1 << numTypes++;\nconst SizeType = 1 << numTypes++;\nconst AnyType = Math.pow(2, numTypes) - 1;\n\nconst typeNames = {\n [BooleanType]: 'boolean',\n [NumberType]: 'number',\n [StringType]: 'string',\n [ColorType]: 'color',\n [NumberArrayType]: 'number[]',\n [SizeType]: 'size',\n};\n\nconst namedTypes = Object.keys(typeNames).map(Number).sort(_array_js__WEBPACK_IMPORTED_MODULE_0__.ascending);\n\n/**\n * @param {number} type The type.\n * @return {boolean} The type is one of the specific types (not any or a union type).\n */\nfunction isSpecific(type) {\n return type in typeNames;\n}\n\n/**\n * Get a string representation for a type.\n * @param {number} type The type.\n * @return {string} The type name.\n */\nfunction typeName(type) {\n const names = [];\n for (const namedType of namedTypes) {\n if (includesType(type, namedType)) {\n names.push(typeNames[namedType]);\n }\n }\n if (names.length === 0) {\n return 'untyped';\n }\n if (names.length < 3) {\n return names.join(' or ');\n }\n return names.slice(0, -1).join(', ') + ', or ' + names[names.length - 1];\n}\n\n/**\n * @param {number} broad The broad type.\n * @param {number} specific The specific type.\n * @return {boolean} The broad type includes the specific type.\n */\nfunction includesType(broad, specific) {\n return (broad & specific) === specific;\n}\n\n/**\n * @param {number} oneType One type.\n * @param {number} otherType Another type.\n * @return {boolean} The set of types overlap (share a common specific type)\n */\nfunction overlapsType(oneType, otherType) {\n return !!(oneType & otherType);\n}\n\n/**\n * @param {number} type The type.\n * @param {number} expected The expected type.\n * @return {boolean} The given type is exactly the expected type.\n */\nfunction isType(type, expected) {\n return type === expected;\n}\n\n/**\n * @typedef {boolean|number|string|Array} LiteralValue\n */\n\nclass LiteralExpression {\n /**\n * @param {number} type The value type.\n * @param {LiteralValue} value The literal value.\n */\n constructor(type, value) {\n if (!isSpecific(type)) {\n throw new Error(\n `literal expressions must have a specific type, got ${typeName(type)}`,\n );\n }\n this.type = type;\n this.value = value;\n }\n}\n\nclass CallExpression {\n /**\n * @param {number} type The return type.\n * @param {string} operator The operator.\n * @param {...Expression} args The arguments.\n */\n constructor(type, operator, ...args) {\n this.type = type;\n this.operator = operator;\n this.args = args;\n }\n}\n\n/**\n * @typedef {LiteralExpression|CallExpression} Expression\n */\n\n/**\n * @typedef {Object} ParsingContext\n * @property {Set} variables Variables referenced with the 'var' operator.\n * @property {Set} properties Properties referenced with the 'get' operator.\n * @property {boolean} featureId The style uses the feature id.\n * @property {boolean} geometryType The style uses the feature geometry type.\n */\n\n/**\n * @return {ParsingContext} A new parsing context.\n */\nfunction newParsingContext() {\n return {\n variables: new Set(),\n properties: new Set(),\n featureId: false,\n geometryType: false,\n };\n}\n\n/**\n * @typedef {LiteralValue|Array} EncodedExpression\n */\n\n/**\n * @param {EncodedExpression} encoded The encoded expression.\n * @param {number} expectedType The expected type.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression result.\n */\nfunction parse(encoded, expectedType, context) {\n switch (typeof encoded) {\n case 'boolean': {\n if (isType(expectedType, StringType)) {\n return new LiteralExpression(StringType, encoded ? 'true' : 'false');\n }\n if (!includesType(expectedType, BooleanType)) {\n throw new Error(\n `got a boolean, but expected ${typeName(expectedType)}`,\n );\n }\n return new LiteralExpression(BooleanType, encoded);\n }\n case 'number': {\n if (isType(expectedType, SizeType)) {\n return new LiteralExpression(SizeType, (0,_size_js__WEBPACK_IMPORTED_MODULE_1__.toSize)(encoded));\n }\n if (isType(expectedType, BooleanType)) {\n return new LiteralExpression(BooleanType, !!encoded);\n }\n if (isType(expectedType, StringType)) {\n return new LiteralExpression(StringType, encoded.toString());\n }\n if (!includesType(expectedType, NumberType)) {\n throw new Error(`got a number, but expected ${typeName(expectedType)}`);\n }\n return new LiteralExpression(NumberType, encoded);\n }\n case 'string': {\n if (isType(expectedType, ColorType)) {\n return new LiteralExpression(ColorType, (0,_color_js__WEBPACK_IMPORTED_MODULE_2__.fromString)(encoded));\n }\n if (isType(expectedType, BooleanType)) {\n return new LiteralExpression(BooleanType, !!encoded);\n }\n if (!includesType(expectedType, StringType)) {\n throw new Error(`got a string, but expected ${typeName(expectedType)}`);\n }\n return new LiteralExpression(StringType, encoded);\n }\n default: {\n // pass\n }\n }\n\n if (!Array.isArray(encoded)) {\n throw new Error('expression must be an array or a primitive value');\n }\n\n if (encoded.length === 0) {\n throw new Error('empty expression');\n }\n\n if (typeof encoded[0] === 'string') {\n return parseCallExpression(encoded, expectedType, context);\n }\n\n for (const item of encoded) {\n if (typeof item !== 'number') {\n throw new Error('expected an array of numbers');\n }\n }\n\n if (isType(expectedType, SizeType)) {\n if (encoded.length !== 2) {\n throw new Error(\n `expected an array of two values for a size, got ${encoded.length}`,\n );\n }\n return new LiteralExpression(SizeType, encoded);\n }\n\n if (isType(expectedType, ColorType)) {\n if (encoded.length === 3) {\n return new LiteralExpression(ColorType, [...encoded, 1]);\n }\n if (encoded.length === 4) {\n return new LiteralExpression(ColorType, encoded);\n }\n throw new Error(\n `expected an array of 3 or 4 values for a color, got ${encoded.length}`,\n );\n }\n\n if (!includesType(expectedType, NumberArrayType)) {\n throw new Error(\n `got an array of numbers, but expected ${typeName(expectedType)}`,\n );\n }\n\n return new LiteralExpression(NumberArrayType, encoded);\n}\n\n/**\n * @type {Object}\n */\nconst Ops = {\n Get: 'get',\n Var: 'var',\n Concat: 'concat',\n GeometryType: 'geometry-type',\n LineMetric: 'line-metric',\n Any: 'any',\n All: 'all',\n Not: '!',\n Resolution: 'resolution',\n Zoom: 'zoom',\n Time: 'time',\n Equal: '==',\n NotEqual: '!=',\n GreaterThan: '>',\n GreaterThanOrEqualTo: '>=',\n LessThan: '<',\n LessThanOrEqualTo: '<=',\n Multiply: '*',\n Divide: '/',\n Add: '+',\n Subtract: '-',\n Clamp: 'clamp',\n Mod: '%',\n Pow: '^',\n Abs: 'abs',\n Floor: 'floor',\n Ceil: 'ceil',\n Round: 'round',\n Sin: 'sin',\n Cos: 'cos',\n Atan: 'atan',\n Sqrt: 'sqrt',\n Match: 'match',\n Between: 'between',\n Interpolate: 'interpolate',\n Coalesce: 'coalesce',\n Case: 'case',\n In: 'in',\n Number: 'number',\n String: 'string',\n Array: 'array',\n Color: 'color',\n Id: 'id',\n Band: 'band',\n Palette: 'palette',\n ToString: 'to-string',\n Has: 'has',\n};\n\n/**\n * @typedef {function(Array, number, ParsingContext):Expression} Parser\n *\n * Second argument is the expected type.\n */\n\n/**\n * @type {Object}\n */\nconst parsers = {\n [Ops.Get]: createCallExpressionParser(hasArgsCount(1, Infinity), withGetArgs),\n [Ops.Var]: createCallExpressionParser(hasArgsCount(1, 1), withVarArgs),\n [Ops.Has]: createCallExpressionParser(hasArgsCount(1, Infinity), withGetArgs),\n [Ops.Id]: createCallExpressionParser(usesFeatureId, withNoArgs),\n [Ops.Concat]: createCallExpressionParser(\n hasArgsCount(2, Infinity),\n withArgsOfType(StringType),\n ),\n [Ops.GeometryType]: createCallExpressionParser(usesGeometryType, withNoArgs),\n [Ops.LineMetric]: createCallExpressionParser(withNoArgs),\n [Ops.Resolution]: createCallExpressionParser(withNoArgs),\n [Ops.Zoom]: createCallExpressionParser(withNoArgs),\n [Ops.Time]: createCallExpressionParser(withNoArgs),\n [Ops.Any]: createCallExpressionParser(\n hasArgsCount(2, Infinity),\n withArgsOfType(BooleanType),\n ),\n [Ops.All]: createCallExpressionParser(\n hasArgsCount(2, Infinity),\n withArgsOfType(BooleanType),\n ),\n [Ops.Not]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(BooleanType),\n ),\n [Ops.Equal]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(AnyType),\n ),\n [Ops.NotEqual]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(AnyType),\n ),\n [Ops.GreaterThan]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.GreaterThanOrEqualTo]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.LessThan]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.LessThanOrEqualTo]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.Multiply]: createCallExpressionParser(\n hasArgsCount(2, Infinity),\n withArgsOfReturnType,\n ),\n [Ops.Coalesce]: createCallExpressionParser(\n hasArgsCount(2, Infinity),\n withArgsOfReturnType,\n ),\n [Ops.Divide]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.Add]: createCallExpressionParser(\n hasArgsCount(2, Infinity),\n withArgsOfType(NumberType),\n ),\n [Ops.Subtract]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.Clamp]: createCallExpressionParser(\n hasArgsCount(3, 3),\n withArgsOfType(NumberType),\n ),\n [Ops.Mod]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.Pow]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.Abs]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Floor]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Ceil]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Round]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Sin]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Cos]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Atan]: createCallExpressionParser(\n hasArgsCount(1, 2),\n withArgsOfType(NumberType),\n ),\n [Ops.Sqrt]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(NumberType),\n ),\n [Ops.Match]: createCallExpressionParser(\n hasArgsCount(4, Infinity),\n hasEvenArgs,\n withMatchArgs,\n ),\n [Ops.Between]: createCallExpressionParser(\n hasArgsCount(3, 3),\n withArgsOfType(NumberType),\n ),\n [Ops.Interpolate]: createCallExpressionParser(\n hasArgsCount(6, Infinity),\n hasEvenArgs,\n withInterpolateArgs,\n ),\n [Ops.Case]: createCallExpressionParser(\n hasArgsCount(3, Infinity),\n hasOddArgs,\n withCaseArgs,\n ),\n [Ops.In]: createCallExpressionParser(hasArgsCount(2, 2), withInArgs),\n [Ops.Number]: createCallExpressionParser(\n hasArgsCount(1, Infinity),\n withArgsOfType(AnyType),\n ),\n [Ops.String]: createCallExpressionParser(\n hasArgsCount(1, Infinity),\n withArgsOfType(AnyType),\n ),\n [Ops.Array]: createCallExpressionParser(\n hasArgsCount(1, Infinity),\n withArgsOfType(NumberType),\n ),\n [Ops.Color]: createCallExpressionParser(\n hasArgsCount(1, 4),\n withArgsOfType(NumberType),\n ),\n [Ops.Band]: createCallExpressionParser(\n hasArgsCount(1, 3),\n withArgsOfType(NumberType),\n ),\n [Ops.Palette]: createCallExpressionParser(\n hasArgsCount(2, 2),\n withPaletteArgs,\n ),\n [Ops.ToString]: createCallExpressionParser(\n hasArgsCount(1, 1),\n withArgsOfType(BooleanType | NumberType | StringType | ColorType),\n ),\n};\n\n/**\n * @typedef {function(Array, number, ParsingContext):Array|void} ArgValidator\n *\n * An argument validator applies various checks to an encoded expression arguments and\n * returns the parsed arguments if any. The second argument is the return type of the call expression.\n */\n\n/**\n * @type ArgValidator\n */\nfunction withGetArgs(encoded, returnType, context) {\n const argsCount = encoded.length - 1;\n const args = new Array(argsCount);\n for (let i = 0; i < argsCount; ++i) {\n const key = encoded[i + 1];\n switch (typeof key) {\n case 'number': {\n args[i] = new LiteralExpression(NumberType, key);\n break;\n }\n case 'string': {\n args[i] = new LiteralExpression(StringType, key);\n break;\n }\n default: {\n throw new Error(\n `expected a string key or numeric array index for a get operation, got ${key}`,\n );\n }\n }\n if (i === 0) {\n context.properties.add(String(key));\n }\n }\n return args;\n}\n\n/**\n * @type ArgValidator\n */\nfunction withVarArgs(encoded, returnType, context) {\n const name = encoded[1];\n if (typeof name !== 'string') {\n throw new Error('expected a string argument for var operation');\n }\n context.variables.add(name);\n\n return [new LiteralExpression(StringType, name)];\n}\n\n/**\n * @type ArgValidator\n */\nfunction usesFeatureId(encoded, returnType, context) {\n context.featureId = true;\n}\n\n/**\n * @type ArgValidator\n */\nfunction usesGeometryType(encoded, returnType, context) {\n context.geometryType = true;\n}\n\n/**\n * @type ArgValidator\n */\nfunction withNoArgs(encoded, returnType, context) {\n const operation = encoded[0];\n if (encoded.length !== 1) {\n throw new Error(`expected no arguments for ${operation} operation`);\n }\n return [];\n}\n\n/**\n * @param {number} minArgs The minimum number of arguments.\n * @param {number} maxArgs The maximum number of arguments.\n * @return {ArgValidator} The argument validator\n */\nfunction hasArgsCount(minArgs, maxArgs) {\n return function (encoded, returnType, context) {\n const operation = encoded[0];\n const argCount = encoded.length - 1;\n if (minArgs === maxArgs) {\n if (argCount !== minArgs) {\n const plural = minArgs === 1 ? '' : 's';\n throw new Error(\n `expected ${minArgs} argument${plural} for ${operation}, got ${argCount}`,\n );\n }\n } else if (argCount < minArgs || argCount > maxArgs) {\n const range =\n maxArgs === Infinity\n ? `${minArgs} or more`\n : `${minArgs} to ${maxArgs}`;\n throw new Error(\n `expected ${range} arguments for ${operation}, got ${argCount}`,\n );\n }\n };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withArgsOfReturnType(encoded, returnType, context) {\n const argCount = encoded.length - 1;\n /**\n * @type {Array}\n */\n const args = new Array(argCount);\n for (let i = 0; i < argCount; ++i) {\n const expression = parse(encoded[i + 1], returnType, context);\n args[i] = expression;\n }\n return args;\n}\n\n/**\n * @param {number} argType The argument type.\n * @return {ArgValidator} The argument validator\n */\nfunction withArgsOfType(argType) {\n return function (encoded, returnType, context) {\n const argCount = encoded.length - 1;\n /**\n * @type {Array}\n */\n const args = new Array(argCount);\n for (let i = 0; i < argCount; ++i) {\n const expression = parse(encoded[i + 1], argType, context);\n args[i] = expression;\n }\n return args;\n };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction hasOddArgs(encoded, returnType, context) {\n const operation = encoded[0];\n const argCount = encoded.length - 1;\n if (argCount % 2 === 0) {\n throw new Error(\n `expected an odd number of arguments for ${operation}, got ${argCount} instead`,\n );\n }\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction hasEvenArgs(encoded, returnType, context) {\n const operation = encoded[0];\n const argCount = encoded.length - 1;\n if (argCount % 2 === 1) {\n throw new Error(\n `expected an even number of arguments for operation ${operation}, got ${argCount} instead`,\n );\n }\n}\n\n/**\n * @type ArgValidator\n */\nfunction withMatchArgs(encoded, returnType, context) {\n const argsCount = encoded.length - 1;\n\n const inputType = StringType | NumberType | BooleanType;\n\n const input = parse(encoded[1], inputType, context);\n\n const fallback = parse(encoded[encoded.length - 1], returnType, context);\n\n const args = new Array(argsCount - 2);\n for (let i = 0; i < argsCount - 2; i += 2) {\n try {\n const match = parse(encoded[i + 2], input.type, context);\n args[i] = match;\n } catch (err) {\n throw new Error(\n `failed to parse argument ${i + 1} of match expression: ${err.message}`,\n );\n }\n try {\n const output = parse(encoded[i + 3], fallback.type, context);\n args[i + 1] = output;\n } catch (err) {\n throw new Error(\n `failed to parse argument ${i + 2} of match expression: ${err.message}`,\n );\n }\n }\n\n return [input, ...args, fallback];\n}\n\n/**\n * @type ArgValidator\n */\nfunction withInterpolateArgs(encoded, returnType, context) {\n const interpolationType = encoded[1];\n /**\n * @type {number}\n */\n let base;\n switch (interpolationType[0]) {\n case 'linear':\n base = 1;\n break;\n case 'exponential':\n const b = interpolationType[1];\n if (typeof b !== 'number' || b <= 0) {\n throw new Error(\n `expected a number base for exponential interpolation` +\n `, got ${JSON.stringify(b)} instead`,\n );\n }\n base = b;\n break;\n default:\n throw new Error(\n `invalid interpolation type: ${JSON.stringify(interpolationType)}`,\n );\n }\n\n const interpolation = new LiteralExpression(NumberType, base);\n\n let input;\n try {\n input = parse(encoded[2], NumberType, context);\n } catch (err) {\n throw new Error(\n `failed to parse argument 1 in interpolate expression: ${err.message}`,\n );\n }\n\n const args = new Array(encoded.length - 3);\n for (let i = 0; i < args.length; i += 2) {\n try {\n const stop = parse(encoded[i + 3], NumberType, context);\n args[i] = stop;\n } catch (err) {\n throw new Error(\n `failed to parse argument ${i + 2} for interpolate expression: ${err.message}`,\n );\n }\n try {\n const output = parse(encoded[i + 4], returnType, context);\n args[i + 1] = output;\n } catch (err) {\n throw new Error(\n `failed to parse argument ${i + 3} for interpolate expression: ${err.message}`,\n );\n }\n }\n\n return [interpolation, input, ...args];\n}\n\n/**\n * @type ArgValidator\n */\nfunction withCaseArgs(encoded, returnType, context) {\n const fallback = parse(encoded[encoded.length - 1], returnType, context);\n\n const args = new Array(encoded.length - 1);\n for (let i = 0; i < args.length - 1; i += 2) {\n try {\n const condition = parse(encoded[i + 1], BooleanType, context);\n args[i] = condition;\n } catch (err) {\n throw new Error(\n `failed to parse argument ${i} of case expression: ${err.message}`,\n );\n }\n try {\n const output = parse(encoded[i + 2], fallback.type, context);\n args[i + 1] = output;\n } catch (err) {\n throw new Error(\n `failed to parse argument ${i + 1} of case expression: ${err.message}`,\n );\n }\n }\n\n args[args.length - 1] = fallback;\n return args;\n}\n\n/**\n * @type ArgValidator\n */\nfunction withInArgs(encoded, returnType, context) {\n let haystack = encoded[2];\n if (!Array.isArray(haystack)) {\n throw new Error(\n `the second argument for the \"in\" operator must be an array`,\n );\n }\n /**\n * @type {number}\n */\n let needleType;\n if (typeof haystack[0] === 'string') {\n if (haystack[0] !== 'literal') {\n throw new Error(\n `for the \"in\" operator, a string array should be wrapped in a \"literal\" operator to disambiguate from expressions`,\n );\n }\n if (!Array.isArray(haystack[1])) {\n throw new Error(\n `failed to parse \"in\" expression: the literal operator must be followed by an array`,\n );\n }\n haystack = haystack[1];\n needleType = StringType;\n } else {\n needleType = NumberType;\n }\n\n const args = new Array(haystack.length);\n for (let i = 0; i < args.length; i++) {\n try {\n const arg = parse(haystack[i], needleType, context);\n args[i] = arg;\n } catch (err) {\n throw new Error(\n `failed to parse haystack item ${i} for \"in\" expression: ${err.message}`,\n );\n }\n }\n\n const needle = parse(encoded[1], needleType, context);\n return [needle, ...args];\n}\n\n/**\n * @type ArgValidator\n */\nfunction withPaletteArgs(encoded, returnType, context) {\n let index;\n try {\n index = parse(encoded[1], NumberType, context);\n } catch (err) {\n throw new Error(\n `failed to parse first argument in palette expression: ${err.message}`,\n );\n }\n const colors = encoded[2];\n if (!Array.isArray(colors)) {\n throw new Error('the second argument of palette must be an array');\n }\n const parsedColors = new Array(colors.length);\n for (let i = 0; i < parsedColors.length; i++) {\n let color;\n try {\n color = parse(colors[i], ColorType, context);\n } catch (err) {\n throw new Error(\n `failed to parse color at index ${i} in palette expression: ${err.message}`,\n );\n }\n if (!(color instanceof LiteralExpression)) {\n throw new Error(\n `the palette color at index ${i} must be a literal value`,\n );\n }\n parsedColors[i] = color;\n }\n return [index, ...parsedColors];\n}\n\n/**\n * @param {Array} validators A chain of argument validators. The last validator is expected\n * to return the parsed arguments.\n * @return {Parser} The parser.\n */\nfunction createCallExpressionParser(...validators) {\n return function (encoded, returnType, context) {\n const operator = encoded[0];\n\n /**\n * @type {Array}\n */\n let args;\n for (let i = 0; i < validators.length; i++) {\n const parsed = validators[i](encoded, returnType, context);\n if (i == validators.length - 1) {\n if (!parsed) {\n throw new Error(\n 'expected last argument validator to return the parsed args',\n );\n }\n args = parsed;\n }\n }\n return new CallExpression(returnType, operator, ...args);\n };\n}\n\n/**\n * @param {Array} encoded The encoded expression.\n * @param {number} returnType The expected return type of the call expression.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression.\n */\nfunction parseCallExpression(encoded, returnType, context) {\n const operator = encoded[0];\n\n const parser = parsers[operator];\n if (!parser) {\n throw new Error(`unknown operator: ${operator}`);\n }\n return parser(encoded, returnType, context);\n}\n\n/**\n * Returns a simplified geometry type suited for the `geometry-type` operator\n * @param {import('../geom/Geometry.js').default|import('../render/Feature.js').default} geometry Geometry object\n * @return {'Point'|'LineString'|'Polygon'|''} Simplified geometry type; empty string of no geometry found\n */\nfunction computeGeometryType(geometry) {\n if (!geometry) {\n return '';\n }\n const type = geometry.getType();\n switch (type) {\n case 'Point':\n case 'LineString':\n case 'Polygon':\n return type;\n case 'MultiPoint':\n case 'MultiLineString':\n case 'MultiPolygon':\n return /** @type {'Point'|'LineString'|'Polygon'} */ (type.substring(5));\n case 'Circle':\n return 'Polygon';\n case 'GeometryCollection':\n return computeGeometryType(\n /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometries()[0],\n );\n default:\n return '';\n }\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/expr/expression.js?"); /***/ }), /***/ "./node_modules/ol/expr/gpu.js": /*!*************************************!*\ !*** ./node_modules/ol/expr/gpu.js ***! \*************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FEATURE_ID_PROPERTY_NAME: () => (/* binding */ FEATURE_ID_PROPERTY_NAME),\n/* harmony export */ GEOMETRY_TYPE_PROPERTY_NAME: () => (/* binding */ GEOMETRY_TYPE_PROPERTY_NAME),\n/* harmony export */ PALETTE_TEXTURE_ARRAY: () => (/* binding */ PALETTE_TEXTURE_ARRAY),\n/* harmony export */ arrayToGlsl: () => (/* binding */ arrayToGlsl),\n/* harmony export */ buildExpression: () => (/* binding */ buildExpression),\n/* harmony export */ colorToGlsl: () => (/* binding */ colorToGlsl),\n/* harmony export */ getStringNumberEquivalent: () => (/* binding */ getStringNumberEquivalent),\n/* harmony export */ newCompilationContext: () => (/* binding */ newCompilationContext),\n/* harmony export */ numberToGlsl: () => (/* binding */ numberToGlsl),\n/* harmony export */ sizeToGlsl: () => (/* binding */ sizeToGlsl),\n/* harmony export */ stringToGlsl: () => (/* binding */ stringToGlsl),\n/* harmony export */ uniformNameForVariable: () => (/* binding */ uniformNameForVariable)\n/* harmony export */ });\n/* harmony import */ var _webgl_PaletteTexture_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../webgl/PaletteTexture.js */ \"./node_modules/ol/webgl/PaletteTexture.js\");\n/* harmony import */ var _expression_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./expression.js */ \"./node_modules/ol/expr/expression.js\");\n/* harmony import */ var _renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../renderer/webgl/TileLayer.js */ \"./node_modules/ol/renderer/webgl/TileLayer.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../color.js */ \"./node_modules/ol/color.js\");\n/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../size.js */ \"./node_modules/ol/size.js\");\n/**\n * @module ol/expr/gpu\n */\n\n\n\n\n\n\n/**\n * @param {string} operator Operator\n * @param {CompilationContext} context Compilation context\n * @return {string} A function name based on the operator, unique in the given context\n */\nfunction computeOperatorFunctionName(operator, context) {\n return `operator_${operator}_${Object.keys(context.functions).length}`;\n}\n\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @return {string} The value as string.\n */\nfunction numberToGlsl(v) {\n const s = v.toString();\n return s.includes('.') ? s : s + '.0';\n}\n\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array} array Numerical values array.\n * @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nfunction arrayToGlsl(array) {\n if (array.length < 2 || array.length > 4) {\n throw new Error(\n '`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.',\n );\n }\n return `vec${array.length}(${array.map(numberToGlsl).join(', ')})`;\n}\n\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nfunction colorToGlsl(color) {\n const array = (0,_color_js__WEBPACK_IMPORTED_MODULE_0__.asArray)(color);\n const alpha = array.length > 3 ? array[3] : 1;\n return arrayToGlsl([array[0] / 255, array[1] / 255, array[2] / 255, alpha]);\n}\n\n/**\n * Normalizes and converts a number or array toa `vec2` array compatible with GLSL.\n * @param {number|import('../size.js').Size} size Size.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nfunction sizeToGlsl(size) {\n const array = (0,_size_js__WEBPACK_IMPORTED_MODULE_1__.toSize)(size);\n return arrayToGlsl(array);\n}\n\n/** @type {Object} */\nconst stringToFloatMap = {};\nlet stringToFloatCounter = 0;\n\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {string} string String literal value\n * @return {number} Number equivalent\n */\nfunction getStringNumberEquivalent(string) {\n if (!(string in stringToFloatMap)) {\n stringToFloatMap[string] = stringToFloatCounter++;\n }\n return stringToFloatMap[string];\n}\n\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * Note: with a float precision of `mediump`, the amount of unique strings supported is 16,777,216\n * @param {string} string String literal value\n * @return {string} GLSL-compatible string containing a number\n */\nfunction stringToGlsl(string) {\n return numberToGlsl(getStringNumberEquivalent(string));\n}\n\n/**\n * Get the uniform name given a variable name.\n * @param {string} variableName The variable name.\n * @return {string} The uniform name.\n */\nfunction uniformNameForVariable(variableName) {\n return 'u_var_' + variableName;\n}\n\n/**\n * @typedef {import('./expression.js').ParsingContext} ParsingContext\n */\n/**\n *\n * @typedef {import(\"./expression.js\").Expression} Expression\n */\n/**\n *\n * @typedef {import(\"./expression.js\").LiteralExpression} LiteralExpression\n */\n\n/**\n * @typedef {Object} CompilationContextProperty\n * @property {string} name Name\n * @property {number} type Resolved property type\n */\n\n/**\n * @typedef {Object} CompilationContextVariable\n * @property {string} name Name\n * @property {number} type Resolved variable type\n */\n\n/**\n * @typedef {Object} CompilationContext\n * @property {boolean} [inFragmentShader] If false, means the expression output should be made for a vertex shader\n * @property {Object} properties The values for properties used in 'get' expressions.\n * @property {Object} variables The values for variables used in 'var' expressions.\n * @property {Object} functions Lookup of functions used by the style.\n * @property {number} [bandCount] Number of bands per pixel.\n * @property {Array} [paletteTextures] List of palettes used by the style.\n * @property {boolean} featureId Whether the feature ID is used in the expression\n * @property {boolean} geometryType Whether the geometry type is used in the expression\n */\n\n/**\n * @return {CompilationContext} A new compilation context.\n */\nfunction newCompilationContext() {\n return {\n inFragmentShader: false,\n variables: {},\n properties: {},\n functions: {},\n bandCount: 0,\n featureId: false,\n geometryType: false,\n };\n}\n\nconst GET_BAND_VALUE_FUNC = 'getBandValue';\n\nconst PALETTE_TEXTURE_ARRAY = 'u_paletteTextures';\n\nconst FEATURE_ID_PROPERTY_NAME = 'featureId';\nconst GEOMETRY_TYPE_PROPERTY_NAME = 'geometryType';\n\n/**\n * @typedef {string} CompiledExpression\n */\n\n/**\n * @typedef {function(CompilationContext, CallExpression, number): string} Compiler\n * Third argument is the expected value types\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {number} type The expected type.\n * @param {import('./expression.js').ParsingContext} parsingContext The parsing context.\n * @param {CompilationContext} compilationContext An existing compilation context\n * @return {CompiledExpression} The compiled expression.\n */\nfunction buildExpression(\n encoded,\n type,\n parsingContext,\n compilationContext,\n) {\n const expression = (0,_expression_js__WEBPACK_IMPORTED_MODULE_2__.parse)(encoded, type, parsingContext);\n return compile(expression, type, compilationContext);\n}\n\n/**\n * @param {function(Array, CompilationContext): string} output Function that takes in parsed arguments and returns a string\n * @return {function(CompilationContext, import(\"./expression.js\").CallExpression, number): string} Compiler for the call expression\n */\nfunction createCompiler(output) {\n return (context, expression, type) => {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compile(expression.args[i], type, context);\n }\n return output(args, context);\n };\n}\n\n/**\n * @type {Object}\n */\nconst compilers = {\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Get]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const propName = /** @type {string} */ (firstArg.value);\n const isExisting = propName in context.properties;\n if (!isExisting) {\n context.properties[propName] = {\n name: propName,\n type: expression.type,\n };\n }\n const prefix = context.inFragmentShader ? 'v_prop_' : 'a_prop_';\n return prefix + propName;\n },\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Id]: (context) => {\n context.featureId = true;\n const prefix = context.inFragmentShader ? 'v_' : 'a_';\n return prefix + FEATURE_ID_PROPERTY_NAME;\n },\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.GeometryType]: (context) => {\n context.geometryType = true;\n const prefix = context.inFragmentShader ? 'v_' : 'a_';\n return prefix + GEOMETRY_TYPE_PROPERTY_NAME;\n },\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.LineMetric]: () => 'currentLineMetric', // this variable is assumed to always be present in shaders, default is 0.\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Var]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const varName = /** @type {string} */ (firstArg.value);\n const isExisting = varName in context.variables;\n if (!isExisting) {\n context.variables[varName] = {\n name: varName,\n type: expression.type,\n };\n }\n return uniformNameForVariable(varName);\n },\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Resolution]: () => 'u_resolution',\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Zoom]: () => 'u_zoom',\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Time]: () => 'u_time',\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Any]: createCompiler((compiledArgs) => `(${compiledArgs.join(` || `)})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.All]: createCompiler((compiledArgs) => `(${compiledArgs.join(` && `)})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Not]: createCompiler(([value]) => `(!${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Equal]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} == ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.NotEqual]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} != ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.GreaterThan]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} > ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.GreaterThanOrEqualTo]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} >= ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.LessThan]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} < ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.LessThanOrEqualTo]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} <= ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Multiply]: createCompiler(\n (compiledArgs) => `(${compiledArgs.join(' * ')})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Divide]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} / ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Add]: createCompiler((compiledArgs) => `(${compiledArgs.join(' + ')})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Subtract]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} - ${secondValue})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Clamp]: createCompiler(\n ([value, min, max]) => `clamp(${value}, ${min}, ${max})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Mod]: createCompiler(([value, modulo]) => `mod(${value}, ${modulo})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Pow]: createCompiler(([value, power]) => `pow(${value}, ${power})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Abs]: createCompiler(([value]) => `abs(${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Floor]: createCompiler(([value]) => `floor(${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Ceil]: createCompiler(([value]) => `ceil(${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Round]: createCompiler(([value]) => `floor(${value} + 0.5)`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Sin]: createCompiler(([value]) => `sin(${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Cos]: createCompiler(([value]) => `cos(${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Atan]: createCompiler(([firstValue, secondValue]) => {\n return secondValue !== undefined\n ? `atan(${firstValue}, ${secondValue})`\n : `atan(${firstValue})`;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Sqrt]: createCompiler(([value]) => `sqrt(${value})`),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Match]: createCompiler((compiledArgs) => {\n const input = compiledArgs[0];\n const fallback = compiledArgs[compiledArgs.length - 1];\n let result = null;\n for (let i = compiledArgs.length - 3; i >= 1; i -= 2) {\n const match = compiledArgs[i];\n const output = compiledArgs[i + 1];\n result = `(${input} == ${match} ? ${output} : ${result || fallback})`;\n }\n return result;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Between]: createCompiler(\n ([value, min, max]) => `(${value} >= ${min} && ${value} <= ${max})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Interpolate]: createCompiler(([exponent, input, ...compiledArgs]) => {\n let result = '';\n for (let i = 0; i < compiledArgs.length - 2; i += 2) {\n const stop1 = compiledArgs[i];\n const output1 = result || compiledArgs[i + 1];\n const stop2 = compiledArgs[i + 2];\n const output2 = compiledArgs[i + 3];\n let ratio;\n if (exponent === numberToGlsl(1)) {\n ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;\n } else {\n ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;\n }\n result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;\n }\n return result;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Case]: createCompiler((compiledArgs) => {\n const fallback = compiledArgs[compiledArgs.length - 1];\n let result = null;\n for (let i = compiledArgs.length - 3; i >= 0; i -= 2) {\n const condition = compiledArgs[i];\n const output = compiledArgs[i + 1];\n result = `(${condition} ? ${output} : ${result || fallback})`;\n }\n return result;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.In]: createCompiler(([needle, ...haystack], context) => {\n const funcName = computeOperatorFunctionName('in', context);\n const tests = [];\n for (let i = 0; i < haystack.length; i += 1) {\n tests.push(` if (inputValue == ${haystack[i]}) { return true; }`);\n }\n context.functions[funcName] = `bool ${funcName}(float inputValue) {\n${tests.join('\\n')}\n return false;\n}`;\n return `${funcName}(${needle})`;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Array]: createCompiler(\n (args) => `vec${args.length}(${args.join(', ')})`,\n ),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Color]: createCompiler((compiledArgs) => {\n if (compiledArgs.length === 1) {\n //grayscale\n return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;\n }\n if (compiledArgs.length === 2) {\n //grayscale with alpha\n return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;\n }\n const rgb = compiledArgs.slice(0, 3).map((color) => `${color} / 255.0`);\n if (compiledArgs.length === 3) {\n return `vec4(${rgb.join(', ')}, 1.0)`;\n }\n const alpha = compiledArgs[3];\n return `vec4(${rgb.join(', ')}, ${alpha})`;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Band]: createCompiler(([band, xOffset, yOffset], context) => {\n if (!(GET_BAND_VALUE_FUNC in context.functions)) {\n let ifBlocks = '';\n const bandCount = context.bandCount || 1;\n for (let i = 0; i < bandCount; i++) {\n const colorIndex = Math.floor(i / 4);\n let bandIndex = i % 4;\n if (i === bandCount - 1 && bandIndex === 1) {\n // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n bandIndex = 3;\n }\n const textureName = `${_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_3__.Uniforms.TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n ifBlocks += ` if (band == ${i + 1}.0) {\n return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\n }\n`;\n }\n\n context.functions[GET_BAND_VALUE_FUNC] =\n `float getBandValue(float band, float xOffset, float yOffset) {\n float dx = xOffset / ${_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_3__.Uniforms.TEXTURE_PIXEL_WIDTH};\n float dy = yOffset / ${_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_3__.Uniforms.TEXTURE_PIXEL_HEIGHT};\n${ifBlocks}\n}`;\n }\n\n return `${GET_BAND_VALUE_FUNC}(${band}, ${xOffset ?? '0.0'}, ${\n yOffset ?? '0.0'\n })`;\n }),\n [_expression_js__WEBPACK_IMPORTED_MODULE_2__.Ops.Palette]: (context, expression) => {\n const [index, ...colors] = expression.args;\n const numColors = colors.length;\n const palette = new Uint8Array(numColors * 4);\n for (let i = 0; i < colors.length; i++) {\n const parsedValue = /** @type {string | Array} */ (\n /** @type {LiteralExpression} */ (colors[i]).value\n );\n const color = (0,_color_js__WEBPACK_IMPORTED_MODULE_0__.asArray)(parsedValue);\n const offset = i * 4;\n palette[offset] = color[0];\n palette[offset + 1] = color[1];\n palette[offset + 2] = color[2];\n palette[offset + 3] = color[3] * 255;\n }\n if (!context.paletteTextures) {\n context.paletteTextures = [];\n }\n const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;\n const paletteTexture = new _webgl_PaletteTexture_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"](paletteName, palette);\n context.paletteTextures.push(paletteTexture);\n const compiledIndex = compile(index, _expression_js__WEBPACK_IMPORTED_MODULE_2__.NumberType, context);\n return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;\n },\n // TODO: unimplemented\n // Ops.Number\n // Ops.String\n // Ops.Coalesce\n // Ops.Concat\n // Ops.ToString\n};\n\n/**\n * @param {Expression} expression The expression.\n * @param {number} returnType The expected return type.\n * @param {CompilationContext} context The compilation context.\n * @return {CompiledExpression} The compiled expression\n */\nfunction compile(expression, returnType, context) {\n // operator\n if (expression instanceof _expression_js__WEBPACK_IMPORTED_MODULE_2__.CallExpression) {\n const compiler = compilers[expression.operator];\n if (compiler === undefined) {\n throw new Error(\n `No compiler defined for this operator: ${JSON.stringify(\n expression.operator,\n )}`,\n );\n }\n return compiler(context, expression, returnType);\n }\n\n if ((expression.type & _expression_js__WEBPACK_IMPORTED_MODULE_2__.NumberType) > 0) {\n return numberToGlsl(/** @type {number} */ (expression.value));\n }\n\n if ((expression.type & _expression_js__WEBPACK_IMPORTED_MODULE_2__.BooleanType) > 0) {\n return expression.value.toString();\n }\n\n if ((expression.type & _expression_js__WEBPACK_IMPORTED_MODULE_2__.StringType) > 0) {\n return stringToGlsl(expression.value.toString());\n }\n\n if ((expression.type & _expression_js__WEBPACK_IMPORTED_MODULE_2__.ColorType) > 0) {\n return colorToGlsl(\n /** @type {Array | string} */ (expression.value),\n );\n }\n\n if ((expression.type & _expression_js__WEBPACK_IMPORTED_MODULE_2__.NumberArrayType) > 0) {\n return arrayToGlsl(/** @type {Array} */ (expression.value));\n }\n\n if ((expression.type & _expression_js__WEBPACK_IMPORTED_MODULE_2__.SizeType) > 0) {\n return sizeToGlsl(\n /** @type {number|import('../size.js').Size} */ (expression.value),\n );\n }\n\n throw new Error(\n `Unexpected expression ${expression.value} (expected type ${(0,_expression_js__WEBPACK_IMPORTED_MODULE_2__.typeName)(\n returnType,\n )})`,\n );\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/expr/gpu.js?"); /***/ }), /***/ "./node_modules/ol/extent.js": /*!***********************************!*\ !*** ./node_modules/ol/extent.js ***! \***********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ applyTransform: () => (/* binding */ applyTransform),\n/* harmony export */ approximatelyEquals: () => (/* binding */ approximatelyEquals),\n/* harmony export */ boundingExtent: () => (/* binding */ boundingExtent),\n/* harmony export */ buffer: () => (/* binding */ buffer),\n/* harmony export */ clone: () => (/* binding */ clone),\n/* harmony export */ closestSquaredDistanceXY: () => (/* binding */ closestSquaredDistanceXY),\n/* harmony export */ containsCoordinate: () => (/* binding */ containsCoordinate),\n/* harmony export */ containsExtent: () => (/* binding */ containsExtent),\n/* harmony export */ containsXY: () => (/* binding */ containsXY),\n/* harmony export */ coordinateRelationship: () => (/* binding */ coordinateRelationship),\n/* harmony export */ createEmpty: () => (/* binding */ createEmpty),\n/* harmony export */ createOrUpdate: () => (/* binding */ createOrUpdate),\n/* harmony export */ createOrUpdateEmpty: () => (/* binding */ createOrUpdateEmpty),\n/* harmony export */ createOrUpdateFromCoordinate: () => (/* binding */ createOrUpdateFromCoordinate),\n/* harmony export */ createOrUpdateFromCoordinates: () => (/* binding */ createOrUpdateFromCoordinates),\n/* harmony export */ createOrUpdateFromFlatCoordinates: () => (/* binding */ createOrUpdateFromFlatCoordinates),\n/* harmony export */ createOrUpdateFromRings: () => (/* binding */ createOrUpdateFromRings),\n/* harmony export */ equals: () => (/* binding */ equals),\n/* harmony export */ extend: () => (/* binding */ extend),\n/* harmony export */ extendCoordinate: () => (/* binding */ extendCoordinate),\n/* harmony export */ extendCoordinates: () => (/* binding */ extendCoordinates),\n/* harmony export */ extendFlatCoordinates: () => (/* binding */ extendFlatCoordinates),\n/* harmony export */ extendRings: () => (/* binding */ extendRings),\n/* harmony export */ extendXY: () => (/* binding */ extendXY),\n/* harmony export */ forEachCorner: () => (/* binding */ forEachCorner),\n/* harmony export */ getArea: () => (/* binding */ getArea),\n/* harmony export */ getBottomLeft: () => (/* binding */ getBottomLeft),\n/* harmony export */ getBottomRight: () => (/* binding */ getBottomRight),\n/* harmony export */ getCenter: () => (/* binding */ getCenter),\n/* harmony export */ getCorner: () => (/* binding */ getCorner),\n/* harmony export */ getEnlargedArea: () => (/* binding */ getEnlargedArea),\n/* harmony export */ getForViewAndSize: () => (/* binding */ getForViewAndSize),\n/* harmony export */ getHeight: () => (/* binding */ getHeight),\n/* harmony export */ getIntersection: () => (/* binding */ getIntersection),\n/* harmony export */ getIntersectionArea: () => (/* binding */ getIntersectionArea),\n/* harmony export */ getMargin: () => (/* binding */ getMargin),\n/* harmony export */ getRotatedViewport: () => (/* binding */ getRotatedViewport),\n/* harmony export */ getSize: () => (/* binding */ getSize),\n/* harmony export */ getTopLeft: () => (/* binding */ getTopLeft),\n/* harmony export */ getTopRight: () => (/* binding */ getTopRight),\n/* harmony export */ getWidth: () => (/* binding */ getWidth),\n/* harmony export */ intersects: () => (/* binding */ intersects),\n/* harmony export */ intersectsSegment: () => (/* binding */ intersectsSegment),\n/* harmony export */ isEmpty: () => (/* binding */ isEmpty),\n/* harmony export */ returnOrUpdate: () => (/* binding */ returnOrUpdate),\n/* harmony export */ scaleFromCenter: () => (/* binding */ scaleFromCenter),\n/* harmony export */ wrapAndSliceX: () => (/* binding */ wrapAndSliceX),\n/* harmony export */ wrapX: () => (/* binding */ wrapX)\n/* harmony export */ });\n/* harmony import */ var _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./extent/Relationship.js */ \"./node_modules/ol/extent/Relationship.js\");\n/**\n * @module ol/extent\n */\n\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array} Extent\n * @api\n */\n\n/**\n * Extent corner.\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} Corner\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nfunction boundingExtent(coordinates) {\n const extent = createEmpty();\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Array} xs Xs.\n * @param {Array} ys Ys.\n * @param {Extent} [dest] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, dest) {\n const minX = Math.min.apply(null, xs);\n const minY = Math.min.apply(null, ys);\n const maxX = Math.max.apply(null, xs);\n const maxY = Math.max.apply(null, ys);\n return createOrUpdate(minX, minY, maxX, maxY, dest);\n}\n\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n * @api\n */\nfunction buffer(extent, value, dest) {\n if (dest) {\n dest[0] = extent[0] - value;\n dest[1] = extent[1] - value;\n dest[2] = extent[2] + value;\n dest[3] = extent[3] + value;\n return dest;\n }\n return [\n extent[0] - value,\n extent[1] - value,\n extent[2] + value,\n extent[3] + value,\n ];\n}\n\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent} [dest] Extent.\n * @return {Extent} The clone.\n */\nfunction clone(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent.slice();\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nfunction closestSquaredDistanceXY(extent, x, y) {\n let dx, dy;\n if (x < extent[0]) {\n dx = extent[0] - x;\n } else if (extent[2] < x) {\n dx = x - extent[2];\n } else {\n dx = 0;\n }\n if (y < extent[1]) {\n dy = extent[1] - y;\n } else if (extent[3] < y) {\n dy = y - extent[3];\n } else {\n dy = 0;\n }\n return dx * dx + dy * dy;\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nfunction containsCoordinate(extent, coordinate) {\n return containsXY(extent, coordinate[0], coordinate[1]);\n}\n\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n * first.\n * @api\n */\nfunction containsExtent(extent1, extent2) {\n return (\n extent1[0] <= extent2[0] &&\n extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] &&\n extent2[3] <= extent1[3]\n );\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nfunction containsXY(extent, x, y) {\n return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n * import(\"./extent/Relationship.js\").Relationship).\n */\nfunction coordinateRelationship(extent, coordinate) {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const x = coordinate[0];\n const y = coordinate[1];\n let relationship = _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].UNKNOWN;\n if (x < minX) {\n relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].LEFT;\n } else if (x > maxX) {\n relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].RIGHT;\n }\n if (y < minY) {\n relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].BELOW;\n } else if (y > maxY) {\n relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ABOVE;\n }\n if (relationship === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].UNKNOWN) {\n relationship = _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].INTERSECTING;\n }\n return relationship;\n}\n\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nfunction createEmpty() {\n return [Infinity, Infinity, -Infinity, -Infinity];\n}\n\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nfunction createOrUpdate(minX, minY, maxX, maxY, dest) {\n if (dest) {\n dest[0] = minX;\n dest[1] = minY;\n dest[2] = maxX;\n dest[3] = maxY;\n return dest;\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nfunction createOrUpdateEmpty(dest) {\n return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, dest);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nfunction createOrUpdateFromCoordinate(coordinate, dest) {\n const x = coordinate[0];\n const y = coordinate[1];\n return createOrUpdate(x, y, x, y, dest);\n}\n\n/**\n * @param {Array} coordinates Coordinates.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nfunction createOrUpdateFromCoordinates(coordinates, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nfunction createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n dest,\n) {\n const extent = createOrUpdateEmpty(dest);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array>} rings Rings.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nfunction createOrUpdateFromRings(rings, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendRings(extent, rings);\n}\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nfunction equals(extent1, extent2) {\n return (\n extent1[0] == extent2[0] &&\n extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] &&\n extent1[3] == extent2[3]\n );\n}\n\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nfunction approximatelyEquals(extent1, extent2, tolerance) {\n return (\n Math.abs(extent1[0] - extent2[0]) < tolerance &&\n Math.abs(extent1[2] - extent2[2]) < tolerance &&\n Math.abs(extent1[1] - extent2[1]) < tolerance &&\n Math.abs(extent1[3] - extent2[3]) < tolerance\n );\n}\n\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nfunction extend(extent1, extent2) {\n if (extent2[0] < extent1[0]) {\n extent1[0] = extent2[0];\n }\n if (extent2[2] > extent1[2]) {\n extent1[2] = extent2[2];\n }\n if (extent2[1] < extent1[1]) {\n extent1[1] = extent2[1];\n }\n if (extent2[3] > extent1[3]) {\n extent1[3] = extent2[3];\n }\n return extent1;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nfunction extendCoordinate(extent, coordinate) {\n if (coordinate[0] < extent[0]) {\n extent[0] = coordinate[0];\n }\n if (coordinate[0] > extent[2]) {\n extent[2] = coordinate[0];\n }\n if (coordinate[1] < extent[1]) {\n extent[1] = coordinate[1];\n }\n if (coordinate[1] > extent[3]) {\n extent[3] = coordinate[1];\n }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nfunction extendCoordinates(extent, coordinates) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nfunction extendFlatCoordinates(\n extent,\n flatCoordinates,\n offset,\n end,\n stride,\n) {\n for (; offset < end; offset += stride) {\n extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array>} rings Rings.\n * @return {Extent} Extent.\n */\nfunction extendRings(extent, rings) {\n for (let i = 0, ii = rings.length; i < ii; ++i) {\n extendCoordinates(extent, rings[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nfunction extendXY(extent, x, y) {\n extent[0] = Math.min(extent[0], x);\n extent[1] = Math.min(extent[1], y);\n extent[2] = Math.max(extent[2], x);\n extent[3] = Math.max(extent[3], y);\n}\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nfunction forEachCorner(extent, callback) {\n let val;\n val = callback(getBottomLeft(extent));\n if (val) {\n return val;\n }\n val = callback(getBottomRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopLeft(extent));\n if (val) {\n return val;\n }\n return false;\n}\n\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nfunction getArea(extent) {\n let area = 0;\n if (!isEmpty(extent)) {\n area = getWidth(extent) * getHeight(extent);\n }\n return area;\n}\n\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nfunction getBottomLeft(extent) {\n return [extent[0], extent[1]];\n}\n\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nfunction getBottomRight(extent) {\n return [extent[2], extent[1]];\n}\n\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nfunction getCenter(extent) {\n return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nfunction getCorner(extent, corner) {\n let coordinate;\n if (corner === 'bottom-left') {\n coordinate = getBottomLeft(extent);\n } else if (corner === 'bottom-right') {\n coordinate = getBottomRight(extent);\n } else if (corner === 'top-left') {\n coordinate = getTopLeft(extent);\n } else if (corner === 'top-right') {\n coordinate = getTopRight(extent);\n } else {\n throw new Error('Invalid corner');\n }\n return coordinate;\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nfunction getEnlargedArea(extent1, extent2) {\n const minX = Math.min(extent1[0], extent2[0]);\n const minY = Math.min(extent1[1], extent2[1]);\n const maxX = Math.max(extent1[2], extent2[2]);\n const maxY = Math.max(extent1[3], extent2[3]);\n return (maxX - minX) * (maxY - minY);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nfunction getForViewAndSize(center, resolution, rotation, size, dest) {\n const [x0, y0, x1, y1, x2, y2, x3, y3] = getRotatedViewport(\n center,\n resolution,\n rotation,\n size,\n );\n return createOrUpdate(\n Math.min(x0, x1, x2, x3),\n Math.min(y0, y1, y2, y3),\n Math.max(x0, x1, x2, x3),\n Math.max(y0, y1, y2, y3),\n dest,\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array} Linear ring representing the viewport.\n */\nfunction getRotatedViewport(center, resolution, rotation, size) {\n const dx = (resolution * size[0]) / 2;\n const dy = (resolution * size[1]) / 2;\n const cosRotation = Math.cos(rotation);\n const sinRotation = Math.sin(rotation);\n const xCos = dx * cosRotation;\n const xSin = dx * sinRotation;\n const yCos = dy * cosRotation;\n const ySin = dy * sinRotation;\n const x = center[0];\n const y = center[1];\n return [\n x - xCos + ySin,\n y - xSin - yCos,\n x - xCos - ySin,\n y - xSin + yCos,\n x + xCos - ySin,\n y + xSin + yCos,\n x + xCos + ySin,\n y + xSin - yCos,\n x - xCos + ySin,\n y - xSin - yCos,\n ];\n}\n\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nfunction getHeight(extent) {\n return extent[3] - extent[1];\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nfunction getIntersectionArea(extent1, extent2) {\n const intersection = getIntersection(extent1, extent2);\n return getArea(intersection);\n}\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent} [dest] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nfunction getIntersection(extent1, extent2, dest) {\n const intersection = dest ? dest : createEmpty();\n if (intersects(extent1, extent2)) {\n if (extent1[0] > extent2[0]) {\n intersection[0] = extent1[0];\n } else {\n intersection[0] = extent2[0];\n }\n if (extent1[1] > extent2[1]) {\n intersection[1] = extent1[1];\n } else {\n intersection[1] = extent2[1];\n }\n if (extent1[2] < extent2[2]) {\n intersection[2] = extent1[2];\n } else {\n intersection[2] = extent2[2];\n }\n if (extent1[3] < extent2[3]) {\n intersection[3] = extent1[3];\n } else {\n intersection[3] = extent2[3];\n }\n } else {\n createOrUpdateEmpty(intersection);\n }\n return intersection;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nfunction getMargin(extent) {\n return getWidth(extent) + getHeight(extent);\n}\n\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nfunction getSize(extent) {\n return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nfunction getTopLeft(extent) {\n return [extent[0], extent[3]];\n}\n\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nfunction getTopRight(extent) {\n return [extent[2], extent[3]];\n}\n\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nfunction getWidth(extent) {\n return extent[2] - extent[0];\n}\n\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nfunction intersects(extent1, extent2) {\n return (\n extent1[0] <= extent2[2] &&\n extent1[2] >= extent2[0] &&\n extent1[1] <= extent2[3] &&\n extent1[3] >= extent2[1]\n );\n}\n\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nfunction isEmpty(extent) {\n return extent[2] < extent[0] || extent[3] < extent[1];\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nfunction returnOrUpdate(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nfunction scaleFromCenter(extent, value) {\n const deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n const deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n extent[0] -= deltaX;\n extent[2] += deltaX;\n extent[1] -= deltaY;\n extent[3] += deltaY;\n}\n\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nfunction intersectsSegment(extent, start, end) {\n let intersects = false;\n const startRel = coordinateRelationship(extent, start);\n const endRel = coordinateRelationship(extent, end);\n if (\n startRel === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].INTERSECTING ||\n endRel === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].INTERSECTING\n ) {\n intersects = true;\n } else {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const startX = start[0];\n const startY = start[1];\n const endX = end[0];\n const endY = end[1];\n const slope = (endY - startY) / (endX - startX);\n let x, y;\n if (!!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ABOVE) && !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ABOVE)) {\n // potentially intersects top\n x = endX - (endY - maxY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].RIGHT) &&\n !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].RIGHT)\n ) {\n // potentially intersects right\n y = endY - (endX - maxX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n if (\n !intersects &&\n !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].BELOW) &&\n !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].BELOW)\n ) {\n // potentially intersects bottom\n x = endX - (endY - minY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].LEFT) &&\n !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].LEFT)\n ) {\n // potentially intersects left\n y = endY - (endX - minX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n }\n return intersects;\n}\n\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent} [dest] Destination extent.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nfunction applyTransform(extent, transformFn, dest, stops) {\n if (isEmpty(extent)) {\n return createOrUpdateEmpty(dest);\n }\n let coordinates = [];\n if (stops > 1) {\n const width = extent[2] - extent[0];\n const height = extent[3] - extent[1];\n for (let i = 0; i < stops; ++i) {\n coordinates.push(\n extent[0] + (width * i) / stops,\n extent[1],\n extent[2],\n extent[1] + (height * i) / stops,\n extent[2] - (width * i) / stops,\n extent[3],\n extent[0],\n extent[3] - (height * i) / stops,\n );\n }\n } else {\n coordinates = [\n extent[0],\n extent[1],\n extent[2],\n extent[1],\n extent[2],\n extent[3],\n extent[0],\n extent[3],\n ];\n }\n transformFn(coordinates, coordinates, 2);\n const xs = [];\n const ys = [];\n for (let i = 0, l = coordinates.length; i < l; i += 2) {\n xs.push(coordinates[i]);\n ys.push(coordinates[i + 1]);\n }\n return _boundingExtentXYs(xs, ys, dest);\n}\n\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nfunction wrapX(extent, projection) {\n const projectionExtent = projection.getExtent();\n const center = getCenter(extent);\n if (\n projection.canWrapX() &&\n (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])\n ) {\n const worldWidth = getWidth(projectionExtent);\n const worldsAway = Math.floor(\n (center[0] - projectionExtent[0]) / worldWidth,\n );\n const offset = worldsAway * worldWidth;\n extent[0] -= offset;\n extent[2] -= offset;\n }\n return extent;\n}\n\n/**\n * Fits the extent to the real world\n *\n * If the extent does not cross the anti meridian, this will return the extent in an array\n * If the extent crosses the anti meridian, the extent will be sliced, so each part fits within the\n * real world\n *\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @param {boolean} [multiWorld] Return all worlds\n * @return {Array} The extent within the real world extent.\n */\nfunction wrapAndSliceX(extent, projection, multiWorld) {\n if (projection.canWrapX()) {\n const projectionExtent = projection.getExtent();\n\n if (!isFinite(extent[0]) || !isFinite(extent[2])) {\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n\n wrapX(extent, projection);\n const worldWidth = getWidth(projectionExtent);\n\n if (getWidth(extent) > worldWidth && !multiWorld) {\n // the extent wraps around on itself\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n if (extent[0] < projectionExtent[0]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0] + worldWidth, extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2], extent[3]],\n ];\n }\n if (extent[2] > projectionExtent[2]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0], extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2] - worldWidth, extent[3]],\n ];\n }\n }\n\n return [extent];\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/extent.js?"); /***/ }), /***/ "./node_modules/ol/extent/Relationship.js": /*!************************************************!*\ !*** ./node_modules/ol/extent/Relationship.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/extent/Relationship\n */\n\n/**\n * Relationship to an extent.\n * @enum {number}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n UNKNOWN: 0,\n INTERSECTING: 1,\n ABOVE: 2,\n RIGHT: 4,\n BELOW: 8,\n LEFT: 16,\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/extent/Relationship.js?"); /***/ }), /***/ "./node_modules/ol/featureloader.js": /*!******************************************!*\ !*** ./node_modules/ol/featureloader.js ***! \******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadFeaturesXhr: () => (/* binding */ loadFeaturesXhr),\n/* harmony export */ setWithCredentials: () => (/* binding */ setWithCredentials),\n/* harmony export */ xhr: () => (/* binding */ xhr)\n/* harmony export */ });\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./functions.js */ \"./node_modules/ol/functions.js\");\n/**\n * @module ol/featureloader\n */\n\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), a\n * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector~VectorSource} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default),\n * import(\"./extent.js\").Extent,\n * number,\n * import(\"./proj/Projection.js\").default,\n * function(Array): void=,\n * function(): void=): void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection~Projection} for the projection as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nfunction loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure,\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true,\n );\n if (format.getType() == 'arraybuffer') {\n xhr.responseType = 'arraybuffer';\n }\n xhr.withCredentials = withCredentials;\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function (event) {\n // status will be 0 for file:// urls\n if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n const type = format.getType();\n try {\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == 'text' || type == 'json') {\n source = xhr.responseText;\n } else if (type == 'xml') {\n source = xhr.responseXML || xhr.responseText;\n } else if (type == 'arraybuffer') {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array} */\n (\n format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })\n ),\n format.readProjection(source),\n );\n } else {\n failure();\n }\n } catch {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\n xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @template {import(\"./Feature.js\").FeatureLike} FeatureType\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nfunction xhr(url, format) {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array): void} [success] Success\n * Function called when loading succeeded.\n * @param {function(): void} [failure] Failure\n * Function called when loading failed.\n */\n return function (extent, resolution, projection, success, failure) {\n const source =\n /** @type {import(\"./source/Vector\").default} */ (this);\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n function (features, dataProjection) {\n source.addFeatures(features);\n if (success !== undefined) {\n success(features);\n }\n },\n /* FIXME handle error */ failure ? failure : _functions_js__WEBPACK_IMPORTED_MODULE_0__.VOID,\n );\n };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nfunction setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/featureloader.js?"); /***/ }), /***/ "./node_modules/ol/functions.js": /*!**************************************!*\ !*** ./node_modules/ol/functions.js ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FALSE: () => (/* binding */ FALSE),\n/* harmony export */ TRUE: () => (/* binding */ TRUE),\n/* harmony export */ VOID: () => (/* binding */ VOID),\n/* harmony export */ memoizeOne: () => (/* binding */ memoizeOne),\n/* harmony export */ toPromise: () => (/* binding */ toPromise)\n/* harmony export */ });\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ \"./node_modules/ol/array.js\");\n/**\n * @module ol/functions\n */\n\n\n\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nfunction TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nfunction FALSE() {\n return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nfunction VOID() {}\n\n/**\n * Wrap a function in another function that remembers the last return. If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nfunction memoizeOne(fn) {\n /** @type {ReturnType} */\n let lastResult;\n\n /** @type {Array|undefined} */\n let lastArgs;\n\n let lastThis;\n\n /**\n * @this {*} Only need to know if `this` changed, don't care what type\n * @return {ReturnType} Memoized value\n */\n return function () {\n const nextArgs = Array.prototype.slice.call(arguments);\n if (!lastArgs || this !== lastThis || !(0,_array_js__WEBPACK_IMPORTED_MODULE_0__.equals)(nextArgs, lastArgs)) {\n lastThis = this;\n lastArgs = nextArgs;\n lastResult = fn.apply(this, arguments);\n }\n return lastResult;\n };\n}\n\n/**\n * @template T\n * @param {function(): (T | Promise)} getter A function that returns a value or a promise for a value.\n * @return {Promise} A promise for the value.\n */\nfunction toPromise(getter) {\n function promiseGetter() {\n let value;\n try {\n value = getter();\n } catch (err) {\n return Promise.reject(err);\n }\n if (value instanceof Promise) {\n return value;\n }\n return Promise.resolve(value);\n }\n return promiseGetter();\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/functions.js?"); /***/ }), /***/ "./node_modules/ol/geom/Circle.js": /*!****************************************!*\ !*** ./node_modules/ol/geom/Circle.js ***! \****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _flat_transform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/transform.js */ \"./node_modules/ol/geom/flat/transform.js\");\n/**\n * @module ol/geom/Circle\n */\n\n\n\n\n\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nclass Circle extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * For internal use, flat coordinates in combination with `layout` and no\n * `radius` are also accepted.\n * @param {number} [radius] Radius in units of the projection.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(center, radius, layout) {\n super();\n if (layout !== undefined && radius === undefined) {\n this.setFlatCoordinates(layout, center);\n } else {\n radius = radius ? radius : 0;\n this.setCenterAndRadius(center, radius, layout);\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Circle} Clone.\n * @api\n * @override\n */\n clone() {\n const circle = new Circle(\n this.flatCoordinates.slice(),\n undefined,\n this.layout,\n );\n circle.applyProperties(this);\n return circle;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const dx = x - flatCoordinates[0];\n const dy = y - flatCoordinates[1];\n const squaredDistance = dx * dx + dy * dy;\n if (squaredDistance < minSquaredDistance) {\n if (squaredDistance === 0) {\n for (let i = 0; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n } else {\n const delta = this.getRadius() / Math.sqrt(squaredDistance);\n closestPoint[0] = flatCoordinates[0] + delta * dx;\n closestPoint[1] = flatCoordinates[1] + delta * dy;\n for (let i = 2; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n }\n closestPoint.length = this.stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n * @override\n */\n containsXY(x, y) {\n const flatCoordinates = this.flatCoordinates;\n const dx = x - flatCoordinates[0];\n const dy = y - flatCoordinates[1];\n return dx * dx + dy * dy <= this.getRadiusSquared_();\n }\n\n /**\n * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @return {import(\"../coordinate.js\").Coordinate} Center.\n * @api\n */\n getCenter() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @override\n */\n computeExtent(extent) {\n const flatCoordinates = this.flatCoordinates;\n const radius = flatCoordinates[this.stride] - flatCoordinates[0];\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.createOrUpdate)(\n flatCoordinates[0] - radius,\n flatCoordinates[1] - radius,\n flatCoordinates[0] + radius,\n flatCoordinates[1] + radius,\n extent,\n );\n }\n\n /**\n * Return the radius of the circle.\n * @return {number} Radius.\n * @api\n */\n getRadius() {\n return Math.sqrt(this.getRadiusSquared_());\n }\n\n /**\n * @private\n * @return {number} Radius squared.\n */\n getRadiusSquared_() {\n const dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n const dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n return dx * dx + dy * dy;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'Circle';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n const circleExtent = this.getExtent();\n if ((0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.intersects)(extent, circleExtent)) {\n const center = this.getCenter();\n\n if (extent[0] <= center[0] && extent[2] >= center[0]) {\n return true;\n }\n if (extent[1] <= center[1] && extent[3] >= center[1]) {\n return true;\n }\n\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.forEachCorner)(extent, this.intersectsCoordinate.bind(this));\n }\n return false;\n }\n\n /**\n * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} center Center.\n * @api\n */\n setCenter(center) {\n const stride = this.stride;\n const radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n const flatCoordinates = center.slice();\n flatCoordinates[stride] = flatCoordinates[0] + radius;\n for (let i = 1; i < stride; ++i) {\n flatCoordinates[stride + i] = center[i];\n }\n this.setFlatCoordinates(this.layout, flatCoordinates);\n this.changed();\n }\n\n /**\n * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n * number) of the circle.\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * @param {number} radius Radius.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCenterAndRadius(center, radius, layout) {\n this.setLayout(layout, center, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n /** @type {Array} */\n const flatCoordinates = this.flatCoordinates;\n let offset = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_2__.deflateCoordinate)(flatCoordinates, 0, center, this.stride);\n flatCoordinates[offset++] = flatCoordinates[0] + radius;\n for (let i = 1, ii = this.stride; i < ii; ++i) {\n flatCoordinates[offset++] = flatCoordinates[i];\n }\n flatCoordinates.length = offset;\n this.changed();\n }\n\n /**\n * @override\n */\n getCoordinates() {\n return null;\n }\n\n /**\n * @override\n */\n setCoordinates(coordinates, layout) {}\n\n /**\n * Set the radius of the circle. The radius is in the units of the projection.\n * @param {number} radius Radius.\n * @api\n */\n setRadius(radius) {\n this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n this.changed();\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n * @override\n */\n rotate(angle, anchor) {\n const center = this.getCenter();\n const stride = this.getStride();\n this.setCenter(\n (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.rotate)(center, 0, center.length, stride, angle, anchor, center),\n );\n this.changed();\n }\n}\n\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry. Note that original geometry is\n * modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Circle);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/Circle.js?"); /***/ }), /***/ "./node_modules/ol/geom/Geometry.js": /*!******************************************!*\ !*** ./node_modules/ol/geom/Geometry.js ***! \******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util.js */ \"./node_modules/ol/util.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transform.js */ \"./node_modules/ol/transform.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _flat_transform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flat/transform.js */ \"./node_modules/ol/geom/flat/transform.js\");\n/**\n * @module ol/geom/Geometry\n */\n\n\n\n\n\n\n\n\n/**\n * @typedef {'XY' | 'XYZ' | 'XYM' | 'XYZM'} GeometryLayout\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available.\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.create)();\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nclass Geometry extends _Object_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"] {\n constructor() {\n super();\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.createEmpty)();\n\n /**\n * @private\n * @type {number}\n */\n this.extentRevision_ = -1;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryRevision = 0;\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} revision The geometry revision.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n this.simplifyTransformedInternal = (0,_functions_js__WEBPACK_IMPORTED_MODULE_4__.memoizeOne)(\n (revision, squaredTolerance, transform) => {\n if (!transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n const clone = this.clone();\n clone.applyTransform(transform);\n return clone.getSimplifiedGeometry(squaredTolerance);\n },\n );\n }\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this.simplifyTransformedInternal(\n this.getRevision(),\n squaredTolerance,\n transform,\n );\n }\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n clone() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * @abstract\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const coord = this.getClosestPoint([x, y]);\n return coord[0] === x && coord[1] === y;\n }\n\n /**\n * Return the closest point of the geometry to the passed point as\n * {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} point Point.\n * @param {import(\"../coordinate.js\").Coordinate} [closestPoint] Closest point.\n * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n * @api\n */\n getClosestPoint(point, closestPoint) {\n closestPoint = closestPoint ? closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n }\n\n /**\n * Returns true if this geometry includes the specified coordinate. If the\n * coordinate is on the boundary of the geometry, returns false.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains coordinate.\n * @api\n */\n intersectsCoordinate(coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Get the extent of the geometry.\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n getExtent(extent) {\n if (this.extentRevision_ != this.getRevision()) {\n const extent = this.computeExtent(this.extent_);\n if (isNaN(extent[0]) || isNaN(extent[1])) {\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.createOrUpdateEmpty)(extent);\n }\n this.extentRevision_ = this.getRevision();\n }\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.returnOrUpdate)(this.extent_, extent);\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Create a simplified version of this geometry. For linestrings, this uses\n * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n * algorithm. For polygons, a quantization-based\n * simplification is used to preserve topology.\n * @param {number} tolerance The tolerance distance for simplification.\n * @return {Geometry} A new, simplified version of the original geometry.\n * @api\n */\n simplify(tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker\n * algorithm.\n * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Geometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {Type} Geometry type.\n */\n getType() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @abstract\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n */\n applyTransform(transformFn) {\n (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n */\n intersectsExtent(extent) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.abstract)();\n }\n\n /**\n * Transform each coordinate of the geometry from one coordinate reference\n * system to another. The geometry is modified in place.\n * For example, a line will be transformed to a line and a circle to a circle.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {this} This geometry. Note that original geometry is\n * modified in place.\n * @api\n */\n transform(source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n const sourceProj = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(source);\n const transformFn =\n sourceProj.getUnits() == 'tile-pixels'\n ? function (inCoordinates, outCoordinates, stride) {\n const pixelExtent = sourceProj.getExtent();\n const projectedExtent = sourceProj.getWorldExtent();\n const scale = (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.getHeight)(projectedExtent) / (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.getHeight)(pixelExtent);\n (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.compose)(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0,\n );\n const transformed = (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_6__.transform2D)(\n inCoordinates,\n 0,\n inCoordinates.length,\n stride,\n tmpTransform,\n outCoordinates,\n );\n const projTransform = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(sourceProj, destination);\n if (projTransform) {\n return projTransform(transformed, transformed, stride);\n }\n return transformed;\n }\n : (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Geometry);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/Geometry.js?"); /***/ }), /***/ "./node_modules/ol/geom/GeometryCollection.js": /*!****************************************************!*\ !*** ./node_modules/ol/geom/GeometryCollection.js ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _Geometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Geometry.js */ \"./node_modules/ol/geom/Geometry.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events.js */ \"./node_modules/ol/events.js\");\n/**\n * @module ol/geom/GeometryCollection\n */\n\n\n\n\n\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry~Geometry} objects.\n *\n * @api\n */\nclass GeometryCollection extends _Geometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Array} geometries Geometries.\n */\n constructor(geometries) {\n super();\n\n /**\n * @private\n * @type {Array}\n */\n this.geometries_ = geometries;\n\n /**\n * @private\n * @type {Array}\n */\n this.changeEventsKeys_ = [];\n\n this.listenGeometriesChange_();\n }\n\n /**\n * @private\n */\n unlistenGeometriesChange_() {\n this.changeEventsKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey);\n this.changeEventsKeys_.length = 0;\n }\n\n /**\n * @private\n */\n listenGeometriesChange_() {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n this.changeEventsKeys_.push(\n (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(geometries[i], _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].CHANGE, this.changed, this),\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!GeometryCollection} Clone.\n * @api\n * @override\n */\n clone() {\n const geometryCollection = new GeometryCollection(\n cloneGeometries(this.geometries_),\n );\n geometryCollection.applyProperties(this);\n return geometryCollection;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n minSquaredDistance = geometries[i].closestPointXY(\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n return minSquaredDistance;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n * @override\n */\n containsXY(x, y) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].containsXY(x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @override\n */\n computeExtent(extent) {\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.createOrUpdateEmpty)(extent);\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.extend)(extent, geometries[i].getExtent());\n }\n return extent;\n }\n\n /**\n * Return the geometries that make up this geometry collection.\n * @return {Array} Geometries.\n * @api\n */\n getGeometries() {\n return cloneGeometries(this.geometries_);\n }\n\n /**\n * @return {Array} Geometries.\n */\n getGeometriesArray() {\n return this.geometries_;\n }\n\n /**\n * @return {Array} Geometries.\n */\n getGeometriesArrayRecursive() {\n /** @type {Array} */\n let geometriesArray = [];\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].getType() === this.getType()) {\n geometriesArray = geometriesArray.concat(\n /** @type {GeometryCollection} */ (\n geometries[i]\n ).getGeometriesArrayRecursive(),\n );\n } else {\n geometriesArray.push(geometries[i]);\n }\n }\n return geometriesArray;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {GeometryCollection} Simplified GeometryCollection.\n * @override\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometries = [];\n const geometries = this.geometries_;\n let simplified = false;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n const geometry = geometries[i];\n const simplifiedGeometry =\n geometry.getSimplifiedGeometry(squaredTolerance);\n simplifiedGeometries.push(simplifiedGeometry);\n if (simplifiedGeometry !== geometry) {\n simplified = true;\n }\n }\n if (simplified) {\n const simplifiedGeometryCollection = new GeometryCollection(\n simplifiedGeometries,\n );\n return simplifiedGeometryCollection;\n }\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'GeometryCollection';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].intersectsExtent(extent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.geometries_.length === 0;\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n * @override\n */\n rotate(angle, anchor) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].rotate(angle, anchor);\n }\n this.changed();\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n * @override\n */\n scale(sx, sy, anchor) {\n if (!anchor) {\n anchor = (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.getCenter)(this.getExtent());\n }\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].scale(sx, sy, anchor);\n }\n this.changed();\n }\n\n /**\n * Set the geometries that make up this geometry collection.\n * @param {Array} geometries Geometries.\n * @api\n */\n setGeometries(geometries) {\n this.setGeometriesArray(cloneGeometries(geometries));\n }\n\n /**\n * @param {Array} geometries Geometries.\n */\n setGeometriesArray(geometries) {\n this.unlistenGeometriesChange_();\n this.geometries_ = geometries;\n this.listenGeometriesChange_();\n this.changed();\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n * @override\n */\n applyTransform(transformFn) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].applyTransform(transformFn);\n }\n this.changed();\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n * @override\n */\n translate(deltaX, deltaY) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].translate(deltaX, deltaY);\n }\n this.changed();\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.unlistenGeometriesChange_();\n super.disposeInternal();\n }\n}\n\n/**\n * @param {Array} geometries Geometries.\n * @return {Array} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n return geometries.map((geometry) => geometry.clone());\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GeometryCollection);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/GeometryCollection.js?"); /***/ }), /***/ "./node_modules/ol/geom/LineString.js": /*!********************************************!*\ !*** ./node_modules/ol/geom/LineString.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/closest.js */ \"./node_modules/ol/geom/flat/closest.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./flat/simplify.js */ \"./node_modules/ol/geom/flat/simplify.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _flat_segments_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flat/segments.js */ \"./node_modules/ol/geom/flat/segments.js\");\n/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flat/inflate.js */ \"./node_modules/ol/geom/flat/inflate.js\");\n/* harmony import */ var _flat_interpolate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flat/interpolate.js */ \"./node_modules/ol/geom/flat/interpolate.js\");\n/* harmony import */ var _flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./flat/intersectsextent.js */ \"./node_modules/ol/geom/flat/intersectsextent.js\");\n/* harmony import */ var _flat_length_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./flat/length.js */ \"./node_modules/ol/geom/flat/length.js\");\n/**\n * @module ol/geom/LineString\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nclass LineString extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate|null}\n */\n this.flatMidpoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.flatMidpointRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates),\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Append the passed coordinate to the coordinates of the linestring.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @api\n */\n appendCoordinate(coordinate) {\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(this.flatCoordinates, coordinate);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LineString} Clone.\n * @api\n * @override\n */\n clone() {\n const lineString = new LineString(\n this.flatCoordinates.slice(),\n this.layout,\n );\n lineString.applyProperties(this);\n return lineString;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.maxSquaredDelta)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0,\n ),\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.assignClosestPoint)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n false,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n\n /**\n * Iterate over each segment, calling the provided callback.\n * If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n *\n * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n * called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n * @return {T|boolean} Value.\n * @template T,S\n * @api\n */\n forEachSegment(callback) {\n return (0,_flat_segments_js__WEBPACK_IMPORTED_MODULE_4__.forEach)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n callback,\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * @param {number} m M.\n * @param {boolean} [extrapolate] Extrapolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n getCoordinateAtM(m, extrapolate) {\n if (this.layout != 'XYM' && this.layout != 'XYZM') {\n return null;\n }\n extrapolate = extrapolate !== undefined ? extrapolate : false;\n return (0,_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_5__.lineStringCoordinateAtM)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n m,\n extrapolate,\n );\n }\n\n /**\n * Return the coordinates of the linestring.\n * @return {Array} Coordinates.\n * @api\n * @override\n */\n getCoordinates() {\n return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_6__.inflateCoordinates)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n );\n }\n\n /**\n * Return the coordinate at the provided fraction along the linestring.\n * The `fraction` is a number between 0 and 1, where 0 is the start of the\n * linestring and 1 is the end.\n * @param {number} fraction Fraction.\n * @param {import(\"../coordinate.js\").Coordinate} [dest] Optional coordinate whose values will\n * be modified. If not provided, a new coordinate will be returned.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n * @api\n */\n getCoordinateAt(fraction, dest) {\n return (0,_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_5__.interpolatePoint)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n fraction,\n dest,\n this.stride,\n );\n }\n\n /**\n * Return the length of the linestring on projected plane.\n * @return {number} Length (on projected plane).\n * @api\n */\n getLength() {\n return (0,_flat_length_js__WEBPACK_IMPORTED_MODULE_7__.lineStringLength)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n );\n }\n\n /**\n * @return {Array} Flat midpoint.\n */\n getFlatMidpoint() {\n if (this.flatMidpointRevision_ != this.getRevision()) {\n this.flatMidpoint_ = this.getCoordinateAt(\n 0.5,\n this.flatMidpoint_ ?? undefined,\n );\n this.flatMidpointRevision_ = this.getRevision();\n }\n return /** @type {Array} */ (this.flatMidpoint_);\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} Simplified LineString.\n * @protected\n * @override\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n /** @type {Array} */\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_8__.douglasPeucker)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n );\n return new LineString(simplifiedFlatCoordinates, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'LineString';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return (0,_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_9__.intersectsLineString)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent,\n );\n }\n\n /**\n * Set the coordinates of the linestring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_10__.deflateCoordinates)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n );\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LineString);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/LineString.js?"); /***/ }), /***/ "./node_modules/ol/geom/LinearRing.js": /*!********************************************!*\ !*** ./node_modules/ol/geom/LinearRing.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flat/closest.js */ \"./node_modules/ol/geom/flat/closest.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flat/simplify.js */ \"./node_modules/ol/geom/flat/simplify.js\");\n/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flat/inflate.js */ \"./node_modules/ol/geom/flat/inflate.js\");\n/* harmony import */ var _flat_area_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/area.js */ \"./node_modules/ol/geom/flat/area.js\");\n/**\n * @module ol/geom/LinearRing\n */\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates),\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @api\n * @override\n */\n clone() {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_2__.maxSquaredDelta)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0,\n ),\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_2__.assignClosestPoint)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n\n /**\n * Return the area of the linear ring on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return (0,_flat_area_js__WEBPACK_IMPORTED_MODULE_3__.linearRing)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n );\n }\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array} Coordinates.\n * @api\n * @override\n */\n getCoordinates() {\n return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_4__.inflateCoordinates)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n );\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LinearRing} Simplified LinearRing.\n * @protected\n * @override\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n /** @type {Array} */\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_5__.douglasPeucker)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n );\n return new LinearRing(simplifiedFlatCoordinates, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'LinearRing';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return false;\n }\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_6__.deflateCoordinates)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n );\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LinearRing);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/LinearRing.js?"); /***/ }), /***/ "./node_modules/ol/geom/MultiLineString.js": /*!*************************************************!*\ !*** ./node_modules/ol/geom/MultiLineString.js ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _LineString_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LineString.js */ \"./node_modules/ol/geom/LineString.js\");\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/closest.js */ \"./node_modules/ol/geom/flat/closest.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./flat/simplify.js */ \"./node_modules/ol/geom/flat/simplify.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flat/inflate.js */ \"./node_modules/ol/geom/flat/inflate.js\");\n/* harmony import */ var _flat_interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flat/interpolate.js */ \"./node_modules/ol/geom/flat/interpolate.js\");\n/* harmony import */ var _flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./flat/intersectsextent.js */ \"./node_modules/ol/geom/flat/intersectsextent.js\");\n/**\n * @module ol/geom/MultiLineString\n */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nclass MultiLineString extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Array|LineString>|Array} coordinates\n * Coordinates or LineString geometries. (For internal use, flat coordinates in\n * combination with `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Flat coordinate ends for internal use.\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (Array.isArray(coordinates[0])) {\n this.setCoordinates(\n /** @type {Array>} */ (\n coordinates\n ),\n layout,\n );\n } else if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates),\n );\n this.ends_ = ends;\n } else {\n const lineStrings = /** @type {Array} */ (coordinates);\n /** @type {Array} */\n const flatCoordinates = [];\n const ends = [];\n for (let i = 0, ii = lineStrings.length; i < ii; ++i) {\n const lineString = lineStrings[i];\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(flatCoordinates, lineString.getFlatCoordinates());\n ends.push(flatCoordinates.length);\n }\n const layout =\n lineStrings.length === 0\n ? this.getLayout()\n : lineStrings[0].getLayout();\n this.setFlatCoordinates(layout, flatCoordinates);\n this.ends_ = ends;\n }\n }\n\n /**\n * Append the passed linestring to the multilinestring.\n * @param {LineString} lineString LineString.\n * @api\n */\n appendLineString(lineString) {\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiLineString} Clone.\n * @api\n * @override\n */\n clone() {\n const multiLineString = new MultiLineString(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice(),\n );\n multiLineString.applyProperties(this);\n return multiLineString;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.arrayMaxSquaredDelta)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0,\n ),\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.assignClosestArrayPoint)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n false,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * `interpolate` controls interpolation between consecutive LineStrings\n * within the MultiLineString. If `interpolate` is `true` the coordinates\n * will be linearly interpolated between the last coordinate of one LineString\n * and the first coordinate of the next LineString. If `interpolate` is\n * `false` then the function will return `null` for Ms falling between\n * LineStrings.\n *\n * @param {number} m M.\n * @param {boolean} [extrapolate] Extrapolate. Default is `false`.\n * @param {boolean} [interpolate] Interpolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n getCoordinateAtM(m, extrapolate, interpolate) {\n if (\n (this.layout != 'XYM' && this.layout != 'XYZM') ||\n this.flatCoordinates.length === 0\n ) {\n return null;\n }\n extrapolate = extrapolate !== undefined ? extrapolate : false;\n interpolate = interpolate !== undefined ? interpolate : false;\n return (0,_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_4__.lineStringsCoordinateAtM)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n m,\n extrapolate,\n interpolate,\n );\n }\n\n /**\n * Return the coordinates of the multilinestring.\n * @return {Array>} Coordinates.\n * @api\n * @override\n */\n getCoordinates() {\n return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_5__.inflateCoordinatesArray)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n );\n }\n\n /**\n * @return {Array} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * Return the linestring at the specified index.\n * @param {number} index Index.\n * @return {LineString} LineString.\n * @api\n */\n getLineString(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new _LineString_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index],\n ),\n this.layout,\n );\n }\n\n /**\n * Return the linestrings of this multilinestring.\n * @return {Array} LineStrings.\n * @api\n */\n getLineStrings() {\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const layout = this.layout;\n /** @type {Array} */\n const lineStrings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const lineString = new _LineString_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\n flatCoordinates.slice(offset, end),\n layout,\n );\n lineStrings.push(lineString);\n offset = end;\n }\n return lineStrings;\n }\n\n /**\n * @return {Array} Flat midpoints.\n */\n getFlatMidpoints() {\n /** @type {Array} */\n const midpoints = [];\n const flatCoordinates = this.flatCoordinates;\n let offset = 0;\n const ends = this.ends_;\n const stride = this.stride;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const midpoint = (0,_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_4__.interpolatePoint)(\n flatCoordinates,\n offset,\n end,\n stride,\n 0.5,\n );\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(midpoints, midpoint);\n offset = end;\n }\n return midpoints;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiLineString} Simplified MultiLineString.\n * @protected\n * @override\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n /** @type {Array} */\n const simplifiedFlatCoordinates = [];\n /** @type {Array} */\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_7__.douglasPeuckerArray)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds,\n );\n return new MultiLineString(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'MultiLineString';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return (0,_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_8__.intersectsLineStringArray)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n extent,\n );\n }\n\n /**\n * Set the coordinates of the multilinestring.\n * @param {!Array>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_9__.deflateCoordinatesArray)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_,\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiLineString);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/MultiLineString.js?"); /***/ }), /***/ "./node_modules/ol/geom/MultiPoint.js": /*!********************************************!*\ !*** ./node_modules/ol/geom/MultiPoint.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Point_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Point.js */ \"./node_modules/ol/geom/Point.js\");\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flat/inflate.js */ \"./node_modules/ol/geom/flat/inflate.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/geom/MultiPoint\n */\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nclass MultiPoint extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n if (layout && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates),\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Append the passed point to this multipoint.\n * @param {Point} point Point.\n * @api\n */\n appendPoint(point) {\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(this.flatCoordinates, point.getFlatCoordinates());\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPoint} Clone.\n * @api\n * @override\n */\n clone() {\n const multiPoint = new MultiPoint(\n this.flatCoordinates.slice(),\n this.layout,\n );\n multiPoint.applyProperties(this);\n return multiPoint;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.squaredDistance)(\n x,\n y,\n flatCoordinates[i],\n flatCoordinates[i + 1],\n );\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (let j = 0; j < stride; ++j) {\n closestPoint[j] = flatCoordinates[i + j];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinates of the multipoint.\n * @return {Array} Coordinates.\n * @api\n * @override\n */\n getCoordinates() {\n return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_4__.inflateCoordinates)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n );\n }\n\n /**\n * Return the point at the specified index.\n * @param {number} index Index.\n * @return {Point} Point.\n * @api\n */\n getPoint(index) {\n const n = this.flatCoordinates.length / this.stride;\n if (index < 0 || n <= index) {\n return null;\n }\n return new _Point_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\n this.flatCoordinates.slice(\n index * this.stride,\n (index + 1) * this.stride,\n ),\n this.layout,\n );\n }\n\n /**\n * Return the points of this multipoint.\n * @return {Array} Points.\n * @api\n */\n getPoints() {\n const flatCoordinates = this.flatCoordinates;\n const layout = this.layout;\n const stride = this.stride;\n /** @type {Array} */\n const points = [];\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const point = new _Point_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](flatCoordinates.slice(i, i + stride), layout);\n points.push(point);\n }\n return points;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'MultiPoint';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n if ((0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.containsXY)(extent, x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Set the coordinates of the multipoint.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_6__.deflateCoordinates)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n );\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiPoint);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/MultiPoint.js?"); /***/ }), /***/ "./node_modules/ol/geom/MultiPolygon.js": /*!**********************************************!*\ !*** ./node_modules/ol/geom/MultiPolygon.js ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _MultiPoint_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MultiPoint.js */ \"./node_modules/ol/geom/MultiPoint.js\");\n/* harmony import */ var _Polygon_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/closest.js */ \"./node_modules/ol/geom/flat/closest.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./flat/interiorpoint.js */ \"./node_modules/ol/geom/flat/interiorpoint.js\");\n/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./flat/inflate.js */ \"./node_modules/ol/geom/flat/inflate.js\");\n/* harmony import */ var _flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./flat/intersectsextent.js */ \"./node_modules/ol/geom/flat/intersectsextent.js\");\n/* harmony import */ var _flat_orient_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flat/orient.js */ \"./node_modules/ol/geom/flat/orient.js\");\n/* harmony import */ var _flat_area_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flat/area.js */ \"./node_modules/ol/geom/flat/area.js\");\n/* harmony import */ var _flat_center_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./flat/center.js */ \"./node_modules/ol/geom/flat/center.js\");\n/* harmony import */ var _flat_contains_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flat/contains.js */ \"./node_modules/ol/geom/flat/contains.js\");\n/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./flat/simplify.js */ \"./node_modules/ol/geom/flat/simplify.js\");\n/**\n * @module ol/geom/MultiPolygon\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nclass MultiPolygon extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Array>|Polygon>|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array>} [endss] Array of ends for internal use with flat coordinates.\n */\n constructor(coordinates, layout, endss) {\n super();\n\n /**\n * @type {Array>}\n * @private\n */\n this.endss_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointsRevision_ = -1;\n\n /**\n * @private\n * @type {Array|null}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array|null}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (!endss && !Array.isArray(coordinates[0])) {\n const polygons = /** @type {Array} */ (coordinates);\n /** @type {Array} */\n const flatCoordinates = [];\n const thisEndss = [];\n for (let i = 0, ii = polygons.length; i < ii; ++i) {\n const polygon = polygons[i];\n const offset = flatCoordinates.length;\n const ends = polygon.getEnds();\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] += offset;\n }\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(flatCoordinates, polygon.getFlatCoordinates());\n thisEndss.push(ends);\n }\n layout =\n polygons.length === 0 ? this.getLayout() : polygons[0].getLayout();\n coordinates = flatCoordinates;\n endss = thisEndss;\n }\n if (layout !== undefined && endss) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates),\n );\n this.endss_ = endss;\n } else {\n this.setCoordinates(\n /** @type {Array>>} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Append the passed polygon to this multipolygon.\n * @param {Polygon} polygon Polygon.\n * @api\n */\n appendPolygon(polygon) {\n /** @type {Array} */\n let ends;\n if (!this.flatCoordinates) {\n this.flatCoordinates = polygon.getFlatCoordinates().slice();\n ends = polygon.getEnds().slice();\n this.endss_.push();\n } else {\n const offset = this.flatCoordinates.length;\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(this.flatCoordinates, polygon.getFlatCoordinates());\n ends = polygon.getEnds().slice();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] += offset;\n }\n }\n this.endss_.push(ends);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPolygon} Clone.\n * @api\n * @override\n */\n clone() {\n const len = this.endss_.length;\n const newEndss = new Array(len);\n for (let i = 0; i < len; ++i) {\n newEndss[i] = this.endss_[i].slice();\n }\n\n const multiPolygon = new MultiPolygon(\n this.flatCoordinates.slice(),\n this.layout,\n newEndss,\n );\n multiPolygon.applyProperties(this);\n\n return multiPolygon;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.multiArrayMaxSquaredDelta)(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n 0,\n ),\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.assignClosestMultiArrayPoint)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n * @override\n */\n containsXY(x, y) {\n return (0,_flat_contains_js__WEBPACK_IMPORTED_MODULE_4__.linearRingssContainsXY)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n x,\n y,\n );\n }\n\n /**\n * Return the area of the multipolygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return (0,_flat_area_js__WEBPACK_IMPORTED_MODULE_5__.linearRingss)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for multi-polygons.\n *\n * @param {boolean} [right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>>} Coordinates.\n * @api\n * @override\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_6__.orientLinearRingsArray)(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n right,\n );\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_7__.inflateMultiCoordinatesArray)(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n );\n }\n\n /**\n * @return {Array>} Endss.\n */\n getEndss() {\n return this.endss_;\n }\n\n /**\n * @return {Array} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n const flatCenters = (0,_flat_center_js__WEBPACK_IMPORTED_MODULE_8__.linearRingss)(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n );\n this.flatInteriorPoints_ = (0,_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_9__.getInteriorPointsOfMultiArray)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n flatCenters,\n );\n this.flatInteriorPointsRevision_ = this.getRevision();\n }\n return /** @type {Array} */ (this.flatInteriorPoints_);\n }\n\n /**\n * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.\n * @return {MultiPoint} Interior points as XYM coordinates, where M is\n * the length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoints() {\n return new _MultiPoint_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"](this.getFlatInteriorPoints().slice(), 'XYM');\n }\n\n /**\n * @return {Array} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (\n (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_6__.linearRingssAreOriented)(flatCoordinates, 0, this.endss_, this.stride)\n ) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_6__.orientLinearRingsArray)(\n this.orientedFlatCoordinates_,\n 0,\n this.endss_,\n this.stride,\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return /** @type {Array} */ (this.orientedFlatCoordinates_);\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiPolygon} Simplified MultiPolygon.\n * @protected\n * @override\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n /** @type {Array} */\n const simplifiedFlatCoordinates = [];\n /** @type {Array>} */\n const simplifiedEndss = [];\n simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_11__.quantizeMultiArray)(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEndss,\n );\n return new MultiPolygon(simplifiedFlatCoordinates, 'XY', simplifiedEndss);\n }\n\n /**\n * Return the polygon at the specified index.\n * @param {number} index Index.\n * @return {Polygon} Polygon.\n * @api\n */\n getPolygon(index) {\n if (index < 0 || this.endss_.length <= index) {\n return null;\n }\n let offset;\n if (index === 0) {\n offset = 0;\n } else {\n const prevEnds = this.endss_[index - 1];\n offset = prevEnds[prevEnds.length - 1];\n }\n const ends = this.endss_[index].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] -= offset;\n }\n }\n return new _Polygon_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](\n this.flatCoordinates.slice(offset, end),\n this.layout,\n ends,\n );\n }\n\n /**\n * Return the polygons of this multipolygon.\n * @return {Array} Polygons.\n * @api\n */\n getPolygons() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const endss = this.endss_;\n const polygons = [];\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] -= offset;\n }\n }\n const polygon = new _Polygon_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](\n flatCoordinates.slice(offset, end),\n layout,\n ends,\n );\n polygons.push(polygon);\n offset = end;\n }\n return polygons;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'MultiPolygon';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return (0,_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_13__.intersectsLinearRingMultiArray)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n extent,\n );\n }\n\n /**\n * Set the coordinates of the multipolygon.\n * @param {!Array>>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 3);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const endss = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_14__.deflateMultiCoordinatesArray)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.endss_,\n );\n if (endss.length === 0) {\n this.flatCoordinates.length = 0;\n } else {\n const lastEnds = endss[endss.length - 1];\n this.flatCoordinates.length =\n lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n }\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiPolygon);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/MultiPolygon.js?"); /***/ }), /***/ "./node_modules/ol/geom/Point.js": /*!***************************************!*\ !*** ./node_modules/ol/geom/Point.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/geom/Point\n */\n\n\n\n\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n this.setCoordinates(coordinates, layout);\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @api\n * @override\n */\n clone() {\n const point = new Point(this.flatCoordinates.slice(), this.layout);\n point.applyProperties(this);\n return point;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.squaredDistance)(\n x,\n y,\n flatCoordinates[0],\n flatCoordinates[1],\n );\n if (squaredDistance < minSquaredDistance) {\n const stride = this.stride;\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @api\n * @override\n */\n getCoordinates() {\n return this.flatCoordinates.slice();\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @override\n */\n computeExtent(extent) {\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.createOrUpdateFromCoordinate)(this.flatCoordinates, extent);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'Point';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.containsXY)(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n }\n\n /**\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_3__.deflateCoordinate)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n );\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Point);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/Point.js?"); /***/ }), /***/ "./node_modules/ol/geom/Polygon.js": /*!*****************************************!*\ !*** ./node_modules/ol/geom/Polygon.js ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ circular: () => (/* binding */ circular),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ fromCircle: () => (/* binding */ fromCircle),\n/* harmony export */ fromExtent: () => (/* binding */ fromExtent),\n/* harmony export */ makeRegular: () => (/* binding */ makeRegular)\n/* harmony export */ });\n/* harmony import */ var _LinearRing_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./LinearRing.js */ \"./node_modules/ol/geom/LinearRing.js\");\n/* harmony import */ var _Point_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Point.js */ \"./node_modules/ol/geom/Point.js\");\n/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/closest.js */ \"./node_modules/ol/geom/flat/closest.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./flat/deflate.js */ \"./node_modules/ol/geom/flat/deflate.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./flat/interiorpoint.js */ \"./node_modules/ol/geom/flat/interiorpoint.js\");\n/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./flat/inflate.js */ \"./node_modules/ol/geom/flat/inflate.js\");\n/* harmony import */ var _flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./flat/intersectsextent.js */ \"./node_modules/ol/geom/flat/intersectsextent.js\");\n/* harmony import */ var _flat_orient_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flat/orient.js */ \"./node_modules/ol/geom/flat/orient.js\");\n/* harmony import */ var _flat_area_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flat/area.js */ \"./node_modules/ol/geom/flat/area.js\");\n/* harmony import */ var _flat_contains_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flat/contains.js */ \"./node_modules/ol/geom/flat/contains.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./flat/simplify.js */ \"./node_modules/ol/geom/flat/simplify.js\");\n/* harmony import */ var _sphere_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../sphere.js */ \"./node_modules/ol/sphere.js\");\n/**\n * @module ol/geom/Polygon\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {!Array>|!Array} coordinates\n * Array of linear rings that define the polygon. The first linear ring of the\n * array defines the outer-boundary or surface of the polygon. Each subsequent\n * linear ring defines a hole in the surface of the polygon. A linear ring is\n * an array of vertices' coordinates where the first coordinate and the last are\n * equivalent. (For internal use, flat coordinates in combination with\n * `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Ends (for internal use with flat coordinates).\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointRevision_ = -1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate|null}\n */\n this.flatInteriorPoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array|null}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates),\n );\n this.ends_ = ends;\n } else {\n this.setCoordinates(\n /** @type {Array>} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Append the passed linear ring to this polygon.\n * @param {LinearRing} linearRing Linear ring.\n * @api\n */\n appendLinearRing(linearRing) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n } else {\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(this.flatCoordinates, linearRing.getFlatCoordinates());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Polygon} Clone.\n * @api\n * @override\n */\n clone() {\n const polygon = new Polygon(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice(),\n );\n polygon.applyProperties(this);\n return polygon;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.arrayMaxSquaredDelta)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0,\n ),\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_3__.assignClosestArrayPoint)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n * @override\n */\n containsXY(x, y) {\n return (0,_flat_contains_js__WEBPACK_IMPORTED_MODULE_4__.linearRingsContainsXY)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n x,\n y,\n );\n }\n\n /**\n * Return the area of the polygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return (0,_flat_area_js__WEBPACK_IMPORTED_MODULE_5__.linearRings)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for polygons.\n *\n * @param {boolean} [right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>} Coordinates.\n * @api\n * @override\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_6__.orientLinearRings)(flatCoordinates, 0, this.ends_, this.stride, right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_7__.inflateCoordinatesArray)(flatCoordinates, 0, this.ends_, this.stride);\n }\n\n /**\n * @return {Array} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * @return {Array} Interior point.\n */\n getFlatInteriorPoint() {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n const flatCenter = (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getCenter)(this.getExtent());\n this.flatInteriorPoint_ = (0,_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_8__.getInteriorPointOfArray)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n flatCenter,\n 0,\n );\n this.flatInteriorPointRevision_ = this.getRevision();\n }\n return /** @type {import(\"../coordinate.js\").Coordinate} */ (\n this.flatInteriorPoint_\n );\n }\n\n /**\n * Return an interior point of the polygon.\n * @return {Point} Interior point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoint() {\n return new _Point_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"](this.getFlatInteriorPoint(), 'XYM');\n }\n\n /**\n * Return the number of rings of the polygon, this includes the exterior\n * ring and any interior rings.\n *\n * @return {number} Number of rings.\n * @api\n */\n getLinearRingCount() {\n return this.ends_.length;\n }\n\n /**\n * Return the Nth linear ring of the polygon geometry. Return `null` if the\n * given index is out of range.\n * The exterior linear ring is available at index `0` and the interior rings\n * at index `1` and beyond.\n *\n * @param {number} index Index.\n * @return {LinearRing|null} Linear ring.\n * @api\n */\n getLinearRing(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new _LinearRing_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"](\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index],\n ),\n this.layout,\n );\n }\n\n /**\n * Return the linear rings of the polygon.\n * @return {Array} Linear rings.\n * @api\n */\n getLinearRings() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const linearRings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const linearRing = new _LinearRing_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"](\n flatCoordinates.slice(offset, end),\n layout,\n );\n linearRings.push(linearRing);\n offset = end;\n }\n return linearRings;\n }\n\n /**\n * @return {Array} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if ((0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_6__.linearRingsAreOriented)(flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_6__.orientLinearRings)(\n this.orientedFlatCoordinates_,\n 0,\n this.ends_,\n this.stride,\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return /** @type {Array} */ (this.orientedFlatCoordinates_);\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Polygon} Simplified Polygon.\n * @protected\n * @override\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n /** @type {Array} */\n const simplifiedFlatCoordinates = [];\n /** @type {Array} */\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_11__.quantizeArray)(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds,\n );\n return new Polygon(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'Polygon';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return (0,_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_12__.intersectsLinearRingArray)(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n extent,\n );\n }\n\n /**\n * Set the coordinates of the polygon.\n * @param {!Array>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_13__.deflateCoordinatesArray)(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_,\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Polygon);\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n * the polygon vertices in meters.\n * @param {number} [n] Optional number of vertices for the resulting\n * polygon. Default is `32`.\n * @param {number} [sphereRadius] Optional radius for the sphere (defaults to\n * the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nfunction circular(center, radius, n, sphereRadius) {\n n = n ? n : 32;\n /** @type {Array} */\n const flatCoordinates = [];\n for (let i = 0; i < n; ++i) {\n (0,_array_js__WEBPACK_IMPORTED_MODULE_1__.extend)(\n flatCoordinates,\n (0,_sphere_js__WEBPACK_IMPORTED_MODULE_14__.offset)(center, radius, (2 * Math.PI * i) / n, sphereRadius),\n );\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nfunction fromExtent(extent) {\n if ((0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.isEmpty)(extent)) {\n throw new Error('Cannot create polygon from empty extent');\n }\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const flatCoordinates = [\n minX,\n minY,\n minX,\n maxY,\n maxX,\n maxY,\n maxX,\n minY,\n minX,\n minY,\n ];\n return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number} [sides] Number of sides of the polygon. Default is 32.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nfunction fromCircle(circle, sides, angle) {\n sides = sides ? sides : 32;\n const stride = circle.getStride();\n const layout = circle.getLayout();\n const center = circle.getCenter();\n const arrayLength = stride * (sides + 1);\n const flatCoordinates = new Array(arrayLength);\n for (let i = 0; i < arrayLength; i += stride) {\n flatCoordinates[i] = 0;\n flatCoordinates[i + 1] = 0;\n for (let j = 2; j < stride; j++) {\n flatCoordinates[i + j] = center[j];\n }\n }\n const ends = [flatCoordinates.length];\n const polygon = new Polygon(flatCoordinates, layout, ends);\n makeRegular(polygon, center, circle.getRadius(), angle);\n return polygon;\n}\n\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n */\nfunction makeRegular(polygon, center, radius, angle) {\n const flatCoordinates = polygon.getFlatCoordinates();\n const stride = polygon.getStride();\n const sides = flatCoordinates.length / stride - 1;\n const startAngle = angle ? angle : 0;\n for (let i = 0; i <= sides; ++i) {\n const offset = i * stride;\n const angle = startAngle + ((0,_math_js__WEBPACK_IMPORTED_MODULE_15__.modulo)(i, sides) * 2 * Math.PI) / sides;\n flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n }\n polygon.changed();\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/Polygon.js?"); /***/ }), /***/ "./node_modules/ol/geom/SimpleGeometry.js": /*!************************************************!*\ !*** ./node_modules/ol/geom/SimpleGeometry.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ getLayoutForStride: () => (/* binding */ getLayoutForStride),\n/* harmony export */ getStrideForLayout: () => (/* binding */ getStrideForLayout),\n/* harmony export */ transformGeom2D: () => (/* binding */ transformGeom2D)\n/* harmony export */ });\n/* harmony import */ var _Geometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Geometry.js */ \"./node_modules/ol/geom/Geometry.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util.js */ \"./node_modules/ol/util.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _flat_transform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/transform.js */ \"./node_modules/ol/geom/flat/transform.js\");\n/**\n * @module ol/geom/SimpleGeometry\n */\n\n\n\n\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nclass SimpleGeometry extends _Geometry_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n constructor() {\n super();\n\n /**\n * @protected\n * @type {import(\"./Geometry.js\").GeometryLayout}\n */\n this.layout = 'XY';\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array}\n */\n this.flatCoordinates;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @override\n */\n computeExtent(extent) {\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.createOrUpdateFromFlatCoordinates)(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent,\n );\n }\n\n /**\n * @abstract\n * @return {Array<*> | null} Coordinates.\n */\n getCoordinates() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.abstract)();\n }\n\n /**\n * Return the first coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n * @api\n */\n getFirstCoordinate() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @return {Array} Flat coordinates.\n */\n getFlatCoordinates() {\n return this.flatCoordinates;\n }\n\n /**\n * Return the last coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} Last point.\n * @api\n */\n getLastCoordinate() {\n return this.flatCoordinates.slice(\n this.flatCoordinates.length - this.stride,\n );\n }\n\n /**\n * Return the {@link import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n * @return {import(\"./Geometry.js\").GeometryLayout} Layout.\n * @api\n */\n getLayout() {\n return this.layout;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @override\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n // If squaredTolerance is negative or if we know that simplification will not\n // have any effect then just return this.\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometry =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\n }\n // Simplification did not actually remove any coordinates. We now know\n // that any calls to getSimplifiedGeometry with a squaredTolerance less\n // than or equal to the current squaredTolerance will also not have any\n // effect. This allows us to short circuit simplification (saving CPU\n // cycles) and prevents the cache of simplified geometries from filling\n // up with useless identical copies of this geometry (saving memory).\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n return this;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride;\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @param {Array} flatCoordinates Flat coordinates.\n */\n setFlatCoordinates(layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n }\n\n /**\n * @abstract\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n setCoordinates(coordinates, layout) {\n (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.abstract)();\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout|undefined} layout Layout.\n * @param {Array<*>} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n setLayout(layout, coordinates, nesting) {\n let stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n } else {\n for (let i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = 'XY';\n this.stride = 2;\n return;\n }\n coordinates = /** @type {Array} */ (coordinates[0]);\n }\n stride = coordinates.length;\n layout = getLayoutForStride(stride);\n }\n this.layout = layout;\n this.stride = stride;\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n * @override\n */\n applyTransform(transformFn) {\n if (this.flatCoordinates) {\n transformFn(\n this.flatCoordinates,\n this.flatCoordinates,\n this.layout.startsWith('XYZ') ? 3 : 2,\n this.stride,\n );\n this.changed();\n }\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n * @override\n */\n rotate(angle, anchor) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.rotate)(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n angle,\n anchor,\n flatCoordinates,\n );\n this.changed();\n }\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n * @override\n */\n scale(sx, sy, anchor) {\n if (sy === undefined) {\n sy = sx;\n }\n if (!anchor) {\n anchor = (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.getCenter)(this.getExtent());\n }\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.scale)(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n sx,\n sy,\n anchor,\n flatCoordinates,\n );\n this.changed();\n }\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n * @override\n */\n translate(deltaX, deltaY) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.translate)(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n deltaX,\n deltaY,\n flatCoordinates,\n );\n this.changed();\n }\n }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n let layout;\n if (stride == 2) {\n layout = 'XY';\n } else if (stride == 3) {\n layout = 'XYZ';\n } else if (stride == 4) {\n layout = 'XYZM';\n }\n return /** @type {import(\"./Geometry.js\").GeometryLayout} */ (layout);\n}\n\n/**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nfunction getStrideForLayout(layout) {\n let stride;\n if (layout == 'XY') {\n stride = 2;\n } else if (layout == 'XYZ' || layout == 'XYM') {\n stride = 3;\n } else if (layout == 'XYZM') {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed flat coordinates.\n */\nfunction transformGeom2D(simpleGeometry, transform, dest) {\n const flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n }\n const stride = simpleGeometry.getStride();\n return (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.transform2D)(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n transform,\n dest,\n );\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SimpleGeometry);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/SimpleGeometry.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/area.js": /*!*******************************************!*\ !*** ./node_modules/ol/geom/flat/area.js ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ linearRing: () => (/* binding */ linearRing),\n/* harmony export */ linearRings: () => (/* binding */ linearRings),\n/* harmony export */ linearRingss: () => (/* binding */ linearRingss)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nfunction linearRing(flatCoordinates, offset, end, stride) {\n let twiceArea = 0;\n const x0 = flatCoordinates[end - stride];\n const y0 = flatCoordinates[end - stride + 1];\n let dx1 = 0;\n let dy1 = 0;\n for (; offset < end; offset += stride) {\n const dx2 = flatCoordinates[offset] - x0;\n const dy2 = flatCoordinates[offset + 1] - y0;\n twiceArea += dy1 * dx2 - dx1 * dy2;\n dx1 = dx2;\n dy1 = dy2;\n }\n return twiceArea / 2;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nfunction linearRings(flatCoordinates, offset, ends, stride) {\n let area = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nfunction linearRingss(flatCoordinates, offset, endss, stride) {\n let area = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/area.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/center.js": /*!*********************************************!*\ !*** ./node_modules/ol/geom/flat/center.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ linearRingss: () => (/* binding */ linearRingss)\n/* harmony export */ });\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../extent.js */ \"./node_modules/ol/extent.js\");\n/**\n * @module ol/geom/flat/center\n */\n\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array} Flat centers.\n */\nfunction linearRingss(flatCoordinates, offset, endss, stride) {\n const flatCenters = [];\n let extent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.createEmpty)();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n extent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.createOrUpdateFromFlatCoordinates)(\n flatCoordinates,\n offset,\n ends[0],\n stride,\n );\n flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n offset = ends[ends.length - 1];\n }\n return flatCenters;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/center.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/closest.js": /*!**********************************************!*\ !*** ./node_modules/ol/geom/flat/closest.js ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ arrayMaxSquaredDelta: () => (/* binding */ arrayMaxSquaredDelta),\n/* harmony export */ assignClosestArrayPoint: () => (/* binding */ assignClosestArrayPoint),\n/* harmony export */ assignClosestMultiArrayPoint: () => (/* binding */ assignClosestMultiArrayPoint),\n/* harmony export */ assignClosestPoint: () => (/* binding */ assignClosestPoint),\n/* harmony export */ maxSquaredDelta: () => (/* binding */ maxSquaredDelta),\n/* harmony export */ multiArrayMaxSquaredDelta: () => (/* binding */ multiArrayMaxSquaredDelta)\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/geom/flat/closest\n */\n\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y). Extra\n * dimensions are linearly interpolated.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n */\nfunction assignClosest(\n flatCoordinates,\n offset1,\n offset2,\n stride,\n x,\n y,\n closestPoint,\n) {\n const x1 = flatCoordinates[offset1];\n const y1 = flatCoordinates[offset1 + 1];\n const dx = flatCoordinates[offset2] - x1;\n const dy = flatCoordinates[offset2 + 1] - y1;\n let offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n } else {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n } else if (t > 0) {\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(\n flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i],\n t,\n );\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nfunction maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n const squaredDelta = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x1, y1, x2, y2);\n if (squaredDelta > max) {\n max = squaredDelta;\n }\n x1 = x2;\n y1 = y2;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nfunction arrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n ends,\n stride,\n max,\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nfunction multiArrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n endss,\n stride,\n max,\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nfunction assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint,\n) {\n if (offset == end) {\n return minSquaredDistance;\n }\n let i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(\n x,\n y,\n flatCoordinates[offset],\n flatCoordinates[offset + 1],\n );\n if (squaredDistance < minSquaredDistance) {\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n let index = offset + stride;\n while (index < end) {\n assignClosest(\n flatCoordinates,\n index - stride,\n index,\n stride,\n x,\n y,\n tmpPoint,\n );\n squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n index += stride;\n } else {\n // Skip ahead multiple points, because we know that all the skipped\n // points cannot be any closer than the closest point we have found so\n // far. We know this because we know how close the current point is, how\n // close the closest point we have found so far is, and the maximum\n // distance between consecutive points. For example, if we're currently\n // at distance 10, the best we've found so far is 3, and that the maximum\n // distance between consecutive points is 2, then we'll need to skip at\n // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n // finding a closer point. We use Math.max(..., 1) to ensure that we\n // always advance at least one point, to avoid an infinite loop.\n index +=\n stride *\n Math.max(\n ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n maxDelta) |\n 0,\n 1,\n );\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n flatCoordinates,\n end - stride,\n offset,\n stride,\n x,\n y,\n tmpPoint,\n );\n squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nfunction assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint,\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n minSquaredDistance = assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint,\n );\n offset = end;\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nfunction assignClosestMultiArrayPoint(\n flatCoordinates,\n offset,\n endss,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint,\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint,\n );\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/closest.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/contains.js": /*!***********************************************!*\ !*** ./node_modules/ol/geom/flat/contains.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ linearRingContainsExtent: () => (/* binding */ linearRingContainsExtent),\n/* harmony export */ linearRingContainsXY: () => (/* binding */ linearRingContainsXY),\n/* harmony export */ linearRingsContainsXY: () => (/* binding */ linearRingsContainsXY),\n/* harmony export */ linearRingssContainsXY: () => (/* binding */ linearRingssContainsXY)\n/* harmony export */ });\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../extent.js */ \"./node_modules/ol/extent.js\");\n/**\n * @module ol/geom/flat/contains\n */\n\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nfunction linearRingContainsExtent(\n flatCoordinates,\n offset,\n end,\n stride,\n extent,\n) {\n const outside = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.forEachCorner)(\n extent,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function (coordinate) {\n return !linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinate[0],\n coordinate[1],\n );\n },\n );\n return !outside;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nfunction linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n x,\n y,\n) {\n // https://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n let wn = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n if (y1 <= y) {\n if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n wn++;\n }\n } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n wn--;\n }\n x1 = x2;\n y1 = y2;\n }\n return wn !== 0;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nfunction linearRingsContainsXY(\n flatCoordinates,\n offset,\n ends,\n stride,\n x,\n y,\n) {\n if (ends.length === 0) {\n return false;\n }\n if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n return false;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nfunction linearRingssContainsXY(\n flatCoordinates,\n offset,\n endss,\n stride,\n x,\n y,\n) {\n if (endss.length === 0) {\n return false;\n }\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/contains.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/deflate.js": /*!**********************************************!*\ !*** ./node_modules/ol/geom/flat/deflate.js ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ deflateCoordinate: () => (/* binding */ deflateCoordinate),\n/* harmony export */ deflateCoordinates: () => (/* binding */ deflateCoordinates),\n/* harmony export */ deflateCoordinatesArray: () => (/* binding */ deflateCoordinatesArray),\n/* harmony export */ deflateMultiCoordinatesArray: () => (/* binding */ deflateMultiCoordinatesArray)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nfunction deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nfunction deflateCoordinates(\n flatCoordinates,\n offset,\n coordinates,\n stride,\n) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n const coordinate = coordinates[i];\n for (let j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array} [ends] Ends.\n * @return {Array} Ends.\n */\nfunction deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatess,\n stride,\n ends,\n) {\n ends = ends ? ends : [];\n let i = 0;\n for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n const end = deflateCoordinates(\n flatCoordinates,\n offset,\n coordinatess[j],\n stride,\n );\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array>} [endss] Endss.\n * @return {Array>} Endss.\n */\nfunction deflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss,\n stride,\n endss,\n) {\n endss = endss ? endss : [];\n let i = 0;\n for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n const ends = deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss[j],\n stride,\n endss[i],\n );\n if (ends.length === 0) {\n ends[0] = offset;\n }\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/deflate.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/geodesic.js": /*!***********************************************!*\ !*** ./node_modules/ol/geom/flat/geodesic.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ greatCircleArc: () => (/* binding */ greatCircleArc),\n/* harmony export */ meridian: () => (/* binding */ meridian),\n/* harmony export */ parallel: () => (/* binding */ parallel)\n/* harmony export */ });\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/geom/flat/geodesic\n */\n\n\n\n/**\n * @param {function(number): import(\"../../coordinate.js\").Coordinate} interpolate Interpolate function.\n * @param {import(\"../../proj.js\").TransformFunction} transform Transform from longitude/latitude to\n * projected coordinates.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array} Flat coordinates.\n */\nfunction line(interpolate, transform, squaredTolerance) {\n // FIXME reduce garbage generation\n // FIXME optimize stack operations\n\n /** @type {Array} */\n const flatCoordinates = [];\n\n let geoA = interpolate(0);\n let geoB = interpolate(1);\n\n let a = transform(geoA);\n let b = transform(geoB);\n\n /** @type {Array} */\n const geoStack = [geoB, geoA];\n /** @type {Array} */\n const stack = [b, a];\n /** @type {Array} */\n const fractionStack = [1, 0];\n\n /** @type {!Object} */\n const fractions = {};\n\n let maxIterations = 1e5;\n let geoM, m, fracA, fracB, fracM, key;\n\n while (--maxIterations > 0 && fractionStack.length > 0) {\n // Pop the a coordinate off the stack\n fracA = fractionStack.pop();\n geoA = geoStack.pop();\n a = stack.pop();\n // Add the a coordinate if it has not been added yet\n key = fracA.toString();\n if (!(key in fractions)) {\n flatCoordinates.push(a[0], a[1]);\n fractions[key] = true;\n }\n // Pop the b coordinate off the stack\n fracB = fractionStack.pop();\n geoB = geoStack.pop();\n b = stack.pop();\n // Find the m point between the a and b coordinates\n fracM = (fracA + fracB) / 2;\n geoM = interpolate(fracM);\n m = transform(geoM);\n if (\n (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.squaredSegmentDistance)(m[0], m[1], a[0], a[1], b[0], b[1]) <\n squaredTolerance\n ) {\n // If the m point is sufficiently close to the straight line, then we\n // discard it. Just use the b coordinate and move on to the next line\n // segment.\n flatCoordinates.push(b[0], b[1]);\n key = fracB.toString();\n fractions[key] = true;\n } else {\n // Otherwise, we need to subdivide the current line segment. Split it\n // into two and push the two line segments onto the stack.\n fractionStack.push(fracB, fracM, fracM, fracA);\n stack.push(b, m, m, a);\n geoStack.push(geoB, geoM, geoM, geoA);\n }\n }\n\n return flatCoordinates;\n}\n\n/**\n * Generate a great-circle arcs between two lat/lon points.\n * @param {number} lon1 Longitude 1 in degrees.\n * @param {number} lat1 Latitude 1 in degrees.\n * @param {number} lon2 Longitude 2 in degrees.\n * @param {number} lat2 Latitude 2 in degrees.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array} Flat coordinates.\n */\nfunction greatCircleArc(\n lon1,\n lat1,\n lon2,\n lat2,\n projection,\n squaredTolerance,\n) {\n const geoProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)('EPSG:4326');\n\n const cosLat1 = Math.cos((0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lat1));\n const sinLat1 = Math.sin((0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lat1));\n const cosLat2 = Math.cos((0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lat2));\n const sinLat2 = Math.sin((0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lat2));\n const cosDeltaLon = Math.cos((0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lon2 - lon1));\n const sinDeltaLon = Math.sin((0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lon2 - lon1));\n const d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;\n\n return line(\n /**\n * @param {number} frac Fraction.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\n function (frac) {\n if (1 <= d) {\n return [lon2, lat2];\n }\n const D = frac * Math.acos(d);\n const cosD = Math.cos(D);\n const sinD = Math.sin(D);\n const y = sinDeltaLon * cosLat2;\n const x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;\n const theta = Math.atan2(y, x);\n const lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));\n const lon =\n (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toRadians)(lon1) +\n Math.atan2(\n Math.sin(theta) * sinD * cosLat1,\n cosD - sinLat1 * Math.sin(lat),\n );\n return [(0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toDegrees)(lon), (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.toDegrees)(lat)];\n },\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(geoProjection, projection),\n squaredTolerance,\n );\n}\n\n/**\n * Generate a meridian (line at constant longitude).\n * @param {number} lon Longitude.\n * @param {number} lat1 Latitude 1.\n * @param {number} lat2 Latitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array} Flat coordinates.\n */\nfunction meridian(lon, lat1, lat2, projection, squaredTolerance) {\n const epsg4326Projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)('EPSG:4326');\n return line(\n /**\n * @param {number} frac Fraction.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\n function (frac) {\n return [lon, lat1 + (lat2 - lat1) * frac];\n },\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(epsg4326Projection, projection),\n squaredTolerance,\n );\n}\n\n/**\n * Generate a parallel (line at constant latitude).\n * @param {number} lat Latitude.\n * @param {number} lon1 Longitude 1.\n * @param {number} lon2 Longitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array} Flat coordinates.\n */\nfunction parallel(lat, lon1, lon2, projection, squaredTolerance) {\n const epsg4326Projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)('EPSG:4326');\n return line(\n /**\n * @param {number} frac Fraction.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\n function (frac) {\n return [lon1 + (lon2 - lon1) * frac, lat];\n },\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(epsg4326Projection, projection),\n squaredTolerance,\n );\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/geodesic.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/inflate.js": /*!**********************************************!*\ !*** ./node_modules/ol/geom/flat/inflate.js ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ inflateCoordinates: () => (/* binding */ inflateCoordinates),\n/* harmony export */ inflateCoordinatesArray: () => (/* binding */ inflateCoordinatesArray),\n/* harmony export */ inflateMultiCoordinatesArray: () => (/* binding */ inflateMultiCoordinatesArray)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array} [coordinates] Coordinates.\n * @return {Array} Coordinates.\n */\nfunction inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinates,\n) {\n coordinates = coordinates !== undefined ? coordinates : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n coordinates[i++] = flatCoordinates.slice(j, j + stride);\n }\n coordinates.length = i;\n return coordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array>} [coordinatess] Coordinatess.\n * @return {Array>} Coordinatess.\n */\nfunction inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatess,\n) {\n coordinatess = coordinatess !== undefined ? coordinatess : [];\n let i = 0;\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n const end = ends[j];\n coordinatess[i++] = inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinatess[i],\n );\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array>>} [coordinatesss]\n * Coordinatesss.\n * @return {Array>>} Coordinatesss.\n */\nfunction inflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n coordinatesss,\n) {\n coordinatesss = coordinatesss !== undefined ? coordinatesss : [];\n let i = 0;\n for (let j = 0, jj = endss.length; j < jj; ++j) {\n const ends = endss[j];\n coordinatesss[i++] =\n ends.length === 1 && ends[0] === offset\n ? []\n : inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatesss[i],\n );\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/inflate.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/interiorpoint.js": /*!****************************************************!*\ !*** ./node_modules/ol/geom/flat/interiorpoint.js ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getInteriorPointOfArray: () => (/* binding */ getInteriorPointOfArray),\n/* harmony export */ getInteriorPointsOfMultiArray: () => (/* binding */ getInteriorPointsOfMultiArray)\n/* harmony export */ });\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/ol/geom/flat/contains.js\");\n/**\n * @module ol/geom/flat/interiorpoint\n */\n\n\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array} [dest] Destination.\n * @return {Array} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nfunction getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n flatCentersOffset,\n dest,\n) {\n let i, ii, x, x1, x2, y1, y2;\n const y = flatCenters[flatCentersOffset + 1];\n /** @type {Array} */\n const intersections = [];\n // Calculate intersections with the horizontal line\n for (let r = 0, rr = ends.length; r < rr; ++r) {\n const end = ends[r];\n x1 = flatCoordinates[end - stride];\n y1 = flatCoordinates[end - stride + 1];\n for (i = offset; i < end; i += stride) {\n x2 = flatCoordinates[i];\n y2 = flatCoordinates[i + 1];\n if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n intersections.push(x);\n }\n x1 = x2;\n y1 = y2;\n }\n }\n // Find the longest segment of the horizontal line that has its center point\n // inside the linear ring.\n let pointX = NaN;\n let maxSegmentLength = -Infinity;\n intersections.sort(_array_js__WEBPACK_IMPORTED_MODULE_0__.ascending);\n x1 = intersections[0];\n for (i = 1, ii = intersections.length; i < ii; ++i) {\n x2 = intersections[i];\n const segmentLength = Math.abs(x2 - x1);\n if (segmentLength > maxSegmentLength) {\n x = (x1 + x2) / 2;\n if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_1__.linearRingsContainsXY)(flatCoordinates, offset, ends, stride, x, y)) {\n pointX = x;\n maxSegmentLength = segmentLength;\n }\n }\n x1 = x2;\n }\n if (isNaN(pointX)) {\n // There is no horizontal line that has its center point inside the linear\n // ring. Use the center of the the linear ring's extent.\n pointX = flatCenters[flatCentersOffset];\n }\n if (dest) {\n dest.push(pointX, y, maxSegmentLength);\n return dest;\n }\n return [pointX, y, maxSegmentLength];\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @return {Array} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nfunction getInteriorPointsOfMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n flatCenters,\n) {\n /** @type {Array} */\n let interiorPoints = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n interiorPoints = getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n 2 * i,\n interiorPoints,\n );\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/interiorpoint.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/interpolate.js": /*!**************************************************!*\ !*** ./node_modules/ol/geom/flat/interpolate.js ***! \**************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ interpolatePoint: () => (/* binding */ interpolatePoint),\n/* harmony export */ lineStringCoordinateAtM: () => (/* binding */ lineStringCoordinateAtM),\n/* harmony export */ lineStringsCoordinateAtM: () => (/* binding */ lineStringsCoordinateAtM)\n/* harmony export */ });\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../array.js */ \"./node_modules/ol/array.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/geom/flat/interpolate\n */\n\n\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array} [dest] Destination.\n * @param {number} [dimension] Destination dimension (default is `2`)\n * @return {Array} Destination.\n */\nfunction interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n fraction,\n dest,\n dimension,\n) {\n let o, t;\n const n = (end - offset) / stride;\n if (n === 1) {\n o = offset;\n } else if (n === 2) {\n o = offset;\n t = fraction;\n } else if (n !== 0) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n const cumulativeLengths = [0];\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length);\n x1 = x2;\n y1 = y2;\n }\n const target = fraction * length;\n const index = (0,_array_js__WEBPACK_IMPORTED_MODULE_0__.binarySearch)(cumulativeLengths, target);\n if (index < 0) {\n t =\n (target - cumulativeLengths[-index - 2]) /\n (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n o = offset + (-index - 2) * stride;\n } else {\n o = offset + index * stride;\n }\n }\n dimension = dimension > 1 ? dimension : 2;\n dest = dest ? dest : new Array(dimension);\n for (let i = 0; i < dimension; ++i) {\n dest[i] =\n o === undefined\n ? NaN\n : t === undefined\n ? flatCoordinates[o + i]\n : (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.lerp)(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nfunction lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n extrapolate,\n) {\n if (end == offset) {\n return null;\n }\n let coordinate;\n if (m < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[end - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(end - stride, end);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n // FIXME use O(1) search\n if (m == flatCoordinates[offset + stride - 1]) {\n return flatCoordinates.slice(offset, offset + stride);\n }\n let lo = offset / stride;\n let hi = end / stride;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n const m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n const m1 = flatCoordinates[(lo + 1) * stride - 1];\n const t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (let i = 0; i < stride - 1; ++i) {\n coordinate.push(\n (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.lerp)(\n flatCoordinates[(lo - 1) * stride + i],\n flatCoordinates[lo * stride + i],\n t,\n ),\n );\n }\n coordinate.push(m);\n return coordinate;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nfunction lineStringsCoordinateAtM(\n flatCoordinates,\n offset,\n ends,\n stride,\n m,\n extrapolate,\n interpolate,\n) {\n if (interpolate) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n ends[ends.length - 1],\n stride,\n m,\n extrapolate,\n );\n }\n let coordinate;\n if (m < flatCoordinates[stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(0, stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[flatCoordinates.length - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n }\n if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n false,\n );\n }\n offset = end;\n }\n return null;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/interpolate.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/intersectsextent.js": /*!*******************************************************!*\ !*** ./node_modules/ol/geom/flat/intersectsextent.js ***! \*******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ intersectsLineString: () => (/* binding */ intersectsLineString),\n/* harmony export */ intersectsLineStringArray: () => (/* binding */ intersectsLineStringArray),\n/* harmony export */ intersectsLinearRing: () => (/* binding */ intersectsLinearRing),\n/* harmony export */ intersectsLinearRingArray: () => (/* binding */ intersectsLinearRingArray),\n/* harmony export */ intersectsLinearRingMultiArray: () => (/* binding */ intersectsLinearRingMultiArray)\n/* harmony export */ });\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _segments_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./segments.js */ \"./node_modules/ol/geom/flat/segments.js\");\n/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contains.js */ \"./node_modules/ol/geom/flat/contains.js\");\n/**\n * @module ol/geom/flat/intersectsextent\n */\n\n\n\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nfunction intersectsLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n extent,\n) {\n const coordinatesExtent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.extendFlatCoordinates)(\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.createEmpty)(),\n flatCoordinates,\n offset,\n end,\n stride,\n );\n if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.intersects)(extent, coordinatesExtent)) {\n return false;\n }\n if ((0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.containsExtent)(extent, coordinatesExtent)) {\n return true;\n }\n if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n return true;\n }\n if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n return true;\n }\n return (0,_segments_js__WEBPACK_IMPORTED_MODULE_1__.forEach)(\n flatCoordinates,\n offset,\n end,\n stride,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n * @return {boolean} `true` if the segment and the extent intersect,\n * `false` otherwise.\n */\n function (point1, point2) {\n return (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.intersectsSegment)(extent, point1, point2);\n },\n );\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nfunction intersectsLineStringArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent,\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n if (\n intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n ) {\n return true;\n }\n offset = ends[i];\n }\n return false;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nfunction intersectsLinearRing(\n flatCoordinates,\n offset,\n end,\n stride,\n extent,\n) {\n if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n return true;\n }\n if (\n (0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[1],\n )\n ) {\n return true;\n }\n if (\n (0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[3],\n )\n ) {\n return true;\n }\n if (\n (0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[1],\n )\n ) {\n return true;\n }\n if (\n (0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[3],\n )\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nfunction intersectsLinearRingArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent,\n) {\n if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n return false;\n }\n if (ends.length === 1) {\n return true;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n (0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsExtent)(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent,\n )\n ) {\n if (\n !intersectsLineString(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent,\n )\n ) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nfunction intersectsLinearRingMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n extent,\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (\n intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)\n ) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/intersectsextent.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/length.js": /*!*********************************************!*\ !*** ./node_modules/ol/geom/flat/length.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ lineStringLength: () => (/* binding */ lineStringLength),\n/* harmony export */ linearRingLength: () => (/* binding */ linearRingLength)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nfunction lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nfunction linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/length.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/linechunk.js": /*!************************************************!*\ !*** ./node_modules/ol/geom/flat/linechunk.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ lineChunk: () => (/* binding */ lineChunk)\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math.js */ \"./node_modules/ol/math.js\");\n\n\n/**\n * Creates chunks of equal length from a linestring\n * @param {number} chunkLength Length of each chunk.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @return {Array>} Chunks of linestrings with stride 2.\n */\nfunction lineChunk(chunkLength, flatCoordinates, offset, end, stride) {\n const chunks = [];\n let cursor = offset;\n let chunkM = 0;\n let currentChunk = flatCoordinates.slice(offset, 2);\n while (chunkM < chunkLength && cursor + stride < end) {\n const [x1, y1] = currentChunk.slice(-2);\n const x2 = flatCoordinates[cursor + stride];\n const y2 = flatCoordinates[cursor + stride + 1];\n const segmentLength = Math.sqrt(\n (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n );\n chunkM += segmentLength;\n if (chunkM >= chunkLength) {\n const m = (chunkLength - chunkM + segmentLength) / segmentLength;\n const x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, m);\n const y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, m);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n if (chunkM == chunkLength) {\n cursor += stride;\n }\n chunkM = 0;\n } else if (chunkM < chunkLength) {\n currentChunk.push(\n flatCoordinates[cursor + stride],\n flatCoordinates[cursor + stride + 1],\n );\n cursor += stride;\n } else {\n const missing = segmentLength - chunkM;\n const x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, missing / segmentLength);\n const y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, missing / segmentLength);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n chunkM = 0;\n cursor += stride;\n }\n }\n if (chunkM > 0) {\n chunks.push(currentChunk);\n }\n return chunks;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/linechunk.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/orient.js": /*!*********************************************!*\ !*** ./node_modules/ol/geom/flat/orient.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ inflateEnds: () => (/* binding */ inflateEnds),\n/* harmony export */ linearRingIsClockwise: () => (/* binding */ linearRingIsClockwise),\n/* harmony export */ linearRingsAreOriented: () => (/* binding */ linearRingsAreOriented),\n/* harmony export */ linearRingssAreOriented: () => (/* binding */ linearRingssAreOriented),\n/* harmony export */ orientLinearRings: () => (/* binding */ orientLinearRings),\n/* harmony export */ orientLinearRingsArray: () => (/* binding */ orientLinearRingsArray)\n/* harmony export */ });\n/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reverse.js */ \"./node_modules/ol/geom/flat/reverse.js\");\n/**\n * @module ol/geom/flat/orient\n */\n\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean|undefined} Is clockwise.\n */\nfunction linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n // https://stackoverflow.com/q/1165647/clockwise-method#1165943\n // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n let edge = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n edge += (x2 - x1) * (y2 + y1);\n x1 = x2;\n y1 = y2;\n }\n return edge === 0 ? undefined : edge > 0;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nfunction linearRingsAreOriented(\n flatCoordinates,\n offset,\n ends,\n stride,\n right,\n) {\n right = right !== undefined ? right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride,\n );\n if (i === 0) {\n if ((right && isClockwise) || (!right && !isClockwise)) {\n return false;\n }\n } else {\n if ((right && !isClockwise) || (!right && isClockwise)) {\n return false;\n }\n }\n offset = end;\n }\n return true;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nfunction linearRingssAreOriented(\n flatCoordinates,\n offset,\n endss,\n stride,\n right,\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, right)) {\n return false;\n }\n if (ends.length) {\n offset = ends[ends.length - 1];\n }\n }\n return true;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nfunction orientLinearRings(\n flatCoordinates,\n offset,\n ends,\n stride,\n right,\n) {\n right = right !== undefined ? right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride,\n );\n const reverse =\n i === 0\n ? (right && isClockwise) || (!right && !isClockwise)\n : (right && !isClockwise) || (!right && isClockwise);\n if (reverse) {\n (0,_reverse_js__WEBPACK_IMPORTED_MODULE_0__.coordinates)(flatCoordinates, offset, end, stride);\n }\n offset = end;\n }\n return offset;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nfunction orientLinearRingsArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n right,\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = orientLinearRings(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n right,\n );\n }\n return offset;\n}\n\n/**\n * Return a two-dimensional endss\n * @param {Array} flatCoordinates Flat coordinates\n * @param {Array} ends Linear ring end indexes\n * @return {Array>} Two dimensional endss array that can\n * be used to construct a MultiPolygon\n */\nfunction inflateEnds(flatCoordinates, ends) {\n const endss = [];\n let offset = 0;\n let prevEndIndex = 0;\n let startOrientation;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n // classifies an array of rings into polygons with outer rings and holes\n const orientation = linearRingIsClockwise(flatCoordinates, offset, end, 2);\n if (startOrientation === undefined) {\n startOrientation = orientation;\n }\n if (orientation === startOrientation) {\n endss.push(ends.slice(prevEndIndex, i + 1));\n } else {\n if (endss.length === 0) {\n continue;\n }\n endss[endss.length - 1].push(ends[prevEndIndex]);\n }\n prevEndIndex = i + 1;\n offset = end;\n }\n return endss;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/orient.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/reverse.js": /*!**********************************************!*\ !*** ./node_modules/ol/geom/flat/reverse.js ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ coordinates: () => (/* binding */ coordinates)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/reverse\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nfunction coordinates(flatCoordinates, offset, end, stride) {\n while (offset < end - stride) {\n for (let i = 0; i < stride; ++i) {\n const tmp = flatCoordinates[offset + i];\n flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n flatCoordinates[end - stride + i] = tmp;\n }\n offset += stride;\n end -= stride;\n }\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/reverse.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/segments.js": /*!***********************************************!*\ !*** ./node_modules/ol/geom/flat/segments.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ forEach: () => (/* binding */ forEach)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/segments\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nfunction forEach(flatCoordinates, offset, end, stride, callback) {\n let ret;\n offset += stride;\n for (; offset < end; offset += stride) {\n ret = callback(\n flatCoordinates.slice(offset - stride, offset),\n flatCoordinates.slice(offset, offset + stride),\n );\n if (ret) {\n return ret;\n }\n }\n return false;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/segments.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/simplify.js": /*!***********************************************!*\ !*** ./node_modules/ol/geom/flat/simplify.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ douglasPeucker: () => (/* binding */ douglasPeucker),\n/* harmony export */ douglasPeuckerArray: () => (/* binding */ douglasPeuckerArray),\n/* harmony export */ douglasPeuckerMultiArray: () => (/* binding */ douglasPeuckerMultiArray),\n/* harmony export */ quantize: () => (/* binding */ quantize),\n/* harmony export */ quantizeArray: () => (/* binding */ quantizeArray),\n/* harmony export */ quantizeMultiArray: () => (/* binding */ quantizeMultiArray),\n/* harmony export */ radialDistance: () => (/* binding */ radialDistance),\n/* harmony export */ simplifyLineString: () => (/* binding */ simplifyLineString),\n/* harmony export */ snap: () => (/* binding */ snap)\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// 1. Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\n\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array} [simplifiedFlatCoordinates] Simplified flat\n * coordinates.\n * @return {Array} Simplified line string.\n */\nfunction simplifyLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n highQuality,\n simplifiedFlatCoordinates,\n) {\n simplifiedFlatCoordinates =\n simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\n if (!highQuality) {\n end = radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n );\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n );\n return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nfunction douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n) {\n const n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array} */\n const markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array} */\n const stack = [offset, end - stride];\n let index = 0;\n while (stack.length > 0) {\n const last = stack.pop();\n const first = stack.pop();\n let maxSquaredDistance = 0;\n const x1 = flatCoordinates[first];\n const y1 = flatCoordinates[first + 1];\n const x2 = flatCoordinates[last];\n const y2 = flatCoordinates[last + 1];\n for (let i = first + stride; i < last; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n const squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredSegmentDistance)(x, y, x1, y1, x2, y2);\n if (squaredDistance > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance;\n }\n }\n if (maxSquaredDistance > squaredTolerance) {\n markers[(index - offset) / stride] = 1;\n if (first + stride < index) {\n stack.push(first, index);\n }\n if (index + stride < last) {\n stack.push(index, last);\n }\n }\n }\n for (let i = 0; i < n; ++i) {\n if (markers[i]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride + 1];\n }\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nfunction douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds,\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nfunction douglasPeuckerMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss,\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n /** @type {Array} */\n const simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds,\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nfunction radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n) {\n if (end <= offset + stride) {\n // zero or one point, no simplification possible, so copy and return\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n let x2 = x1;\n let y2 = y1;\n for (offset += stride; offset < end; offset += stride) {\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n if ((0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x1, y1, x2, y2) > squaredTolerance) {\n // copy point at offset\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n }\n }\n if (x2 != x1 || y2 != y1) {\n // copy last point\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nfunction snap(value, tolerance) {\n return tolerance * Math.round(value / tolerance);\n}\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nfunction quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n let x1 = snap(flatCoordinates[offset], tolerance);\n let y1 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // add the first coordinate to the output\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n // find the next coordinate that does not snap to the same value as the first\n // coordinate (P2)\n let x2, y2;\n do {\n x2 = snap(flatCoordinates[offset], tolerance);\n y2 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n if (offset == end) {\n // all coordinates snap to the same value, the line collapses to a point\n // push the last snapped value anyway to ensure that the output contains\n // at least two points\n // FIXME should we really return at least two points anyway?\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n }\n } while (x2 == x1 && y2 == y1);\n while (offset < end) {\n // snap the next coordinate (P3)\n const x3 = snap(flatCoordinates[offset], tolerance);\n const y3 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // skip P3 if it is equal to P2\n if (x3 == x2 && y3 == y2) {\n continue;\n }\n // calculate the delta between P1 and P2\n const dx1 = x2 - x1;\n const dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n const dx2 = x3 - x1;\n const dy2 = y3 - y1;\n // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n // P1 in the same direction then P2 is on the straight line between P1 and\n // P3\n if (\n dx1 * dy2 == dy1 * dx2 &&\n ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))\n ) {\n // discard P2 and set P2 = P3\n x2 = x3;\n y2 = y3;\n continue;\n }\n // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n // between P3 and P1 or on the opposite half of the line to P2. add P2,\n // and continue with P1 = P2 and P2 = P3\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n x2 = x3;\n y2 = y3;\n }\n // add the last point (P2)\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nfunction quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds,\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nfunction quantizeMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss,\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n /** @type {Array} */\n const simplifiedEnds = [];\n simplifiedOffset = quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds,\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/simplify.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/straightchunk.js": /*!****************************************************!*\ !*** ./node_modules/ol/geom/flat/straightchunk.js ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ matchingChunk: () => (/* binding */ matchingChunk)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nfunction matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n let chunkStart = offset;\n let chunkEnd = offset;\n let chunkM = 0;\n let m = 0;\n let start = offset;\n let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n for (i = offset; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n if (x1 !== undefined) {\n x23 = x2 - x1;\n y23 = y2 - y1;\n m23 = Math.sqrt(x23 * x23 + y23 * y23);\n if (x12 !== undefined) {\n m += m12;\n acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n if (acos > maxAngle) {\n if (m > chunkM) {\n chunkM = m;\n chunkStart = start;\n chunkEnd = i;\n }\n m = 0;\n start = i - stride;\n }\n }\n m12 = m23;\n x12 = x23;\n y12 = y23;\n }\n x1 = x2;\n y1 = y2;\n }\n m += m23;\n return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/straightchunk.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/textpath.js": /*!***********************************************!*\ !*** ./node_modules/ol/geom/flat/textpath.js ***! \***********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawTextOnPath: () => (/* binding */ drawTextOnPath)\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math.js */ \"./node_modules/ol/math.js\");\n/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ \"./node_modules/ol/geom/flat/transform.js\");\n/**\n * @module ol/geom/flat/textpath\n */\n\n\n\n/**\n * @param {Array} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @param {boolean} keepUpright Whether the text needs to be kept upright\n * @return {Array>|null} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nfunction drawTextOnPath(\n flatCoordinates,\n offset,\n end,\n stride,\n text,\n startM,\n maxAngle,\n scale,\n measureAndCacheTextWidth,\n font,\n cache,\n rotation,\n keepUpright = true,\n) {\n let x2 = flatCoordinates[offset];\n let y2 = flatCoordinates[offset + 1];\n let x1 = 0;\n let y1 = 0;\n let segmentLength = 0;\n let segmentM = 0;\n\n function advance() {\n x1 = x2;\n y1 = y2;\n offset += stride;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n segmentM += segmentLength;\n segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n do {\n advance();\n } while (offset < end - stride && segmentM + segmentLength < startM);\n\n let interpolate =\n segmentLength === 0 ? 0 : (startM - segmentM) / segmentLength;\n const beginX = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, interpolate);\n const beginY = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, interpolate);\n\n const startOffset = offset - stride;\n const startLength = segmentM;\n const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n while (offset < end - stride && segmentM + segmentLength < endM) {\n advance();\n }\n interpolate = segmentLength === 0 ? 0 : (endM - segmentM) / segmentLength;\n const endX = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, interpolate);\n const endY = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, interpolate);\n\n // Keep text upright if the option is selected\n let reverse = false;\n if (keepUpright) {\n if (rotation) {\n const flat = [beginX, beginY, endX, endY];\n (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.rotate)(flat, 0, 4, 2, rotation, flat, flat);\n reverse = flat[0] > flat[2];\n } else {\n reverse = beginX > endX;\n }\n }\n\n const PI = Math.PI;\n const result = [];\n const singleSegment = startOffset + stride === offset;\n\n offset = startOffset;\n segmentLength = 0;\n segmentM = startLength;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n\n let previousAngle;\n // All on the same segment\n if (singleSegment) {\n advance();\n\n previousAngle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n previousAngle += previousAngle > 0 ? -PI : PI;\n }\n const x = (endX + beginX) / 2;\n const y = (endY + beginY) / 2;\n result[0] = [x, y, (endM - startM) / 2, previousAngle, text];\n return result;\n }\n\n // rendering across line segments\n text = text.replace(/\\n/g, ' '); // ensure rendering in single-line as all calculations below don't handle multi-lines\n\n for (let i = 0, ii = text.length; i < ii; ) {\n advance();\n let angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -PI : PI;\n }\n if (previousAngle !== undefined) {\n let delta = angle - previousAngle;\n delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n previousAngle = angle;\n\n const iStart = i;\n let charLength = 0;\n for (; i < ii; ++i) {\n const index = reverse ? ii - i - 1 : i;\n const len = scale * measureAndCacheTextWidth(font, text[index], cache);\n if (\n offset + stride < end &&\n segmentM + segmentLength < startM + charLength + len / 2\n ) {\n break;\n }\n charLength += len;\n }\n if (i === iStart) {\n continue;\n }\n const chars = reverse\n ? text.substring(ii - iStart, ii - i)\n : text.substring(iStart, i);\n interpolate =\n segmentLength === 0\n ? 0\n : (startM + charLength / 2 - segmentM) / segmentLength;\n const x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, interpolate);\n const y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, interpolate);\n result.push([x, y, charLength / 2, angle, chars]);\n startM += charLength;\n }\n return result;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/textpath.js?"); /***/ }), /***/ "./node_modules/ol/geom/flat/transform.js": /*!************************************************!*\ !*** ./node_modules/ol/geom/flat/transform.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ rotate: () => (/* binding */ rotate),\n/* harmony export */ scale: () => (/* binding */ scale),\n/* harmony export */ transform2D: () => (/* binding */ transform2D),\n/* harmony export */ translate: () => (/* binding */ translate)\n/* harmony export */ });\n/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @param {number} [destinationStride] Stride of destination coordinates; if unspecified, assumed to be 2.\n * @return {Array} Transformed coordinates.\n */\nfunction transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n transform,\n dest,\n destinationStride,\n) {\n dest = dest ? dest : [];\n destinationStride = destinationStride ? destinationStride : 2;\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const x = flatCoordinates[j];\n const y = flatCoordinates[j + 1];\n dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n\n for (let k = 2; k < destinationStride; k++) {\n dest[i++] = flatCoordinates[j + k];\n }\n }\n\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array} anchor Rotation anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nfunction rotate(\n flatCoordinates,\n offset,\n end,\n stride,\n angle,\n anchor,\n dest,\n) {\n dest = dest ? dest : [];\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array} anchor Scale anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nfunction scale(\n flatCoordinates,\n offset,\n end,\n stride,\n sx,\n sy,\n anchor,\n dest,\n) {\n dest = dest ? dest : [];\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nfunction translate(\n flatCoordinates,\n offset,\n end,\n stride,\n deltaX,\n deltaY,\n dest,\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/geom/flat/transform.js?"); /***/ }), /***/ "./node_modules/ol/has.js": /*!********************************!*\ !*** ./node_modules/ol/has.js ***! \********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CREATE_IMAGE_BITMAP: () => (/* binding */ CREATE_IMAGE_BITMAP),\n/* harmony export */ DEVICE_PIXEL_RATIO: () => (/* binding */ DEVICE_PIXEL_RATIO),\n/* harmony export */ FIREFOX: () => (/* binding */ FIREFOX),\n/* harmony export */ IMAGE_DECODE: () => (/* binding */ IMAGE_DECODE),\n/* harmony export */ MAC: () => (/* binding */ MAC),\n/* harmony export */ PASSIVE_EVENT_LISTENERS: () => (/* binding */ PASSIVE_EVENT_LISTENERS),\n/* harmony export */ SAFARI: () => (/* binding */ SAFARI),\n/* harmony export */ SAFARI_BUG_237906: () => (/* binding */ SAFARI_BUG_237906),\n/* harmony export */ WEBKIT: () => (/* binding */ WEBKIT),\n/* harmony export */ WORKER_OFFSCREEN_CANVAS: () => (/* binding */ WORKER_OFFSCREEN_CANVAS)\n/* harmony export */ });\n/**\n * @module ol/has\n */\n\nconst ua =\n typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nconst FIREFOX = ua.includes('firefox');\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nconst SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nconst SAFARI_BUG_237906 =\n SAFARI &&\n (ua.includes('version/15.4') ||\n /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nconst WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nconst MAC = ua.includes('macintosh');\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nconst DEVICE_PIXEL_RATIO =\n typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nconst WORKER_OFFSCREEN_CANVAS =\n typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nconst IMAGE_DECODE =\n typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * createImageBitmap() is supported.\n * @type {boolean}\n */\nconst CREATE_IMAGE_BITMAP = typeof createImageBitmap === 'function';\n\n/**\n * @type {boolean}\n */\nconst PASSIVE_EVENT_LISTENERS = (function () {\n let passive = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n\n // @ts-ignore Ignore invalid event type '_'\n window.addEventListener('_', null, options);\n // @ts-ignore Ignore invalid event type '_'\n window.removeEventListener('_', null, options);\n } catch (error) {\n // passive not supported\n }\n return passive;\n})();\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/has.js?"); /***/ }), /***/ "./node_modules/ol/interaction/DoubleClickZoom.js": /*!********************************************************!*\ !*** ./node_modules/ol/interaction/DoubleClickZoom.js ***! \********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction.js */ \"./node_modules/ol/interaction/Interaction.js\");\n/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n/**\n * @module ol/interaction/DoubleClickZoom\n */\n\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nclass DoubleClickZoom extends _Interaction_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a\n * doubleclick) and eventually zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @override\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].DBLCLICK) {\n const browserEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const map = mapBrowserEvent.map;\n const anchor = mapBrowserEvent.coordinate;\n const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n const view = map.getView();\n (0,_Interaction_js__WEBPACK_IMPORTED_MODULE_0__.zoomByDelta)(view, delta, anchor, this.duration_);\n browserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DoubleClickZoom);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/DoubleClickZoom.js?"); /***/ }), /***/ "./node_modules/ol/interaction/DragBox.js": /*!************************************************!*\ !*** ./node_modules/ol/interaction/DragBox.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DragBoxEvent: () => (/* binding */ DragBoxEvent),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../events/Event.js */ \"./node_modules/ol/events/Event.js\");\n/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Pointer.js */ \"./node_modules/ol/interaction/Pointer.js\");\n/* harmony import */ var _render_Box_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../render/Box.js */ \"./node_modules/ol/render/Box.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\n\n\n\n\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n\n/**\n * @enum {string}\n */\nconst DragBoxEventType = {\n /**\n * Triggered upon drag box start.\n * @event DragBoxEvent#boxstart\n * @api\n */\n BOXSTART: 'boxstart',\n\n /**\n * Triggered on drag when box is active.\n * @event DragBoxEvent#boxdrag\n * @api\n */\n BOXDRAG: 'boxdrag',\n\n /**\n * Triggered upon drag box end.\n * @event DragBoxEvent#boxend\n * @api\n */\n BOXEND: 'boxend',\n\n /**\n * Triggered upon drag box canceled.\n * @event DragBoxEvent#boxcancel\n * @api\n */\n BOXCANCEL: 'boxcancel',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nclass DragBoxEvent extends _events_Event_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {string} type The event type.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n */\n constructor(type, coordinate, mapBrowserEvent) {\n super(type);\n\n /**\n * The coordinate of the drag event.\n * @const\n * @type {import(\"../coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = coordinate;\n\n /**\n * @const\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature} DragBoxOnSignature\n */\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with a {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom~DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nclass DragBox extends _Pointer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.on;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.once;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.un;\n\n options = options ?? {};\n\n /**\n * @type {import(\"../render/Box.js\").default}\n * @private\n */\n this.box_ = new _render_Box_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"](options.className || 'ol-dragbox');\n\n /**\n * @type {number}\n * @private\n */\n this.minArea_ = options.minArea ?? 64;\n\n if (options.onBoxEnd) {\n this.onBoxEnd = options.onBoxEnd;\n }\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ?? _events_condition_js__WEBPACK_IMPORTED_MODULE_3__.mouseActionButton;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ =\n options.boxEndCondition ?? this.defaultBoxEndCondition;\n }\n\n /**\n * The default condition for determining whether the boxend event\n * should fire.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n * leading to the box end.\n * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n * @return {boolean} Whether or not the boxend condition should be fired.\n */\n defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {\n const width = endPixel[0] - startPixel[0];\n const height = endPixel[1] - startPixel[1];\n return width * width + height * height >= this.minArea_;\n }\n\n /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n getGeometry() {\n return this.box_.getGeometry();\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @override\n */\n handleDragEvent(mapBrowserEvent) {\n if (!this.startPixel_) {\n return;\n }\n\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate,\n mapBrowserEvent,\n ),\n );\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleUpEvent(mapBrowserEvent) {\n if (!this.startPixel_) {\n return false;\n }\n\n const completeBox = this.boxEndCondition_(\n mapBrowserEvent,\n this.startPixel_,\n mapBrowserEvent.pixel,\n );\n if (completeBox) {\n this.onBoxEnd(mapBrowserEvent);\n }\n this.dispatchEvent(\n new DragBoxEvent(\n completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL,\n mapBrowserEvent.coordinate,\n mapBrowserEvent,\n ),\n );\n\n this.box_.setMap(null);\n this.startPixel_ = null;\n\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.condition_(mapBrowserEvent)) {\n this.startPixel_ = mapBrowserEvent.pixel;\n this.box_.setMap(mapBrowserEvent.map);\n this.box_.setPixels(this.startPixel_, this.startPixel_);\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXSTART,\n mapBrowserEvent.coordinate,\n mapBrowserEvent,\n ),\n );\n return true;\n }\n return false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {}\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n * @override\n */\n setActive(active) {\n if (!active) {\n this.box_.setMap(null);\n if (this.startPixel_) {\n this.dispatchEvent(\n new DragBoxEvent(DragBoxEventType.BOXCANCEL, this.startPixel_, null),\n );\n this.startPixel_ = null;\n }\n }\n\n super.setActive(active);\n }\n\n /**\n * @param {import(\"../Map.js\").default|null} map Map.\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n\n if (oldMap) {\n this.box_.setMap(null);\n\n if (this.startPixel_) {\n this.dispatchEvent(\n new DragBoxEvent(DragBoxEventType.BOXCANCEL, this.startPixel_, null),\n );\n this.startPixel_ = null;\n }\n }\n\n super.setMap(map);\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DragBox);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/DragBox.js?"); /***/ }), /***/ "./node_modules/ol/interaction/DragPan.js": /*!************************************************!*\ !*** ./node_modules/ol/interaction/DragPan.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pointer.js */ \"./node_modules/ol/interaction/Pointer.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../coordinate.js */ \"./node_modules/ol/coordinate.js\");\n/**\n * @module ol/interaction/DragPan\n */\n\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nclass DragPan extends _Pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super({\n stopDown: _functions_js__WEBPACK_IMPORTED_MODULE_1__.FALSE,\n });\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../Kinetic.js\").default|undefined}\n */\n this.kinetic_ = options.kinetic;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.lastCentroid = null;\n\n /**\n * @type {number}\n * @private\n */\n this.lastPointersCount_;\n\n /**\n * @type {boolean}\n * @private\n */\n this.panning_ = false;\n\n const condition = options.condition\n ? options.condition\n : (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.all)(_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.noModifierKeys, _events_condition_js__WEBPACK_IMPORTED_MODULE_2__.primaryAction);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.all)(_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @override\n */\n handleDragEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n if (!this.panning_) {\n this.panning_ = true;\n map.getView().beginInteraction();\n }\n const targetPointers = this.targetPointers;\n const centroid = map.getEventPixel((0,_Pointer_js__WEBPACK_IMPORTED_MODULE_0__.centroid)(targetPointers));\n if (targetPointers.length == this.lastPointersCount_) {\n if (this.kinetic_) {\n this.kinetic_.update(centroid[0], centroid[1]);\n }\n if (this.lastCentroid) {\n const delta = [\n this.lastCentroid[0] - centroid[0],\n centroid[1] - this.lastCentroid[1],\n ];\n const map = mapBrowserEvent.map;\n const view = map.getView();\n (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_3__.scale)(delta, view.getResolution());\n (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_3__.rotate)(delta, view.getRotation());\n view.adjustCenterInternal(delta);\n }\n } else if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger down, tiny drag, second finger down\n this.kinetic_.begin();\n }\n this.lastCentroid = centroid;\n this.lastPointersCount_ = targetPointers.length;\n mapBrowserEvent.originalEvent.preventDefault();\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleUpEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (this.targetPointers.length === 0) {\n if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n const distance = this.kinetic_.getDistance();\n const angle = this.kinetic_.getAngle();\n const center = view.getCenterInternal();\n const centerpx = map.getPixelFromCoordinateInternal(center);\n const dest = map.getCoordinateFromPixelInternal([\n centerpx[0] - distance * Math.cos(angle),\n centerpx[1] - distance * Math.sin(angle),\n ]);\n view.animateInternal({\n center: view.getConstrainedCenter(dest),\n duration: 500,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_4__.easeOut,\n });\n }\n if (this.panning_) {\n this.panning_ = false;\n view.endInteraction();\n }\n return false;\n }\n if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger up, tiny drag, second finger up\n this.kinetic_.begin();\n }\n this.lastCentroid = null;\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n this.lastCentroid = null;\n // stop any current animation\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n if (this.kinetic_) {\n this.kinetic_.begin();\n }\n // No kinetic as soon as more than one pointer on the screen is\n // detected. This is to prevent nasty pans after pinch.\n this.noKinetic_ = this.targetPointers.length > 1;\n return true;\n }\n return false;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DragPan);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/DragPan.js?"); /***/ }), /***/ "./node_modules/ol/interaction/DragRotate.js": /*!***************************************************!*\ !*** ./node_modules/ol/interaction/DragRotate.js ***! \***************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pointer.js */ \"./node_modules/ol/interaction/Pointer.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/* harmony import */ var _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rotationconstraint.js */ \"./node_modules/ol/rotationconstraint.js\");\n/**\n * @module ol/interaction/DragRotate\n */\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with a {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nclass DragRotate extends _Pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n stopDown: _functions_js__WEBPACK_IMPORTED_MODULE_1__.FALSE,\n });\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : _events_condition_js__WEBPACK_IMPORTED_MODULE_2__.altShiftKeysOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @override\n */\n handleDragEvent(mapBrowserEvent) {\n if (!(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.mouseOnly)(mapBrowserEvent)) {\n return;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_3__.disable) {\n return;\n }\n const size = map.getSize();\n const offset = mapBrowserEvent.pixel;\n const theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n const delta = theta - this.lastAngle_;\n view.adjustRotationInternal(-delta);\n }\n this.lastAngle_ = theta;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleUpEvent(mapBrowserEvent) {\n if (!(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.mouseOnly)(mapBrowserEvent)) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleDownEvent(mapBrowserEvent) {\n if (!(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.mouseOnly)(mapBrowserEvent)) {\n return false;\n }\n\n if (\n (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_2__.mouseActionButton)(mapBrowserEvent) &&\n this.condition_(mapBrowserEvent)\n ) {\n const map = mapBrowserEvent.map;\n map.getView().beginInteraction();\n this.lastAngle_ = undefined;\n return true;\n }\n return false;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DragRotate);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/DragRotate.js?"); /***/ }), /***/ "./node_modules/ol/interaction/DragZoom.js": /*!*************************************************!*\ !*** ./node_modules/ol/interaction/DragZoom.js ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _DragBox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DragBox.js */ \"./node_modules/ol/interaction/DragBox.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/**\n * @module ol/interaction/DragZoom\n */\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with a {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nclass DragZoom extends _DragBox_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const condition = options.condition ? options.condition : _events_condition_js__WEBPACK_IMPORTED_MODULE_1__.shiftKeyOnly;\n\n super({\n condition: condition,\n className: options.className || 'ol-dragzoom',\n minArea: options.minArea,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n /**\n * @private\n * @type {boolean}\n */\n this.out_ = options.out !== undefined ? options.out : false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @override\n */\n onBoxEnd(event) {\n const map = this.getMap();\n const view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n let geometry = this.getGeometry();\n\n if (this.out_) {\n const rotatedExtent = view.rotatedExtentForGeometry(geometry);\n const resolution = view.getResolutionForExtentInternal(rotatedExtent);\n const factor = view.getResolution() / resolution;\n geometry = geometry.clone();\n geometry.scale(factor * factor);\n }\n\n view.fitInternal(geometry, {\n duration: this.duration_,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.easeOut,\n });\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DragZoom);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/DragZoom.js?"); /***/ }), /***/ "./node_modules/ol/interaction/Draw.js": /*!*********************************************!*\ !*** ./node_modules/ol/interaction/Draw.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DrawEvent: () => (/* binding */ DrawEvent),\n/* harmony export */ createBox: () => (/* binding */ createBox),\n/* harmony export */ createRegularPolygon: () => (/* binding */ createRegularPolygon),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _geom_Circle_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geom/Circle.js */ \"./node_modules/ol/geom/Circle.js\");\n/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/Event.js */ \"./node_modules/ol/events/Event.js\");\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _Feature_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Feature.js */ \"./node_modules/ol/Feature.js\");\n/* harmony import */ var _geom_GeometryCollection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geom/GeometryCollection.js */ \"./node_modules/ol/geom/GeometryCollection.js\");\n/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Property.js */ \"./node_modules/ol/interaction/Property.js\");\n/* harmony import */ var _geom_LineString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geom/LineString.js */ \"./node_modules/ol/geom/LineString.js\");\n/* harmony import */ var _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../MapBrowserEvent.js */ \"./node_modules/ol/MapBrowserEvent.js\");\n/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n/* harmony import */ var _geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geom/MultiLineString.js */ \"./node_modules/ol/geom/MultiLineString.js\");\n/* harmony import */ var _geom_MultiPoint_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../geom/MultiPoint.js */ \"./node_modules/ol/geom/MultiPoint.js\");\n/* harmony import */ var _geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geom/MultiPolygon.js */ \"./node_modules/ol/geom/MultiPolygon.js\");\n/* harmony import */ var _geom_Point_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geom/Point.js */ \"./node_modules/ol/geom/Point.js\");\n/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Pointer.js */ \"./node_modules/ol/interaction/Pointer.js\");\n/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geom/Polygon.js */ \"./node_modules/ol/geom/Polygon.js\");\n/* harmony import */ var _layer_Vector_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../layer/Vector.js */ \"./node_modules/ol/layer/Vector.js\");\n/* harmony import */ var _source_Vector_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../source/Vector.js */ \"./node_modules/ol/source/Vector.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../extent.js */ \"./node_modules/ol/extent.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/* harmony import */ var _style_Style_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../style/Style.js */ \"./node_modules/ol/style/Style.js\");\n/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../coordinate.js */ \"./node_modules/ol/coordinate.js\");\n/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var _geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../geom/SimpleGeometry.js */ \"./node_modules/ol/geom/SimpleGeometry.js\");\n/**\n * @module ol/interaction/Draw\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/Geometry.js\").Type} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn. The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish. Must be greater than `0`.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished. Not used when drawing\n * POINT or MULTI_POINT geometries.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike} [style]\n * Style for sketch features. The draw interaction can have up to three sketch features, depending on the mode.\n * It will always contain a feature with a `Point` geometry that corresponds to the current cursor position.\n * If the mode is `LineString` or `Polygon`, and there is at least one drawn point, it will also contain a feature with\n * a `LineString` geometry that corresponds to the line between the already drawn points and the current cursor position.\n * If the mode is `Polygon`, and there is at least one drawn point, it will also contain a feature with a `Polygon`\n * geometry that corresponds to the polygon between the already drawn points and the current cursor position\n * (note that this polygon has only two points if only one point is drawn).\n * If the mode is `Circle`, and there is one point drawn, it will also contain a feature with a `Circle` geometry whose\n * center is the drawn point and the radius is determined by the distance between the drawn point and the cursor.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition.noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles. This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition.shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean|import(\"../events/condition.js\").Condition} [trace=false] Trace a portion of another geometry.\n * Ignored when in freehand mode.\n * @property {VectorSource} [traceSource] Source for features to trace. If tracing is active and a `traceSource` is\n * not provided, the interaction's `source` will be used. Tracing requires that the interaction is configured with\n * either a `traceSource` or a `source`.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n * @property {import(\"../geom/Geometry.js\").GeometryLayout} [geometryLayout='XY'] Layout of the\n * feature geometries created by the draw interaction.\n */\n\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array} LineCoordType\n */\n\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array>} PolyCoordType\n */\n\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n\n/**\n * @typedef {Object} TraceState\n * @property {boolean} active Tracing active.\n * @property {import(\"../pixel.js\").Pixel} [startPx] The initially clicked pixel location.\n * @property {Array} [targets] Targets available for tracing.\n * @property {number} [targetIndex] The index of the currently traced target. A value of -1 indicates\n * that no trace target is active.\n */\n\n/**\n * @typedef {Object} TraceTarget\n * @property {Array} coordinates Target coordinates.\n * @property {boolean} ring The target coordinates are a linear ring.\n * @property {number} startIndex The index of first traced coordinate. A fractional index represents an\n * edge intersection. Index values for rings will wrap (may be negative or larger than coordinates length).\n * @property {number} endIndex The index of last traced coordinate. Details from startIndex also apply here.\n */\n\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default,\n * import(\"../proj/Projection.js\").default):\n * import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'Polygon' | 'Circle'} Mode\n * Draw mode. This collapses multi-part geometry types with their single-part\n * cousins.\n */\n\n/**\n * @enum {string}\n */\nconst DrawEventType = {\n /**\n * Triggered upon feature draw start\n * @event DrawEvent#drawstart\n * @api\n */\n DRAWSTART: 'drawstart',\n /**\n * Triggered upon feature draw end\n * @event DrawEvent#drawend\n * @api\n */\n DRAWEND: 'drawend',\n /**\n * Triggered upon feature draw abortion\n * @event DrawEvent#drawabort\n * @api\n */\n DRAWABORT: 'drawabort',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nclass DrawEvent extends _events_Event_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {DrawEventType} type Type.\n * @param {Feature} feature The feature drawn.\n */\n constructor(type, feature) {\n super(type);\n\n /**\n * The feature being drawn.\n * @type {Feature}\n * @api\n */\n this.feature = feature;\n }\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n * @param {Array} features The candidate features.\n * @return {Array} The trace targets.\n */\nfunction getTraceTargets(coordinate, features) {\n /**\n * @type {Array}\n */\n const targets = [];\n\n for (let i = 0; i < features.length; ++i) {\n const feature = features[i];\n const geometry = feature.getGeometry();\n appendGeometryTraceTargets(coordinate, geometry, targets);\n }\n\n return targets;\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} a One coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b Another coordinate.\n * @return {number} The squared distance between the two coordinates.\n */\nfunction getSquaredDistance(a, b) {\n return (0,_math_js__WEBPACK_IMPORTED_MODULE_2__.squaredDistance)(a[0], a[1], b[0], b[1]);\n}\n\n/**\n * @param {LineCoordType} coordinates The ring coordinates.\n * @param {number} index The index. May be wrapped.\n * @return {import(\"../coordinate.js\").Coordinate} The coordinate.\n */\nfunction getCoordinate(coordinates, index) {\n const count = coordinates.length;\n if (index < 0) {\n return coordinates[index + count];\n }\n if (index >= count) {\n return coordinates[index - count];\n }\n return coordinates[index];\n}\n\n/**\n * Get the cumulative squared distance along a ring path. The end index index may be \"wrapped\" and it may\n * be less than the start index to indicate the direction of travel. The start and end index may have\n * a fractional part to indicate a point between two coordinates.\n * @param {LineCoordType} coordinates Ring coordinates.\n * @param {number} startIndex The start index.\n * @param {number} endIndex The end index.\n * @return {number} The cumulative squared distance along the ring path.\n */\nfunction getCumulativeSquaredDistance(coordinates, startIndex, endIndex) {\n let lowIndex, highIndex;\n if (startIndex < endIndex) {\n lowIndex = startIndex;\n highIndex = endIndex;\n } else {\n lowIndex = endIndex;\n highIndex = startIndex;\n }\n const lowWholeIndex = Math.ceil(lowIndex);\n const highWholeIndex = Math.floor(highIndex);\n\n if (lowWholeIndex > highWholeIndex) {\n // both start and end are on the same segment\n const start = interpolateCoordinate(coordinates, lowIndex);\n const end = interpolateCoordinate(coordinates, highIndex);\n return getSquaredDistance(start, end);\n }\n\n let sd = 0;\n\n if (lowIndex < lowWholeIndex) {\n const start = interpolateCoordinate(coordinates, lowIndex);\n const end = getCoordinate(coordinates, lowWholeIndex);\n sd += getSquaredDistance(start, end);\n }\n\n if (highWholeIndex < highIndex) {\n const start = getCoordinate(coordinates, highWholeIndex);\n const end = interpolateCoordinate(coordinates, highIndex);\n sd += getSquaredDistance(start, end);\n }\n\n for (let i = lowWholeIndex; i < highWholeIndex - 1; ++i) {\n const start = getCoordinate(coordinates, i);\n const end = getCoordinate(coordinates, i + 1);\n sd += getSquaredDistance(start, end);\n }\n\n return sd;\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n * @param {import(\"../geom/Geometry.js\").default} geometry The candidate geometry.\n * @param {Array} targets The trace targets.\n */\nfunction appendGeometryTraceTargets(coordinate, geometry, targets) {\n if (geometry instanceof _geom_LineString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n appendTraceTarget(coordinate, geometry.getCoordinates(), false, targets);\n return;\n }\n if (geometry instanceof _geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n const coordinates = geometry.getCoordinates();\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n appendTraceTarget(coordinate, coordinates[i], false, targets);\n }\n return;\n }\n if (geometry instanceof _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]) {\n const coordinates = geometry.getCoordinates();\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n appendTraceTarget(coordinate, coordinates[i], true, targets);\n }\n return;\n }\n if (geometry instanceof _geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]) {\n const polys = geometry.getCoordinates();\n for (let i = 0, ii = polys.length; i < ii; ++i) {\n const coordinates = polys[i];\n for (let j = 0, jj = coordinates.length; j < jj; ++j) {\n appendTraceTarget(coordinate, coordinates[j], true, targets);\n }\n }\n return;\n }\n if (geometry instanceof _geom_GeometryCollection_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]) {\n const geometries = geometry.getGeometries();\n for (let i = 0; i < geometries.length; ++i) {\n appendGeometryTraceTargets(coordinate, geometries[i], targets);\n }\n return;\n }\n // other types cannot be traced\n}\n\n/**\n * @typedef {Object} TraceTargetUpdateInfo\n * @property {number} index The new target index.\n * @property {number} endIndex The new segment end index.\n */\n\n/**\n * @type {TraceTargetUpdateInfo}\n */\nconst sharedUpdateInfo = {index: -1, endIndex: NaN};\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The coordinate.\n * @param {TraceState} traceState The trace state.\n * @param {import(\"../Map.js\").default} map The map.\n * @param {number} snapTolerance The snap tolerance.\n * @return {TraceTargetUpdateInfo} Information about the new trace target. The returned\n * object is reused between calls and must not be modified by the caller.\n */\nfunction getTraceTargetUpdate(coordinate, traceState, map, snapTolerance) {\n const x = coordinate[0];\n const y = coordinate[1];\n\n let closestTargetDistance = Infinity;\n\n let newTargetIndex = -1;\n let newEndIndex = NaN;\n\n for (\n let targetIndex = 0;\n targetIndex < traceState.targets.length;\n ++targetIndex\n ) {\n const target = traceState.targets[targetIndex];\n const coordinates = target.coordinates;\n\n let minSegmentDistance = Infinity;\n let endIndex;\n for (\n let coordinateIndex = 0;\n coordinateIndex < coordinates.length - 1;\n ++coordinateIndex\n ) {\n const start = coordinates[coordinateIndex];\n const end = coordinates[coordinateIndex + 1];\n const rel = getPointSegmentRelationship(x, y, start, end);\n if (rel.squaredDistance < minSegmentDistance) {\n minSegmentDistance = rel.squaredDistance;\n endIndex = coordinateIndex + rel.along;\n }\n }\n\n if (minSegmentDistance < closestTargetDistance) {\n closestTargetDistance = minSegmentDistance;\n if (target.ring && traceState.targetIndex === targetIndex) {\n // same target, maintain the same trace direction\n if (target.endIndex > target.startIndex) {\n // forward trace\n if (endIndex < target.startIndex) {\n endIndex += coordinates.length;\n }\n } else if (target.endIndex < target.startIndex) {\n // reverse trace\n if (endIndex > target.startIndex) {\n endIndex -= coordinates.length;\n }\n }\n }\n newEndIndex = endIndex;\n newTargetIndex = targetIndex;\n }\n }\n\n const newTarget = traceState.targets[newTargetIndex];\n let considerBothDirections = newTarget.ring;\n if (traceState.targetIndex === newTargetIndex && considerBothDirections) {\n // only consider switching trace direction if close to the start\n const newCoordinate = interpolateCoordinate(\n newTarget.coordinates,\n newEndIndex,\n );\n const pixel = map.getPixelFromCoordinate(newCoordinate);\n if ((0,_coordinate_js__WEBPACK_IMPORTED_MODULE_8__.distance)(pixel, traceState.startPx) > snapTolerance) {\n considerBothDirections = false;\n }\n }\n\n if (considerBothDirections) {\n const coordinates = newTarget.coordinates;\n const count = coordinates.length;\n const startIndex = newTarget.startIndex;\n const endIndex = newEndIndex;\n if (startIndex < endIndex) {\n const forwardDistance = getCumulativeSquaredDistance(\n coordinates,\n startIndex,\n endIndex,\n );\n const reverseDistance = getCumulativeSquaredDistance(\n coordinates,\n startIndex,\n endIndex - count,\n );\n if (reverseDistance < forwardDistance) {\n newEndIndex -= count;\n }\n } else {\n const reverseDistance = getCumulativeSquaredDistance(\n coordinates,\n startIndex,\n endIndex,\n );\n const forwardDistance = getCumulativeSquaredDistance(\n coordinates,\n startIndex,\n endIndex + count,\n );\n if (forwardDistance < reverseDistance) {\n newEndIndex += count;\n }\n }\n }\n\n sharedUpdateInfo.index = newTargetIndex;\n sharedUpdateInfo.endIndex = newEndIndex;\n return sharedUpdateInfo;\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The clicked coordinate.\n * @param {Array} coordinates The geometry component coordinates.\n * @param {boolean} ring The coordinates represent a linear ring.\n * @param {Array} targets The trace targets.\n */\nfunction appendTraceTarget(coordinate, coordinates, ring, targets) {\n const x = coordinate[0];\n const y = coordinate[1];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const start = coordinates[i];\n const end = coordinates[i + 1];\n const rel = getPointSegmentRelationship(x, y, start, end);\n if (rel.squaredDistance === 0) {\n const index = i + rel.along;\n targets.push({\n coordinates: coordinates,\n ring: ring,\n startIndex: index,\n endIndex: index,\n });\n return;\n }\n }\n}\n\n/**\n * @typedef {Object} PointSegmentRelationship\n * @property {number} along The closest point expressed as a fraction along the segment length.\n * @property {number} squaredDistance The squared distance of the point to the segment.\n */\n\n/**\n * @type {PointSegmentRelationship}\n */\nconst sharedRel = {along: 0, squaredDistance: 0};\n\n/**\n * @param {number} x The point x.\n * @param {number} y The point y.\n * @param {import(\"../coordinate.js\").Coordinate} start The segment start.\n * @param {import(\"../coordinate.js\").Coordinate} end The segment end.\n * @return {PointSegmentRelationship} The point segment relationship. The returned object is\n * shared between calls and must not be modified by the caller.\n */\nfunction getPointSegmentRelationship(x, y, start, end) {\n const x1 = start[0];\n const y1 = start[1];\n const x2 = end[0];\n const y2 = end[1];\n const dx = x2 - x1;\n const dy = y2 - y1;\n let along = 0;\n let px = x1;\n let py = y1;\n if (dx !== 0 || dy !== 0) {\n along = (0,_math_js__WEBPACK_IMPORTED_MODULE_2__.clamp)(((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy), 0, 1);\n px += dx * along;\n py += dy * along;\n }\n\n sharedRel.along = along;\n sharedRel.squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_2__.toFixed)((0,_math_js__WEBPACK_IMPORTED_MODULE_2__.squaredDistance)(x, y, px, py), 10);\n return sharedRel;\n}\n\n/**\n * @param {LineCoordType} coordinates The coordinates.\n * @param {number} index The index. May be fractional and may wrap.\n * @return {import(\"../coordinate.js\").Coordinate} The interpolated coordinate.\n */\nfunction interpolateCoordinate(coordinates, index) {\n const count = coordinates.length;\n\n let startIndex = Math.floor(index);\n const along = index - startIndex;\n if (startIndex >= count) {\n startIndex -= count;\n } else if (startIndex < 0) {\n startIndex += count;\n }\n\n let endIndex = startIndex + 1;\n if (endIndex >= count) {\n endIndex -= count;\n }\n\n const start = coordinates[startIndex];\n const x0 = start[0];\n const y0 = start[1];\n const end = coordinates[endIndex];\n const dx = end[0] - x0;\n const dy = end[1] - y0;\n\n return [x0 + dx * along, y0 + dy * along];\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature<'drawabort'|'drawend'|'drawstart', DrawEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature} DrawOnSignature\n */\n\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nclass Draw extends _Pointer_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"] {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = _functions_js__WEBPACK_IMPORTED_MODULE_10__.FALSE;\n }\n\n super(pointerOptions);\n\n /***\n * @type {DrawOnSignature}\n */\n this.on;\n\n /***\n * @type {DrawOnSignature}\n */\n this.once;\n\n /***\n * @type {DrawOnSignature}\n */\n this.un;\n\n /**\n * @type {boolean}\n * @private\n */\n this.shouldHandle_ = false;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.downPx_ = null;\n\n /**\n * @type {ReturnType}\n * @private\n */\n this.downTimeout_;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.lastDragTime_;\n\n /**\n * Pointer type of the last pointermove event\n * @type {string}\n * @private\n */\n this.pointerType_;\n\n /**\n * @type {boolean}\n * @private\n */\n this.freehand_ = false;\n\n /**\n * Target source for drawn features.\n * @type {VectorSource|null}\n * @private\n */\n this.source_ = options.source ? options.source : null;\n\n /**\n * Target collection for drawn features.\n * @type {import(\"../Collection.js\").default|null}\n * @private\n */\n this.features_ = options.features ? options.features : null;\n\n /**\n * Pixel distance for snapping.\n * @type {number}\n * @private\n */\n this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n\n /**\n * Geometry type.\n * @type {import(\"../geom/Geometry.js\").Type}\n * @private\n */\n this.type_ = /** @type {import(\"../geom/Geometry.js\").Type} */ (\n options.type\n );\n\n /**\n * Drawing mode (derived from geometry type.\n * @type {Mode}\n * @private\n */\n this.mode_ = getMode(this.type_);\n\n /**\n * Stop click, singleclick, and doubleclick events from firing during drawing.\n * Default is `false`.\n * @type {boolean}\n * @private\n */\n this.stopClick_ = !!options.stopClick;\n\n /**\n * The number of points that must be drawn before a polygon ring or line\n * string can be finished. The default is 3 for polygon rings and 2 for\n * line strings.\n * @type {number}\n * @private\n */\n this.minPoints_ = options.minPoints\n ? options.minPoints\n : this.mode_ === 'Polygon'\n ? 3\n : 2;\n\n /**\n * The number of points that can be drawn before a polygon ring or line string\n * is finished. The default is no restriction.\n * @type {number}\n * @private\n */\n this.maxPoints_ =\n this.mode_ === 'Circle'\n ? 2\n : options.maxPoints\n ? options.maxPoints\n : Infinity;\n\n /**\n * A function to decide if a potential finish coordinate is permissible\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.finishCondition_ = options.finishCondition\n ? options.finishCondition\n : _functions_js__WEBPACK_IMPORTED_MODULE_10__.TRUE;\n\n /**\n * @private\n * @type {import(\"../geom/Geometry.js\").GeometryLayout}\n */\n this.geometryLayout_ = options.geometryLayout\n ? options.geometryLayout\n : 'XY';\n\n let geometryFunction = options.geometryFunction;\n if (!geometryFunction) {\n const mode = this.mode_;\n if (mode === 'Circle') {\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = (coordinates, geometry, projection) => {\n const circle = geometry\n ? /** @type {Circle} */ (geometry)\n : new _geom_Circle_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]([NaN, NaN]);\n const center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(coordinates[0], projection);\n const squaredLength = (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_8__.squaredDistance)(\n center,\n (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(coordinates[coordinates.length - 1], projection),\n );\n circle.setCenterAndRadius(\n center,\n Math.sqrt(squaredLength),\n this.geometryLayout_,\n );\n const userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();\n if (userProjection) {\n circle.transform(projection, userProjection);\n }\n return circle;\n };\n } else {\n let Constructor;\n if (mode === 'Point') {\n Constructor = _geom_Point_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n } else if (mode === 'LineString') {\n Constructor = _geom_LineString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n } else if (mode === 'Polygon') {\n Constructor = _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n }\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = (coordinates, geometry, projection) => {\n if (geometry) {\n if (mode === 'Polygon') {\n if (coordinates[0].length) {\n // Add a closing coordinate to match the first\n geometry.setCoordinates(\n [coordinates[0].concat([coordinates[0][0]])],\n this.geometryLayout_,\n );\n } else {\n geometry.setCoordinates([], this.geometryLayout_);\n }\n } else {\n geometry.setCoordinates(coordinates, this.geometryLayout_);\n }\n } else {\n geometry = new Constructor(coordinates, this.geometryLayout_);\n }\n return geometry;\n };\n }\n }\n\n /**\n * @type {GeometryFunction}\n * @private\n */\n this.geometryFunction_ = geometryFunction;\n\n /**\n * @type {number}\n * @private\n */\n this.dragVertexDelay_ =\n options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n\n /**\n * Finish coordinate for the feature (first point for polygons, last point for\n * linestrings).\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.finishCoordinate_ = null;\n\n /**\n * Sketch feature.\n * @type {Feature}\n * @private\n */\n this.sketchFeature_ = null;\n\n /**\n * Sketch point.\n * @type {Feature}\n * @private\n */\n this.sketchPoint_ = null;\n\n /**\n * Sketch coordinates. Used when drawing a line or polygon.\n * @type {SketchCoordType}\n * @private\n */\n this.sketchCoords_ = null;\n\n /**\n * Sketch line. Used when drawing polygon.\n * @type {Feature}\n * @private\n */\n this.sketchLine_ = null;\n\n /**\n * Sketch line coordinates. Used when drawing a polygon or circle.\n * @type {LineCoordType}\n * @private\n */\n this.sketchLineCoords_ = null;\n\n /**\n * Squared tolerance for handling up events. If the squared distance\n * between a down and up event is greater than this tolerance, up events\n * will not be handled.\n * @type {number}\n * @private\n */\n this.squaredClickTolerance_ = options.clickTolerance\n ? options.clickTolerance * options.clickTolerance\n : 36;\n\n /**\n * Draw overlay where our sketch features are drawn.\n * @type {VectorLayer}\n * @private\n */\n this.overlay_ = new _layer_Vector_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]({\n source: new _source_Vector_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]({\n useSpatialIndex: false,\n wrapX: options.wrapX ? options.wrapX : false,\n }),\n style: options.style ? options.style : getDefaultStyleFunction(),\n updateWhileInteracting: true,\n });\n\n /**\n * Name of the geometry attribute for newly created features.\n * @type {string|undefined}\n * @private\n */\n this.geometryName_ = options.geometryName;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : _events_condition_js__WEBPACK_IMPORTED_MODULE_15__.noModifierKeys;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.freehandCondition_;\n if (options.freehand) {\n this.freehandCondition_ = _events_condition_js__WEBPACK_IMPORTED_MODULE_15__.always;\n } else {\n this.freehandCondition_ = options.freehandCondition\n ? options.freehandCondition\n : _events_condition_js__WEBPACK_IMPORTED_MODULE_15__.shiftKeyOnly;\n }\n\n /**\n * @type {import(\"../events/condition.js\").Condition}\n * @private\n */\n this.traceCondition_;\n this.setTrace(options.trace || false);\n\n /**\n * @type {TraceState}\n * @private\n */\n this.traceState_ = {active: false};\n\n /**\n * @type {VectorSource|null}\n * @private\n */\n this.traceSource_ = options.traceSource || options.source || null;\n\n this.addChangeListener(_Property_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"].ACTIVE, this.updateState_);\n }\n\n /**\n * Toggle tracing mode or set a tracing condition.\n *\n * @param {boolean|import(\"../events/condition.js\").Condition} trace A boolean to toggle tracing mode or an event\n * condition that will be checked when a feature is clicked to determine if tracing should be active.\n */\n setTrace(trace) {\n let condition;\n if (!trace) {\n condition = _events_condition_js__WEBPACK_IMPORTED_MODULE_15__.never;\n } else if (trace === true) {\n condition = _events_condition_js__WEBPACK_IMPORTED_MODULE_15__.always;\n } else {\n condition = trace;\n }\n this.traceCondition_ = condition;\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default} map Map.\n * @override\n */\n setMap(map) {\n super.setMap(map);\n this.updateState_();\n }\n\n /**\n * Get the overlay layer that this interaction renders sketch features to.\n * @return {VectorLayer} Overlay layer.\n * @api\n */\n getOverlay() {\n return this.overlay_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n * @override\n */\n handleEvent(event) {\n if (event.originalEvent.type === _events_EventType_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].CONTEXTMENU) {\n // Avoid context menu for long taps when drawing on mobile\n event.originalEvent.preventDefault();\n }\n this.freehand_ = this.mode_ !== 'Point' && this.freehandCondition_(event);\n let move = event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERMOVE;\n let pass = true;\n if (\n !this.freehand_ &&\n this.lastDragTime_ &&\n event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERDRAG\n ) {\n const now = Date.now();\n if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n this.downPx_ = event.pixel;\n this.shouldHandle_ = !this.freehand_;\n move = true;\n } else {\n this.lastDragTime_ = undefined;\n }\n if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n }\n if (\n this.freehand_ &&\n event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERDRAG &&\n this.sketchFeature_ !== null\n ) {\n this.addToDrawing_(event.coordinate);\n pass = false;\n } else if (\n this.freehand_ &&\n event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERDOWN\n ) {\n pass = false;\n } else if (move && this.getPointerCount() < 2) {\n pass = event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERMOVE;\n if (pass && this.freehand_) {\n this.handlePointerMove_(event);\n if (this.shouldHandle_) {\n // Avoid page scrolling when freehand drawing on mobile\n event.originalEvent.preventDefault();\n }\n } else if (\n event.originalEvent.pointerType === 'mouse' ||\n (event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERDRAG &&\n this.downTimeout_ === undefined)\n ) {\n this.handlePointerMove_(event);\n }\n } else if (event.type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].DBLCLICK) {\n pass = false;\n }\n\n return super.handleEvent(event) && pass;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleDownEvent(event) {\n this.shouldHandle_ = !this.freehand_;\n\n if (this.freehand_) {\n this.downPx_ = event.pixel;\n if (!this.finishCoordinate_) {\n this.startDrawing_(event.coordinate);\n }\n return true;\n }\n\n if (!this.condition_(event)) {\n this.lastDragTime_ = undefined;\n return false;\n }\n\n this.lastDragTime_ = Date.now();\n this.downTimeout_ = setTimeout(() => {\n this.handlePointerMove_(\n new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"](\n _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"].POINTERMOVE,\n event.map,\n event.originalEvent,\n false,\n event.frameState,\n ),\n );\n }, this.dragVertexDelay_);\n this.downPx_ = event.pixel;\n return true;\n }\n\n /**\n * @private\n */\n deactivateTrace_() {\n this.traceState_ = {active: false};\n }\n\n /**\n * Activate or deactivate trace state based on a browser event.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n toggleTraceState_(event) {\n if (!this.traceSource_ || !this.traceCondition_(event)) {\n return;\n }\n\n if (this.traceState_.active) {\n this.deactivateTrace_();\n return;\n }\n\n const map = this.getMap();\n const lowerLeft = map.getCoordinateFromPixel([\n event.pixel[0] - this.snapTolerance_,\n event.pixel[1] + this.snapTolerance_,\n ]);\n const upperRight = map.getCoordinateFromPixel([\n event.pixel[0] + this.snapTolerance_,\n event.pixel[1] - this.snapTolerance_,\n ]);\n const extent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.boundingExtent)([lowerLeft, upperRight]);\n const features = this.traceSource_.getFeaturesInExtent(extent);\n if (features.length === 0) {\n return;\n }\n\n const targets = getTraceTargets(event.coordinate, features);\n if (targets.length) {\n this.traceState_ = {\n active: true,\n startPx: event.pixel.slice(),\n targets: targets,\n targetIndex: -1,\n };\n }\n }\n\n /**\n * @param {TraceTarget} target The trace target.\n * @param {number} endIndex The new end index of the trace.\n * @private\n */\n addOrRemoveTracedCoordinates_(target, endIndex) {\n // three cases to handle:\n // 1. traced in the same direction and points need adding\n // 2. traced in the same direction and points need removing\n // 3. traced in a new direction\n const previouslyForward = target.startIndex <= target.endIndex;\n const currentlyForward = target.startIndex <= endIndex;\n if (previouslyForward === currentlyForward) {\n // same direction\n if (\n (previouslyForward && endIndex > target.endIndex) ||\n (!previouslyForward && endIndex < target.endIndex)\n ) {\n // case 1 - add new points\n this.addTracedCoordinates_(target, target.endIndex, endIndex);\n } else if (\n (previouslyForward && endIndex < target.endIndex) ||\n (!previouslyForward && endIndex > target.endIndex)\n ) {\n // case 2 - remove old points\n this.removeTracedCoordinates_(endIndex, target.endIndex);\n }\n } else {\n // case 3 - remove old points, add new points\n this.removeTracedCoordinates_(target.startIndex, target.endIndex);\n this.addTracedCoordinates_(target, target.startIndex, endIndex);\n }\n }\n\n /**\n * @param {number} fromIndex The start index.\n * @param {number} toIndex The end index.\n * @private\n */\n removeTracedCoordinates_(fromIndex, toIndex) {\n if (fromIndex === toIndex) {\n return;\n }\n\n let remove = 0;\n if (fromIndex < toIndex) {\n const start = Math.ceil(fromIndex);\n let end = Math.floor(toIndex);\n if (end === toIndex) {\n end -= 1;\n }\n remove = end - start + 1;\n } else {\n const start = Math.floor(fromIndex);\n let end = Math.ceil(toIndex);\n if (end === toIndex) {\n end += 1;\n }\n remove = start - end + 1;\n }\n\n if (remove > 0) {\n this.removeLastPoints_(remove);\n }\n }\n\n /**\n * @param {TraceTarget} target The trace target.\n * @param {number} fromIndex The start index.\n * @param {number} toIndex The end index.\n * @private\n */\n addTracedCoordinates_(target, fromIndex, toIndex) {\n if (fromIndex === toIndex) {\n return;\n }\n\n const coordinates = [];\n if (fromIndex < toIndex) {\n // forward trace\n const start = Math.ceil(fromIndex);\n let end = Math.floor(toIndex);\n if (end === toIndex) {\n // if end is snapped to a vertex, it will be added later\n end -= 1;\n }\n for (let i = start; i <= end; ++i) {\n coordinates.push(getCoordinate(target.coordinates, i));\n }\n } else {\n // reverse trace\n const start = Math.floor(fromIndex);\n let end = Math.ceil(toIndex);\n if (end === toIndex) {\n end += 1;\n }\n for (let i = start; i >= end; --i) {\n coordinates.push(getCoordinate(target.coordinates, i));\n }\n }\n if (coordinates.length) {\n this.appendCoordinates(coordinates);\n }\n }\n\n /**\n * Update the trace.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n updateTrace_(event) {\n const traceState = this.traceState_;\n if (!traceState.active) {\n return;\n }\n\n if (traceState.targetIndex === -1) {\n // check if we are ready to pick a target\n if ((0,_coordinate_js__WEBPACK_IMPORTED_MODULE_8__.distance)(traceState.startPx, event.pixel) < this.snapTolerance_) {\n return;\n }\n }\n\n const updatedTraceTarget = getTraceTargetUpdate(\n event.coordinate,\n traceState,\n this.getMap(),\n this.snapTolerance_,\n );\n\n if (traceState.targetIndex !== updatedTraceTarget.index) {\n // target changed\n if (traceState.targetIndex !== -1) {\n // remove points added during previous trace\n const oldTarget = traceState.targets[traceState.targetIndex];\n this.removeTracedCoordinates_(oldTarget.startIndex, oldTarget.endIndex);\n }\n // add points for the new target\n const newTarget = traceState.targets[updatedTraceTarget.index];\n this.addTracedCoordinates_(\n newTarget,\n newTarget.startIndex,\n updatedTraceTarget.endIndex,\n );\n } else {\n // target stayed the same\n const target = traceState.targets[traceState.targetIndex];\n this.addOrRemoveTracedCoordinates_(target, updatedTraceTarget.endIndex);\n }\n\n // modify the state with updated info\n traceState.targetIndex = updatedTraceTarget.index;\n const target = traceState.targets[traceState.targetIndex];\n target.endIndex = updatedTraceTarget.endIndex;\n\n // update event coordinate and pixel to match end point of final segment\n const coordinate = interpolateCoordinate(\n target.coordinates,\n target.endIndex,\n );\n const pixel = this.getMap().getPixelFromCoordinate(coordinate);\n event.coordinate = coordinate;\n event.pixel = [Math.round(pixel[0]), Math.round(pixel[1])];\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleUpEvent(event) {\n let pass = true;\n\n if (this.getPointerCount() === 0) {\n if (this.downTimeout_) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n\n this.handlePointerMove_(event);\n const tracing = this.traceState_.active;\n this.toggleTraceState_(event);\n\n if (this.shouldHandle_) {\n const startingToDraw = !this.finishCoordinate_;\n if (startingToDraw) {\n this.startDrawing_(event.coordinate);\n }\n if (!startingToDraw && this.freehand_) {\n this.finishDrawing();\n } else if (\n !this.freehand_ &&\n (!startingToDraw || this.mode_ === 'Point')\n ) {\n if (this.atFinish_(event.pixel, tracing)) {\n if (this.finishCondition_(event)) {\n this.finishDrawing();\n }\n } else {\n this.addToDrawing_(event.coordinate);\n }\n }\n pass = false;\n } else if (this.freehand_) {\n this.abortDrawing();\n }\n }\n\n if (!pass && this.stopClick_) {\n event.preventDefault();\n }\n return pass;\n }\n\n /**\n * Handle move events.\n * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n * @private\n */\n handlePointerMove_(event) {\n this.pointerType_ = event.originalEvent.pointerType;\n if (\n this.downPx_ &&\n ((!this.freehand_ && this.shouldHandle_) ||\n (this.freehand_ && !this.shouldHandle_))\n ) {\n const downPx = this.downPx_;\n const clickPx = event.pixel;\n const dx = downPx[0] - clickPx[0];\n const dy = downPx[1] - clickPx[1];\n const squaredDistance = dx * dx + dy * dy;\n this.shouldHandle_ = this.freehand_\n ? squaredDistance > this.squaredClickTolerance_\n : squaredDistance <= this.squaredClickTolerance_;\n if (!this.shouldHandle_) {\n return;\n }\n }\n\n if (!this.finishCoordinate_) {\n this.createOrUpdateSketchPoint_(event.coordinate.slice());\n return;\n }\n\n this.updateTrace_(event);\n this.modifyDrawing_(event.coordinate);\n }\n\n /**\n * Determine if an event is within the snapping tolerance of the start coord.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @param {boolean} [tracing] Drawing in trace mode (only stop if at the starting point).\n * @return {boolean} The event is within the snapping tolerance of the start.\n * @private\n */\n atFinish_(pixel, tracing) {\n let at = false;\n if (this.sketchFeature_) {\n let potentiallyDone = false;\n let potentiallyFinishCoordinates = [this.finishCoordinate_];\n const mode = this.mode_;\n if (mode === 'Point') {\n at = true;\n } else if (mode === 'Circle') {\n at = this.sketchCoords_.length === 2;\n } else if (mode === 'LineString') {\n potentiallyDone =\n !tracing && this.sketchCoords_.length > this.minPoints_;\n } else if (mode === 'Polygon') {\n const sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n potentiallyDone = sketchCoords[0].length > this.minPoints_;\n potentiallyFinishCoordinates = [\n sketchCoords[0][0],\n sketchCoords[0][sketchCoords[0].length - 2],\n ];\n if (tracing) {\n potentiallyFinishCoordinates = [sketchCoords[0][0]];\n } else {\n potentiallyFinishCoordinates = [\n sketchCoords[0][0],\n sketchCoords[0][sketchCoords[0].length - 2],\n ];\n }\n }\n if (potentiallyDone) {\n const map = this.getMap();\n for (let i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n const finishCoordinate = potentiallyFinishCoordinates[i];\n const finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n const dx = pixel[0] - finishPixel[0];\n const dy = pixel[1] - finishPixel[1];\n const snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n if (at) {\n this.finishCoordinate_ = finishCoordinate;\n break;\n }\n }\n }\n }\n return at;\n }\n\n /**\n * @param {import(\"../coordinate\").Coordinate} coordinates Coordinate.\n * @private\n */\n createOrUpdateSketchPoint_(coordinates) {\n if (!this.sketchPoint_) {\n this.sketchPoint_ = new _Feature_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"](new _geom_Point_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](coordinates));\n this.updateSketchFeatures_();\n } else {\n const sketchPointGeom = this.sketchPoint_.getGeometry();\n sketchPointGeom.setCoordinates(coordinates);\n }\n }\n\n /**\n * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n * @private\n */\n createOrUpdateCustomSketchLine_(geometry) {\n if (!this.sketchLine_) {\n this.sketchLine_ = new _Feature_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]();\n }\n const ring = geometry.getLinearRing(0);\n let sketchLineGeom = this.sketchLine_.getGeometry();\n if (!sketchLineGeom) {\n sketchLineGeom = new _geom_LineString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\n ring.getFlatCoordinates(),\n ring.getLayout(),\n );\n this.sketchLine_.setGeometry(sketchLineGeom);\n } else {\n sketchLineGeom.setFlatCoordinates(\n ring.getLayout(),\n ring.getFlatCoordinates(),\n );\n sketchLineGeom.changed();\n }\n }\n\n /**\n * Start the drawing.\n * @param {import(\"../coordinate.js\").Coordinate} start Start coordinate.\n * @private\n */\n startDrawing_(start) {\n const projection = this.getMap().getView().getProjection();\n const stride = (0,_geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_22__.getStrideForLayout)(this.geometryLayout_);\n while (start.length < stride) {\n start.push(0);\n }\n this.finishCoordinate_ = start;\n if (this.mode_ === 'Point') {\n this.sketchCoords_ = start.slice();\n } else if (this.mode_ === 'Polygon') {\n this.sketchCoords_ = [[start.slice(), start.slice()]];\n this.sketchLineCoords_ = this.sketchCoords_[0];\n } else {\n this.sketchCoords_ = [start.slice(), start.slice()];\n }\n if (this.sketchLineCoords_) {\n this.sketchLine_ = new _Feature_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"](new _geom_LineString_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.sketchLineCoords_));\n }\n const geometry = this.geometryFunction_(\n this.sketchCoords_,\n undefined,\n projection,\n );\n this.sketchFeature_ = new _Feature_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]();\n if (this.geometryName_) {\n this.sketchFeature_.setGeometryName(this.geometryName_);\n }\n this.sketchFeature_.setGeometry(geometry);\n this.updateSketchFeatures_();\n this.dispatchEvent(\n new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_),\n );\n }\n\n /**\n * Modify the drawing.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @private\n */\n modifyDrawing_(coordinate) {\n const map = this.getMap();\n const geometry = this.sketchFeature_.getGeometry();\n const projection = map.getView().getProjection();\n const stride = (0,_geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_22__.getStrideForLayout)(this.geometryLayout_);\n let coordinates, last;\n while (coordinate.length < stride) {\n coordinate.push(0);\n }\n if (this.mode_ === 'Point') {\n last = this.sketchCoords_;\n } else if (this.mode_ === 'Polygon') {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n last = coordinates[coordinates.length - 1];\n if (this.atFinish_(map.getPixelFromCoordinate(coordinate))) {\n // snap to finish\n coordinate = this.finishCoordinate_.slice();\n }\n } else {\n coordinates = this.sketchCoords_;\n last = coordinates[coordinates.length - 1];\n }\n last[0] = coordinate[0];\n last[1] = coordinate[1];\n this.geometryFunction_(\n /** @type {!LineCoordType} */ (this.sketchCoords_),\n geometry,\n projection,\n );\n if (this.sketchPoint_) {\n const sketchPointGeom = this.sketchPoint_.getGeometry();\n sketchPointGeom.setCoordinates(coordinate);\n }\n if (geometry.getType() === 'Polygon' && this.mode_ !== 'Polygon') {\n this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n } else if (this.sketchLineCoords_) {\n const sketchLineGeom = this.sketchLine_.getGeometry();\n sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n }\n this.updateSketchFeatures_();\n }\n\n /**\n * Add a new coordinate to the drawing.\n * @param {!PointCoordType} coordinate Coordinate\n * @return {Feature} The sketch feature.\n * @private\n */\n addToDrawing_(coordinate) {\n const geometry = this.sketchFeature_.getGeometry();\n const projection = this.getMap().getView().getProjection();\n let done;\n let coordinates;\n const mode = this.mode_;\n if (mode === 'LineString' || mode === 'Circle') {\n this.finishCoordinate_ = coordinate.slice();\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n } else {\n done = true;\n }\n }\n coordinates.push(coordinate.slice());\n this.geometryFunction_(coordinates, geometry, projection);\n } else if (mode === 'Polygon') {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n } else {\n done = true;\n }\n }\n coordinates.push(coordinate.slice());\n if (done) {\n this.finishCoordinate_ = coordinates[0];\n }\n this.geometryFunction_(this.sketchCoords_, geometry, projection);\n }\n this.createOrUpdateSketchPoint_(coordinate.slice());\n this.updateSketchFeatures_();\n if (done) {\n return this.finishDrawing();\n }\n return this.sketchFeature_;\n }\n\n /**\n * @param {number} n The number of points to remove.\n */\n removeLastPoints_(n) {\n if (!this.sketchFeature_) {\n return;\n }\n const geometry = this.sketchFeature_.getGeometry();\n const projection = this.getMap().getView().getProjection();\n const mode = this.mode_;\n for (let i = 0; i < n; ++i) {\n let coordinates;\n if (mode === 'LineString' || mode === 'Circle') {\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n coordinates.splice(-2, 1);\n if (coordinates.length >= 2) {\n this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n const finishCoordinate = this.finishCoordinate_.slice();\n coordinates[coordinates.length - 1] = finishCoordinate;\n this.createOrUpdateSketchPoint_(finishCoordinate);\n }\n this.geometryFunction_(coordinates, geometry, projection);\n if (geometry.getType() === 'Polygon' && this.sketchLine_) {\n this.createOrUpdateCustomSketchLine_(\n /** @type {Polygon} */ (geometry),\n );\n }\n } else if (mode === 'Polygon') {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n coordinates.splice(-2, 1);\n const sketchLineGeom = this.sketchLine_.getGeometry();\n if (coordinates.length >= 2) {\n const finishCoordinate = coordinates[coordinates.length - 2].slice();\n coordinates[coordinates.length - 1] = finishCoordinate;\n this.createOrUpdateSketchPoint_(finishCoordinate);\n }\n sketchLineGeom.setCoordinates(coordinates);\n this.geometryFunction_(this.sketchCoords_, geometry, projection);\n }\n\n if (coordinates.length === 1) {\n this.abortDrawing();\n break;\n }\n }\n\n this.updateSketchFeatures_();\n }\n\n /**\n * Remove last point of the feature currently being drawn. Does not do anything when\n * drawing POINT or MULTI_POINT geometries.\n * @api\n */\n removeLastPoint() {\n this.removeLastPoints_(1);\n }\n\n /**\n * Stop drawing and add the sketch feature to the target layer.\n * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n * dispatched before inserting the feature.\n * @return {Feature|null} The drawn feature.\n * @api\n */\n finishDrawing() {\n const sketchFeature = this.abortDrawing_();\n if (!sketchFeature) {\n return null;\n }\n let coordinates = this.sketchCoords_;\n const geometry = sketchFeature.getGeometry();\n const projection = this.getMap().getView().getProjection();\n if (this.mode_ === 'LineString') {\n // remove the redundant last point\n coordinates.pop();\n this.geometryFunction_(coordinates, geometry, projection);\n } else if (this.mode_ === 'Polygon') {\n // remove the redundant last point in ring\n /** @type {PolyCoordType} */ (coordinates)[0].pop();\n this.geometryFunction_(coordinates, geometry, projection);\n coordinates = geometry.getCoordinates();\n }\n\n // cast multi-part geometries\n if (this.type_ === 'MultiPoint') {\n sketchFeature.setGeometry(\n new _geom_MultiPoint_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]([/** @type {PointCoordType} */ (coordinates)]),\n );\n } else if (this.type_ === 'MultiLineString') {\n sketchFeature.setGeometry(\n new _geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]([/** @type {LineCoordType} */ (coordinates)]),\n );\n } else if (this.type_ === 'MultiPolygon') {\n sketchFeature.setGeometry(\n new _geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]([/** @type {PolyCoordType} */ (coordinates)]),\n );\n }\n\n // First dispatch event to allow full set up of feature\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n\n // Then insert feature\n if (this.features_) {\n this.features_.push(sketchFeature);\n }\n if (this.source_) {\n this.source_.addFeature(sketchFeature);\n }\n return sketchFeature;\n }\n\n /**\n * Stop drawing without adding the sketch feature to the target layer.\n * @return {Feature|null} The sketch feature (or null if none).\n * @private\n */\n abortDrawing_() {\n this.finishCoordinate_ = null;\n const sketchFeature = this.sketchFeature_;\n this.sketchFeature_ = null;\n this.sketchPoint_ = null;\n this.sketchLine_ = null;\n this.overlay_.getSource().clear(true);\n this.deactivateTrace_();\n return sketchFeature;\n }\n\n /**\n * Stop drawing without adding the sketch feature to the target layer.\n * @api\n */\n abortDrawing() {\n const sketchFeature = this.abortDrawing_();\n if (sketchFeature) {\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n }\n }\n\n /**\n * Append coordinates to the end of the geometry that is currently being drawn.\n * This can be used when drawing LineStrings or Polygons. Coordinates will\n * either be appended to the current LineString or the outer ring of the current\n * Polygon. If no geometry is being drawn, a new one will be created.\n * @param {!LineCoordType} coordinates Linear coordinates to be appended to\n * the coordinate array.\n * @api\n */\n appendCoordinates(coordinates) {\n const mode = this.mode_;\n const newDrawing = !this.sketchFeature_;\n if (newDrawing) {\n this.startDrawing_(coordinates[0]);\n }\n /** @type {LineCoordType} */\n let sketchCoords;\n if (mode === 'LineString' || mode === 'Circle') {\n sketchCoords = /** @type {LineCoordType} */ (this.sketchCoords_);\n } else if (mode === 'Polygon') {\n sketchCoords =\n this.sketchCoords_ && this.sketchCoords_.length\n ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n : [];\n } else {\n return;\n }\n\n if (newDrawing) {\n sketchCoords.shift();\n }\n\n // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n sketchCoords.pop();\n\n // Append coordinate list\n for (let i = 0; i < coordinates.length; i++) {\n this.addToDrawing_(coordinates[i]);\n }\n\n const ending = coordinates[coordinates.length - 1];\n // Duplicate last coordinate for sketch drawing (cursor position)\n this.sketchFeature_ = this.addToDrawing_(ending);\n this.modifyDrawing_(ending);\n }\n\n /**\n * Initiate draw mode by starting from an existing geometry which will\n * receive new additional points. This only works on features with\n * `LineString` geometries, where the interaction will extend lines by adding\n * points to the end of the coordinates array.\n * This will change the original feature, instead of drawing a copy.\n *\n * The function will dispatch a `drawstart` event.\n *\n * @param {!Feature} feature Feature to be extended.\n * @api\n */\n extend(feature) {\n const geometry = feature.getGeometry();\n const lineString = geometry;\n this.sketchFeature_ = feature;\n this.sketchCoords_ = lineString.getCoordinates();\n const last = this.sketchCoords_[this.sketchCoords_.length - 1];\n this.finishCoordinate_ = last.slice();\n this.sketchCoords_.push(last.slice());\n this.sketchPoint_ = new _Feature_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"](new _geom_Point_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](last));\n this.updateSketchFeatures_();\n this.dispatchEvent(\n new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_),\n );\n }\n\n /**\n * Redraw the sketch features.\n * @private\n */\n updateSketchFeatures_() {\n const sketchFeatures = [];\n if (this.sketchFeature_) {\n sketchFeatures.push(this.sketchFeature_);\n }\n if (this.sketchLine_) {\n sketchFeatures.push(this.sketchLine_);\n }\n if (this.sketchPoint_) {\n sketchFeatures.push(this.sketchPoint_);\n }\n const overlaySource = this.overlay_.getSource();\n overlaySource.clear(true);\n overlaySource.addFeatures(sketchFeatures);\n }\n\n /**\n * @private\n */\n updateState_() {\n const map = this.getMap();\n const active = this.getActive();\n if (!map || !active) {\n this.abortDrawing();\n }\n this.overlay_.setMap(active ? map : null);\n }\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n const styles = (0,_style_Style_js__WEBPACK_IMPORTED_MODULE_24__.createEditingStyle)();\n return function (feature, resolution) {\n return styles[feature.getGeometry().getType()];\n };\n}\n\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of a\n * {@link import(\"../geom/Circle.js\").Circle} geometry.\n * @param {number} [sides] Number of sides of the regular polygon.\n * Default is 32.\n * @param {number} [angle] Angle of the first point in counter-clockwise\n * radians. 0 means East.\n * Default is the angle defined by the heading from the center of the\n * regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a polygon.\n * @api\n */\nfunction createRegularPolygon(sides, angle) {\n return function (coordinates, geometry, projection) {\n const center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(\n /** @type {LineCoordType} */ (coordinates)[0],\n projection,\n );\n const end = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(\n /** @type {LineCoordType} */ (coordinates)[coordinates.length - 1],\n projection,\n );\n const radius = Math.sqrt((0,_coordinate_js__WEBPACK_IMPORTED_MODULE_8__.squaredDistance)(center, end));\n geometry = geometry || (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_5__.fromCircle)(new _geom_Circle_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"](center), sides);\n\n let internalAngle = angle;\n if (!angle && angle !== 0) {\n const x = end[0] - center[0];\n const y = end[1] - center[1];\n internalAngle = Math.atan2(y, x);\n }\n (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_5__.makeRegular)(\n /** @type {Polygon} */ (geometry),\n center,\n radius,\n internalAngle,\n );\n\n const userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();\n if (userProjection) {\n geometry.transform(projection, userProjection);\n }\n return geometry;\n };\n}\n\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes). Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nfunction createBox() {\n return function (coordinates, geometry, projection) {\n const extent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.boundingExtent)(\n /** @type {LineCoordType} */ ([\n coordinates[0],\n coordinates[coordinates.length - 1],\n ]).map(function (coordinate) {\n return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(coordinate, projection);\n }),\n );\n const boxCoordinates = [\n [\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getBottomLeft)(extent),\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getBottomRight)(extent),\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getTopRight)(extent),\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getTopLeft)(extent),\n (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getBottomLeft)(extent),\n ],\n ];\n if (geometry) {\n geometry.setCoordinates(boxCoordinates);\n } else {\n geometry = new _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"](boxCoordinates);\n }\n const userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();\n if (userProjection) {\n geometry.transform(projection, userProjection);\n }\n return geometry;\n };\n}\n\n/**\n * Get the drawing mode. The mode for multi-part geometries is the same as for\n * their single-part cousins.\n * @param {import(\"../geom/Geometry.js\").Type} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n switch (type) {\n case 'Point':\n case 'MultiPoint':\n return 'Point';\n case 'LineString':\n case 'MultiLineString':\n return 'LineString';\n case 'Polygon':\n case 'MultiPolygon':\n return 'Polygon';\n case 'Circle':\n return 'Circle';\n default:\n throw new Error('Invalid type: ' + type);\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Draw);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/Draw.js?"); /***/ }), /***/ "./node_modules/ol/interaction/Interaction.js": /*!****************************************************!*\ !*** ./node_modules/ol/interaction/Interaction.js ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ pan: () => (/* binding */ pan),\n/* harmony export */ zoomByDelta: () => (/* binding */ zoomByDelta)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Property.js */ \"./node_modules/ol/interaction/Property.js\");\n/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../easing.js */ \"./node_modules/ol/easing.js\");\n/**\n * @module ol/interaction/Interaction\n */\n\n\n\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} InteractionOnSignature\n */\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nclass Interaction extends _Object_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {InteractionOptions} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {InteractionOnSignature}\n */\n this.on;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.once;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.un;\n\n if (options && options.handleEvent) {\n this.handleEvent = options.handleEvent;\n }\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n this.setActive(true);\n }\n\n /**\n * Return whether the interaction is currently active.\n * @return {boolean} `true` if the interaction is active, `false` otherwise.\n * @observable\n * @api\n */\n getActive() {\n return /** @type {boolean} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ACTIVE));\n }\n\n /**\n * Get the map associated with this interaction.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event}.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n return true;\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ACTIVE, active);\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n this.map_ = map;\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number} [duration] Duration.\n */\nfunction pan(view, delta, duration) {\n const currentCenter = view.getCenterInternal();\n if (currentCenter) {\n const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n view.animateInternal({\n duration: duration !== undefined ? duration : 250,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.linear,\n center: view.getConstrainedCenter(center),\n });\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] Anchor coordinate in the user projection.\n * @param {number} [duration] Duration.\n */\nfunction zoomByDelta(view, delta, anchor, duration) {\n const currentZoom = view.getZoom();\n\n if (currentZoom === undefined) {\n return;\n }\n\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n const newResolution = view.getResolutionForZoom(newZoom);\n\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n anchor: anchor,\n duration: duration !== undefined ? duration : 250,\n easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.easeOut,\n });\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Interaction);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/Interaction.js?"); /***/ }), /***/ "./node_modules/ol/interaction/KeyboardPan.js": /*!****************************************************!*\ !*** ./node_modules/ol/interaction/KeyboardPan.js ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction.js */ \"./node_modules/ol/interaction/Interaction.js\");\n/* harmony import */ var _events_Key_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../events/Key.js */ \"./node_modules/ol/events/Key.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../coordinate.js */ \"./node_modules/ol/coordinate.js\");\n/**\n * @module ol/interaction/KeyboardPan\n */\n\n\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.noModifierKeys} and\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nclass KeyboardPan extends _Interaction_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /**\n * @private\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n * @return {boolean} Combined condition result.\n */\n this.defaultCondition_ = function (mapBrowserEvent) {\n return (\n (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.noModifierKeys)(mapBrowserEvent) && (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.targetNotEditable)(mapBrowserEvent)\n );\n };\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ =\n options.condition !== undefined\n ? options.condition\n : this.defaultCondition_;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelDelta_ =\n options.pixelDelta !== undefined ? options.pixelDelta : 128;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n * pressed).\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @override\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].KEYDOWN) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const key = keyEvent.key;\n if (\n this.condition_(mapBrowserEvent) &&\n (key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].DOWN ||\n key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].LEFT ||\n key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].RIGHT ||\n key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].UP)\n ) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n let deltaX = 0,\n deltaY = 0;\n if (key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].DOWN) {\n deltaY = -mapUnitsDelta;\n } else if (key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (key == _events_Key_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n const delta = [deltaX, deltaY];\n (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_4__.rotate)(delta, view.getRotation());\n (0,_Interaction_js__WEBPACK_IMPORTED_MODULE_0__.pan)(view, delta, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (KeyboardPan);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/KeyboardPan.js?"); /***/ }), /***/ "./node_modules/ol/interaction/KeyboardZoom.js": /*!*****************************************************!*\ !*** ./node_modules/ol/interaction/KeyboardZoom.js ***! \*****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction.js */ \"./node_modules/ol/interaction/Interaction.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/**\n * @module ol/interaction/KeyboardZoom\n */\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. The default condition is\n * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that\n * the platform modifier key isn't pressed\n * (!{@link module:ol/events/condition.platformModifierKey}).\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nclass KeyboardZoom extends _Interaction_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition\n ? options.condition\n : function (mapBrowserEvent) {\n return (\n !(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.platformModifierKey)(mapBrowserEvent) &&\n (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.targetNotEditable)(mapBrowserEvent)\n );\n };\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n * key pressed was '+' or '-').\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @override\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (\n mapBrowserEvent.type == _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].KEYDOWN ||\n mapBrowserEvent.type == _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].KEYPRESS\n ) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const key = keyEvent.key;\n if (this.condition_(mapBrowserEvent) && (key === '+' || key === '-')) {\n const map = mapBrowserEvent.map;\n const delta = key === '+' ? this.delta_ : -this.delta_;\n const view = map.getView();\n (0,_Interaction_js__WEBPACK_IMPORTED_MODULE_0__.zoomByDelta)(view, delta, undefined, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (KeyboardZoom);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/KeyboardZoom.js?"); /***/ }), /***/ "./node_modules/ol/interaction/MouseWheelZoom.js": /*!*******************************************************!*\ !*** ./node_modules/ol/interaction/MouseWheelZoom.js ***! \*******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ \"./node_modules/ol/events/EventType.js\");\n/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction.js */ \"./node_modules/ol/interaction/Interaction.js\");\n/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../has.js */ \"./node_modules/ol/has.js\");\n/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/condition.js */ \"./node_modules/ol/events/condition.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/interaction/MouseWheelZoom\n */\n\n\n\n\n\n\n/**\n * @typedef {'trackpad' | 'wheel'} Mode\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nclass MouseWheelZoom extends _Interaction_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options),\n );\n\n /**\n * @private\n * @type {number}\n */\n this.totalDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.lastDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @private\n * @type {number}\n */\n this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useAnchor_ =\n options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ =\n options.constrainResolution !== undefined\n ? options.constrainResolution\n : false;\n\n const condition = options.condition ? options.condition : _events_condition_js__WEBPACK_IMPORTED_MODULE_1__.always;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? (0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.all)(_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {?import(\"../pixel.js\").Pixel}\n */\n this.lastAnchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.startTime_ = undefined;\n\n /**\n * @private\n * @type {ReturnType}\n */\n this.timeoutId_;\n\n /**\n * @private\n * @type {Mode|undefined}\n */\n this.mode_ = undefined;\n\n /**\n * Trackpad events separated by this delay will be considered separate\n * interactions.\n * @private\n * @type {number}\n */\n this.trackpadEventGap_ = 400;\n\n /**\n * @private\n * @type {ReturnType}\n */\n this.trackpadTimeoutId_;\n\n /**\n * The number of delta values per zoom level\n * @private\n * @type {number}\n */\n this.deltaPerZoom_ = 300;\n }\n\n /**\n * @private\n */\n endInteraction_() {\n this.trackpadTimeoutId_ = undefined;\n const map = this.getMap();\n if (!map) {\n return;\n }\n const view = map.getView();\n view.endInteraction(\n undefined,\n this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0,\n this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,\n );\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n * zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @override\n */\n handleEvent(mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n const type = mapBrowserEvent.type;\n if (type !== _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].WHEEL) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const wheelEvent = /** @type {WheelEvent} */ (\n mapBrowserEvent.originalEvent\n );\n wheelEvent.preventDefault();\n\n if (this.useAnchor_) {\n this.lastAnchor_ = mapBrowserEvent.pixel;\n }\n\n // Delta normalisation inspired by\n // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n let delta;\n if (mapBrowserEvent.type == _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].WHEEL) {\n delta = wheelEvent.deltaY;\n if (_has_js__WEBPACK_IMPORTED_MODULE_3__.FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n delta /= _has_js__WEBPACK_IMPORTED_MODULE_3__.DEVICE_PIXEL_RATIO;\n }\n if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n delta *= 40;\n }\n }\n\n if (delta === 0) {\n return false;\n }\n this.lastDelta_ = delta;\n\n const now = Date.now();\n\n if (this.startTime_ === undefined) {\n this.startTime_ = now;\n }\n\n if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n this.mode_ = Math.abs(delta) < 4 ? 'trackpad' : 'wheel';\n }\n\n const view = map.getView();\n if (\n this.mode_ === 'trackpad' &&\n !(view.getConstrainResolution() || this.constrainResolution_)\n ) {\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.beginInteraction();\n }\n this.trackpadTimeoutId_ = setTimeout(\n this.endInteraction_.bind(this),\n this.timeout_,\n );\n view.adjustZoom(\n -delta / this.deltaPerZoom_,\n this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,\n );\n this.startTime_ = now;\n return false;\n }\n\n this.totalDelta_ += delta;\n\n const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(\n this.handleWheelZoom_.bind(this, map),\n timeLeft,\n );\n\n return false;\n }\n\n /**\n * @private\n * @param {import(\"../Map.js\").default} map Map.\n */\n handleWheelZoom_(map) {\n const view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n let delta =\n -(0,_math_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(\n this.totalDelta_,\n -this.maxDelta_ * this.deltaPerZoom_,\n this.maxDelta_ * this.deltaPerZoom_,\n ) / this.deltaPerZoom_;\n if (view.getConstrainResolution() || this.constrainResolution_) {\n // view has a zoom constraint, zoom by 1\n delta = delta ? (delta > 0 ? 1 : -1) : 0;\n }\n (0,_Interaction_js__WEBPACK_IMPORTED_MODULE_0__.zoomByDelta)(\n view,\n delta,\n this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,\n this.duration_,\n );\n\n this.mode_ = undefined;\n this.totalDelta_ = 0;\n this.lastAnchor_ = null;\n this.startTime_ = undefined;\n this.timeoutId_ = undefined;\n }\n\n /**\n * Enable or disable using the mouse's location as an anchor when zooming\n * @param {boolean} useAnchor true to zoom to the mouse's location, false\n * to zoom to the center of the map\n * @api\n */\n setMouseAnchor(useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MouseWheelZoom);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/MouseWheelZoom.js?"); /***/ }), /***/ "./node_modules/ol/interaction/PinchRotate.js": /*!****************************************************!*\ !*** ./node_modules/ol/interaction/PinchRotate.js ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pointer.js */ \"./node_modules/ol/interaction/Pointer.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/* harmony import */ var _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rotationconstraint.js */ \"./node_modules/ol/rotationconstraint.js\");\n/**\n * @module ol/interaction/PinchRotate\n */\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchRotate extends _Pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = _functions_js__WEBPACK_IMPORTED_MODULE_1__.FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotating_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.rotationDelta_ = 0.0;\n\n /**\n * @private\n * @type {number}\n */\n this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @override\n */\n handleDragEvent(mapBrowserEvent) {\n let rotationDelta = 0.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n\n // angle between touches\n const angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX,\n );\n\n if (this.lastAngle_ !== undefined) {\n const delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_2__.disable) {\n return;\n }\n\n // rotate anchor point.\n // FIXME: should be the intersection point between the lines:\n // touch0,touch1 and previousTouch0,previousTouch1\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel((0,_Pointer_js__WEBPACK_IMPORTED_MODULE_0__.centroid)(this.targetPointers)),\n );\n\n // rotate\n if (this.rotating_) {\n map.render();\n view.adjustRotationInternal(rotationDelta, this.anchor_);\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastAngle_ = undefined;\n this.rotating_ = false;\n this.rotationDelta_ = 0.0;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PinchRotate);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/PinchRotate.js?"); /***/ }), /***/ "./node_modules/ol/interaction/PinchZoom.js": /*!**************************************************!*\ !*** ./node_modules/ol/interaction/PinchZoom.js ***! \**************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pointer.js */ \"./node_modules/ol/interaction/Pointer.js\");\n/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../functions.js */ \"./node_modules/ol/functions.js\");\n/**\n * @module ol/interaction/PinchZoom\n */\n\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchZoom extends _Pointer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = _functions_js__WEBPACK_IMPORTED_MODULE_1__.FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastDistance_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 1;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @override\n */\n handleDragEvent(mapBrowserEvent) {\n let scaleDelta = 1.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n const dx = touch0.clientX - touch1.clientX;\n const dy = touch0.clientY - touch1.clientY;\n\n // distance between touches\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (this.lastDistance_ !== undefined) {\n scaleDelta = this.lastDistance_ / distance;\n }\n this.lastDistance_ = distance;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\n\n // scale anchor point.\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel((0,_Pointer_js__WEBPACK_IMPORTED_MODULE_0__.centroid)(this.targetPointers)),\n );\n\n // scale, bypass the resolution constraint\n map.render();\n view.adjustResolutionInternal(scaleDelta, this.anchor_);\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n view.endInteraction(this.duration_, direction);\n return false;\n }\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @override\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastDistance_ = undefined;\n this.lastScaleDelta_ = 1;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PinchZoom);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/PinchZoom.js?"); /***/ }), /***/ "./node_modules/ol/interaction/Pointer.js": /*!************************************************!*\ !*** ./node_modules/ol/interaction/Pointer.js ***! \************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ centroid: () => (/* binding */ centroid),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction.js */ \"./node_modules/ol/interaction/Interaction.js\");\n/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../MapBrowserEventType.js */ \"./node_modules/ol/MapBrowserEventType.js\");\n/**\n * @module ol/interaction/Pointer\n */\n\n\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n * Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nclass PointerInteraction extends _Interaction_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options),\n );\n\n if (options.handleDownEvent) {\n this.handleDownEvent = options.handleDownEvent;\n }\n\n if (options.handleDragEvent) {\n this.handleDragEvent = options.handleDragEvent;\n }\n\n if (options.handleMoveEvent) {\n this.handleMoveEvent = options.handleMoveEvent;\n }\n\n if (options.handleUpEvent) {\n this.handleUpEvent = options.handleUpEvent;\n }\n\n if (options.stopDown) {\n this.stopDown = options.stopDown;\n }\n\n /**\n * @type {boolean}\n * @protected\n */\n this.handlingDownUpSequence = false;\n\n /**\n * @type {Array}\n * @protected\n */\n this.targetPointers = [];\n }\n\n /**\n * Returns the current number of pointers involved in the interaction,\n * e.g. `2` when two fingers are used.\n * @return {number} The number of pointers.\n * @api\n */\n getPointerCount() {\n return this.targetPointers.length;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleDownEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleDragEvent(mapBrowserEvent) {}\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into\n * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n * detected.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n * @override\n */\n handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent) {\n return true;\n }\n\n let stopEvent = false;\n this.updateTrackedPointers_(mapBrowserEvent);\n if (this.handlingDownUpSequence) {\n if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].POINTERDRAG) {\n this.handleDragEvent(mapBrowserEvent);\n // prevent page scrolling during dragging\n mapBrowserEvent.originalEvent.preventDefault();\n } else if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].POINTERUP) {\n const handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence =\n handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].POINTERDOWN) {\n const handled = this.handleDownEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handled;\n stopEvent = this.stopDown(handled);\n } else if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].POINTERMOVE) {\n this.handleMoveEvent(mapBrowserEvent);\n }\n }\n return !stopEvent;\n }\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleMoveEvent(mapBrowserEvent) {}\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleUpEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * This function is used to determine if \"down\" events should be propagated\n * to other interactions or should be stopped.\n * @param {boolean} handled Was the event handled by the interaction?\n * @return {boolean} Should the `down` event be stopped?\n */\n stopDown(handled) {\n return handled;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n updateTrackedPointers_(mapBrowserEvent) {\n if (mapBrowserEvent.activePointers) {\n this.targetPointers = mapBrowserEvent.activePointers;\n }\n }\n}\n\n/**\n * @param {Array} pointerEvents List of events.\n * @return {{clientX: number, clientY: number}} Centroid pixel.\n */\nfunction centroid(pointerEvents) {\n const length = pointerEvents.length;\n let clientX = 0;\n let clientY = 0;\n for (let i = 0; i < length; i++) {\n clientX += pointerEvents[i].clientX;\n clientY += pointerEvents[i].clientY;\n }\n return {clientX: clientX / length, clientY: clientY / length};\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PointerInteraction);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/Pointer.js?"); /***/ }), /***/ "./node_modules/ol/interaction/Property.js": /*!*************************************************!*\ !*** ./node_modules/ol/interaction/Property.js ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n ACTIVE: 'active',\n});\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/Property.js?"); /***/ }), /***/ "./node_modules/ol/interaction/defaults.js": /*!*************************************************!*\ !*** ./node_modules/ol/interaction/defaults.js ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ defaults: () => (/* binding */ defaults)\n/* harmony export */ });\n/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Collection.js */ \"./node_modules/ol/Collection.js\");\n/* harmony import */ var _DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DoubleClickZoom.js */ \"./node_modules/ol/interaction/DoubleClickZoom.js\");\n/* harmony import */ var _DragPan_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DragPan.js */ \"./node_modules/ol/interaction/DragPan.js\");\n/* harmony import */ var _DragRotate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DragRotate.js */ \"./node_modules/ol/interaction/DragRotate.js\");\n/* harmony import */ var _DragZoom_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DragZoom.js */ \"./node_modules/ol/interaction/DragZoom.js\");\n/* harmony import */ var _KeyboardPan_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./KeyboardPan.js */ \"./node_modules/ol/interaction/KeyboardPan.js\");\n/* harmony import */ var _KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./KeyboardZoom.js */ \"./node_modules/ol/interaction/KeyboardZoom.js\");\n/* harmony import */ var _Kinetic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Kinetic.js */ \"./node_modules/ol/Kinetic.js\");\n/* harmony import */ var _MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MouseWheelZoom.js */ \"./node_modules/ol/interaction/MouseWheelZoom.js\");\n/* harmony import */ var _PinchRotate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PinchRotate.js */ \"./node_modules/ol/interaction/PinchRotate.js\");\n/* harmony import */ var _PinchZoom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PinchZoom.js */ \"./node_modules/ol/interaction/PinchZoom.js\");\n/**\n * @module ol/interaction/defaults\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed. If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction~Interaction} instances and insert\n * them into a {@link module:ol/Collection~Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions} [options] Defaults options.\n * @return {Collection}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nfunction defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const interactions = new _Collection_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\n const kinetic = new _Kinetic_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](-0.005, 0.05, 100);\n\n const altShiftDragRotate =\n options.altShiftDragRotate !== undefined\n ? options.altShiftDragRotate\n : true;\n if (altShiftDragRotate) {\n interactions.push(new _DragRotate_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]());\n }\n\n const doubleClickZoom =\n options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(\n new _DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n }),\n );\n }\n\n const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(\n new _DragPan_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n onFocusOnly: options.onFocusOnly,\n kinetic: kinetic,\n }),\n );\n }\n\n const pinchRotate =\n options.pinchRotate !== undefined ? options.pinchRotate : true;\n if (pinchRotate) {\n interactions.push(new _PinchRotate_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]());\n }\n\n const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(\n new _PinchZoom_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n duration: options.zoomDuration,\n }),\n );\n }\n\n const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n if (keyboard) {\n interactions.push(new _KeyboardPan_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]());\n interactions.push(\n new _KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n }),\n );\n }\n\n const mouseWheelZoom =\n options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(\n new _MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]({\n onFocusOnly: options.onFocusOnly,\n duration: options.zoomDuration,\n }),\n );\n }\n\n const shiftDragZoom =\n options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(\n new _DragZoom_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]({\n duration: options.zoomDuration,\n }),\n );\n }\n\n return interactions;\n}\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/interaction/defaults.js?"); /***/ }), /***/ "./node_modules/ol/layer.js": /*!**********************************!*\ !*** ./node_modules/ol/layer.js ***! \**********************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Graticule: () => (/* reexport safe */ _layer_Graticule_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ Group: () => (/* reexport safe */ _layer_Group_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ Heatmap: () => (/* reexport safe */ _layer_Heatmap_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ Image: () => (/* reexport safe */ _layer_Image_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ Layer: () => (/* reexport safe */ _layer_Layer_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n/* harmony export */ Tile: () => (/* reexport safe */ _layer_Tile_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]),\n/* harmony export */ Vector: () => (/* reexport safe */ _layer_Vector_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]),\n/* harmony export */ VectorImage: () => (/* reexport safe */ _layer_VectorImage_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]),\n/* harmony export */ VectorTile: () => (/* reexport safe */ _layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]),\n/* harmony export */ WebGLPoints: () => (/* reexport safe */ _layer_WebGLPoints_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ WebGLTile: () => (/* reexport safe */ _layer_WebGLTile_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]),\n/* harmony export */ WebGLVector: () => (/* reexport safe */ _layer_WebGLVector_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var _layer_Graticule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layer/Graticule.js */ \"./node_modules/ol/layer/Graticule.js\");\n/* harmony import */ var _layer_Group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layer/Group.js */ \"./node_modules/ol/layer/Group.js\");\n/* harmony import */ var _layer_Heatmap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layer/Heatmap.js */ \"./node_modules/ol/layer/Heatmap.js\");\n/* harmony import */ var _layer_Image_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer/Image.js */ \"./node_modules/ol/layer/Image.js\");\n/* harmony import */ var _layer_Layer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./layer/Layer.js */ \"./node_modules/ol/layer/Layer.js\");\n/* harmony import */ var _layer_Tile_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./layer/Tile.js */ \"./node_modules/ol/layer/Tile.js\");\n/* harmony import */ var _layer_Vector_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./layer/Vector.js */ \"./node_modules/ol/layer/Vector.js\");\n/* harmony import */ var _layer_VectorImage_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./layer/VectorImage.js */ \"./node_modules/ol/layer/VectorImage.js\");\n/* harmony import */ var _layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./layer/VectorTile.js */ \"./node_modules/ol/layer/VectorTile.js\");\n/* harmony import */ var _layer_WebGLPoints_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./layer/WebGLPoints.js */ \"./node_modules/ol/layer/WebGLPoints.js\");\n/* harmony import */ var _layer_WebGLTile_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./layer/WebGLTile.js */ \"./node_modules/ol/layer/WebGLTile.js\");\n/* harmony import */ var _layer_WebGLVector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./layer/WebGLVector.js */ \"./node_modules/ol/layer/WebGLVector.js\");\n/**\n * @module ol/layer\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/layer.js?"); /***/ }), /***/ "./node_modules/ol/layer/Base.js": /*!***************************************!*\ !*** ./node_modules/ol/layer/Base.js ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Object.js */ \"./node_modules/ol/Object.js\");\n/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Property.js */ \"./node_modules/ol/layer/Property.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util.js */ \"./node_modules/ol/util.js\");\n/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../asserts.js */ \"./node_modules/ol/asserts.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../math.js */ \"./node_modules/ol/math.js\");\n/**\n * @module ol/layer/Base\n */\n\n\n\n\n\n\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseLayerOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number | undefined} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nclass BaseLayer extends _Object_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.un;\n\n /**\n * @type {BackgroundColor|false}\n * @private\n */\n this.background_ = options.background;\n\n /**\n * @type {Object}\n */\n const properties = Object.assign({}, options);\n if (typeof options.properties === 'object') {\n delete properties.properties;\n Object.assign(properties, options.properties);\n }\n\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_2__.assert)(\n typeof properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].OPACITY] === 'number',\n 'Layer opacity must be a number',\n );\n\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].VISIBLE] =\n options.visible !== undefined ? options.visible : true;\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].Z_INDEX] = options.zIndex;\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MAX_RESOLUTION] =\n options.maxResolution !== undefined ? options.maxResolution : Infinity;\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MIN_RESOLUTION] =\n options.minResolution !== undefined ? options.minResolution : 0;\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MIN_ZOOM] =\n options.minZoom !== undefined ? options.minZoom : -Infinity;\n properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MAX_ZOOM] =\n options.maxZoom !== undefined ? options.maxZoom : Infinity;\n\n /**\n * @type {string}\n * @private\n */\n this.className_ =\n properties.className !== undefined ? properties.className : 'ol-layer';\n delete properties.className;\n\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n }\n\n /**\n * Get the background for this layer.\n * @return {BackgroundColor|false} Layer background.\n */\n getBackground() {\n return this.background_;\n }\n\n /**\n * @return {string} CSS class name.\n */\n getClassName() {\n return this.className_;\n }\n\n /**\n * This method is not meant to be called by layers or layer renderers because the state\n * is incorrect if the layer is included in a layer group.\n *\n * @param {boolean} [managed] Layer is managed.\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n getLayerState(managed) {\n /** @type {import(\"./Layer.js\").State} */\n const state =\n this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: managed === undefined ? true : managed,\n });\n const zIndex = this.getZIndex();\n state.opacity = (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.clamp)(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n state.minZoom = this.getMinZoom();\n state.maxZoom = this.getMaxZoom();\n this.state_ = state;\n\n return state;\n }\n\n /**\n * @abstract\n * @param {Array} [array] Array of layers (to be\n * modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)();\n }\n\n /**\n * @abstract\n * @param {Array} [states] Optional list of layer\n * states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(states) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)();\n }\n\n /**\n * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n * will be visible regardless of extent.\n * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n * @observable\n * @api\n */\n getExtent() {\n return /** @type {import(\"../extent.js\").Extent|undefined} */ (\n this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].EXTENT)\n );\n }\n\n /**\n * Return the maximum resolution of the layer. Returns Infinity if\n * the layer has no maximum resolution set.\n * @return {number} The maximum resolution of the layer.\n * @observable\n * @api\n */\n getMaxResolution() {\n return /** @type {number} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MAX_RESOLUTION));\n }\n\n /**\n * Return the minimum resolution of the layer. Returns 0 if\n * the layer has no minimum resolution set.\n * @return {number} The minimum resolution of the layer.\n * @observable\n * @api\n */\n getMinResolution() {\n return /** @type {number} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MIN_RESOLUTION));\n }\n\n /**\n * Return the minimum zoom level of the layer. Returns -Infinity if\n * the layer has no minimum zoom set.\n * @return {number} The minimum zoom level of the layer.\n * @observable\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MIN_ZOOM));\n }\n\n /**\n * Return the maximum zoom level of the layer. Returns Infinity if\n * the layer has no maximum zoom set.\n * @return {number} The maximum zoom level of the layer.\n * @observable\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MAX_ZOOM));\n }\n\n /**\n * Return the opacity of the layer (between 0 and 1).\n * @return {number} The opacity of the layer.\n * @observable\n * @api\n */\n getOpacity() {\n return /** @type {number} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].OPACITY));\n }\n\n /**\n * @abstract\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n getSourceState() {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)();\n }\n\n /**\n * Return the value of this layer's `visible` property. To find out whether the layer\n * is visible on a map, use `isVisible()` instead.\n * @return {boolean} The value of the `visible` property of the layer.\n * @observable\n * @api\n */\n getVisible() {\n return /** @type {boolean} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].VISIBLE));\n }\n\n /**\n * Return the Z-index of the layer, which is used to order layers before\n * rendering. Returns undefined if the layer is unmanaged.\n * @return {number|undefined} The Z-index of the layer.\n * @observable\n * @api\n */\n getZIndex() {\n return /** @type {number|undefined} */ (this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].Z_INDEX));\n }\n\n /**\n * Sets the background color.\n * @param {BackgroundColor} [background] Background color.\n */\n setBackground(background) {\n this.background_ = background;\n this.changed();\n }\n\n /**\n * Set the extent at which the layer is visible. If `undefined`, the layer\n * will be visible at all extents.\n * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n * @observable\n * @api\n */\n setExtent(extent) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].EXTENT, extent);\n }\n\n /**\n * Set the maximum resolution at which the layer is visible.\n * @param {number} maxResolution The maximum resolution of the layer.\n * @observable\n * @api\n */\n setMaxResolution(maxResolution) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MAX_RESOLUTION, maxResolution);\n }\n\n /**\n * Set the minimum resolution at which the layer is visible.\n * @param {number} minResolution The minimum resolution of the layer.\n * @observable\n * @api\n */\n setMinResolution(minResolution) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MIN_RESOLUTION, minResolution);\n }\n\n /**\n * Set the maximum zoom (exclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} maxZoom The maximum zoom of the layer.\n * @observable\n * @api\n */\n setMaxZoom(maxZoom) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MAX_ZOOM, maxZoom);\n }\n\n /**\n * Set the minimum zoom (inclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} minZoom The minimum zoom of the layer.\n * @observable\n * @api\n */\n setMinZoom(minZoom) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MIN_ZOOM, minZoom);\n }\n\n /**\n * Set the opacity of the layer, allowed values range from 0 to 1.\n * @param {number} opacity The opacity of the layer.\n * @observable\n * @api\n */\n setOpacity(opacity) {\n (0,_asserts_js__WEBPACK_IMPORTED_MODULE_2__.assert)(typeof opacity === 'number', 'Layer opacity must be a number');\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].OPACITY, opacity);\n }\n\n /**\n * Set the visibility of the layer (`true` or `false`).\n * @param {boolean} visible The visibility of the layer.\n * @observable\n * @api\n */\n setVisible(visible) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].VISIBLE, visible);\n }\n\n /**\n * Set Z-index of the layer, which is used to order layers before rendering.\n * The default Z-index is 0.\n * @param {number} zindex The z-index of the layer.\n * @observable\n * @api\n */\n setZIndex(zindex) {\n this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].Z_INDEX, zindex);\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n if (this.state_) {\n this.state_.layer = null;\n this.state_ = null;\n }\n super.disposeInternal();\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseLayer);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/layer/Base.js?"); /***/ }), /***/ "./node_modules/ol/layer/BaseImage.js": /*!********************************************!*\ !*** ./node_modules/ol/layer/BaseImage.js ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Layer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Layer.js */ \"./node_modules/ol/layer/Layer.js\");\n/**\n * @module ol/layer/BaseImage\n */\n\n\n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer}\n * @api\n */\nclass BaseImageLayer extends _Layer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Layer options.\n */\n constructor(options) {\n options = options ? options : {};\n super(options);\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseImageLayer);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/layer/BaseImage.js?"); /***/ }), /***/ "./node_modules/ol/layer/BaseTile.js": /*!*******************************************!*\ !*** ./node_modules/ol/layer/BaseTile.js ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Layer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Layer.js */ \"./node_modules/ol/layer/Layer.js\");\n/* harmony import */ var _TileProperty_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TileProperty.js */ \"./node_modules/ol/layer/TileProperty.js\");\n/**\n * @module ol/layer/BaseTile\n */\n\n\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseTileLayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated. Use interim tiles on error.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n * @property {number} [cacheSize=512] The internal tile cache size. This needs to be large enough to render\n * two zoom levels worth of tiles.\n */\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer}\n * @api\n */\nclass BaseTileLayer extends _Layer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * @param {Options} [options] Tile layer options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n\n const cacheSize = options.cacheSize;\n delete options.cacheSize;\n\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n super(baseOptions);\n\n /***\n * @type {BaseTileLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseTileLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseTileLayerOnSignature}\n */\n this.un;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.cacheSize_ = cacheSize;\n\n this.setPreload(options.preload !== undefined ? options.preload : 0);\n this.setUseInterimTilesOnError(\n options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true,\n );\n }\n\n /**\n * @return {number|undefined} The suggested cache size\n * @protected\n */\n getCacheSize() {\n return this.cacheSize_;\n }\n\n /**\n * Return the level as number to which we will preload tiles up to.\n * @return {number} The level to preload tiles up to.\n * @observable\n * @api\n */\n getPreload() {\n return /** @type {number} */ (this.get(_TileProperty_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].PRELOAD));\n }\n\n /**\n * Set the level as number to which we will preload tiles up to.\n * @param {number} preload The level to preload tiles up to.\n * @observable\n * @api\n */\n setPreload(preload) {\n this.set(_TileProperty_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].PRELOAD, preload);\n }\n\n /**\n * Deprecated. Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n getUseInterimTilesOnError() {\n return /** @type {boolean} */ (\n this.get(_TileProperty_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].USE_INTERIM_TILES_ON_ERROR)\n );\n }\n\n /**\n * Deprecated. Set whether we use interim tiles on error.\n * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n * @observable\n * @api\n */\n setUseInterimTilesOnError(useInterimTilesOnError) {\n this.set(_TileProperty_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n }\n\n /**\n * Get data for a pixel location. The return type depends on the source data. For image tiles,\n * a four element RGBA array will be returned. For data tiles, the array length will match the\n * number of bands in the dataset. For requests outside the layer extent, `null` will be returned.\n * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.\n *\n * ```js\n * // display layer data on every pointer move\n * map.on('pointermove', (event) => {\n * console.log(layer.getData(event.pixel));\n * });\n * ```\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n * @api\n * @override\n */\n getData(pixel) {\n return super.getData(pixel);\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseTileLayer);\n\n\n//# sourceURL=webpack://flyguide/./node_modules/ol/layer/BaseTile.js?"); /***/ }), /***/ "./node_modules/ol/layer/BaseVector.js": /*!*********************************************!*\ !*** ./node_modules/ol/layer/BaseVector.js ***! \*********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Layer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Layer.js */ \"./node_modules/ol/layer/Layer.js\");\n/* harmony import */ var rbush__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rbush */ \"./node_modules/rbush/index.js\");\n/* harmony import */ var _style_Style_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../style/Style.js */ \"./node_modules/ol/style/Style.js\");\n/* harmony import */ var _render_canvas_style_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../render/canvas/style.js */ \"./node_modules/ol/render/canvas/style.js\");\n/**\n * @module ol/layer/BaseVector\n */\n\n\n\n\n\n/***\n * @template T\n * @typedef {T extends import(\"../source/Vector.js\").default ? U : never} ExtractedFeatureType\n */\n\n/**\n * @template {import('../Feature').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n RENDER_ORDER: 'renderOrder',\n};\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import('../Feature').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @extends {Layer}\n * @template {import(\"../renderer/canvas/VectorLayer.js\").default|import(\"../renderer/canvas/VectorTileLayer.js\").default|import(\"../renderer/canvas/VectorImageLayer.js\").default|import(\"../renderer/webgl/PointsLayer.js\").default} RendererType\n * @api\n */\nclass BaseVectorLayer extends _Layer_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n\n delete baseOptions.style;\n delete baseOptions.renderBuffer;\n delete baseOptions.updateWhileAnimating;\n delete baseOptions.updateWhileInteracting;\n super(baseOptions);\n\n /**\n * @private\n * @type {string}\n */\n this.declutter_ = options.declutter ? String(options.declutter) : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.renderBuffer_ =\n options.renderBuffer !== undefined ? options.renderBuffer : 100;\n\n /**\n * User provided style.\n * @type {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike}\n * @private\n */\n this.style_ = null;\n\n /**\n * Style function for use within the library.\n * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n * @private\n */\n this.styleFunction_ = undefined;\n\n this.setStyle(options.style);\n\n /**\n * @type {boolean}\n * @private\n */\n this.updateWhileAnimating_ =\n options.updateWhileAnimating !== undefined\n ? options.updateWhileAnimating\n : false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.updateWhileInteracting_ =\n options.updateWhileInteracting !== undefined\n ? options.updateWhileInteracting\n : false;\n }\n\n /**\n * @return {string} Declutter group.\n * @override\n */\n getDeclutter() {\n return this.declutter_;\n }\n\n /**\n * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n * that resolves with an array of features. The array will either contain the topmost feature\n * when a hit was detected, or it will be empty.\n *\n * The hit detection algorithm used for this method is optimized for performance, but is less\n * accurate than the one used in [map.getFeaturesAtPixel()]{@link import(\"../Map.js\").default#getFeaturesAtPixel}.\n * Text is not considered, and icons are only represented by their bounding box instead of the exact\n * image.\n *\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise>} Promise that resolves with an array of features.\n * @api\n * @override\n */\n getFeatures(pixel) {\n return super.getFeatures(pixel);\n }\n\n /**\n * @return {number|undefined} Render buffer.\n */\n getRenderBuffer() {\n return this.renderBuffer_;\n }\n\n /**\n * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): number|null|undefined} Render\n * order.\n */\n getRenderOrder() {\n return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (\n this.get(Property.RENDER_ORDER)\n );\n }\n\n /**\n * Get the style for features. This returns whatever was passed to the `style`\n * option at construction or to the `setStyle` method.\n * @return {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null|undefined} Layer style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the style function.\n * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @return {boolean} Whether the rendered layer should be updated while\n * animating.\n */\n getUpdateWhileAnimating() {\n return this.updateWhileAnimating_;\n }\n\n /**\n * @return {boolean} Whether the rendered layer should be updated while\n * interacting.\n */\n getUpdateWhileInteracting() {\n return this.updateWhileInteracting_;\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n * @override\n */\n renderDeclutter(frameState, layerState) {\n const declutterGroup = this.getDeclutter();\n if (declutterGroup in frameState.declutter === false) {\n frameState.declutter[declutterGroup] = new rbush__WEBPACK_IMPORTED_MODULE_0__[\"default\"](9);\n }\n this.getRenderer().renderDeclutter(frameState, layerState);\n }\n\n /**\n * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n * Render order.\n */\n setRenderOrder(renderOrder) {\n this.set(Property.RENDER_ORDER, renderOrder);\n }\n\n /**\n * Set the style for features. This can be a single style object, an array\n * of styles, or a function that takes a feature and resolution and returns\n * an array of styles. If set to `null`, the layer has no style (a `null` style),\n * so only features that have their own styles will be rendered in the layer. Call\n * `setStyle()` without arguments to reset to the default style. See\n * [the ol/style/Style module]{@link module:ol/style/Style~Style} for information on the default style.\n *\n * If your layer has a static style, you can use [flat style]{@link module:ol/style/flat~FlatStyle} object\n * literals instead of using the `Style` and symbolizer constructors (`Fill`, `Stroke`, etc.):\n * ```js\n * vectorLayer.setStyle({\n * \"fill-color\": \"yellow\",\n * \"stroke-color\": \"black\",\n * \"stroke-width\": 4\n * })\n * ```\n *\n * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n * @api\n */\n setStyle(style) {\n this.style_ = style === undefined ? _style_Style_js__WEBPACK_IMPORTED_MODULE_2__.createDefaultStyle : style;\n const styleLike = toStyleLike(style);\n this.styleFunction_ =\n style === null ? undefined : (0,_style_Style_js__WEBPACK_IMPORTED_MODULE_2__.toFunction)(styleLike);\n this.changed();\n }\n\n /**\n * @param {boolean|string|number} declutter Declutter images and text.\n * @api\n */\n setDeclutter(declutter) {\n this.declutter_ = declutter ? String(declutter) : undefined;\n this.changed();\n }\n}\n\n/**\n * Coerce the allowed style types into a shorter list of types. Flat styles, arrays of flat\n * styles, and arrays of rules are converted into style functions.\n *\n * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n * @return {import(\"../style/Style.js\").StyleLike|null} The style.\n */\nfunction toStyleLike(style) {\n if (style === undefined) {\n return _style_Style_js__WEBPACK_IMPORTED_MODULE_2__.createDefaultStyle;\n }\n if (!style) {\n return null;\n }\n if (typeof style === 'function') {\n return style;\n }\n if (style instanceof _style_Style_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n return style;\n }\n if (!Array.isArray(style)) {\n return (0,_render_canvas_style_js__WEBPACK_IMPORTED_MODULE_3__.flatStylesToStyleFunction)([style]);\n }\n if (style.length === 0) {\n return [];\n }\n\n const length = style.length;\n const first = style[0];\n\n if (first instanceof _style_Style_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n /**\n * @type {Array