var S=Object.defineProperty;var I=(m,t,r)=>t in m?S(m,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):m[t]=r;var o=(m,t,r)=>(I(m,typeof t!="symbol"?t+"":t,r),r);import{U as p,a as h}from"./UIEventSource-92ac4fe9.js";const u=class u{static getParsed(t,r){return u.get(t).sync(s=>{if(s===void 0)return r;try{return JSON.parse(s)}catch{return r}},[],s=>JSON.stringify(s))}static get(t,r=void 0){const s=u._cache[t];if(s)return s;let a=r;if(!p.runningFromConsole)try{a=localStorage.getItem(t),a==="undefined"&&(a=void 0)}catch{console.error("Could not get value",t,"from local storage")}const c=new h(a??r,"localstorage:"+t);return p.runningFromConsole||c.addCallback(n=>{if(n===void 0||n===""||n===null){localStorage.removeItem(t);return}try{localStorage.setItem(t,n)}catch{localStorage.clear()}}),u._cache[t]=c,c}};o(u,"_cache",{});let y=u;const l=class l{static Current(){return l.hash.data===void 0||l.hash.data===""?"":"#"+l.hash.data}static Get(){if(p.runningFromConsole)return new h(void 0);const t=new h(window.location.hash.substr(1));return t.addCallback(r=>{if(r==="undefined"&&(console.warn("Got a literal 'undefined' as hash, ignoring"),r=void 0),r===void 0||r===""){window.location.hash="";return}history.pushState({},""),window.location.hash="#"+r}),window.onhashchange=()=>{let r=window.location.hash.substr(1);r===""&&(r=void 0),t.setData(r)},t}};o(l,"hash",l.Get());let g=l;const i=class i{static getQueryParameter(t,r){this.initialized||this.init();let{deflt:s,documentation:a,stackOffset:c,category:n}=r??{},d;if(p.runningFromConsole&&a){const v=p.getLocationInCode(-1+(c??0));d="This documentation is defined in the source code at ["+v.filename+"]("+v.markdownLocation+`)
`}if(a&&i.documentation.set(t,{documentation:a,category:n,sourceLocation:d}),s!==void 0&&(i.defaults[t]=s),i.knownSources[t]!==void 0)return i.knownSources[t];i.addOrder(t);const f=new h(s,"&"+t);return i.knownSources[t]=f,f.addCallback(()=>i.Serialize()),f}static SetDefaultFor(t,r){i.defaults[t]!==r&&(i.defaults[t]=r,i.Serialize())}static getBooleanQueryParameter(t,r,s,a){return h.asBoolean(i.getQueryParameter(t,{deflt:""+(r??!1),documentation:s,stackOffset:-1,category:a}))}static wasInitialized(t){return this.init(),i._wasInitialized.has(t)}static initializedParameters(){return Array.from(i._wasInitialized.keys())}static addOrder(t){this.order.indexOf(t)i.Serialize()),i.knownSources[a]=d}}}static GetParts(t){var s;const r=[];for(const a of i.order)t!=null&&t.has(a)||((s=i.knownSources[a])==null?void 0:s.data)!==void 0&&i.knownSources[a].data!=="undefined"&&i.knownSources[a].data!==i.defaults[a]&&r.push(encodeURIComponent(a)+"="+encodeURIComponent(i.knownSources[a].data));return r}static Serialize(){const t=i.GetParts();if(!p.runningFromConsole)try{history.replaceState(null,"","?"+t.join("&")+g.Current())}catch(r){console.error(r)}}static ClearAll(){for(const t in i.knownSources)i.knownSources[t].setData(void 0);i._wasInitialized.clear(),i.order=[]}static GetDefaultFor(t){return i.defaults[t]}};o(i,"defaults",{}),o(i,"documentation",new Map),o(i,"_wasInitialized",new Set),o(i,"knownSources",{}),o(i,"order",["layout","test","z","lat","lon"]),o(i,"initialized",!1);let w=i;const O="0.61.2",b={"#oauth_credentials:comment":["`oauth_credentials` are the OAuth-2 credentials for the production-OSM server and the test-server.","Are you deploying your own instance? Register your application too.","See https://wiki.openstreetmap.org/wiki/OAuth#Registering_your_application_as_OAuth_2.0_consumer for instructions","Use `https:////land.html` as redirect URIs. You can add `http://127.0.0.1:1234/land.html` too for local development.","Alternatively, you can override the `osm` credentials using the environment variables `VITE_OSM_OAUTH_CLIENT_ID` and `VITE_OSM_OAUTH_SECRET`"],oauth_landing:null,oauth_credentials:{"#":"This client-id is registered by 'MapComplete' on OpenStreetMap.org","#fork":"For a fork, you will need to register your own key at https://www.openstreetmap.org/oauth2/applications ; redirect url is `https:///land.html`, permissions: `read_user_preferences`, `modify preferences`, `modify the map`. For GPS-traces: both, `modify-notes` if you want the notes-theme to work.",oauth_client_id:"K93H1d8ve7p-tVLE1ZwsQ4lAFLQk8INx5vfTLMu5DWk",oauth_secret:"NBWGhWDrD3QDB35xtVuxv4aExnmIt4FA_WgeLtwxasg",url:"https://www.openstreetmap.org",api_url:"https://api.openstreetmap.org"},"ogf:oauth_credentials":{"#":"OpenGeofiction","#note":"The dev server was down and I needed to test something...",oauth_client_id:"O82wngcOgR8DOlszV-F2QSzo6nvKH4e6ELxF99f7T9s",oauth_secret:"Tp7TLtfMRiOnuPKicaFJv0hFx9_FD_dIiUfgZTvqMJw",url:"https://opengeofiction.net",api_url:"https://opengeofiction.net",bypass_capability_check:!0},"test:oauth_credentials":{"##":"DEV","#":"This client-id is registered by 'MapComplete' on https://master.apis.dev.openstreetmap.org/",oauth_client_id:"BAPPMRuojjFsY__0APmScr1hbebYj1GlDbV6S5TsUbo",oauth_secret:"Lq1UKYAySRfQfwgFctGvlGrfxbGHQwggheE52HIGrO8",url:"https://master.apis.dev.openstreetmap.org",api_url:"https://master.apis.dev.openstreetmap.org",bypass_capability_check:!0},mvt_layer_server:"https://cache.mapcomplete.org/public.{type}_{layer}/{z}/{x}/{y}.pbf","#summary_server":"Should be the endpoint; appending status.json should work",summary_server:"https://cache.mapcomplete.org/",geoip_server:"https://ipinfo.mapcomplete.org/",error_server:"https://report.mapcomplete.org/report","#nsi_logos_server":"The location where a running instance of MapComplete will fetch the NSI-logos. This is by default the host itself, but not in e.g. the android app",nsi_logos_server:"https://data.mapcomplete.org/nsi/",mapillary_v4:"MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85",panoramax:{"#fork":"Not bound to a domain; can be reused",url:"https://panoramax.mapcomplete.org",token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnZW92aXNpbyIsInN1YiI6IjU5ZjgzOGI0LTM4ZjAtNDdjYi04OWYyLTM3NDQ3MWMxNTUxOCJ9.0rBioZS_48NTjnkIyN9497c3fQdTqtGgH1HDqlz1bWs",sequence:"a7cf963f-8d1c-4bac-9717-e3149f5f9fff",testsequence:"7f34cf53-27ff-46c9-ac22-78511fa8457a"},default_overpass_urls:["https://overpass-api.de/api/interpreter","https://overpass.private.coffee/api/interpreter"],"#broken_overpass_urls":{"https://maps.mail.ru/osm/tools/overpass/api/interpreter":"Blocked by firefox strict tracking protection as 'tracking'","https://overpass.openstreetmap.ru/cgi/interpreter":"Broken as of 2024-09-05, might be a glitch"},country_coder_host:"https://data.mapcomplete.org/countrycoder/",community_index_host:"https://data.mapcomplete.org/community-index/",nominatimEndpoint:"https://geocoding.geofabrik.de/b75350b1cfc34962ac49824fe5b582dc/","#photonEndpoint":"`api/` or `reverse/` will be appended by the code",photonEndpoint:"https://photon.komoot.io/","jsonld-proxy":"https://lod.mapcomplete.org/extractgraph?url={url}",protomaps_archive_server:"https://cache.mapcomplete.org",protomaps:{"#fork":"Bound to https://mapcomplete.org; get your own at https://protomaps.com/","api-key":"2af8b969a9e8b692",endpoint:"https://api.protomaps.com/tiles/",styles:["https://api.protomaps.com/styles/v2/light.json","https://api.protomaps.com/styles/v2/dark.json","https://api.protomaps.com/styles/v2/white.json","https://api.protomaps.com/styles/v2/grayscale.json","https://api.protomaps.com/styles/v2/black.json"]}},T={"#":"Settings in this file override the `config`-section of `package.json`"},M=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"})),e=class e{static isPriviliged(t){let r;return typeof t=="string"?r=t:r=t.id,this.priviligedLayerSet.has(r)}};o(e,"vNumber",O),o(e,"MaprouletteApiKey",""),o(e,"added_by_default",["selected_element","gps_location","gps_location_history","home_location","gps_track","range","last_click","favourite","summary","search","geocoded_image"]),o(e,"no_include",["conflation","split_point","split_road","current_view","import_candidate","usersettings","icons","filters"]),o(e,"priviliged_layers",[...e.added_by_default,...e.no_include]),o(e,"panoramax",{...b.panoramax,description:"The panoramax-server that MapComplete uploads to",category:"core",sourceAvailable:!0,openData:!0,selfhostable:!0,moreInfo:["https://wiki.openstreetmap.org/wiki/Panoramax"]}),o(e,"userJourney",{moreScreenUnlock:1,personalThemeUnlock:5,historyLinkVisible:10,deletePointsOfOthersUnlock:20,tagsVisibleAt:25,tagsVisibleAndWikiLinked:30,mapCompleteHelpUnlock:50,themeGeneratorReadOnlyUnlock:50,multiSelectUnlock:100,addNewPointWithUnreadMessagesUnlock:500,importHelperUnlock:5e3}),o(e,"minZoomLevelToAddNewPoint",18),o(e,"updateTimeoutSec",15),o(e,"nearbyVisitTime",30*60),o(e,"distanceToChangeObjectBins",[25,50,100,500,1e3,5e3,Number.MAX_VALUE]),o(e,"themeOrder",["personal","cyclofix","etymology","waste","food","cafes_and_pubs","shops","healthcare","sports","artwork","bookcases","playgrounds","drinking_water","toilets","vending_machine","aed","clock","charging_stations","surveillance","advertising","circular_economy"]),o(e,"zoomToLocationTimeout",15),o(e,"viewportCenterCloseToGpsCutoff",20),o(e,"config",(()=>({...b,...M}))()),o(e,"mapillary_client_token_v4",e.config.mapillary_v4),o(e,"defaultOverpassUrls",e.config.default_overpass_urls),o(e,"countryCoderEndpoint",e.config.country_coder_host),o(e,"pmtiles_host",e.config.protomaps_archive_server),o(e,"countryCoderInfo",{url:e.countryCoderEndpoint,trigger:["always"],openData:!0,category:"core",logging:"no",selfhostable:!0,sourceAvailable:!0,moreInfo:["https://source.mapcomplete.org/MapComplete/latlon2country"],description:"For quite some functions, we need to know in what _country_ a feature is located. LatLon2Country is a static dataset, which, by cleverly encoding the data, can quickly tell in what country a feature is located."}),o(e,"communityIndexHost",e.config.community_index_host),o(e,"osmServerInfo",{trigger:["always"],description:"Login service, by OpenStreetMap.org",sourceAvailable:!0,openData:!0,selfhostable:"partially - a copy can be hosted, but this would be useless",category:"core",moreInfo:["https://www.openstreetmap.org/copyright","https://www.openstreetmap.org/about","https://osmfoundation.org/wiki/Privacy_Policy"]}),o(e,"osmAuthConfig",{...e.config.oauth_credentials,...e.osmServerInfo}),o(e,"nominatimEndpoint",e.config.nominatimEndpoint),o(e,"nominatimEndpointInfo",{url:e.nominatimEndpoint,description:"Nominatim search engine endpoint, used when searching",selfhostable:!0,openData:!0,sourceAvailable:!0,category:"core",trigger:["specific_feature"],moreInfo:["https://wiki.openstreetmap.org/wiki/Nominatim"]}),o(e,"photonEndpoint",e.config.photonEndpoint),o(e,"photonEndpointInfo",{url:e.photonEndpoint,description:"Endpoint for search with photon",sourceAvailable:!0,selfhostable:!0,openData:!0,category:"core",trigger:["specific_feature"],moreInfo:["https://wiki.openstreetmap.org/wiki/Photon"]}),o(e,"nsiLogosEndpoint",e.config.nsi_logos_server??null),o(e,"weblate","https://translate.mapcomplete.org/"),o(e,"linkedDataProxy",e.config["jsonld-proxy"]),o(e,"linkedDataProxyInfo",{url:e.config["jsonld-proxy"],trigger:["specific_feature"],category:"core",openData:!0,description:"This proxy queries websites to detect if they contain linked open data and gives this data back. Triggered by opening a feature",sourceAvailable:!0,selfhostable:!0,moreInfo:["https://source.mapcomplete.org/MapComplete/MapComplete/src/branch/develop/scripts/serverLdScrape.ts"]}),o(e,"_defaultPinIcons",["addSmall","airport","brick_wall_round","brick_wall_square","building_office_2","building_storefront","bug","checkmark","checkmark","circle","clock","close","close","confirm","computer","cross_bottom_right","crosshair","desktop","direction","gear","globe_alt","gps_arrow","heart","heart_outline","help","help","home","house","key","invalid","invalid","lightning","link","location","location_empty","location_locked","lock","mastodon","not_found","note","party","pencil","pin","resolved","ring","scissors","snowflake","square","square_rounded","teardrop","teardrop_with_hole_green","train","triangle","user_circle","wifi"]),o(e,"defaultPinIcons",e._defaultPinIcons),o(e,"VectorTileServer",e.config.mvt_layer_server),o(e,"vectorTileServerInfo",{url:e.VectorTileServer,description:"The vectortileserver is a cache of OSM data and can be used as an alternative for overpass to actually show data, esp on low zoom levels",selfhostable:!0,openData:!0,category:"core",sourceAvailable:!0,trigger:["always"],moreInfo:["https://source.mapcomplete.org/MapComplete/MapComplete/src/branch/develop/Docs/Dev/SettingUpPSQL.md"]}),o(e,"GeoIpServer",e.config.geoip_server),o(e,"geoIpServerInfo",{url:e.GeoIpServer,category:"core",description:"When opening MapComplete for the first time, we try to set the map at a relevant location. For this, we try to determine the location based on the IP-address; this is done by this service.",selfhostable:!0,openData:!1,trigger:["always"],sourceAvailable:!0}),o(e,"ErrorReportServer",e.config.error_server),o(e,"errorReportServerInfo",{url:e.ErrorReportServer,logging:"yes",category:"core",selfhostable:"yes",openData:"no (privacy)",trigger:["on_failure"],description:"If a severe error occurs in MapComplete, this is logged on this server - this mostly concerns errors where making a change to OpenStreetMap failed. Data is handled confidentially and _only_ to replay the change and fix the root cause."}),o(e,"SummaryServer",e.config.summary_server),o(e,"summaryServerInfo",{url:e.SummaryServer,trigger:["always"],category:"core",selfhostable:!0,sourceAvailable:!0,openData:!0,description:"This server indicates how much items there are (according to OpenStreetMap) at a given slippy tile coordinate"}),o(e,"allServers",[{description:"OpenStreetMap.org, the source of most data",url:"https://api.openstreetmap.org",category:"core"},e.summaryServerInfo,e.vectorTileServerInfo,e.geoIpServerInfo,e.errorReportServerInfo,e.osmAuthConfig,e.countryCoderInfo,e.nominatimEndpointInfo,e.photonEndpointInfo,...e.defaultOverpassUrls.map(t=>({url:t,openData:!0,selfhostable:!0,trigger:["always"],sourceAvailable:!0,category:"core",description:"Overpass is a query service where OpenStreetMap-data can be retrieved. Various overpass-servers are used to query this data",moreInfo:["https://wiki.openstreetmap.org/wiki/Overpass_turbo"]}))]),o(e,"priviligedLayerSet",new Set(e.priviliged_layers));let k=e;export{k as C,g as H,y as L,w as Q,O as v};
//# sourceMappingURL=Constants-78dfb500.js.map