tangram-core 0.2.0__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tangram_core/App.vue +335 -0
- tangram_core/__init__.py +5 -0
- tangram_core/__main__.py +141 -0
- tangram_core/_core.cp313-win_amd64.pyd +0 -0
- tangram_core/_core.pyi +38 -0
- tangram_core/api.ts +456 -0
- tangram_core/backend.py +335 -0
- tangram_core/colour.ts +71 -0
- tangram_core/config.py +122 -0
- tangram_core/dist-frontend/aggregation-layers.js +521 -0
- tangram_core/dist-frontend/aggregation-layers.js.map +1 -0
- tangram_core/dist-frontend/assets/_commonjsHelpers-CqkleIqs.js +2 -0
- tangram_core/dist-frontend/assets/_commonjsHelpers-CqkleIqs.js.map +1 -0
- tangram_core/dist-frontend/assets/array-utils-flat-wyE8tIYR.js +11 -0
- tangram_core/dist-frontend/assets/array-utils-flat-wyE8tIYR.js.map +1 -0
- tangram_core/dist-frontend/assets/assert-hrfsarFU.js +3 -0
- tangram_core/dist-frontend/assets/assert-hrfsarFU.js.map +1 -0
- tangram_core/dist-frontend/assets/b612-latin-400-italic-DePNXA0a.woff +0 -0
- tangram_core/dist-frontend/assets/b612-latin-400-italic-a-4GLPtl.woff2 +0 -0
- tangram_core/dist-frontend/assets/b612-latin-400-normal-CC98FVm_.woff2 +0 -0
- tangram_core/dist-frontend/assets/b612-latin-400-normal-JbZ7xwUX.woff +0 -0
- tangram_core/dist-frontend/assets/b612-latin-700-normal-B_Snq1wd.woff +0 -0
- tangram_core/dist-frontend/assets/b612-latin-700-normal-BinQrnoB.woff2 +0 -0
- tangram_core/dist-frontend/assets/clip-extension-DTCP51Ak.js +26 -0
- tangram_core/dist-frontend/assets/clip-extension-DTCP51Ak.js.map +1 -0
- tangram_core/dist-frontend/assets/color-CUNNsFV-.js +17 -0
- tangram_core/dist-frontend/assets/color-CUNNsFV-.js.map +1 -0
- tangram_core/dist-frontend/assets/cube-geometry-CzJ_uBWa.js +2 -0
- tangram_core/dist-frontend/assets/cube-geometry-CzJ_uBWa.js.map +1 -0
- tangram_core/dist-frontend/assets/deep-equal-uriyKJca.js +2 -0
- tangram_core/dist-frontend/assets/deep-equal-uriyKJca.js.map +1 -0
- tangram_core/dist-frontend/assets/fly-to-interpolator-DlKiy9_S.js +2 -0
- tangram_core/dist-frontend/assets/fly-to-interpolator-DlKiy9_S.js.map +1 -0
- tangram_core/dist-frontend/assets/geojson-layer-CLhXLxdI.js +1010 -0
- tangram_core/dist-frontend/assets/geojson-layer-CLhXLxdI.js.map +1 -0
- tangram_core/dist-frontend/assets/globe-view-DKhftlA1.js +94 -0
- tangram_core/dist-frontend/assets/globe-view-DKhftlA1.js.map +1 -0
- tangram_core/dist-frontend/assets/globe-viewport-CPES4D4P.js +2 -0
- tangram_core/dist-frontend/assets/globe-viewport-CPES4D4P.js.map +1 -0
- tangram_core/dist-frontend/assets/image-loader-ClbNCMXW.js +2 -0
- tangram_core/dist-frontend/assets/image-loader-ClbNCMXW.js.map +1 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-400-normal-DTZQ6lD6.woff2 +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-400-normal-HYADljCo.woff +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-700-normal-ByjKuJjN.woff2 +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-700-normal-DzgUY3Rl.woff +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-ext-400-normal-BaHVOdFB.woff2 +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-ext-400-normal-yvPjCxxx.woff +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-ext-700-normal-D0Kpgs_9.woff2 +0 -0
- tangram_core/dist-frontend/assets/inconsolata-latin-ext-700-normal-Dlt-daqV.woff +0 -0
- tangram_core/dist-frontend/assets/inconsolata-vietnamese-400-normal-ByiM2lek.woff +0 -0
- tangram_core/dist-frontend/assets/inconsolata-vietnamese-400-normal-DfC_iMic.woff2 +0 -0
- tangram_core/dist-frontend/assets/inconsolata-vietnamese-700-normal-DLCFFAUf.woff +0 -0
- tangram_core/dist-frontend/assets/inconsolata-vietnamese-700-normal-DuasYmn8.woff2 +0 -0
- tangram_core/dist-frontend/assets/index-UPPakSLR.css +1 -0
- tangram_core/dist-frontend/assets/index-r8T0kY2p.js +821 -0
- tangram_core/dist-frontend/assets/index-r8T0kY2p.js.map +1 -0
- tangram_core/dist-frontend/assets/layer-DO63TrsS.js +555 -0
- tangram_core/dist-frontend/assets/layer-DO63TrsS.js.map +1 -0
- tangram_core/dist-frontend/assets/layer-extension-CZ3zsHuN.js +2 -0
- tangram_core/dist-frontend/assets/layer-extension-CZ3zsHuN.js.map +1 -0
- tangram_core/dist-frontend/assets/mesh-layers-BSECKarm.js +1123 -0
- tangram_core/dist-frontend/assets/mesh-layers-BSECKarm.js.map +1 -0
- tangram_core/dist-frontend/assets/orthographic-viewport-CzZmHDEZ.js +2 -0
- tangram_core/dist-frontend/assets/orthographic-viewport-CzZmHDEZ.js.map +1 -0
- tangram_core/dist-frontend/assets/pick-layers-pass-xhWsgZtf.js +2 -0
- tangram_core/dist-frontend/assets/pick-layers-pass-xhWsgZtf.js.map +1 -0
- tangram_core/dist-frontend/assets/project-CrvReKGW.js +760 -0
- tangram_core/dist-frontend/assets/project-CrvReKGW.js.map +1 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-italic-4qS3_zkX.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-italic-CDK-EZBY.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-normal-Bgns473E.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-normal-_T2aQlWs.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-500-normal-CvEVpWxD.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-500-normal-s4PklZE0.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-700-normal-9RN-Z7cI.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-700-normal-BGMkBBYx.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-italic-C7erd-g8.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-italic-DR5R5TWx.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-normal-DGo1Ayjq.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-normal-WtM1l1qc.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-500-normal-C8FNIdXm.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-500-normal-TLDmfi3Q.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-700-normal-CTXjXnze.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-700-normal-CWPRiRXS.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-400-italic-CR6qj4Z4.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-400-italic-DHRaIs10.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-400-normal-D5vBSIyg.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-400-normal-FabMgVmk.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-500-normal-BIN62cw9.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-500-normal-Hsn-wDIp.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-700-normal-89Up2Xly.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-greek-700-normal-DWMOA2VK.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-400-italic-D_BR-3LG.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-400-italic-om57GXsO.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-400-normal-BICmKrXV.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-400-normal-D2e7XwB1.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-500-normal-3p2daRJW.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-500-normal-Dc9bsamC.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-700-normal-BOl6B_hI.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-700-normal-DRbp0YnP.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-italic-BXrkWnoY.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-italic-Bhem1d5z.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-normal-DT8nEsYA.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-normal-OHaX69iP.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-500-normal-CcSTXKtO.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-500-normal-JgPl2bDS.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-700-normal-B004qtqu.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-700-normal-O6H_RRvN.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-italic-BwUYFJ2t.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-italic-DV8QogUk.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-normal-0o1laQ-g.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-normal-CPsdS8_S.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-500-normal-G9shSJ2z.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-500-normal-TFWhjk13.woff2 +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-700-normal-BtNeb9D6.woff +0 -0
- tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-700-normal-D35V1G0s.woff2 +0 -0
- tangram_core/dist-frontend/assets/shader-BJmsOfPx.js +843 -0
- tangram_core/dist-frontend/assets/shader-BJmsOfPx.js.map +1 -0
- tangram_core/dist-frontend/assets/solid-polygon-layer-DiarVGxh.js +392 -0
- tangram_core/dist-frontend/assets/solid-polygon-layer-DiarVGxh.js.map +1 -0
- tangram_core/dist-frontend/assets/tesselator-49Dw9L5A.js +2 -0
- tangram_core/dist-frontend/assets/tesselator-49Dw9L5A.js.map +1 -0
- tangram_core/dist-frontend/assets/webgl-developer-tools-CZl8qVFg.js +7 -0
- tangram_core/dist-frontend/assets/webgl-developer-tools-CZl8qVFg.js.map +1 -0
- tangram_core/dist-frontend/assets/webgl-device-BY0-CUP6.js +3 -0
- tangram_core/dist-frontend/assets/webgl-device-BY0-CUP6.js.map +1 -0
- tangram_core/dist-frontend/assets/widget-BbOeHGj0.js +2 -0
- tangram_core/dist-frontend/assets/widget-BbOeHGj0.js.map +1 -0
- tangram_core/dist-frontend/core.js +60 -0
- tangram_core/dist-frontend/core.js.map +1 -0
- tangram_core/dist-frontend/extensions.js +609 -0
- tangram_core/dist-frontend/extensions.js.map +1 -0
- tangram_core/dist-frontend/favicon.ico +0 -0
- tangram_core/dist-frontend/favicon.png +0 -0
- tangram_core/dist-frontend/font-awesome.min.css +4 -0
- tangram_core/dist-frontend/fonts/FontAwesome.otf +0 -0
- tangram_core/dist-frontend/fonts/fontawesome-webfont.eot +0 -0
- tangram_core/dist-frontend/fonts/fontawesome-webfont.svg +2671 -0
- tangram_core/dist-frontend/fonts/fontawesome-webfont.ttf +0 -0
- tangram_core/dist-frontend/fonts/fontawesome-webfont.woff +0 -0
- tangram_core/dist-frontend/fonts/fontawesome-webfont.woff2 +0 -0
- tangram_core/dist-frontend/geo-layers.js +115 -0
- tangram_core/dist-frontend/geo-layers.js.map +1 -0
- tangram_core/dist-frontend/index.html +38 -0
- tangram_core/dist-frontend/json.js +3 -0
- tangram_core/dist-frontend/json.js.map +1 -0
- tangram_core/dist-frontend/layers.js +268 -0
- tangram_core/dist-frontend/layers.js.map +1 -0
- tangram_core/dist-frontend/lit-html.js +7 -0
- tangram_core/dist-frontend/lit-html.js.map +1 -0
- tangram_core/dist-frontend/mapbox.js +2 -0
- tangram_core/dist-frontend/mapbox.js.map +1 -0
- tangram_core/dist-frontend/maplibre-gl.js +59 -0
- tangram_core/dist-frontend/maplibre-gl.js.map +1 -0
- tangram_core/dist-frontend/mesh-layers.js +2 -0
- tangram_core/dist-frontend/mesh-layers.js.map +1 -0
- tangram_core/dist-frontend/rs1090_wasm.js +813 -0
- tangram_core/dist-frontend/rs1090_wasm_bg.wasm +0 -0
- tangram_core/dist-frontend/vue.esm-browser.prod.js +13 -0
- tangram_core/dist-frontend/widgets.js +3 -0
- tangram_core/dist-frontend/widgets.js.map +1 -0
- tangram_core/main.ts +16 -0
- tangram_core/plugin.py +70 -0
- tangram_core/plugin.ts +41 -0
- tangram_core/redis.py +89 -0
- tangram_core/user.css +114 -0
- tangram_core/vite-plugin-tangram.mjs +88 -0
- tangram_core-0.2.0.dist-info/METADATA +37 -0
- tangram_core-0.2.0.dist-info/RECORD +171 -0
- tangram_core-0.2.0.dist-info/WHEEL +4 -0
- tangram_core-0.2.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.js","sources":["../../../../../node_modules/.pnpm/preact@10.27.2/node_modules/preact/dist/preact.module.js","../../../../../node_modules/.pnpm/preact@10.27.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/components/button-group.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/components/grouped-icon-button.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/zoom-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/components/icon-button.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/reset-view-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/gimbal-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/compass-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/scale-widget.js","../../../../../node_modules/.pnpm/preact@10.27.2/node_modules/preact/hooks/dist/hooks.module.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/components/dropdown-menu.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/geocode/geocoder-history.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/geocode/geocoders.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/geocoder-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/fullscreen-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/splitter-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/components/icon-menu.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/view-selector-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/info-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/lib/components/simple-menu.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/context-menu-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/timeline-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/screenshot-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/themes.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/theme-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/loading-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/fps-widget.js","../../../../../node_modules/.pnpm/@deck.gl+widgets@9.2.2_@deck.gl+core@9.2.2_@luma.gl+core@9.2.4/node_modules/@deck.gl/widgets/dist/stats-widget.js"],"sourcesContent":["var n,l,u,t,i,r,o,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?S(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!$.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)($)}function $(){for(var n,u,t,r,o,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N(f,t,c),r.__e=r.__=null,t.__e!=o&&C(t)));$.__r=0}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p:m[y.__i]||p,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):\"function\"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(f=r+h,(o=n.__k[r]=\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?m(null,o,null,null,null):w(o)?m(k,{children:o},null,null,null):null==o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D(e,e));return t}function A(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(w(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function T(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||y.test(l)?u:u+\"px\"}function j(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||T(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(f,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof j)try{if(b=u.props,S=\"prototype\"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x(b,M),h.constructor=j,h.render=E),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=V(a.props.children)),f=I(n,w(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(T=o.length;T--;)g(o[T]);z(u)}else u.__e=t.__e,u.__k=t.__k,n.then||z(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z)}function N(n,u,t){for(var i=0;i<t.length;i++)B(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function V(n){return\"object\"!=typeof n||null==n||n.__b&&n.__b>0?n:w(n)?n.map(V):d({},n)}function q(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&\"setAttribute\"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)b===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),b=i.props||p,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],\"children\"==a);else if(\"dangerouslySetInnerHTML\"==a)v=d;else if(!(a in k)){if(\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k)continue;j(u,a,null,d,o)}for(a in k)d=k[a],\"children\"==a?y=d:\"dangerouslySetInnerHTML\"==a?h=d:\"value\"==a?_=d:\"checked\"==a?m=d:c&&\"function\"!=typeof d||b[a]===d||j(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=\"\"),I(\"template\"==t.type?u.content:u,w(y)?y:[y],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a=\"value\",\"progress\"==x&&null==_?u.removeAttribute(\"value\"):null!=_&&(_!==u[a]||\"progress\"==x&&!_||\"option\"==x&&_!=b[a])&&j(u,a,_,b[a],o),a=\"checked\",null!=m&&m!=u[a]&&j(u,a,m,b[a],o))}return u}function B(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function D(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D(i[r],u,t||\"function\"!=typeof n.type);t||g(n.__e),n.__c=n.__=n.__e=void 0}function E(n,l,u){return this.constructor(n,u)}function G(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O(t,u=(!r&&i||t).__k=_(k,null,[u]),o||p,p,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),N(e,u,f)}function J(n,l){G(n,l,J)}function K(l,u,t){var i,r,o,e,f=d({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,r||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0;export{x as Component,k as Fragment,K as cloneElement,Q as createContext,_ as createElement,b as createRef,_ as h,J as hydrate,t as isValidElement,l as options,G as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import { jsx as _jsx } from \"preact/jsx-runtime\";\n/** Renders a group of buttons with Widget CSS */\nexport const ButtonGroup = (props) => {\n const { children, orientation = 'horizontal' } = props;\n return _jsx(\"div\", { className: `deck-widget-button-group ${orientation}`, children: children });\n};\n//# sourceMappingURL=button-group.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\n/** Renders an icon button as part of a ButtonGroup */\nexport const GroupedIconButton = (props) => {\n const { className = '', label, onClick, children } = props;\n return (_jsx(\"button\", { className: `deck-widget-icon-button ${className}`, type: \"button\", onClick: onClick, title: label, children: children ? children : _jsx(\"div\", { className: \"deck-widget-icon\" }) }));\n};\n//# sourceMappingURL=grouped-icon-button.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget, FlyToInterpolator, LinearInterpolator } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { ButtonGroup } from \"./lib/components/button-group.js\";\nimport { GroupedIconButton } from \"./lib/components/grouped-icon-button.js\";\nexport class ZoomWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-zoom';\n this.placement = 'top-left';\n this.viewports = {};\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n const ui = (_jsxs(ButtonGroup, { orientation: this.props.orientation, children: [_jsx(GroupedIconButton, { onClick: () => this.handleZoomIn(), label: this.props.zoomInLabel, className: \"deck-widget-zoom-in\" }), _jsx(GroupedIconButton, { onClick: () => this.handleZoomOut(), label: this.props.zoomOutLabel, className: \"deck-widget-zoom-out\" })] }));\n render(ui, rootElement);\n }\n onViewportChange(viewport) {\n this.viewports[viewport.id] = viewport;\n }\n handleZoom(viewport, nextZoom) {\n const viewId = this.viewId || viewport?.id || 'default-view';\n const nextViewState = {\n ...viewport,\n zoom: nextZoom\n };\n if (this.props.transitionDuration > 0) {\n nextViewState.transitionDuration = this.props.transitionDuration;\n nextViewState.transitionInterpolator =\n 'latitude' in nextViewState\n ? new FlyToInterpolator()\n : new LinearInterpolator({\n transitionProps: ['zoom']\n });\n }\n this.setViewState(viewId, nextViewState);\n }\n handleZoomIn() {\n for (const viewport of Object.values(this.viewports)) {\n this.handleZoom(viewport, viewport.zoom + 1);\n }\n }\n handleZoomOut() {\n for (const viewport of Object.values(this.viewports)) {\n this.handleZoom(viewport, viewport.zoom - 1);\n }\n }\n /** @todo - move to deck or widget manager */\n setViewState(viewId, viewState) {\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState, interactionState: {} });\n }\n}\nZoomWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'zoom',\n placement: 'top-left',\n orientation: 'vertical',\n transitionDuration: 200,\n zoomInLabel: 'Zoom In',\n zoomOutLabel: 'Zoom Out',\n viewId: null\n};\n//# sourceMappingURL=zoom-widget.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\n/** Renders a button component with widget CSS */\nexport const IconButton = (props) => {\n const { className = '', label, onClick, children } = props;\n return (_jsx(\"div\", { className: \"deck-widget-button\", children: _jsx(\"button\", { className: `deck-widget-icon-button ${className}`, type: \"button\", onClick: onClick, title: label, children: children ? children : _jsx(\"div\", { className: \"deck-widget-icon\" }) }) }));\n};\n//# sourceMappingURL=icon-button.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\nimport { render } from 'preact';\nimport { Widget } from '@deck.gl/core';\nimport { IconButton } from \"./lib/components/icon-button.js\";\n/**\n * A button widget that resets the view state of deck to an initial state.\n */\nexport class ResetViewWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-reset-view';\n this.placement = 'top-left';\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n render(_jsx(IconButton, { className: \"deck-widget-reset-focus\", label: this.props.label, onClick: this.handleClick.bind(this) }), rootElement);\n }\n handleClick() {\n const initialViewState = this.props.initialViewState || this.deck?.props.initialViewState;\n this.setViewState(initialViewState);\n }\n setViewState(viewState) {\n const viewId = (this.props.viewId || 'default-view');\n const nextViewState = {\n ...(viewId !== 'default-view' ? viewState?.[viewId] : viewState)\n // only works for geospatial?\n // transitionDuration: this.props.transitionDuration,\n // transitionInterpolator: new FlyToInterpolator()\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });\n }\n}\nResetViewWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'reset-view',\n placement: 'top-left',\n label: 'Reset View',\n initialViewState: undefined,\n viewId: null\n};\n//# sourceMappingURL=reset-view-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget, LinearInterpolator } from '@deck.gl/core';\nimport { render } from 'preact';\nexport class GimbalWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-gimbal';\n this.placement = 'top-left';\n this.viewports = {};\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n const viewId = this.viewId || Object.values(this.viewports)[0]?.id || 'default-view';\n const widgetViewport = this.viewports[viewId];\n const { rotationOrbit, rotationX } = this.getNormalizedRotation(widgetViewport);\n // Note - we use CSS 3D transforms instead of SVG 2D transforms\n const ui = (_jsx(\"div\", { className: \"deck-widget-button\", style: { perspective: 100, pointerEvents: 'auto' }, children: _jsxs(\"button\", { type: \"button\", onClick: () => {\n for (const viewport of Object.values(this.viewports)) {\n this.resetOrbitView(viewport);\n }\n }, title: this.props.label, style: { position: 'relative', width: 26, height: 26 }, children: [_jsx(\"svg\", { className: \"gimbal-outer-ring\", width: \"100%\", height: \"100%\", viewBox: \"0 0 26 26\", style: {\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `rotateY(${rotationOrbit}deg)`\n }, children: _jsx(\"circle\", { cx: \"13\", cy: \"13\", r: \"10\", stroke: \"var(--icon-gimbal-outer-color, rgb(68, 92, 204))\", strokeWidth: this.props.strokeWidth, fill: \"none\" }) }), _jsx(\"svg\", { className: \"gimbal-inner-ring\", width: \"100%\", height: \"100%\", viewBox: \"0 0 26 26\", style: {\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `rotateX(${rotationX}deg)`\n }, children: _jsx(\"circle\", { cx: \"13\", cy: \"13\", r: \"7\", stroke: \"var(--icon-gimbal-inner-color, rgb(240, 92, 68))\", strokeWidth: this.props.strokeWidth, fill: \"none\" }) })] }) }));\n render(ui, rootElement);\n }\n onViewportChange(viewport) {\n this.viewports[viewport.id] = viewport;\n this.updateHTML();\n }\n resetOrbitView(viewport) {\n const viewId = this.getViewId(viewport);\n const viewState = this.getViewState(viewId);\n if ('rotationOrbit' in viewState || 'rotationX' in viewState) {\n const nextViewState = {\n ...viewState,\n rotationOrbit: 0,\n rotationX: 0,\n transitionDuration: this.props.transitionDuration,\n transitionInterpolator: new LinearInterpolator({\n transitionProps: ['rotationOrbit', 'rotationX']\n })\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });\n }\n }\n getNormalizedRotation(viewport) {\n const viewState = this.getViewState(this.getViewId(viewport));\n const [rz, rx] = this.getRotation(viewState);\n const rotationOrbit = normalizeAndClampAngle(rz);\n const rotationX = normalizeAndClampAngle(rx);\n return { rotationOrbit, rotationX };\n }\n getRotation(viewState) {\n if (viewState && ('rotationOrbit' in viewState || 'rotationX' in viewState)) {\n return [-(viewState.rotationOrbit || 0), viewState.rotationX || 0];\n }\n return [0, 0];\n }\n // Move to Widget/WidgetManager?\n getViewId(viewport) {\n const viewId = this.viewId || viewport?.id || 'OrbitView';\n return viewId;\n }\n getViewState(viewId) {\n const viewManager = this.getViewManager();\n const viewState = (viewId && viewManager.getViewState(viewId)) || viewManager.viewState;\n return viewState;\n }\n getViewManager() {\n // @ts-expect-error protected\n const viewManager = this.deck?.viewManager;\n if (!viewManager) {\n throw new Error('wigdet must be added to a deck instance');\n }\n return viewManager;\n }\n}\nGimbalWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'gimbal',\n placement: 'top-left',\n viewId: null,\n label: 'Gimbal',\n strokeWidth: 1.5,\n transitionDuration: 200\n};\nfunction normalizeAndClampAngle(angle) {\n // Bring angle into [-180, 180]\n let normalized = ((((angle + 180) % 360) + 360) % 360) - 180;\n // Avoid rotating the gimbal rings to close to 90 degrees as they will visually disappear\n const AVOID_ANGLE_DELTA = 10;\n const distanceFrom90 = normalized - 90;\n if (Math.abs(distanceFrom90) < AVOID_ANGLE_DELTA) {\n if (distanceFrom90 < AVOID_ANGLE_DELTA) {\n normalized = 90 + AVOID_ANGLE_DELTA;\n }\n else if (distanceFrom90 > -AVOID_ANGLE_DELTA) {\n normalized = 90 - AVOID_ANGLE_DELTA;\n }\n }\n // Clamp to [-80, 80]\n return normalized; // Math.max(-80, Math.min(80, normalized));\n}\n//# sourceMappingURL=gimbal-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget, FlyToInterpolator, WebMercatorViewport, _GlobeViewport } from '@deck.gl/core';\nimport { render } from 'preact';\nexport class CompassWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-compass';\n this.placement = 'top-left';\n this.viewports = {};\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n const viewId = this.viewId || Object.values(this.viewports)[0]?.id || 'default-view';\n const widgetViewport = this.viewports[viewId];\n const [rz, rx] = this.getRotation(widgetViewport);\n const ui = (_jsx(\"div\", { className: \"deck-widget-button\", style: { perspective: 100 }, children: _jsx(\"button\", { type: \"button\", onClick: () => {\n for (const viewport of Object.values(this.viewports)) {\n this.handleCompassReset(viewport);\n }\n }, title: this.props.label, style: { transform: `rotateX(${rx}deg)` }, children: _jsx(\"svg\", { fill: \"none\", width: \"100%\", height: \"100%\", viewBox: \"0 0 26 26\", children: _jsxs(\"g\", { transform: `rotate(${rz},13,13)`, children: [_jsx(\"path\", { d: \"M10 13.0001L12.9999 5L15.9997 13.0001H10Z\", fill: \"var(--icon-compass-north-color, rgb(240, 92, 68))\" }), _jsx(\"path\", { d: \"M16.0002 12.9999L13.0004 21L10.0005 12.9999H16.0002Z\", fill: \"var(--icon-compass-south-color, rgb(204, 204, 204))\" })] }) }) }) }));\n render(ui, rootElement);\n }\n onViewportChange(viewport) {\n // no need to update if viewport is the same\n if (!viewport.equals(this.viewports[viewport.id])) {\n this.viewports[viewport.id] = viewport;\n this.updateHTML();\n }\n }\n getRotation(viewport) {\n if (viewport instanceof WebMercatorViewport) {\n return [-viewport.bearing, viewport.pitch];\n }\n else if (viewport instanceof _GlobeViewport) {\n return [0, Math.max(-80, Math.min(80, viewport.latitude))];\n }\n return [0, 0];\n }\n handleCompassReset(viewport) {\n const viewId = this.viewId || viewport.id || 'default-view';\n if (viewport instanceof WebMercatorViewport) {\n const nextViewState = {\n ...viewport,\n bearing: 0,\n ...(this.getRotation(viewport)[0] === 0 ? { pitch: 0 } : {}),\n transitionDuration: this.props.transitionDuration,\n transitionInterpolator: new FlyToInterpolator()\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });\n }\n }\n}\nCompassWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'compass',\n placement: 'top-left',\n viewId: null,\n label: 'Reset Compass',\n transitionDuration: 200\n};\n//# sourceMappingURL=compass-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\nimport { render } from 'preact';\nimport { Widget } from '@deck.gl/core';\n/**\n * A scale widget that displays a Google Maps–like scale indicator.\n * Instead of text inside a div, this widget renders an SVG that contains a horizontal line\n * with two vertical tick marks (extending upward from the line only) and a pretty distance label\n * positioned to the left of the line. The horizontal line’s length is computed from a “nice”\n * candidate distance (e.g. 200, 500, 1000 m, etc.) so that its pixel width is between 100 and 200.\n */\nexport class ScaleWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-scale';\n this.placement = 'bottom-left';\n // The pixel width of the scale line (computed from a candidate distance)\n this.scaleWidth = 10;\n // The candidate distance (in meters) corresponding to the scale line length.\n this.scaleValue = 0;\n // The formatted distance label (e.g. \"200 m\" or \"1.0 km\")\n this.scaleText = '';\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n // Reserve space for the text label (to the left of the horizontal line)\n const lineOffsetX = 50;\n // Overall SVG width includes the left offset plus the computed scale line width.\n const svgWidth = lineOffsetX + this.scaleWidth;\n const tickHeight = 10; // vertical tick extends upward by 10 pixels from the horizontal line\n render(_jsxs(\"svg\", { className: \"deck-widget-scale\", width: svgWidth, height: 30, style: { overflow: 'visible', background: 'transparent' }, onClick: this.handleClick.bind(this), children: [_jsx(\"text\", { x: lineOffsetX + 5, y: \"10\", textAnchor: \"end\", alignmentBaseline: \"middle\", style: { fontSize: '16px', fill: 'black', fontWeight: 'bold', fontFamily: 'sans-serif' }, children: this.scaleText }), _jsx(\"line\", { x1: lineOffsetX, y1: \"15\", x2: lineOffsetX + this.scaleWidth, y2: \"15\", stroke: \"black\", strokeWidth: \"6\" }), _jsx(\"line\", { x1: lineOffsetX, y1: \"15\", x2: lineOffsetX, y2: 15 - tickHeight, stroke: \"black\", strokeWidth: \"6\" }), _jsx(\"line\", { x1: lineOffsetX + this.scaleWidth, y1: \"15\", x2: lineOffsetX + this.scaleWidth, y2: 15 - tickHeight, stroke: \"black\", strokeWidth: \"6\" })] }), rootElement);\n }\n onViewportChange(viewport) {\n // Only handle geospatial viewports (which contain latitude)\n if (!('latitude' in viewport))\n return;\n const { latitude, zoom } = viewport;\n const metersPerPixel = getMetersPerPixel(latitude, zoom);\n const { candidate, candidatePixels } = computeScaleCandidate(metersPerPixel);\n this.scaleValue = candidate;\n this.scaleWidth = candidatePixels;\n // Format the candidate distance for display (using km if >= 1000 m)\n if (candidate >= 1000) {\n this.scaleText = `${(candidate / 1000).toFixed(1)} km`;\n }\n else {\n this.scaleText = `${candidate} m`;\n }\n this.updateHTML();\n }\n handleClick() { }\n}\nScaleWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'scale',\n placement: 'bottom-left',\n label: 'Scale',\n viewId: null\n};\n/**\n * Compute the meters per pixel at a given latitude and zoom level.\n *\n * @param latitude - The current latitude.\n * @param zoom - The current zoom level.\n * @returns The number of meters per pixel.\n */\nfunction getMetersPerPixel(latitude, zoom) {\n const earthCircumference = 40075016.686;\n return (earthCircumference * Math.cos((latitude * Math.PI) / 180)) / Math.pow(2, zoom + 8);\n}\n/**\n * Compute a \"nice\" scale candidate such that the scale bar width in pixels is between 100 and 200.\n * The candidate distance (in meters) will be one of a set of round numbers (100, 200, 500, 1000, 2000, 5000, etc.).\n *\n * @param metersPerPixel - The number of meters per pixel at the current zoom/latitude.\n * @returns An object containing the candidate distance and its width in pixels.\n */\nfunction computeScaleCandidate(metersPerPixel) {\n const minPixels = 100;\n const maxPixels = 200;\n const targetPixels = (minPixels + maxPixels) / 2;\n const targetDistance = targetPixels * metersPerPixel;\n const exponent = Math.floor(Math.log10(targetDistance));\n const base = Math.pow(10, exponent);\n const multipliers = [1, 2, 5];\n let candidate = multipliers[0] * base;\n let candidatePixels = candidate / metersPerPixel;\n for (let i = 0; i < multipliers.length; i++) {\n const currentCandidate = multipliers[i] * base;\n const currentPixels = currentCandidate / metersPerPixel;\n if (currentPixels >= minPixels && currentPixels <= maxPixels) {\n candidate = currentCandidate;\n candidatePixels = currentPixels;\n break;\n }\n if (currentPixels > maxPixels) {\n candidate = i > 0 ? multipliers[i - 1] * base : currentCandidate;\n candidatePixels = candidate / metersPerPixel;\n break;\n }\n if (i === multipliers.length - 1 && currentPixels < minPixels) {\n candidate = multipliers[0] * base * 10;\n candidatePixels = candidate / metersPerPixel;\n }\n }\n return { candidate, candidatePixels };\n}\n//# sourceMappingURL=scale-widget.js.map","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,h(D,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=p(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=p(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=p(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=p(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],c.__e(t,n.__v)}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,y as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,h as useReducer,A as useRef,d as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\nimport { useState, useRef, useEffect } from 'preact/hooks';\nexport const DropdownMenu = (props) => {\n const [isOpen, setIsOpen] = useState(false);\n const dropdownRef = useRef(null);\n const toggleDropdown = () => setIsOpen(!isOpen);\n const handleClickOutside = (event) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {\n setIsOpen(false);\n }\n };\n useEffect(() => {\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, []);\n const handleSelect = (value) => {\n props.onSelect(value);\n setIsOpen(false);\n };\n return (_jsxs(\"div\", { className: \"dropdown-container\", ref: dropdownRef, style: {\n position: 'relative',\n display: 'inline-block',\n ...props.style\n }, children: [_jsx(\"button\", { onClick: toggleDropdown, style: {\n width: '30px',\n height: '30px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n border: '1px solid #ccc',\n borderRadius: '4px',\n background: '#fff',\n cursor: 'pointer',\n padding: 0\n }, children: \"\\u25BC\" }), isOpen && (_jsx(\"ul\", { style: {\n position: 'absolute',\n top: '100%',\n right: '100%',\n background: '#fff',\n border: '1px solid #ccc',\n borderRadius: '4px',\n listStyle: 'none',\n padding: '4px 0',\n margin: 0,\n zIndex: 1000,\n minWidth: '200px'\n }, children: props.menuItems.map(item => (_jsx(\"li\", { onClick: () => handleSelect(item), style: {\n padding: '4px 8px',\n cursor: 'pointer',\n whiteSpace: 'nowrap'\n }, children: item }, item))) }))] }));\n};\n//# sourceMappingURL=dropdown-menu.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nconst CURRENT_LOCATION = 'current';\nconst LOCAL_STORAGE_KEY = 'deck-geocoder-history';\n/**\n * An internal, experimental helper class for storing a list of locations in local storage.\n * @todo Remove the UI related state.\n */\nexport class GeocoderHistory {\n constructor(props) {\n this.addressText = '';\n this.errorText = '';\n this.addressHistory = [];\n this.props = { maxEntries: 5, ...props };\n this.addressHistory = this.loadPreviousAddresses();\n }\n /** PErform geocoding */\n async geocode(geocoder, address, apiKey) {\n this.errorText = '';\n this.addressText = address;\n try {\n const coordinates = await geocoder.geocode(address, apiKey);\n if (coordinates) {\n this.storeAddress(this.addressText);\n return coordinates;\n }\n this.errorText = 'Invalid address';\n }\n catch (error) {\n this.errorText = `${error.message}`;\n }\n return null;\n }\n loadPreviousAddresses() {\n try {\n const stored = window.localStorage.getItem(LOCAL_STORAGE_KEY);\n const list = stored && JSON.parse(stored);\n const addresses = Array.isArray(list)\n ? list.filter((v) => typeof v === 'string')\n : [];\n return addresses;\n }\n catch {\n // ignore\n }\n return [];\n }\n storeAddress(address) {\n const cleaned = address.trim();\n if (!cleaned || cleaned === CURRENT_LOCATION) {\n return;\n }\n const deduped = [cleaned, ...this.addressHistory.filter(a => a !== cleaned)];\n this.addressHistory = deduped.slice(0, this.props.maxEntries);\n try {\n window.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(this.addressHistory));\n }\n catch {\n // ignore\n }\n }\n}\n//# sourceMappingURL=geocoder-history.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nconst GOOGLE_URL = 'https://maps.googleapis.com/maps/api/geocode/json';\nconst MAPBOX_URL = 'https://api.mapbox.com/geocoding/v5/mapbox.places';\nconst OPENCAGE_API_URL = 'https://api.opencagedata.com/geocode/v1/json';\n/**\n * A geocoder that uses the google geocoding service\n * @note Requires an API key from Google\n * @see https://developers.google.com/maps/documentation/geocoding/get-api-key\n */\nexport const GoogleGeocoder = {\n name: 'google',\n requiresApiKey: true,\n async geocode(address, apiKey) {\n const encodedAddress = encodeURIComponent(address);\n const json = await fetchJson(`${GOOGLE_URL}?address=${encodedAddress}&key=${apiKey}`);\n switch (json.status) {\n case 'OK':\n const loc = json.results.length > 0 && json.results[0].geometry.location;\n return loc ? { longitude: loc.lng, latitude: loc.lat } : null;\n default:\n throw new Error(`Google Geocoder failed: ${json.status}`);\n }\n }\n};\n/**\n * A geocoder that uses the google geocoding service\n * @note Requires an API key from Mapbox\n * @see https://docs.mapbox.com/api/search/geocoding/\n */\nexport const MapboxGeocoder = {\n name: 'google',\n requiresApiKey: true,\n async geocode(address, apiKey) {\n const encodedAddress = encodeURIComponent(address);\n const json = await fetchJson(`${MAPBOX_URL}/${encodedAddress}.json?access_token=${apiKey}`);\n if (Array.isArray(json.features) && json.features.length > 0) {\n const center = json.features[0].center;\n if (Array.isArray(center) && center.length >= 2) {\n return { longitude: center[0], latitude: center[1] };\n }\n }\n return null;\n }\n};\n/**\n * A geocoder that uses the google geocoding service\n * @note Requires an API key from OpenCageData\n * @see https://opencagedata.com/api\n */\nexport const OpenCageGeocoder = {\n name: 'opencage',\n requiresApiKey: true,\n async geocode(address, key) {\n const encodedAddress = encodeURIComponent(address);\n const data = await fetchJson(`${OPENCAGE_API_URL}?q=${encodedAddress}&key=${key}`);\n if (Array.isArray(data.results) && data.results.length > 0) {\n const geometry = data.results[0].geometry;\n return { longitude: geometry.lng, latitude: geometry.lat };\n }\n return null;\n }\n};\n/**\n * A geocoder adapter that wraps the browser's geolocation API. Always returns the user's current location.\n * @note Not technically a geocoder, but a geolocation service that provides a source of locations.\n * @note The user must allow location access for this to work.\n */\nexport const CurrentLocationGeocoder = {\n name: 'current',\n requiresApiKey: false,\n /** Attempt to call browsers geolocation API */\n async geocode() {\n if (!navigator.geolocation) {\n throw new Error('Geolocation not supported');\n }\n return new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n /** @see https://developer.mozilla.org/docs/Web/API/GeolocationPosition */\n (position) => {\n const { longitude, latitude } = position.coords;\n resolve({ longitude, latitude });\n }, \n /** @see https://developer.mozilla.org/docs/Web/API/GeolocationPositionError */\n (error) => reject(new Error(error.message)));\n });\n }\n};\n/** Fetch JSON, catching HTTP errors */\nasync function fetchJson(url) {\n let response;\n try {\n response = await fetch(url);\n }\n catch (error) {\n // Annoyingly, fetch reports some errors (e.g. CORS) using excpetions, not response.ok\n throw new Error(`CORS error? ${error}. ${url}: `);\n }\n if (!response.ok) {\n throw new Error(`${response.statusText}. ${url}: `);\n }\n const data = await response.json();\n if (!data) {\n throw new Error(`No data returned. ${url}`);\n }\n return data;\n}\n/**\n * Parse a coordinate string.\n * Supports comma- or semicolon-separated values.\n * Heuristically determines which value is longitude and which is latitude.\n */\nexport const CoordinatesGeocoder = {\n name: 'coordinates',\n requiresApiKey: false,\n placeholderLocation: `-122.45, 37.8 or 37°48'N, 122°27'W`,\n async geocode(address) {\n return parseCoordinates(address) || null;\n }\n};\n/**\n * Parse an input string for coordinates.\n * Supports comma- or semicolon-separated values.\n * Heuristically determines which value is longitude and which is latitude.\n */\nfunction parseCoordinates(input) {\n input = input.trim();\n const parts = input.split(/[,;]/).map(p => p.trim());\n if (parts.length < 2)\n return null;\n const first = parseCoordinatePart(parts[0]);\n const second = parseCoordinatePart(parts[1]);\n if (first === null || second === null)\n return null;\n // Use a heuristic:\n // If one number exceeds 90 in absolute value, it's likely a longitude.\n if (Math.abs(first) > 90 && Math.abs(second) <= 90) {\n return { longitude: first, latitude: second };\n }\n else if (Math.abs(second) > 90 && Math.abs(first) <= 90) {\n return { longitude: second, latitude: first };\n }\n // If both are <= 90, assume order: latitude, longitude.\n return { latitude: first, longitude: second };\n}\n/**\n * Parse a single coordinate part (which may be in decimal or DMS format).\n */\nfunction parseCoordinatePart(s) {\n s = s.trim();\n // If the string contains a degree symbol or similar markers, use DMS parsing.\n if (s.includes('°') || s.includes(\"'\") || s.includes('\"')) {\n const value = dmsToDecimal(s);\n return isNaN(value) ? null : value;\n }\n // Otherwise, check for a cardinal letter and remove it.\n let sign = 1;\n if (/[SW]/i.test(s))\n sign = -1;\n s = s.replace(/[NSEW]/gi, '');\n const value = parseFloat(s);\n return isNaN(value) ? null : sign * value;\n}\n/** Convert a DMS string (e.g. \"37°48'00\\\"N\") to decimal degrees. */\nfunction dmsToDecimal(s) {\n // A simple regex to extract degrees, minutes, seconds and direction.\n const regex = /(\\d+)[°d]\\s*(\\d+)?['′m]?\\s*(\\d+(?:\\.\\d+)?)?[\\\"″s]?\\s*([NSEW])?/i;\n const match = s.match(regex);\n if (!match)\n return NaN;\n const degrees = parseFloat(match[1]) || 0;\n const minutes = parseFloat(match[2]) || 0;\n const seconds = parseFloat(match[3]) || 0;\n const direction = match[4] || '';\n let dec = degrees + minutes / 60 + seconds / 3600;\n if (/[SW]/i.test(direction)) {\n dec = -dec;\n }\n return dec;\n}\n//# sourceMappingURL=geocoders.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget } from '@deck.gl/core';\nimport { FlyToInterpolator, LinearInterpolator } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { DropdownMenu } from \"./lib/components/dropdown-menu.js\";\nimport { GeocoderHistory } from \"./lib/geocode/geocoder-history.js\";\nimport { GoogleGeocoder, MapboxGeocoder, OpenCageGeocoder, CoordinatesGeocoder, CurrentLocationGeocoder } from \"./lib/geocode/geocoders.js\";\nconst CURRENT_LOCATION = 'current';\n/**\n * A widget that display a text box that lets user type in a location\n * and a button that moves the view to that location.\n * @todo For now only supports coordinates, Could be extended with location service integrations.\n */\nexport class GeocoderWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-geocoder';\n this.placement = 'top-left';\n this.geocodeHistory = new GeocoderHistory({});\n this.addressText = '';\n this.geocoder = CoordinatesGeocoder;\n this.setInput = (text) => {\n this.addressText = text;\n };\n this.handleKeyPress = e => {\n if (e.key === 'Enter') {\n this.handleSubmit();\n }\n };\n this.handleSelect = (address) => {\n this.setInput(address);\n this.handleSubmit();\n };\n /** Sync wrapper for async geocode() */\n this.handleSubmit = () => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.geocode(this.addressText);\n };\n /** Perform geocoding */\n this.geocode = async (address) => {\n const useGeolocation = this.props._geolocation && address === CURRENT_LOCATION;\n const geocoder = useGeolocation ? CurrentLocationGeocoder : this.geocoder;\n const coordinates = await this.geocodeHistory.geocode(geocoder, this.addressText, this.props.apiKey);\n if (coordinates) {\n this.setViewState(coordinates);\n }\n };\n this.viewports = {};\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n this.geocoder = getGeocoder(this.props);\n if (this.geocoder.requiresApiKey && !this.props.apiKey) {\n throw new Error(`API key is required for the ${this.geocoder.name} geocoder`);\n }\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n const menuItems = this.props._geolocation\n ? [CURRENT_LOCATION, ...this.geocodeHistory.addressHistory]\n : [...this.geocodeHistory.addressHistory];\n render(_jsxs(\"div\", { className: \"deck-widget-geocoder\", style: {\n pointerEvents: 'auto',\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap' // Allows wrapping on smaller screens\n }, children: [_jsx(\"input\", { type: \"text\", placeholder: this.geocoder.placeholderLocation ?? 'Enter address or location', value: this.geocodeHistory.addressText, \n // @ts-expect-error event type\n onInput: e => this.setInput(e.target?.value || ''), onKeyPress: this.handleKeyPress, style: {\n flex: '1 1 auto',\n minWidth: '200px',\n margin: 0,\n padding: '8px',\n boxSizing: 'border-box'\n } }), _jsx(DropdownMenu, { menuItems: menuItems, onSelect: this.handleSelect, style: {\n margin: 2,\n padding: '4px 2px',\n boxSizing: 'border-box'\n } }), this.geocodeHistory.errorText && (_jsx(\"div\", { className: \"error\", children: this.geocodeHistory.errorText }))] }), rootElement);\n }\n // TODO - MOVE TO WIDGETIMPL?\n setViewState(viewState) {\n const viewId = this.props.viewId || viewState?.id || 'default-view';\n const viewport = this.viewports[viewId] || {};\n const nextViewState = {\n ...viewport,\n ...viewState\n };\n if (this.props.transitionDuration > 0) {\n nextViewState.transitionDuration = this.props.transitionDuration;\n nextViewState.transitionInterpolator =\n 'latitude' in nextViewState ? new FlyToInterpolator() : new LinearInterpolator();\n }\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });\n }\n onViewportChange(viewport) {\n this.viewports[viewport.id] = viewport;\n }\n}\nGeocoderWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'geocoder',\n viewId: null,\n placement: 'top-left',\n label: 'Geocoder',\n transitionDuration: 200,\n geocoder: 'coordinates',\n customGeocoder: CoordinatesGeocoder,\n apiKey: '',\n _geolocation: false\n};\nfunction getGeocoder(props) {\n switch (props.geocoder) {\n case 'google':\n return GoogleGeocoder;\n case 'mapbox':\n return MapboxGeocoder;\n case 'opencage':\n return OpenCageGeocoder;\n case 'coordinates':\n return CoordinatesGeocoder;\n case 'custom':\n if (!props.customGeocoder) {\n throw new Error('Custom geocoder is not defined');\n }\n return props.customGeocoder;\n default:\n throw new Error(`Unknown geocoder: ${props.geocoder}`);\n }\n}\n//# sourceMappingURL=geocoder-widget.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n/* global document */\nimport { log, Widget } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { IconButton } from \"./lib/components/icon-button.js\";\nexport class FullscreenWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-fullscreen';\n this.placement = 'top-left';\n this.fullscreen = false;\n this.setProps(this.props);\n }\n onAdd() {\n document.addEventListener('fullscreenchange', this.onFullscreenChange.bind(this));\n }\n onRemove() {\n document.removeEventListener('fullscreenchange', this.onFullscreenChange.bind(this));\n }\n onRenderHTML(rootElement) {\n render(_jsx(IconButton, { onClick: () => {\n this.handleClick().catch(err => log.error(err)());\n }, label: this.fullscreen ? this.props.exitLabel : this.props.enterLabel, className: this.fullscreen ? 'deck-widget-fullscreen-exit' : 'deck-widget-fullscreen-enter' }), rootElement);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n getContainer() {\n return this.props.container || this.deck?.getCanvas()?.parentElement;\n }\n onFullscreenChange() {\n const prevFullscreen = this.fullscreen;\n const fullscreen = document.fullscreenElement === this.getContainer();\n if (prevFullscreen !== fullscreen) {\n this.fullscreen = !this.fullscreen;\n }\n this.updateHTML();\n }\n async handleClick() {\n if (this.fullscreen) {\n await this.exitFullscreen();\n }\n else {\n await this.requestFullscreen();\n }\n this.updateHTML();\n }\n async requestFullscreen() {\n const container = this.getContainer();\n if (container?.requestFullscreen) {\n await container.requestFullscreen({ navigationUI: 'hide' });\n }\n else {\n this.togglePseudoFullscreen();\n }\n }\n async exitFullscreen() {\n if (document.exitFullscreen) {\n await document.exitFullscreen();\n }\n else {\n this.togglePseudoFullscreen();\n }\n }\n togglePseudoFullscreen() {\n this.getContainer()?.classList.toggle('deck-pseudo-fullscreen');\n }\n}\nFullscreenWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'fullscreen',\n placement: 'top-left',\n viewId: null,\n enterLabel: 'Enter Fullscreen',\n exitLabel: 'Exit Fullscreen',\n container: undefined\n};\n//# sourceMappingURL=fullscreen-widget.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { render } from 'preact';\nimport { useState, useRef } from 'preact/hooks';\nimport { Widget } from '@deck.gl/core';\n/**\n * A draggable splitter widget that appears as a vertical or horizontal line\n * across the deck.gl canvas. It positions itself based on the split percentage\n * of the first view and provides callbacks when dragged.\n */\nexport class SplitterWidget extends Widget {\n constructor(props) {\n super(props);\n this.className = 'deck-widget-splitter';\n this.placement = 'fill';\n }\n setProps(props) {\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n // Ensure the widget container fills the deck.gl canvas.\n // TODO - Move styling to CSS\n rootElement.style.position = 'absolute';\n rootElement.style.top = '0';\n rootElement.style.left = '0';\n rootElement.style.width = '100%';\n rootElement.style.height = '100%';\n rootElement.style.margin = '0px';\n render(_jsx(Splitter, { orientation: this.props.orientation, initialSplit: this.props.initialSplit, onChange: this.props.onChange, onDragStart: this.props.onDragStart, onDragEnd: this.props.onDragEnd }), rootElement);\n }\n}\nSplitterWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'splitter-widget',\n viewId1: '',\n viewId2: '',\n orientation: 'vertical',\n initialSplit: 0.5,\n onChange: () => { },\n onDragStart: () => { },\n onDragEnd: () => { }\n};\n/**\n * A functional component that renders a draggable splitter line.\n * It computes its position based on the provided split percentage and\n * updates it during mouse drag events.\n */\nfunction Splitter({ orientation, initialSplit, onChange, onDragStart, onDragEnd }) {\n const [split, setSplit] = useState(initialSplit);\n const dragging = useRef(false);\n const containerRef = useRef(null);\n const handleDragStart = (event) => {\n dragging.current = true;\n onDragStart?.();\n document.addEventListener('mousemove', handleDragging);\n document.addEventListener('mouseup', handleDragEnd);\n event.preventDefault();\n };\n const handleDragging = (event) => {\n if (!dragging.current || !containerRef.current)\n return;\n const rect = containerRef.current.getBoundingClientRect();\n let newSplit;\n if (orientation === 'vertical') {\n newSplit = (event.clientX - rect.left) / rect.width;\n }\n else {\n newSplit = (event.clientY - rect.top) / rect.height;\n }\n // Clamp newSplit between 5% and 95%\n newSplit = Math.min(Math.max(newSplit, 0.05), 0.95);\n setSplit(newSplit);\n onChange?.(newSplit);\n };\n const handleDragEnd = (event) => {\n if (!dragging.current)\n return;\n dragging.current = false;\n onDragEnd?.();\n document.removeEventListener('mousemove', handleDragging);\n document.removeEventListener('mouseup', handleDragEnd);\n };\n // The splitter line style based on orientation and the current split percentage.\n const splitterStyle = orientation === 'vertical'\n ? {\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: `${split * 100}%`,\n width: '4px',\n cursor: 'col-resize',\n background: '#ccc',\n zIndex: 10,\n pointerEvents: 'auto',\n boxShadow: 'inset -1px 0 0 white, inset 1px 0 0 white'\n }\n : {\n position: 'absolute',\n left: 0,\n right: 0,\n top: `${split * 100}%`,\n height: '4px',\n cursor: 'row-resize',\n background: '#ccc',\n zIndex: 10,\n pointerEvents: 'auto',\n boxShadow: 'inset -1px 0 0 white, inset 1px 0 0 white'\n };\n // Container style to fill the entire deck.gl canvas.\n const containerStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n return (_jsx(\"div\", { ref: containerRef, style: containerStyle, children: _jsx(\"div\", { style: splitterStyle, onMouseDown: handleDragStart }) }));\n}\n//# sourceMappingURL=splitter-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\nimport { useState, useRef, useEffect } from 'preact/hooks';\nimport { IconButton } from \"./icon-button.js\";\nimport { ButtonGroup } from \"./button-group.js\";\nimport { GroupedIconButton } from \"./grouped-icon-button.js\";\n/** A component that renders an icon popup menu */\nexport function IconMenu(props) {\n const [menuOpen, setMenuOpen] = useState(false);\n const containerRef = useRef(null);\n // Close the menu when clicking outside.\n const handleClickOutside = (event) => {\n if (containerRef.current && !containerRef.current.contains(event.target)) {\n setMenuOpen(false);\n }\n };\n useEffect(() => {\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [containerRef]);\n const [selectedItem, setSelectedItem] = useState(props.initialItem);\n const handleSelectItem = (item) => {\n setSelectedItem(item);\n setMenuOpen(false);\n props.onItemSelected(item);\n };\n const handleButtonClick = () => setMenuOpen(!menuOpen);\n const selectedMenuItem = props.menuItems.find(item => item.value === selectedItem);\n const label = props.label || selectedMenuItem?.label || '';\n const icon = (props.icon || selectedMenuItem?.icon);\n return (_jsxs(\"div\", { style: { position: 'relative', display: 'inline-block' }, ref: containerRef, children: [_jsx(IconButton, { className: props.className, label: label, onClick: handleButtonClick, children: icon }), menuOpen && (_jsx(\"div\", { className: \"deck-widget-icon-menu\", children: _jsx(ButtonGroup, { orientation: \"vertical\", children: props.menuItems.map(item => (_jsx(GroupedIconButton, { label: item.label, onClick: () => handleSelectItem(item.value), children: item.icon }, item.value))) }) }))] }));\n}\n//# sourceMappingURL=icon-menu.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { render } from 'preact';\nimport { Widget } from '@deck.gl/core';\nimport { IconMenu } from \"./lib/components/icon-menu.js\";\n/**\n * A widget that renders a popup menu for selecting a view mode.\n * It displays a button with the current view mode icon. Clicking the button\n * toggles a popup that shows three icons for:\n * - Single view\n * - Two views, split horizontally\n * - Two views, split vertically\n */\nexport class ViewSelectorWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-view-selector';\n this.placement = 'top-left';\n this.handleSelectMode = (viewMode) => {\n this.viewMode = viewMode;\n this.updateHTML();\n this.props.onViewModeChange(viewMode);\n };\n this.viewMode = this.props.initialViewMode;\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n render(_jsx(IconMenu, { className: \"deck-widget-view-selector\", menuItems: MENU_ITEMS.map(item => ({\n ...item,\n icon: item.icon()\n })), initialItem: this.props.initialViewMode, onItemSelected: this.handleSelectMode }), rootElement);\n }\n}\nViewSelectorWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'view-selector',\n placement: 'top-left',\n viewId: null,\n label: 'Split View',\n initialViewMode: 'single',\n onViewModeChange: () => { }\n};\nconst ICON_STYLE = { width: '24px', height: '24px' };\n// JSX wrapped in a function to fix deck's Node tests\nconst ICONS = {\n single: () => (_jsx(\"svg\", { width: \"24\", height: \"24\", style: ICON_STYLE, children: _jsx(\"rect\", { x: \"4\", y: \"4\", width: \"16\", height: \"16\", stroke: \"var(--button-icon-hover, rgb(24, 24, 26))\", fill: \"none\", strokeWidth: \"2\" }) })),\n 'split-horizontal': () => (_jsxs(\"svg\", { width: \"24\", height: \"24\", style: ICON_STYLE, children: [_jsx(\"rect\", { x: \"4\", y: \"4\", width: \"16\", height: \"7\", stroke: \"var(--button-icon-hover, rgb(24, 24, 26))\", fill: \"none\", strokeWidth: \"2\" }), _jsx(\"rect\", { x: \"4\", y: \"13\", width: \"16\", height: \"7\", stroke: \"var(--button-icon-hover, rgb(24, 24, 26))\", fill: \"none\", strokeWidth: \"2\" })] })),\n 'split-vertical': () => (_jsxs(\"svg\", { width: \"24\", height: \"24\", style: ICON_STYLE, children: [_jsx(\"rect\", { x: \"4\", y: \"4\", width: \"7\", height: \"16\", stroke: \"var(--button-icon-hover, rgb(24, 24, 26))\", fill: \"none\", strokeWidth: \"2\" }), _jsx(\"rect\", { x: \"13\", y: \"4\", width: \"7\", height: \"16\", stroke: \"var(--button-icon-hover, rgb(24, 24, 26))\", fill: \"none\", strokeWidth: \"2\" })] }))\n};\n// Define menu items for the popup menu.\nconst MENU_ITEMS = [\n { value: 'single', icon: ICONS.single, label: 'Single View' },\n { value: 'split-horizontal', icon: ICONS['split-horizontal'], label: 'Split Horizontal' },\n { value: 'split-vertical', icon: ICONS['split-vertical'], label: 'Split Vertical' }\n];\n//# sourceMappingURL=view-selector-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget } from '@deck.gl/core';\nimport { render } from 'preact';\nexport class InfoWidget extends Widget {\n constructor(props) {\n super(props);\n this.className = 'deck-widget-info';\n this.placement = 'fill';\n this.setProps(this.props);\n }\n setProps(props) {\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onCreateRootElement() {\n const element = super.onCreateRootElement();\n const style = { margin: '0px', top: '0px', left: '0px', position: 'absolute' };\n Object.entries(style).forEach(([key, value]) => element.style.setProperty(key, value));\n return element;\n }\n onViewportChange(viewport) {\n this.viewport = viewport;\n this.updateHTML();\n }\n onHover(info) {\n if (this.props.mode === 'hover' && this.props.getTooltip) {\n const tooltip = this.props.getTooltip(info, this);\n // hover tooltips should show over static and click infos\n this.setProps({\n visible: tooltip !== null,\n ...tooltip,\n style: { zIndex: '1', ...tooltip?.style }\n });\n }\n }\n onClick(info) {\n if (this.props.mode === 'click' && this.props.getTooltip) {\n const tooltip = this.props.getTooltip(info, this);\n this.setProps({\n visible: tooltip !== null,\n ...tooltip\n });\n return tooltip !== null;\n }\n // Original behavior\n return this.props.onClick?.(this, info) || false;\n }\n onAdd({ deck, viewId }) {\n this.deck = deck;\n if (!viewId) {\n this.viewport = deck.getViewports()[0];\n }\n else {\n this.viewport = deck.getViewports().find(viewport => viewport.id === viewId);\n }\n }\n onRenderHTML(rootElement) {\n if (!this.viewport) {\n return;\n }\n const [longitude, latitude] = this.props.position;\n // Project the clicked geographic coordinate to canvas (x, y)\n const [x, y] = this.viewport.project([longitude, latitude]);\n const minOffset = this.props.minOffset || 0;\n const gap = 10; // gap between clicked point and popup box\n const arrowHeight = 8; // height of the triangle arrow\n const arrowWidth = 16; // full width of the arrow\n // Decide vertical orientation.\n // If the clicked point is in the bottom half, place the popup above the point.\n const isAbove = y > this.viewport.height / 2;\n const background = (this.props.style && this.props.style.background) || 'rgba(255,255,255,0.9)';\n // Render the popup container with a content box and a placeholder for the arrow.\n // The container is positioned absolutely (initially at 0,0) and will be repositioned after measuring.\n const ui = this.props.visible ? (_jsxs(\"div\", { className: \"popup-container\", style: { position: 'absolute', left: 0, top: 0 }, children: [_jsx(\"div\", { className: \"popup-content\", style: {\n background,\n padding: '10px',\n position: 'relative',\n // Include any additional styles\n ...this.props.style\n }, children: this.props.text }), _jsx(\"div\", { className: \"popup-arrow\", style: { position: 'absolute', width: '0px', height: '0px' } })] })) : null;\n render(ui, rootElement);\n // After rendering, measure the content and adjust positioning so that:\n // - The popup (with its arrow) does not cover the clicked point.\n // - The arrow's tip points to the clicked point.\n // - The popup remains within the canvas bounds, with minOffset.\n // eslint-disable-next-line max-statements, complexity\n requestAnimationFrame(() => {\n if (!this.props.visible || !rootElement.firstChild || !this.viewport)\n return;\n const container = rootElement.firstChild;\n const contentEl = container.querySelector('.popup-content');\n const arrowEl = container.querySelector('.popup-arrow');\n if (!contentEl || !arrowEl)\n return;\n const contentRect = contentEl.getBoundingClientRect();\n const popupWidth = contentRect.width;\n const popupHeight = contentRect.height;\n // Compute ideal horizontal position: center the popup on the clicked x\n let computedLeft = x - popupWidth / 2;\n // Compute vertical position based on orientation:\n // If the popup is above, position its bottom edge (minus arrow & gap) at the clicked y.\n // Otherwise, position its top edge (plus arrow & gap) at the clicked y.\n let computedTop;\n if (isAbove) {\n computedTop = y - gap - arrowHeight - popupHeight;\n }\n else {\n computedTop = y + gap + arrowHeight;\n }\n // Ensure the popup (content) stays within horizontal bounds of the canvas\n if (computedLeft < minOffset) {\n computedLeft = minOffset;\n }\n if (computedLeft + popupWidth > this.viewport.width - minOffset) {\n computedLeft = this.viewport.width - minOffset - popupWidth;\n }\n // Ensure the vertical position (including the arrow) stays within canvas bounds.\n if (isAbove) {\n if (computedTop < minOffset) {\n computedTop = minOffset;\n }\n }\n else if (computedTop + popupHeight + arrowHeight > this.viewport.height - minOffset) {\n computedTop = this.viewport.height - minOffset - popupHeight - arrowHeight;\n }\n // Update container position (remove any transform and set left/top explicitly)\n container.style.left = `${computedLeft}px`;\n container.style.top = `${computedTop}px`;\n container.style.transform = '';\n // Compute arrow's horizontal offset relative to the container.\n // We want the arrow's tip to align with the clicked point.\n let arrowLeft = x - computedLeft - arrowWidth / 2;\n // Optionally constrain arrowLeft so it stays within the popup's width.\n arrowLeft = Math.max(arrowLeft, 0);\n arrowLeft = Math.min(arrowLeft, popupWidth - arrowWidth);\n // Update arrow element's style based on orientation.\n if (isAbove) {\n // Popup is above the clicked point so arrow appears at the bottom of the popup.\n arrowEl.style.left = `${arrowLeft}px`;\n arrowEl.style.bottom = `-${arrowHeight}px`;\n arrowEl.style.top = '';\n arrowEl.style.borderLeft = `${arrowWidth / 2}px solid transparent`;\n arrowEl.style.borderRight = `${arrowWidth / 2}px solid transparent`;\n arrowEl.style.borderTop = `${arrowHeight}px solid ${background}`;\n arrowEl.style.borderBottom = '';\n }\n else {\n // Popup is below the clicked point so arrow appears at the top.\n arrowEl.style.left = `${arrowLeft}px`;\n arrowEl.style.top = `-${arrowHeight}px`;\n arrowEl.style.bottom = '';\n arrowEl.style.borderLeft = `${arrowWidth / 2}px solid transparent`;\n arrowEl.style.borderRight = `${arrowWidth / 2}px solid transparent`;\n arrowEl.style.borderBottom = `${arrowHeight}px solid ${background}`;\n arrowEl.style.borderTop = '';\n }\n });\n }\n}\nInfoWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'info',\n position: [0, 0],\n text: '',\n visible: false,\n minOffset: 0,\n viewId: null,\n mode: 'hover',\n getTooltip: undefined,\n onClick: undefined\n};\n//# sourceMappingURL=info-widget.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\nconst MENU_STYLE = {\n position: 'absolute',\n top: '100%',\n left: 0,\n background: 'white',\n border: '1px solid #ccc',\n borderRadius: '4px',\n marginTop: 'var(--menu-gap, 4px)',\n zIndex: 100\n};\nconst MENU_ITEM_STYLE = {\n background: 'white',\n border: 'none',\n padding: '4px',\n cursor: 'pointer',\n pointerEvents: 'auto'\n};\n/** Renders a simple dropdown menu at an arbitrary position */\nexport const SimpleMenu = (props) => {\n const { menuItems, onItemSelected, position, style } = props;\n const styleOverride = {\n ...MENU_STYLE,\n ...style,\n left: `${position.x}px`,\n top: `${position.y}px`\n };\n return (_jsx(\"div\", { style: styleOverride, children: menuItems.map(({ key, label }) => (_jsx(\"button\", { style: { ...MENU_ITEM_STYLE, display: 'block' }, onClick: _ => onItemSelected(key), children: label }, key))) }));\n};\n//# sourceMappingURL=simple-menu.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n/* global document */\nimport { Widget } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { SimpleMenu } from \"./lib/components/simple-menu.js\";\n/** The standard, modern way is to use event.button === 2, where button is the standardized property (0 = left, 1 = middle, 2 = right). */\nconst MOUSE_BUTTON_RIGHT = 2;\n/** A name for the legacy MouseEvent.which value that corresponds to the right-mouse button. In older browsers, the check is: if (event.which === 3) */\nconst MOUSE_WHICH_RIGHT = 3;\nexport class ContextMenuWidget extends Widget {\n constructor(props) {\n super(props);\n this.className = 'deck-widget-context-menu';\n this.placement = 'fill';\n this.pickInfo = null;\n this.pickInfo = null;\n this.setProps(this.props);\n }\n onAdd({ deck }) {\n const element = document.createElement('div');\n element.classList.add('deck-widget', 'deck-widget-context-menu');\n const style = {\n margin: '0px',\n top: '0px',\n left: '0px',\n position: 'absolute',\n pointerEvents: 'auto'\n };\n Object.entries(style).forEach(([key, value]) => element.style.setProperty(key, value));\n deck.getCanvas()?.addEventListener('click', () => this.hide());\n deck.getCanvas()?.addEventListener('contextmenu', event => this.handleContextMenu(event));\n return element;\n }\n onRenderHTML(rootElement) {\n const { visible, position, menuItems } = this.props;\n const ui = visible && menuItems.length ? (_jsx(SimpleMenu, { menuItems: menuItems, onItemSelected: key => this.props.onMenuItemSelected(key, this.pickInfo), position: position, style: { pointerEvents: 'auto' } })) : null;\n render(ui, rootElement);\n }\n handleContextMenu(srcEvent) {\n if (srcEvent &&\n (srcEvent.button === MOUSE_BUTTON_RIGHT || srcEvent.which === MOUSE_WHICH_RIGHT)) {\n this.pickInfo =\n this.deck?.pickObject({\n x: srcEvent.clientX,\n y: srcEvent.clientY\n }) || null;\n const menuItems = (this.pickInfo && this.props.getMenuItems?.(this.pickInfo, this)) || [];\n const visible = menuItems.length > 0;\n this.setProps({\n visible,\n position: { x: srcEvent.clientX, y: srcEvent.clientY },\n menuItems\n });\n this.updateHTML();\n srcEvent.preventDefault();\n return visible;\n }\n return false;\n }\n hide() {\n this.setProps({ visible: false });\n }\n}\nContextMenuWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'context',\n viewId: null,\n visible: false,\n position: { x: 0, y: 0 },\n getMenuItems: undefined,\n menuItems: [],\n // eslint-disable-next-line no-console\n onMenuItemSelected: (key, pickInfo) => console.log('Context menu item selected:', key, pickInfo)\n};\n//# sourceMappingURL=context-menu-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { IconButton } from \"./lib/components/icon-button.js\";\nexport class TimelineWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.id = 'timeline';\n this.className = 'deck-widget-timeline';\n this.placement = 'bottom-left';\n this.playing = false;\n this.timerId = null;\n this.handlePlayPause = () => {\n if (this.playing) {\n this.stop();\n }\n else {\n this.start();\n }\n };\n this.handleSliderChange = (e) => {\n const input = e.target;\n const val = Number(input.value);\n this.currentTime = val;\n this.props.onTimeChange(val);\n this.updateHTML();\n };\n this.tick = () => {\n const [min, max] = this.props.timeRange;\n let next = this.currentTime + this.props.step;\n if (next > max) {\n next = min;\n }\n this.currentTime = next;\n this.props.onTimeChange(next);\n this.updateHTML();\n if (this.playing) {\n this.timerId = window.setTimeout(this.tick, this.props.playInterval);\n }\n };\n this.currentTime = this.props.initialTime ?? this.props.timeRange[0];\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onAdd() {\n this.playing = false;\n this.timerId = null;\n }\n onRemove() {\n this.stop();\n }\n onRenderHTML(rootElement) {\n render(_jsxs(\"div\", { style: { display: 'flex', alignItems: 'center', pointerEvents: 'auto' }, children: [_jsx(IconButton, { label: this.playing ? 'Pause' : 'Play', onClick: this.handlePlayPause, children: _jsx(\"div\", { className: \"text\", children: this.playing ? '⏸' : '▶' }) }), _jsx(\"input\", { type: \"range\", className: \"timeline-slider\", min: this.props.timeRange[0], max: this.props.timeRange[1], step: this.props.step, value: this.currentTime, onInput: this.handleSliderChange })] }), rootElement);\n }\n start() {\n this.playing = true;\n this.updateHTML();\n this.tick();\n }\n stop() {\n this.playing = false;\n if (this.timerId !== null) {\n window.clearTimeout(this.timerId);\n this.timerId = null;\n }\n this.updateHTML();\n }\n}\nTimelineWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'timeline',\n placement: 'bottom-left',\n viewId: null,\n timeRange: [0, 100],\n step: 1,\n initialTime: undefined,\n onTimeChange: () => { },\n playInterval: 1000\n};\n//# sourceMappingURL=timeline-widget.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\nimport { render } from 'preact';\nimport { Widget } from '@deck.gl/core';\nimport { IconButton } from \"./lib/components/icon-button.js\";\n/**\n * A button widget that captures a screenshot of the current canvas and downloads it as a (png) file.\n * @note only captures canvas contents, not HTML DOM or CSS styles\n */\nexport class ScreenshotWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-screenshot';\n this.placement = 'top-left';\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n render(_jsx(IconButton, { className: \"deck-widget-camera\", label: this.props.label, onClick: this.handleClick.bind(this) }), rootElement);\n }\n handleClick() {\n // Allow user to override the capture logic\n if (this.props.onCapture) {\n this.props.onCapture(this);\n return;\n }\n const dataURL = this.captureScreenToDataURL(this.props.imageFormat);\n if (dataURL) {\n this.downloadDataURL(dataURL, this.props.filename);\n }\n }\n /** @note only captures canvas contents, not HTML DOM or CSS styles */\n captureScreenToDataURL(imageFormat) {\n const canvas = this.deck?.getCanvas();\n return canvas?.toDataURL(imageFormat);\n }\n /** Download a data URL */\n downloadDataURL(dataURL, filename) {\n const link = document.createElement('a');\n link.href = dataURL;\n link.download = filename;\n link.click();\n }\n}\nScreenshotWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'screenshot',\n placement: 'top-left',\n viewId: null,\n label: 'Screenshot',\n filename: 'screenshot.png',\n imageFormat: 'image/png',\n onCapture: undefined\n};\n//# sourceMappingURL=screenshot-widget.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport const LightTheme = {\n '--widget-margin': '12px',\n '--button-size': '28px',\n '--button-corner-radius': '8px',\n '--button-background': '#fff',\n '--button-stroke': 'rgba(255, 255, 255, 0.3)',\n '--button-inner-stroke': 'unset',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',\n '--button-backdrop-filter': 'unset',\n '--button-icon-idle': 'rgba(97, 97, 102, 1)',\n '--button-icon-hover': 'rgba(24, 24, 26, 1)',\n '--button-text': 'rgb(24, 24, 26, 1)',\n '--icon-compass-north-color': 'rgb(240, 92, 68)',\n '--icon-compass-south-color': 'rgb(204, 204, 204)',\n '--menu-gap': '4px'\n};\nexport const DarkTheme = {\n '--widget-margin': '12px',\n '--button-size': '28px',\n '--button-corner-radius': '8px',\n '--button-background': 'rgba(18, 18, 20, 1)',\n '--button-stroke': 'rgba(18, 18, 20, 0.30)',\n '--button-inner-stroke': 'unset',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',\n '--button-backdrop-filter': 'unset',\n '--button-icon-idle': 'rgba(158, 157, 168, 1)',\n '--button-icon-hover': 'rgba(215, 214, 229, 1)',\n '--button-text': 'rgb(215, 214, 229, 1)',\n '--icon-compass-north-color': 'rgb(240, 92, 68)',\n '--icon-compass-south-color': 'rgb(200, 199, 209)',\n '--menu-gap': '4px'\n};\nexport const LightGlassTheme = {\n '--widget-margin': '12px',\n '--button-size': '28px',\n '--button-corner-radius': '8px',\n '--button-background': 'rgba(255, 255, 255, 0.6)',\n '--button-stroke': 'rgba(255, 255, 255, 0.3)',\n '--button-inner-stroke': '1px solid rgba(255, 255, 255, 0.6)',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',\n '--button-backdrop-filter': 'blur(4px)',\n '--button-icon-idle': 'rgba(97, 97, 102, 1)',\n '--button-icon-hover': 'rgba(24, 24, 26, 1)',\n '--button-text': 'rgb(24, 24, 26, 1)',\n '--icon-compass-north-color': 'rgb(240, 92, 68)',\n '--icon-compass-south-color': 'rgb(204, 204, 204)',\n '--menu-gap': '4px'\n};\nexport const DarkGlassTheme = {\n '--widget-margin': '12px',\n '--button-size': '28px',\n '--button-corner-radius': '8px',\n '--button-background': 'rgba(18, 18, 20, 0.75)',\n '--button-stroke': 'rgba(18, 18, 20, 0.30)',\n '--button-inner-stroke': '1px solid rgba(18, 18, 20, 0.75)',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',\n '--button-backdrop-filter': 'blur(4px)',\n '--button-icon-idle': 'rgba(158, 157, 168, 1)',\n '--button-icon-hover': 'rgba(215, 214, 229, 1)',\n '--button-text': 'rgb(215, 214, 229, 1)',\n '--icon-compass-north-color': 'rgb(240, 92, 68)',\n '--icon-compass-south-color': 'rgb(200, 199, 209)',\n '--menu-gap': '4px'\n};\n//# sourceMappingURL=themes.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { log, _deepEqual as deepEqual, _applyStyles as applyStyles } from '@deck.gl/core';\nimport { Widget } from '@deck.gl/core';\nimport { render } from 'preact';\n// import {useCallback} from 'preact/hooks';\nimport { IconButton } from \"./lib/components/icon-button.js\";\nimport { LightGlassTheme, DarkGlassTheme } from \"./themes.js\";\nexport class ThemeWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-theme';\n this.placement = 'top-left';\n this.themeMode = 'dark';\n this.themeMode = this._getInitialThemeMode();\n this.setProps(this.props);\n }\n // eslint-disable-next-line complexity\n setProps(props) {\n const { lightModeTheme, darkModeTheme } = this.props;\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n switch (this.themeMode) {\n case 'light':\n if (props.lightModeTheme && !deepEqual(props.lightModeTheme, lightModeTheme, 1)) {\n this._setThemeMode('light');\n }\n break;\n case 'dark':\n if (props.darkModeTheme && !deepEqual(props.darkModeTheme, darkModeTheme, 1)) {\n this._setThemeMode('dark');\n }\n break;\n default:\n log.warn(`Invalid theme mode ${this.themeMode}`)();\n }\n }\n onRenderHTML(rootElement) {\n const { lightModeLabel, darkModeLabel } = this.props;\n // const onClick = useCallback(this._handleClick.bind(this), [this._handleClick]);\n render(_jsx(IconButton, { onClick: this._handleClick.bind(this), label: this.themeMode === 'dark' ? darkModeLabel : lightModeLabel, className: this.themeMode === 'dark' ? 'deck-widget-moon' : 'deck-widget-sun' }), rootElement);\n }\n onAdd() {\n // Note: theme styling is applied in here onAdd() once DOM element is created\n this._setThemeMode(this.themeMode);\n }\n _handleClick() {\n const newThemeMode = this.themeMode === 'dark' ? 'light' : 'dark';\n this._setThemeMode(newThemeMode);\n }\n _setThemeMode(themeMode) {\n this.themeMode = themeMode;\n const container = this.rootElement?.closest('.deck-widget-container');\n if (container) {\n const themeStyle = themeMode === 'dark' ? this.props.darkModeTheme : this.props.lightModeTheme;\n applyStyles(container, themeStyle);\n const label = this.themeMode === 'dark' ? this.props.darkModeLabel : this.props.lightModeLabel;\n log.log(1, `Switched theme to ${label}`, themeStyle)();\n this.updateHTML();\n }\n }\n /** Read browser preference */\n _getInitialThemeMode() {\n const { initialThemeMode } = this.props;\n return initialThemeMode === 'auto'\n ? window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light'\n : initialThemeMode;\n }\n}\nThemeWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'theme',\n placement: 'top-left',\n viewId: null,\n lightModeLabel: 'Light Mode',\n lightModeTheme: LightGlassTheme,\n darkModeLabel: 'Dark Mode',\n darkModeTheme: DarkGlassTheme,\n initialThemeMode: 'auto'\n};\n//# sourceMappingURL=theme-widget.js.map","import { jsx as _jsx } from \"preact/jsx-runtime\";\nimport { render } from 'preact';\nimport { Widget } from '@deck.gl/core';\nimport { IconButton } from \"./lib/components/icon-button.js\";\n/**\n * A non-interactive widget that shows a loading spinner if any layers are loading data\n */\nexport class LoadingWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-loading';\n this.placement = 'top-left';\n this.loading = true;\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onRenderHTML(rootElement) {\n render(\n // TODO(ibgreen) - this should not be a button, but styling is so nested that it is easier to reuse this component.\n this.loading && (_jsx(IconButton, { className: \"deck-widget-spinner\", label: this.props.label, onClick: this.handleClick.bind(this) })), rootElement);\n }\n onRedraw({ layers }) {\n const loading = layers.some(layer => !layer.isLoaded);\n if (loading !== this.loading) {\n this.loading = loading;\n this.updateHTML();\n }\n }\n // TODO(ibgreen) - this should not be a button, see above.\n handleClick() { }\n}\nLoadingWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'loading',\n placement: 'top-left',\n viewId: null,\n label: 'Loading layer data'\n};\n//# sourceMappingURL=loading-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { IconButton } from \"./lib/components/icon-button.js\";\n/**\n * Displays the average frames per second reported by the Deck instance.\n */\nexport class FpsWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-fps';\n this.placement = 'top-left';\n this._lastFps = -1;\n this.setProps(this.props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n super.setProps(props);\n }\n onAdd({}) {\n this._lastFps = this._getFps();\n requestAnimationFrame(() => this._animate());\n }\n onRenderHTML(rootElement) {\n const fps = this._getFps();\n render(_jsx(IconButton, { children: _jsxs(\"div\", { className: \"text\", children: [\"FPS\", _jsx(\"br\", {}), fps] }) }), rootElement);\n }\n _animate() {\n const fps = this._getFps();\n if (this._lastFps !== fps) {\n this._lastFps = fps;\n this.updateHTML();\n }\n requestAnimationFrame(() => this._animate());\n }\n _getFps() {\n // @ts-expect-error protected\n return Math.round(this.deck?.metrics.fps ?? 0);\n }\n}\nFpsWidget.defaultProps = {\n ...Widget.defaultProps,\n id: 'fps',\n placement: 'top-left',\n viewId: null\n};\n//# sourceMappingURL=fps-widget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Widget } from '@deck.gl/core';\nimport { luma } from '@luma.gl/core';\nimport { render } from 'preact';\nconst RIGHT_ARROW = '\\u25b6';\nconst DOWN_ARROW = '\\u2b07';\nconst DEFAULT_COUNT_FORMATTER = (stat) => `${stat.name}: ${stat.count}`;\nfunction formatTime(time) {\n return time < 1000 ? `${time.toFixed(2)}ms` : `${(time / 1000).toFixed(2)}s`;\n}\nfunction formatMemory(bytes) {\n const mb = bytes / 1e6;\n return `${mb.toFixed(1)} MB`;\n}\nexport const DEFAULT_FORMATTERS = {\n count: DEFAULT_COUNT_FORMATTER,\n averageTime: (stat) => `${stat.name}: ${formatTime(stat.getAverageTime())}`,\n totalTime: (stat) => `${stat.name}: ${formatTime(stat.time)}`,\n fps: (stat) => `${stat.name}: ${Math.round(stat.getHz())}fps`,\n memory: (stat) => `${stat.name}: ${formatMemory(stat.count)}`\n};\n/** Displays probe.gl stats in a floating pop-up. */\nexport class StatsWidget extends Widget {\n constructor(props = {}) {\n super(props);\n this.className = 'deck-widget-stats';\n this.placement = 'top-left';\n this._counter = 0;\n this.collapsed = true;\n this._toggleCollapsed = () => {\n this.collapsed = !this.collapsed;\n this.updateHTML();\n };\n this._formatters = { ...DEFAULT_FORMATTERS };\n this._resetOnUpdate = { ...this.props.resetOnUpdate };\n this._stats = this.props.stats;\n this.setProps(props);\n }\n setProps(props) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n this._stats = this._getStats();\n if (props.formatters) {\n for (const name in props.formatters) {\n const f = props.formatters[name];\n this._formatters[name] =\n typeof f === 'string' ? DEFAULT_FORMATTERS[f] || DEFAULT_COUNT_FORMATTER : f;\n }\n }\n if (props.resetOnUpdate) {\n this._resetOnUpdate = { ...props.resetOnUpdate };\n }\n super.setProps(props);\n }\n onAdd() {\n this._stats = this._getStats();\n this.updateHTML();\n }\n onRenderHTML(rootElement) {\n const stats = this._stats;\n const collapsed = this.collapsed;\n const title = this.props.title || stats?.id || 'Stats';\n const items = [];\n if (!collapsed && stats) {\n stats.forEach(stat => {\n const lines = this._getLines(stat);\n if (this._resetOnUpdate && this._resetOnUpdate[stat.name]) {\n stat.reset();\n }\n lines.forEach((line, i) => {\n items.push(_jsx(\"div\", { style: { whiteSpace: 'pre' }, children: line }, `${stat.name}-${i}`));\n });\n });\n }\n render(_jsxs(\"div\", { className: \"deck-widget-stats-container\", style: { cursor: 'default' }, children: [_jsxs(\"div\", { className: \"deck-widget-stats-header\", style: { cursor: 'pointer', pointerEvents: 'auto' }, onClick: this._toggleCollapsed, children: [collapsed ? RIGHT_ARROW : DOWN_ARROW, \" \", title] }), !collapsed && _jsx(\"div\", { className: \"deck-widget-stats-content\", children: items })] }), rootElement);\n }\n onRedraw() {\n const framesPerUpdate = Math.max(1, this.props.framesPerUpdate || 1);\n if (this._counter++ % framesPerUpdate === 0) {\n this._stats = this._getStats();\n this.updateHTML();\n }\n }\n _getStats() {\n switch (this.props.type) {\n case 'deck':\n // @ts-expect-error stats is protected\n return this.deck?.stats;\n case 'luma':\n return Array.from(luma.stats.stats.values())[0];\n case 'device':\n // @ts-expect-error is protected\n const device = this.deck?.device;\n const stats = device?.statsManager.stats.values();\n return stats ? Array.from(stats)[0] : undefined;\n case 'custom':\n return this.props.stats;\n default:\n throw new Error(`Unknown stats type: ${this.props.type}`);\n }\n }\n _getLines(stat) {\n const formatter = this._formatters[stat.name] || this._formatters[stat.type || ''] || DEFAULT_COUNT_FORMATTER;\n return formatter(stat).split('\\n');\n }\n}\nStatsWidget.defaultProps = {\n ...Widget.defaultProps,\n type: 'deck',\n placement: 'top-left',\n viewId: null,\n stats: undefined,\n title: 'Stats',\n framesPerUpdate: 1,\n formatters: {},\n resetOnUpdate: {},\n id: 'stats'\n};\n//# sourceMappingURL=stats-widget.js.map"],"names":["n","l","u","i","r","o","e","f","c","s","a","p","v","y","w","d","g","_","t","m","k","x","S","C","M","$","O","N","I","h","b","P","B","A","L","D","T","j","F","H","E","V","z","q","G","ButtonGroup","props","children","orientation","_jsx","GroupedIconButton","className","label","onClick","ZoomWidget","Widget","rootElement","ui","_jsxs","render","viewport","nextZoom","viewId","nextViewState","FlyToInterpolator","LinearInterpolator","viewState","IconButton","ResetViewWidget","initialViewState","GimbalWidget","widgetViewport","rotationOrbit","rotationX","rz","rx","normalizeAndClampAngle","viewManager","angle","normalized","AVOID_ANGLE_DELTA","distanceFrom90","CompassWidget","WebMercatorViewport","_GlobeViewport","ScaleWidget","svgWidth","tickHeight","latitude","zoom","metersPerPixel","getMetersPerPixel","candidate","candidatePixels","computeScaleCandidate","targetDistance","exponent","base","multipliers","currentCandidate","currentPixels","DropdownMenu","isOpen","setIsOpen","useState","dropdownRef","useRef","toggleDropdown","handleClickOutside","event","useEffect","handleSelect","value","item","CURRENT_LOCATION","LOCAL_STORAGE_KEY","GeocoderHistory","geocoder","address","apiKey","coordinates","error","stored","list","cleaned","deduped","GOOGLE_URL","MAPBOX_URL","OPENCAGE_API_URL","GoogleGeocoder","encodedAddress","json","fetchJson","loc","MapboxGeocoder","center","OpenCageGeocoder","key","data","geometry","CurrentLocationGeocoder","resolve","reject","position","longitude","url","response","CoordinatesGeocoder","parseCoordinates","input","parts","first","parseCoordinatePart","second","dmsToDecimal","sign","regex","match","degrees","minutes","seconds","direction","dec","GeocoderWidget","text","getGeocoder","menuItems","FullscreenWidget","err","log","prevFullscreen","fullscreen","container","SplitterWidget","Splitter","initialSplit","onChange","onDragStart","onDragEnd","split","setSplit","dragging","containerRef","handleDragStart","handleDragging","handleDragEnd","rect","newSplit","splitterStyle","IconMenu","menuOpen","setMenuOpen","selectedItem","setSelectedItem","handleSelectItem","handleButtonClick","selectedMenuItem","icon","ViewSelectorWidget","viewMode","MENU_ITEMS","ICON_STYLE","ICONS","InfoWidget","element","info","tooltip","deck","minOffset","gap","arrowHeight","arrowWidth","isAbove","background","contentEl","arrowEl","contentRect","popupWidth","popupHeight","computedLeft","computedTop","arrowLeft","MENU_STYLE","MENU_ITEM_STYLE","SimpleMenu","onItemSelected","style","styleOverride","MOUSE_BUTTON_RIGHT","MOUSE_WHICH_RIGHT","ContextMenuWidget","visible","srcEvent","pickInfo","TimelineWidget","val","min","max","next","ScreenshotWidget","dataURL","imageFormat","filename","link","LightTheme","DarkTheme","LightGlassTheme","DarkGlassTheme","ThemeWidget","lightModeTheme","darkModeTheme","deepEqual","lightModeLabel","darkModeLabel","newThemeMode","themeMode","themeStyle","applyStyles","initialThemeMode","LoadingWidget","layers","loading","layer","FpsWidget","fps","RIGHT_ARROW","DOWN_ARROW","DEFAULT_COUNT_FORMATTER","stat","formatTime","time","formatMemory","bytes","DEFAULT_FORMATTERS","StatsWidget","name","stats","collapsed","title","items","lines","line","framesPerUpdate","luma"],"mappings":"wSAAG,IAACA,EAAEC,EAAEC,GAAIC,EAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAIC,EAAE,CAAA,EAAGC,GAAE,CAAA,EAAGC,GAAE,oEAAoEC,EAAE,MAAM,QAAQ,SAASC,EAAEf,EAAEC,EAAE,CAAC,QAAQC,KAAKD,EAAED,EAAEE,CAAC,EA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AAaA,IAAoB,IACtC,KAAK,OAAS,KAAK,UAAS,EAC5B,KAAK,WAAU,EAEvB,CACA,WAAY,CACR,OAAQ,KAAK,MAAM,KAAI,CACnB,IAAK,OAED,OAAO,KAAK,MAAM,MACtB,IAAK,OACD,OAAO,MAAM,KAAKC,GAAK,MAAM,MAAM,OAAM,CAAE,EAAE,CAAC,EAClD,IAAK,SAGD,MAAMP,EADS,KAAK,MAAM,QACJ,aAAa,MAAM,OAAM,EAC/C,OAAOA,EAAQ,MAAM,KAAKA,CAAK,EAAE,CAAC,EAAI,OAC1C,IAAK,SACD,OAAO,KAAK,MAAM,MACtB,QACI,MAAM,IAAI,MAAM,uBAAuB,KAAK,MAAM,IAAI,EAAE,CACxE,CACI,CACA,UAAUR,EAAM,CAEZ,OADkB,KAAK,YAAYA,EAAK,IAAI,GAAK,KAAK,YAAYA,EAAK,MAAQ,EAAE,GAAKD,IACrEC,CAAI,EAAE,MAAM;AAAA,CAAI,CACrC,CACJ,CACAM,GAAY,aAAe,CACvB,GAAG3N,EAAO,aACV,KAAM,OACN,UAAW,WACX,OAAQ,KACR,MAAO,OACP,MAAO,QACP,gBAAiB,EACjB,WAAY,CAAA,EACZ,cAAe,CAAA,EACf,GAAI,OACR","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]}
|
tangram_core/main.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
import "maplibre-gl/dist/maplibre-gl.css";
|
|
4
|
+
import "./user.css";
|
|
5
|
+
|
|
6
|
+
import "@fontsource/inconsolata/400.css";
|
|
7
|
+
import "@fontsource/inconsolata/700.css";
|
|
8
|
+
import "@fontsource/roboto-condensed/400.css";
|
|
9
|
+
import "@fontsource/roboto-condensed/400-italic.css";
|
|
10
|
+
import "@fontsource/roboto-condensed/500.css";
|
|
11
|
+
import "@fontsource/roboto-condensed/700.css";
|
|
12
|
+
import "@fontsource/b612/400.css";
|
|
13
|
+
import "@fontsource/b612/400-italic.css";
|
|
14
|
+
import "@fontsource/b612/700.css";
|
|
15
|
+
|
|
16
|
+
createApp(App).mount("#app");
|
tangram_core/plugin.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import functools
|
|
5
|
+
import importlib.metadata
|
|
6
|
+
import logging
|
|
7
|
+
import traceback
|
|
8
|
+
from collections.abc import Awaitable, Callable
|
|
9
|
+
from dataclasses import dataclass, field
|
|
10
|
+
from typing import TYPE_CHECKING, NewType, TypeAlias
|
|
11
|
+
|
|
12
|
+
from fastapi import APIRouter
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from .backend import BackendState
|
|
16
|
+
|
|
17
|
+
RouterFunc: TypeAlias = Callable[[], APIRouter]
|
|
18
|
+
ServiceAsyncFunc: TypeAlias = Callable[[BackendState], Awaitable[None]]
|
|
19
|
+
ServiceFunc: TypeAlias = ServiceAsyncFunc | Callable[[BackendState], None]
|
|
20
|
+
Priority: TypeAlias = int
|
|
21
|
+
|
|
22
|
+
DistName = NewType("DistName", str)
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass
|
|
27
|
+
class Plugin:
|
|
28
|
+
frontend_path: str | None = None
|
|
29
|
+
routers: list[APIRouter] = field(default_factory=list)
|
|
30
|
+
services: list[tuple[Priority, ServiceAsyncFunc]] = field(
|
|
31
|
+
default_factory=list, init=False
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
def register_service(
|
|
35
|
+
self, priority: Priority = 0
|
|
36
|
+
) -> Callable[[ServiceFunc], ServiceFunc]:
|
|
37
|
+
def decorator(func: ServiceFunc) -> ServiceFunc:
|
|
38
|
+
@functools.wraps(func)
|
|
39
|
+
async def async_wrapper(backend_state: BackendState) -> None:
|
|
40
|
+
if asyncio.iscoroutinefunction(func):
|
|
41
|
+
await func(backend_state)
|
|
42
|
+
else:
|
|
43
|
+
await asyncio.to_thread(func, backend_state)
|
|
44
|
+
|
|
45
|
+
self.services.append((priority, async_wrapper))
|
|
46
|
+
return func
|
|
47
|
+
|
|
48
|
+
return decorator
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def scan_plugins() -> importlib.metadata.EntryPoints:
|
|
52
|
+
return importlib.metadata.entry_points(group="tangram_core.plugins")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def load_plugin(
|
|
56
|
+
entry_point: importlib.metadata.EntryPoint,
|
|
57
|
+
) -> tuple[DistName, Plugin] | None:
|
|
58
|
+
try:
|
|
59
|
+
plugin_instance = entry_point.load()
|
|
60
|
+
except Exception as e:
|
|
61
|
+
tb = traceback.format_exc()
|
|
62
|
+
logger.error(
|
|
63
|
+
f"failed to load plugin {entry_point.name}: {e}. {tb}"
|
|
64
|
+
f"\n= help: does {entry_point.value} exist?"
|
|
65
|
+
)
|
|
66
|
+
return None
|
|
67
|
+
if not isinstance(plugin_instance, Plugin):
|
|
68
|
+
logger.error(f"entry point {entry_point.name} is not an instance of `Plugin`")
|
|
69
|
+
return None
|
|
70
|
+
return DistName(entry_point.name), plugin_instance
|
tangram_core/plugin.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { TangramApi } from "./api";
|
|
2
|
+
|
|
3
|
+
type PluginProgressStage = "manifest" | "plugin" | "done";
|
|
4
|
+
type PluginProgress = {
|
|
5
|
+
stage: PluginProgressStage;
|
|
6
|
+
pluginName?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export async function loadPlugins(
|
|
10
|
+
tangramApi: TangramApi,
|
|
11
|
+
onProgress?: (progress: PluginProgress) => void
|
|
12
|
+
) {
|
|
13
|
+
onProgress?.({ stage: "manifest" });
|
|
14
|
+
const manifest = await fetch("/manifest.json").then(res => res.json());
|
|
15
|
+
|
|
16
|
+
for (const pluginName of manifest.plugins) {
|
|
17
|
+
onProgress?.({ stage: "plugin", pluginName });
|
|
18
|
+
const pluginManifestUrl = `/plugins/${pluginName}/plugin.json`;
|
|
19
|
+
const pluginManifest = await fetch(pluginManifestUrl).then(res => res.json());
|
|
20
|
+
|
|
21
|
+
if (pluginManifest.style) {
|
|
22
|
+
const link = document.createElement("link");
|
|
23
|
+
link.rel = "stylesheet";
|
|
24
|
+
link.href = `/plugins/${pluginName}/${pluginManifest.style}`;
|
|
25
|
+
document.head.appendChild(link);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const entryPointUrl = `/plugins/${pluginName}/${pluginManifest.main}`;
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
const pluginModule = await import(/* @vite-ignore */ entryPointUrl);
|
|
32
|
+
if (pluginModule.install) {
|
|
33
|
+
pluginModule.install(tangramApi);
|
|
34
|
+
}
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.error(`failed to load plugin "${pluginName}":`, e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
onProgress?.({ stage: "done" });
|
|
41
|
+
}
|