blue-chestnut-solar-expert 0.0.18 → 0.0.20
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.
- package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.cjs.js.map +1 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js +3124 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-widget.cjs.entry.js +2 -2
- package/dist/cjs/loading-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/loading-widget.entry.cjs.js.map +1 -1
- package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
- package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
- package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/icons/icon.js +3 -0
- package/dist/collection/components/icons/icon.js.map +1 -1
- package/dist/collection/components/icons/undo.js +64 -0
- package/dist/collection/components/icons/undo.js.map +1 -0
- package/dist/collection/components/map-draw/map-draw.js +65 -22
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/map-draw/map-selector.js +2 -2
- package/dist/collection/components/map-draw/map-selector.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +26 -1
- package/dist/collection/components/map-draw/polygon-buttons.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-information.js +3 -3
- package/dist/collection/components/map-draw/polygon-information.js.map +1 -1
- package/dist/collection/components/map-draw/tool-box.js +27 -3
- package/dist/collection/components/map-draw/tool-box.js.map +1 -1
- package/dist/collection/components/settings/settings.js +8 -8
- package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +16 -1
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +85 -185
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/components/widgets/loading-widget.js +1 -1
- package/dist/collection/constants.js +2 -1
- package/dist/collection/constants.js.map +1 -1
- package/dist/collection/output.css +20 -9
- package/dist/collection/store.js +1 -1
- package/dist/collection/store.js.map +1 -1
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/lang/english.js +5 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/german.js +7 -2
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +5 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -1
- package/dist/collection/utils/render/tools.js +7 -0
- package/dist/collection/utils/render/tools.js.map +1 -1
- package/dist/collection/utils/simulation/simulation.js +109 -0
- package/dist/collection/utils/simulation/simulation.js.map +1 -0
- package/dist/collection/utils/simulation/solarCurves.js +31 -0
- package/dist/collection/utils/simulation/solarCurves.js.map +1 -0
- package/dist/collection/utils/simulation/types.js +4 -0
- package/dist/collection/utils/simulation/types.js.map +1 -0
- package/dist/components/eraser-icon.js +1 -1
- package/dist/components/house-icon.js +1 -1
- package/dist/components/icon-selector.js +1 -1
- package/dist/components/loading-widget.js +2 -2
- package/dist/components/loading-widget.js.map +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/map-selector.js +1 -1
- package/dist/components/move-icon.js +1 -1
- package/dist/components/octagon-minus-icon.js +1 -1
- package/dist/components/p-BDBrVfn4.js +38 -0
- package/dist/components/p-BDBrVfn4.js.map +1 -0
- package/dist/components/p-BDrs1Te9.js +38 -0
- package/dist/components/p-BDrs1Te9.js.map +1 -0
- package/dist/components/p-BbXgEBG5.js +38 -0
- package/dist/components/p-BbXgEBG5.js.map +1 -0
- package/dist/components/p-Bq1PVegq.js +174 -0
- package/dist/components/p-Bq1PVegq.js.map +1 -0
- package/dist/components/p-BrVkygdn.js +38 -0
- package/dist/components/p-BrVkygdn.js.map +1 -0
- package/dist/components/p-BxEeUA4s.js +149 -0
- package/dist/components/p-BxEeUA4s.js.map +1 -0
- package/dist/components/p-C-_6TJs5.js +164 -0
- package/dist/components/p-C-_6TJs5.js.map +1 -0
- package/dist/components/{p-BSx-VRl1.js → p-CPLDlLfb.js} +99 -50
- package/dist/components/p-CPLDlLfb.js.map +1 -0
- package/dist/components/p-CRnyqUKc.js +47 -0
- package/dist/components/p-CRnyqUKc.js.map +1 -0
- package/dist/components/p-CabEU06O.js +103 -0
- package/dist/components/p-CabEU06O.js.map +1 -0
- package/dist/components/p-CmFUQbz_.js +507 -0
- package/dist/components/p-CmFUQbz_.js.map +1 -0
- package/dist/components/p-CumvV0_M.js +38 -0
- package/dist/components/p-CumvV0_M.js.map +1 -0
- package/dist/components/{p-C5Qpifsm.js → p-CwVUc6Hq.js} +20 -5
- package/dist/components/p-CwVUc6Hq.js.map +1 -0
- package/dist/components/p-DI6_jwLe.js +38 -0
- package/dist/components/p-DI6_jwLe.js.map +1 -0
- package/dist/components/p-DPfpDV5e.js +74 -0
- package/dist/components/p-DPfpDV5e.js.map +1 -0
- package/dist/components/p-DYiK8eDp.js +38 -0
- package/dist/components/p-DYiK8eDp.js.map +1 -0
- package/dist/components/polygon-buttons.js +1 -1
- package/dist/components/polygon-information.js +1 -1
- package/dist/components/search-icon.js +1 -1
- package/dist/components/settings-icon.js +1 -1
- package/dist/components/settings-modal.js +1 -1
- package/dist/components/solar-calculator.js +2 -2
- package/dist/components/solar-calculator.js.map +1 -1
- package/dist/components/solar-expert.js +52 -31
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/components/tool-box.js +1 -1
- package/dist/components/undo-icon.d.ts +11 -0
- package/dist/components/undo-icon.js +9 -0
- package/dist/components/undo-icon.js.map +1 -0
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.js.map +1 -0
- package/dist/esm/eraser-icon_16.entry.js +3107 -0
- package/dist/esm/eraser-icon_16.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-widget.entry.js +2 -2
- package/dist/esm/loading-widget.entry.js.map +1 -1
- package/dist/esm/solar-calculator.entry.js +2 -2
- package/dist/esm/solar-calculator.entry.js.map +1 -1
- package/dist/esm/stencil-library.js +1 -1
- package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +1 -0
- package/dist/stencil-library/loading-widget.entry.esm.js.map +1 -1
- package/dist/stencil-library/p-1acfe8c0.entry.js +32 -0
- package/dist/stencil-library/{p-04893dc6.entry.js.map → p-1acfe8c0.entry.js.map} +1 -1
- package/dist/stencil-library/p-1e2ddc82.entry.js +2 -0
- package/dist/stencil-library/p-1e2ddc82.entry.js.map +1 -0
- package/dist/stencil-library/p-56f8bd65.entry.js +2 -0
- package/dist/stencil-library/p-56f8bd65.entry.js.map +1 -0
- package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/components/icons/undo.d.ts +5 -0
- package/dist/types/components/map-draw/map-draw.d.ts +1 -0
- package/dist/types/components/map-draw/polygon-buttons.d.ts +1 -0
- package/dist/types/components/map-draw/tool-box.d.ts +1 -0
- package/dist/types/components/solar-expert/solar-expert.d.ts +1 -0
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +3 -2
- package/dist/types/components.d.ts +21 -0
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/types/lang.d.ts +5 -0
- package/dist/types/utils/render/tools.d.ts +2 -1
- package/dist/types/utils/simulation/simulation.d.ts +8 -0
- package/dist/types/utils/simulation/solarCurves.d.ts +3 -0
- package/dist/types/utils/simulation/types.d.ts +49 -0
- package/package.json +2 -2
- package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.cjs.js.map +0 -1
- package/dist/cjs/eraser-icon_15.cjs.entry.js +0 -3007
- package/dist/cjs/eraser-icon_15.cjs.entry.js.map +0 -1
- package/dist/components/p-BJFgUvs3.js +0 -38
- package/dist/components/p-BJFgUvs3.js.map +0 -1
- package/dist/components/p-BP2JkbOB.js +0 -149
- package/dist/components/p-BP2JkbOB.js.map +0 -1
- package/dist/components/p-BSx-VRl1.js.map +0 -1
- package/dist/components/p-BfAeCWO4.js +0 -38
- package/dist/components/p-BfAeCWO4.js.map +0 -1
- package/dist/components/p-BilSpdUG.js +0 -94
- package/dist/components/p-BilSpdUG.js.map +0 -1
- package/dist/components/p-Bn39cXBR.js +0 -38
- package/dist/components/p-Bn39cXBR.js.map +0 -1
- package/dist/components/p-BzuGyPz5.js +0 -493
- package/dist/components/p-BzuGyPz5.js.map +0 -1
- package/dist/components/p-C4UfrfLc.js +0 -40
- package/dist/components/p-C4UfrfLc.js.map +0 -1
- package/dist/components/p-C5Qpifsm.js.map +0 -1
- package/dist/components/p-CesxKYgJ.js +0 -38
- package/dist/components/p-CesxKYgJ.js.map +0 -1
- package/dist/components/p-Cm-6HU5f.js +0 -38
- package/dist/components/p-Cm-6HU5f.js.map +0 -1
- package/dist/components/p-D93MrNOs.js +0 -174
- package/dist/components/p-D93MrNOs.js.map +0 -1
- package/dist/components/p-DSWRVBhO.js +0 -74
- package/dist/components/p-DSWRVBhO.js.map +0 -1
- package/dist/components/p-klKuBKKU.js +0 -149
- package/dist/components/p-klKuBKKU.js.map +0 -1
- package/dist/components/p-metMBa33.js +0 -38
- package/dist/components/p-metMBa33.js.map +0 -1
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.js.map +0 -1
- package/dist/esm/eraser-icon_15.entry.js +0 -2991
- package/dist/esm/eraser-icon_15.entry.js.map +0 -1
- package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.esm.js.map +0 -1
- package/dist/stencil-library/p-02607fda.entry.js +0 -2
- package/dist/stencil-library/p-02607fda.entry.js.map +0 -1
- package/dist/stencil-library/p-04893dc6.entry.js +0 -32
- package/dist/stencil-library/p-3af1ea82.entry.js +0 -2
- package/dist/stencil-library/p-3af1ea82.entry.js.map +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h } from './index.js';
|
|
2
|
+
import { g as getLanguageStrings, s as state } from './p-CwVUc6Hq.js';
|
|
3
|
+
|
|
4
|
+
function calculatePolygonArea(points) {
|
|
5
|
+
let area = 0;
|
|
6
|
+
for (let i = 0; i < points.length; i++) {
|
|
7
|
+
const j = (i + 1) % points.length;
|
|
8
|
+
area += points[i].x * points[j].y;
|
|
9
|
+
area -= points[j].x * points[i].y;
|
|
10
|
+
}
|
|
11
|
+
return Math.abs(area / 2);
|
|
12
|
+
}
|
|
13
|
+
function azimuthToCardinal(azimuth) {
|
|
14
|
+
// Convert angle to cardinal direction
|
|
15
|
+
if (azimuth >= 337.5 || azimuth < 22.5)
|
|
16
|
+
return "North";
|
|
17
|
+
if (azimuth >= 22.5 && azimuth < 67.5)
|
|
18
|
+
return "Northeast";
|
|
19
|
+
if (azimuth >= 67.5 && azimuth < 112.5)
|
|
20
|
+
return "East";
|
|
21
|
+
if (azimuth >= 112.5 && azimuth < 157.5)
|
|
22
|
+
return "Southeast";
|
|
23
|
+
if (azimuth >= 157.5 && azimuth < 202.5)
|
|
24
|
+
return "South";
|
|
25
|
+
if (azimuth >= 202.5 && azimuth < 247.5)
|
|
26
|
+
return "Southwest";
|
|
27
|
+
if (azimuth >= 247.5 && azimuth < 292.5)
|
|
28
|
+
return "West";
|
|
29
|
+
return "Northwest";
|
|
30
|
+
}
|
|
31
|
+
function latLngToPixel(bounds, canvas, latLng) {
|
|
32
|
+
const ctx = canvas.getContext('2d');
|
|
33
|
+
if (!ctx) {
|
|
34
|
+
throw new Error('Canvas context not found');
|
|
35
|
+
}
|
|
36
|
+
const latToPixel = (lat) => {
|
|
37
|
+
return canvas.height * (1 - (lat - bounds.south) / (bounds.north - bounds.south));
|
|
38
|
+
};
|
|
39
|
+
const lngToPixel = (lng) => {
|
|
40
|
+
return canvas.width * (lng - bounds.west) / (bounds.east - bounds.west);
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
x: lngToPixel(latLng.longitude),
|
|
44
|
+
y: latToPixel(latLng.latitude),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function getPixelInMeters(rgbTiff) {
|
|
48
|
+
const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;
|
|
49
|
+
// const lngDiff = rgbTiff.bounds.east - rgbTiff.bounds.west;
|
|
50
|
+
// const pixelWidth = rgbTiff.width;
|
|
51
|
+
const pixelHeight = rgbTiff.height;
|
|
52
|
+
const pixelInMeters = latDiff * 111320 / pixelHeight;
|
|
53
|
+
// const latAvg = (rgbTiff.bounds.north + rgbTiff.bounds.south) / 2;
|
|
54
|
+
// const pixelInMetersLng = lngDiff * 111320 * Math.cos(latAvg * Math.PI / 180) / pixelWidth;
|
|
55
|
+
return pixelInMeters;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const outputCss = "/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-3 {\n grid-template-rows: repeat(3, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#00000056\\] {\n background-color: #00000056;\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-black {\n &:focus {\n border-color: var(--color-black);\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
59
|
+
|
|
60
|
+
const PolygonInformation = /*@__PURE__*/ proxyCustomElement(class PolygonInformation extends H {
|
|
61
|
+
constructor() {
|
|
62
|
+
super();
|
|
63
|
+
this.__registerHost();
|
|
64
|
+
this.__attachShadow();
|
|
65
|
+
}
|
|
66
|
+
currentPolygon;
|
|
67
|
+
positionedPanels;
|
|
68
|
+
handleAzimuthChange;
|
|
69
|
+
handlePitchChange;
|
|
70
|
+
calculateSolarPanels;
|
|
71
|
+
render() {
|
|
72
|
+
const t = getLanguageStrings(state.settings.language);
|
|
73
|
+
return (h("div", { key: 'd6ab424241a7a68ed6e9c8732d7142b2097d0491', class: "flex gap-4 flex-row justify-center items-center w-full" }, h("div", { key: '1e5870aa04b0d26668a28663779e3f4248eb5791', class: "w-full bg-[#f3ebda] rounded-4xl p-4" }, h("h3", { key: 'db95c0cb87f0c922f4c03ee3b6bd4c5f5b0131df', class: "text-lg font-semibold mb-4 text-center" }, t.mapDraw.information), this.currentPolygon?.details
|
|
74
|
+
? (h("div", { class: "space-y-4" }, h("div", null, h("div", { class: "grid grid-cols-2 gap-2" }, h("div", null, h("h4", { class: "text-sm font-medium text-gray-600" }, t.mapDraw.area), h("p", { class: "text-lg" }, this.currentPolygon.details
|
|
75
|
+
?.area
|
|
76
|
+
.toFixed(2), " m\u00B2")), h("div", null, h("div", null, h("h4", { class: "text-sm font-medium text-gray-600" }, t.mapDraw.panels), h("p", { class: "text-lg" }, this.positionedPanels
|
|
77
|
+
?.length ?? 0))))), h("div", null, h("h4", { class: "text-sm font-medium text-gray-600" }, t.mapDraw.azimuth), h("div", { class: "flex gap-2 flex-row justify-start bg-white rounded-4xl p-2" }, h("input", { class: "text-lg w-full", onKeyDown: (e) => {
|
|
78
|
+
if (e.key === "Enter") {
|
|
79
|
+
this.handleAzimuthChange(e);
|
|
80
|
+
e.target
|
|
81
|
+
.blur();
|
|
82
|
+
}
|
|
83
|
+
}, value: this.currentPolygon
|
|
84
|
+
.details
|
|
85
|
+
?.azimuth }), "(", azimuthToCardinal(this.currentPolygon.details
|
|
86
|
+
?.azimuth), ")"), h("input", { type: "range", min: "0", max: "360", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", value: this.currentPolygon
|
|
87
|
+
.details?.azimuth, onInput: (e) => {
|
|
88
|
+
const target = e
|
|
89
|
+
.target;
|
|
90
|
+
const azimuth = parseFloat(target.value);
|
|
91
|
+
this.currentPolygon.details
|
|
92
|
+
.azimuth = azimuth;
|
|
93
|
+
if (this.currentPolygon
|
|
94
|
+
.type ===
|
|
95
|
+
"roof" &&
|
|
96
|
+
this.positionedPanels) {
|
|
97
|
+
this.calculateSolarPanels();
|
|
98
|
+
}
|
|
99
|
+
} })), h("div", null, h("h4", { class: "text-sm font-medium text-gray-600 pl-2" }, t.mapDraw.pitch), h("div", { class: "flex gap-2 flex-row justify-start bg-white rounded-4xl p-2" }, h("input", { class: "text-lg w-full", onKeyDown: (e) => {
|
|
100
|
+
if (e.key === "Enter") {
|
|
101
|
+
this.handlePitchChange(e);
|
|
102
|
+
e.target
|
|
103
|
+
.blur();
|
|
104
|
+
}
|
|
105
|
+
}, value: this.currentPolygon
|
|
106
|
+
.details
|
|
107
|
+
?.pitch }), "\u00B0"), h("input", { type: "range", min: "0", max: "90", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", value: this.currentPolygon
|
|
108
|
+
.details?.pitch, onInput: (e) => {
|
|
109
|
+
const target = e
|
|
110
|
+
.target;
|
|
111
|
+
const pitch = parseFloat(target.value);
|
|
112
|
+
this.currentPolygon.details
|
|
113
|
+
.pitch = pitch;
|
|
114
|
+
if (this.currentPolygon
|
|
115
|
+
.type ===
|
|
116
|
+
"roof" &&
|
|
117
|
+
this.positionedPanels) {
|
|
118
|
+
this.calculateSolarPanels();
|
|
119
|
+
}
|
|
120
|
+
} }))))
|
|
121
|
+
: (h("p", { class: "text-gray-500 text-center" }, t.mapDraw.noPolygonSelected)))));
|
|
122
|
+
}
|
|
123
|
+
static get style() { return outputCss; }
|
|
124
|
+
}, [1, "polygon-information", {
|
|
125
|
+
"currentPolygon": [8, "current-polygon"],
|
|
126
|
+
"positionedPanels": [16, "positioned-panels"],
|
|
127
|
+
"handleAzimuthChange": [16, "handle-azimuth-change"],
|
|
128
|
+
"handlePitchChange": [16, "handle-pitch-change"],
|
|
129
|
+
"calculateSolarPanels": [16, "calculate-solar-panels"]
|
|
130
|
+
}]);
|
|
131
|
+
function defineCustomElement() {
|
|
132
|
+
if (typeof customElements === "undefined") {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const components = ["polygon-information"];
|
|
136
|
+
components.forEach(tagName => { switch (tagName) {
|
|
137
|
+
case "polygon-information":
|
|
138
|
+
if (!customElements.get(tagName)) {
|
|
139
|
+
customElements.define(tagName, PolygonInformation);
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
} });
|
|
143
|
+
}
|
|
144
|
+
defineCustomElement();
|
|
145
|
+
|
|
146
|
+
export { PolygonInformation as P, calculatePolygonArea as c, defineCustomElement as d, getPixelInMeters as g, latLngToPixel as l };
|
|
147
|
+
//# sourceMappingURL=p-BxEeUA4s.js.map
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=p-BxEeUA4s.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-BxEeUA4s.js","mappings":"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","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/utils/utils.ts","src/output.css?tag=polygon-information&encapsulation=shadow","src/components/map-draw/polygon-information.tsx"],"sourcesContent":["import { Point } from \"../types/shapes\";\r\nimport { Bounds, GeoTiff, LatLng } from \"./solar\";\r\n\r\nexport function calculatePolygonArea(points: Point[]): number {\r\n let area = 0;\r\n for (let i = 0; i < points.length; i++) {\r\n const j = (i + 1) % points.length;\r\n area += points[i].x * points[j].y;\r\n area -= points[j].x * points[i].y;\r\n }\r\n return Math.abs(area / 2);\r\n};\r\n\r\nexport function azimuthToCardinal(azimuth: number): string {\r\n // Convert angle to cardinal direction\r\n if (azimuth >= 337.5 || azimuth < 22.5) return \"North\";\r\n if (azimuth >= 22.5 && azimuth < 67.5) return \"Northeast\";\r\n if (azimuth >= 67.5 && azimuth < 112.5) return \"East\";\r\n if (azimuth >= 112.5 && azimuth < 157.5) return \"Southeast\";\r\n if (azimuth >= 157.5 && azimuth < 202.5) return \"South\";\r\n if (azimuth >= 202.5 && azimuth < 247.5) return \"Southwest\";\r\n if (azimuth >= 247.5 && azimuth < 292.5) return \"West\";\r\n return \"Northwest\";\r\n}\r\n\r\nexport function calculatePolygonOrientation(points: Point[]): number {\r\n if (points.length < 3) return 0;\r\n\r\n // Calculate the average direction of the polygon\r\n let totalAngle = 0;\r\n for (let i = 0; i < points.length; i++) {\r\n const j = (i + 1) % points.length;\r\n const angle = Math.atan2(\r\n points[j].y - points[i].y,\r\n points[j].x - points[i].x,\r\n );\r\n totalAngle += angle;\r\n }\r\n\r\n const avgAngle = (totalAngle / points.length) * (180 / Math.PI);\r\n const normalizedAngle = (avgAngle + 360) % 360;\r\n return normalizedAngle;\r\n};\r\n\r\nexport function calculatePolygonAngle(points: Point[]): number {\r\n if (points.length < 3) return 0;\r\n\r\n // Calculate the average angle of the polygon\r\n let totalAngle = 0;\r\n for (let i = 0; i < points.length; i++) {\r\n const j = (i + 1) % points.length;\r\n const k = (i + 2) % points.length;\r\n\r\n const v1 = {\r\n x: points[j].x - points[i].x,\r\n y: points[j].y - points[i].y,\r\n };\r\n const v2 = {\r\n x: points[k].x - points[j].x,\r\n y: points[k].y - points[j].y,\r\n };\r\n\r\n const dot = v1.x * v2.x + v1.y * v2.y;\r\n const mag1 = Math.sqrt(v1.x * v1.x + v1.y * v1.y);\r\n const mag2 = Math.sqrt(v2.x * v2.x + v2.y * v2.y);\r\n\r\n const angle = Math.acos(dot / (mag1 * mag2));\r\n totalAngle += angle;\r\n }\r\n\r\n return (totalAngle / points.length) * (180 / Math.PI);\r\n};\r\n\r\nexport function latLngToPixel(bounds: Bounds, canvas: HTMLCanvasElement, latLng: LatLng): Point {\r\n const ctx = canvas.getContext('2d');\r\n if (!ctx) {\r\n throw new Error('Canvas context not found');\r\n }\r\n const latToPixel = (lat: number) => {\r\n return canvas.height * (1 - (lat - bounds.south) / (bounds.north - bounds.south));\r\n };\r\n \r\n const lngToPixel = (lng: number) => {\r\n return canvas.width * (lng - bounds.west) / (bounds.east - bounds.west);\r\n };\r\n\r\n return {\r\n x: lngToPixel(latLng.longitude),\r\n y: latToPixel(latLng.latitude),\r\n };\r\n}\r\n\r\nexport function getPixelInMeters(rgbTiff: GeoTiff): number {\r\n const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;\r\n // const lngDiff = rgbTiff.bounds.east - rgbTiff.bounds.west;\r\n // const pixelWidth = rgbTiff.width;\r\n const pixelHeight = rgbTiff.height;\r\n const pixelInMeters = latDiff * 111320 / pixelHeight;\r\n // const latAvg = (rgbTiff.bounds.north + rgbTiff.bounds.south) / 2;\r\n // const pixelInMetersLng = lngDiff * 111320 * Math.cos(latAvg * Math.PI / 180) / pixelWidth;\r\n return pixelInMeters\r\n}","/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-3 {\n grid-template-rows: repeat(3, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#00000056\\] {\n background-color: #00000056;\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-black {\n &:focus {\n border-color: var(--color-black);\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport { Polygon, SolarPanelSystemPart } from \"../../components\";\r\nimport { getLanguageStrings } from \"../../utils/lang/general\";\r\nimport { state } from \"../../store\";\r\nimport { azimuthToCardinal } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"polygon-information\",\r\n styleUrl: \"../../output.css\",\r\n shadow: true,\r\n})\r\nexport class PolygonInformation {\r\n @Prop()\r\n currentPolygon: Polygon;\r\n @Prop()\r\n positionedPanels: SolarPanelSystemPart[] | undefined;\r\n @Prop()\r\n handleAzimuthChange: (event: Event) => void;\r\n @Prop()\r\n handlePitchChange: (event: Event) => void;\r\n @Prop()\r\n calculateSolarPanels: () => void;\r\n\r\n render() {\r\n const t = getLanguageStrings(state.settings.language);\r\n\r\n return (\r\n <div class=\"flex gap-4 flex-row justify-center items-center w-full\">\r\n <div class=\"w-full bg-[#f3ebda] rounded-4xl p-4\">\r\n <h3 class=\"text-lg font-semibold mb-4 text-center\">\r\n {t.mapDraw.information}\r\n </h3>\r\n {this.currentPolygon?.details\r\n ? (\r\n <div class=\"space-y-4\">\r\n <div>\r\n <div class=\"grid grid-cols-2 gap-2\">\r\n <div>\r\n <h4 class=\"text-sm font-medium text-gray-600\">\r\n {t.mapDraw.area}\r\n </h4>\r\n <p class=\"text-lg\">\r\n {this.currentPolygon.details\r\n ?.area\r\n .toFixed(2)} m²\r\n </p>\r\n </div>\r\n <div>\r\n <div>\r\n <h4 class=\"text-sm font-medium text-gray-600\">\r\n {t.mapDraw.panels}\r\n </h4>\r\n <p class=\"text-lg\">\r\n {this.positionedPanels\r\n ?.length ?? 0}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n <h4 class=\"text-sm font-medium text-gray-600\">\r\n {t.mapDraw.azimuth}\r\n </h4>\r\n <div class=\"flex gap-2 flex-row justify-start bg-white rounded-4xl p-2\">\r\n <input\r\n class=\"text-lg w-full\"\r\n onKeyDown={(e) => {\r\n if (e.key === \"Enter\") {\r\n this.handleAzimuthChange(\r\n e,\r\n );\r\n (e.target as HTMLInputElement)\r\n .blur();\r\n }\r\n }}\r\n value={this.currentPolygon\r\n .details\r\n ?.azimuth}\r\n />\r\n ({azimuthToCardinal(\r\n this.currentPolygon.details\r\n ?.azimuth,\r\n )})\r\n </div>\r\n <input\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"360\"\r\n class=\"input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white\"\r\n value={this.currentPolygon\r\n .details?.azimuth}\r\n onInput={(e) => {\r\n const target = e\r\n .target as HTMLInputElement;\r\n const azimuth = parseFloat(\r\n target.value,\r\n );\r\n this.currentPolygon.details\r\n .azimuth = azimuth;\r\n if (\r\n this.currentPolygon\r\n .type ===\r\n \"roof\" &&\r\n this.positionedPanels\r\n ) {\r\n this.calculateSolarPanels();\r\n }\r\n }}\r\n />\r\n </div>\r\n <div>\r\n <h4 class=\"text-sm font-medium text-gray-600 pl-2\">\r\n {t.mapDraw.pitch}\r\n </h4>\r\n <div class=\"flex gap-2 flex-row justify-start bg-white rounded-4xl p-2\">\r\n <input\r\n class=\"text-lg w-full\"\r\n onKeyDown={(e) => {\r\n if (e.key === \"Enter\") {\r\n this.handlePitchChange(\r\n e,\r\n );\r\n (e.target as HTMLInputElement)\r\n .blur();\r\n }\r\n }}\r\n value={this.currentPolygon\r\n .details\r\n ?.pitch}\r\n />\r\n °\r\n </div>\r\n <input\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"90\"\r\n class=\"input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white\"\r\n value={this.currentPolygon\r\n .details?.pitch}\r\n onInput={(e) => {\r\n const target = e\r\n .target as HTMLInputElement;\r\n const pitch = parseFloat(\r\n target.value,\r\n );\r\n this.currentPolygon.details\r\n .pitch = pitch;\r\n if (\r\n this.currentPolygon\r\n .type ===\r\n \"roof\" &&\r\n this.positionedPanels\r\n ) {\r\n this.calculateSolarPanels();\r\n }\r\n }}\r\n />\r\n </div>\r\n </div>\r\n )\r\n : (\r\n <p class=\"text-gray-500 text-center\">\r\n {t.mapDraw.noPolygonSelected}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h } from './index.js';
|
|
2
|
+
import { g as getLanguageStrings, s as state } from './p-CwVUc6Hq.js';
|
|
3
|
+
import { d as defineCustomElement$8 } from './p-DYiK8eDp.js';
|
|
4
|
+
import { d as defineCustomElement$7 } from './p-BrVkygdn.js';
|
|
5
|
+
import { d as defineCustomElement$6 } from './p-CabEU06O.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './p-BDrs1Te9.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './p-BDBrVfn4.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-DI6_jwLe.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-BbXgEBG5.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-CumvV0_M.js';
|
|
11
|
+
|
|
12
|
+
const polygonKeyboardCombinations = [
|
|
13
|
+
{
|
|
14
|
+
key: "shift",
|
|
15
|
+
description: "add one point on perpendicular line",
|
|
16
|
+
},
|
|
17
|
+
// {
|
|
18
|
+
// key: "alt",
|
|
19
|
+
// description: "add parallel line",
|
|
20
|
+
// },
|
|
21
|
+
];
|
|
22
|
+
const moveTool = {
|
|
23
|
+
name: "move",
|
|
24
|
+
ariaLabel: "Move",
|
|
25
|
+
icon: "move",
|
|
26
|
+
cursor: "move",
|
|
27
|
+
keyboardShortcut: "m",
|
|
28
|
+
explanation: "Move points of the active polygon",
|
|
29
|
+
};
|
|
30
|
+
const roofTool = {
|
|
31
|
+
name: "roof",
|
|
32
|
+
ariaLabel: "Roof Area",
|
|
33
|
+
icon: "house",
|
|
34
|
+
cursor: "crosshair",
|
|
35
|
+
keyboardShortcut: "r",
|
|
36
|
+
keyboardCombinations: polygonKeyboardCombinations,
|
|
37
|
+
explanation: "Draw the roof of the building",
|
|
38
|
+
};
|
|
39
|
+
const obstructionTool = {
|
|
40
|
+
name: "obstruction",
|
|
41
|
+
ariaLabel: "Obstruction",
|
|
42
|
+
icon: "octagon-minus",
|
|
43
|
+
cursor: "crosshair",
|
|
44
|
+
keyboardShortcut: "o",
|
|
45
|
+
keyboardCombinations: polygonKeyboardCombinations,
|
|
46
|
+
explanation: "Draw the obstruction of the building",
|
|
47
|
+
};
|
|
48
|
+
const deleteTool = {
|
|
49
|
+
name: "delete",
|
|
50
|
+
ariaLabel: "Delete",
|
|
51
|
+
icon: "eraser",
|
|
52
|
+
cursor: "default",
|
|
53
|
+
keyboardShortcut: "d",
|
|
54
|
+
explanation: "Delete the active polygon",
|
|
55
|
+
};
|
|
56
|
+
const markRoofEdgeTool = {
|
|
57
|
+
name: "markRoofEdge",
|
|
58
|
+
ariaLabel: "Mark Roof Edge",
|
|
59
|
+
icon: "arrow-down-left-and-up-right-to-center",
|
|
60
|
+
cursor: "pointer",
|
|
61
|
+
explanation: "Mark the edge of the roof",
|
|
62
|
+
};
|
|
63
|
+
const undoTool = {
|
|
64
|
+
name: "undo"};
|
|
65
|
+
const tools = [
|
|
66
|
+
moveTool,
|
|
67
|
+
roofTool,
|
|
68
|
+
obstructionTool,
|
|
69
|
+
deleteTool,
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
const outputCss = "/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-3 {\n grid-template-rows: repeat(3, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#00000056\\] {\n background-color: #00000056;\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-black {\n &:focus {\n border-color: var(--color-black);\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
73
|
+
|
|
74
|
+
const ToolBox = /*@__PURE__*/ proxyCustomElement(class ToolBox extends H {
|
|
75
|
+
constructor() {
|
|
76
|
+
super();
|
|
77
|
+
this.__registerHost();
|
|
78
|
+
}
|
|
79
|
+
currentTool;
|
|
80
|
+
undoCallback;
|
|
81
|
+
onToolSelect;
|
|
82
|
+
render() {
|
|
83
|
+
const t = getLanguageStrings(state.settings.language);
|
|
84
|
+
const undoToolStrings = t.mapDraw.tools[undoTool.name];
|
|
85
|
+
return (h("div", { key: '21ef401acdfa0169902c72c51a7fad31c6fd75c4', class: "flex lg:gap-4 rounded-4xl bg-[#f3ebda] p-4 flex-wrap justify-center w-full text-xs" }, tools.map((tool) => {
|
|
86
|
+
const toolStrings = t.mapDraw.tools[tool.name];
|
|
87
|
+
return (h("button", { class: `px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#ffffff] ${this.currentTool.name === tool.name
|
|
88
|
+
? "bg-[#271200] hover:bg-gray-500"
|
|
89
|
+
: "bg-[#f3ebda] hover:bg-[#ffffff]"}`, style: {
|
|
90
|
+
color: this.currentTool.name === tool.name
|
|
91
|
+
? "#ffffff"
|
|
92
|
+
: "#000000",
|
|
93
|
+
}, "aria-label": toolStrings.ariaLabel, title: toolStrings.explanation, onClick: () => this.onToolSelect(tool) }, h("div", { class: "flex items-center gap-1 flex-col" }, h("icon-selector", { name: tool.icon }), h("span", null, toolStrings.name))));
|
|
94
|
+
}), h("button", { key: '2de8094cce52d847d6cf65966876e449b86156af', class: `px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#ffffff] ${this.currentTool.name === undoTool.name
|
|
95
|
+
? "bg-[#271200] hover:bg-gray-500"
|
|
96
|
+
: "bg-[#f3ebda] hover:bg-[#ffffff]"}`, style: {
|
|
97
|
+
color: "#000000",
|
|
98
|
+
}, "aria-label": undoToolStrings.ariaLabel, title: undoToolStrings.explanation, onClick: () => this.undoCallback() }, h("div", { key: '559227361f76ce39b4c2e48f216d477737e46d6c', class: "flex items-center gap-1 flex-col" }, h("undo-icon", { key: '6b97156dfd7d50c11ad627e9b6d11539e4b0fc7e' }), h("span", { key: '6307014e12640793d7e2511b790d192824a8d2fa' }, undoToolStrings.name)))));
|
|
99
|
+
}
|
|
100
|
+
static get style() { return outputCss; }
|
|
101
|
+
}, [0, "tool-box", {
|
|
102
|
+
"currentTool": [16, "current-tool"],
|
|
103
|
+
"undoCallback": [16, "undo-callback"],
|
|
104
|
+
"onToolSelect": [16, "on-tool-select"]
|
|
105
|
+
}]);
|
|
106
|
+
function defineCustomElement() {
|
|
107
|
+
if (typeof customElements === "undefined") {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const components = ["tool-box", "eraser-icon", "house-icon", "icon-selector", "move-icon", "octagon-minus-icon", "search-icon", "settings-icon", "undo-icon"];
|
|
111
|
+
components.forEach(tagName => { switch (tagName) {
|
|
112
|
+
case "tool-box":
|
|
113
|
+
if (!customElements.get(tagName)) {
|
|
114
|
+
customElements.define(tagName, ToolBox);
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
case "eraser-icon":
|
|
118
|
+
if (!customElements.get(tagName)) {
|
|
119
|
+
defineCustomElement$8();
|
|
120
|
+
}
|
|
121
|
+
break;
|
|
122
|
+
case "house-icon":
|
|
123
|
+
if (!customElements.get(tagName)) {
|
|
124
|
+
defineCustomElement$7();
|
|
125
|
+
}
|
|
126
|
+
break;
|
|
127
|
+
case "icon-selector":
|
|
128
|
+
if (!customElements.get(tagName)) {
|
|
129
|
+
defineCustomElement$6();
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
case "move-icon":
|
|
133
|
+
if (!customElements.get(tagName)) {
|
|
134
|
+
defineCustomElement$5();
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
case "octagon-minus-icon":
|
|
138
|
+
if (!customElements.get(tagName)) {
|
|
139
|
+
defineCustomElement$4();
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
case "search-icon":
|
|
143
|
+
if (!customElements.get(tagName)) {
|
|
144
|
+
defineCustomElement$3();
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
case "settings-icon":
|
|
148
|
+
if (!customElements.get(tagName)) {
|
|
149
|
+
defineCustomElement$2();
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case "undo-icon":
|
|
153
|
+
if (!customElements.get(tagName)) {
|
|
154
|
+
defineCustomElement$1();
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
} });
|
|
158
|
+
}
|
|
159
|
+
defineCustomElement();
|
|
160
|
+
|
|
161
|
+
export { ToolBox as T, markRoofEdgeTool as a, deleteTool as b, defineCustomElement as d, moveTool as m, obstructionTool as o, roofTool as r, tools as t };
|
|
162
|
+
//# sourceMappingURL=p-C-_6TJs5.js.map
|
|
163
|
+
|
|
164
|
+
//# sourceMappingURL=p-C-_6TJs5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-C-_6TJs5.js","mappings":";;;;;;;;;;;AAiBA,MAAM,2BAA2B,GAA0B;AACvD,IAAA;AACI,QAAA,GAAG,EAAE,OAAO;AACZ,QAAA,WAAW,EAAE,qCAAqC;AACrD,KAAA;;;;;CAKJ;AAEY,MAAA,QAAQ,GAAS;AAC1B,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,MAAM;AACd,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,WAAW,EAAE,mCAAmC;;AAGvC,MAAA,QAAQ,GAAS;AAC1B,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,oBAAoB,EAAE,2BAA2B;AACjD,IAAA,WAAW,EAAE,+BAA+B;;AAGnC,MAAA,eAAe,GAAS;AACjC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,IAAI,EAAE,eAAe;AACrB,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,oBAAoB,EAAE,2BAA2B;AACjD,IAAA,WAAW,EAAE,sCAAsC;;AAG1C,MAAA,UAAU,GAAS;AAC5B,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,WAAW,EAAE,2BAA2B;;AAG/B,MAAA,gBAAgB,GAAS;AAClC,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,SAAS,EAAE,gBAAgB;AAC3B,IAAA,IAAI,EAAE,wCAAwC;AAC9C,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,WAAW,EAAE,2BAA2B;;AAGrC,MAAM,QAAQ,GAAS;AAC1B,IAAA,IAAI,EAAE,OAKT;AAEY,MAAA,KAAK,GAAW;IACzB,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,UAAU;;;ACtFd,MAAM,SAAS,GAAG,+yrBAA+yrB;;MCWpzrB,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;AAEhB,IAAA,WAAW;AAEX,IAAA,YAAY;AAEZ,IAAA,YAAY;IAEZ,MAAM,GAAA;QACF,MAAM,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACrD,QAAA,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEtD,QACI,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,oFAAoF,EAAA,EAC1F,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;AAChB,YAAA,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAC9C,YAAA,QACI,CAAA,CAAA,QAAA,EAAA,EACI,KAAK,EAAE,CACH,wEAAA,EAAA,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;AAC3B,sBAAE;AACF,sBAAE,iCACV,CAAE,CAAA,EACF,KAAK,EAAE;oBACH,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;AAClC,0BAAE;AACF,0BAAE,SAAS;AAClB,iBAAA,EACW,YAAA,EAAA,WAAW,CAAC,SAAS,EACjC,KAAK,EAAE,WAAW,CAAC,WAAW,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAA,EAEtC,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,kCAAkC,EAAA,EACzC,CAAA,CAAA,eAAA,EAAA,EAAe,IAAI,EAAE,IAAI,CAAC,IAAI,EAAI,CAAA,EAClC,CAAA,CAAA,MAAA,EAAA,IAAA,EAAO,WAAW,CAAC,IAAI,CAAQ,CAC7B,CACD;SAEhB,CAAC,EACF,CACI,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAA,wEAAA,EACH,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC/B,kBAAE;AACF,kBAAE,iCACV,CAAE,CAAA,EACF,KAAK,EAAE;AACH,gBAAA,KAAK,EAAE,SAAS;AACnB,aAAA,EAAA,YAAA,EACW,eAAe,CAAC,SAAS,EACrC,KAAK,EAAE,eAAe,CAAC,WAAW,EAClC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAA,EAElC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,kCAAkC,EAAA,EACzC,CAAa,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACb,CAAO,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,eAAe,CAAC,IAAI,CAAQ,CACjC,CACD,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/utils/render/tools.ts","src/output.css?tag=tool-box","src/components/map-draw/tool-box.tsx"],"sourcesContent":["export type ToolType = \"move\" | \"roof\" | \"obstruction\" | \"delete\" | \"markRoofEdge\" | \"undo\";\r\n\r\nexport interface KeyboardCombination {\r\n key: string;\r\n description: string;\r\n}\r\n\r\nexport interface Tool {\r\n name: ToolType;\r\n ariaLabel: string;\r\n icon: string;\r\n cursor: string;\r\n keyboardShortcut?: string;\r\n keyboardCombinations?: KeyboardCombination[];\r\n explanation?: string;\r\n}\r\n\r\nconst polygonKeyboardCombinations: KeyboardCombination[] = [\r\n {\r\n key: \"shift\",\r\n description: \"add one point on perpendicular line\",\r\n },\r\n // {\r\n // key: \"alt\",\r\n // description: \"add parallel line\",\r\n // },\r\n];\r\n\r\nexport const moveTool: Tool = {\r\n name: \"move\",\r\n ariaLabel: \"Move\",\r\n icon: \"move\",\r\n cursor: \"move\",\r\n keyboardShortcut: \"m\",\r\n explanation: \"Move points of the active polygon\",\r\n}\r\n\r\nexport const roofTool: Tool = {\r\n name: \"roof\",\r\n ariaLabel: \"Roof Area\",\r\n icon: \"house\",\r\n cursor: \"crosshair\",\r\n keyboardShortcut: \"r\",\r\n keyboardCombinations: polygonKeyboardCombinations,\r\n explanation: \"Draw the roof of the building\",\r\n}\r\n\r\nexport const obstructionTool: Tool = {\r\n name: \"obstruction\",\r\n ariaLabel: \"Obstruction\",\r\n icon: \"octagon-minus\",\r\n cursor: \"crosshair\",\r\n keyboardShortcut: \"o\",\r\n keyboardCombinations: polygonKeyboardCombinations,\r\n explanation: \"Draw the obstruction of the building\",\r\n}\r\n\r\nexport const deleteTool: Tool = {\r\n name: \"delete\",\r\n ariaLabel: \"Delete\",\r\n icon: \"eraser\",\r\n cursor: \"default\",\r\n keyboardShortcut: \"d\",\r\n explanation: \"Delete the active polygon\",\r\n}\r\n\r\nexport const markRoofEdgeTool: Tool = {\r\n name: \"markRoofEdge\",\r\n ariaLabel: \"Mark Roof Edge\",\r\n icon: \"arrow-down-left-and-up-right-to-center\",\r\n cursor: \"pointer\",\r\n explanation: \"Mark the edge of the roof\",\r\n}\r\n\r\nexport const undoTool: Tool = {\r\n name: \"undo\",\r\n ariaLabel: \"Undo\",\r\n icon: \"undo\",\r\n cursor: \"default\",\r\n explanation: \"Undo the last action\",\r\n}\r\n\r\nexport const tools: Tool[] = [\r\n moveTool,\r\n roofTool,\r\n obstructionTool,\r\n deleteTool,\r\n];\r\n","/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-3 {\n grid-template-rows: repeat(3, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#00000056\\] {\n background-color: #00000056;\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-black {\n &:focus {\n border-color: var(--color-black);\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n","import { Component, h, Prop } from \"@stencil/core\";\r\nimport { Tool } from \"../../utils/render/tools\";\r\nimport { getLanguageStrings } from \"../../utils/lang/general\";\r\nimport { state } from \"../../store\";\r\nimport { tools, undoTool } from \"../../utils/render/tools\";\r\n\r\n@Component({\r\n tag: \"tool-box\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class ToolBox {\r\n @Prop()\r\n currentTool: Tool;\r\n @Prop()\r\n undoCallback: () => void;\r\n @Prop()\r\n onToolSelect: (tool: Tool) => void;\r\n\r\n render() {\r\n const t = getLanguageStrings(state.settings.language);\r\n const undoToolStrings = t.mapDraw.tools[undoTool.name];\r\n\r\n return (\r\n <div class=\"flex lg:gap-4 rounded-4xl bg-[#f3ebda] p-4 flex-wrap justify-center w-full text-xs\">\r\n {tools.map((tool) => {\r\n const toolStrings = t.mapDraw.tools[tool.name];\r\n return (\r\n <button\r\n class={`px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#ffffff] ${\r\n this.currentTool.name === tool.name\r\n ? \"bg-[#271200] hover:bg-gray-500\"\r\n : \"bg-[#f3ebda] hover:bg-[#ffffff]\"\r\n }`}\r\n style={{\r\n color: this.currentTool.name === tool.name\r\n ? \"#ffffff\"\r\n : \"#000000\",\r\n }}\r\n aria-label={toolStrings.ariaLabel}\r\n title={toolStrings.explanation}\r\n onClick={() => this.onToolSelect(tool)}\r\n >\r\n <div class=\"flex items-center gap-1 flex-col\">\r\n <icon-selector name={tool.icon} />\r\n <span>{toolStrings.name}</span>\r\n </div>\r\n </button>\r\n );\r\n })}\r\n <button\r\n class={`px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#ffffff] ${\r\n this.currentTool.name === undoTool.name\r\n ? \"bg-[#271200] hover:bg-gray-500\"\r\n : \"bg-[#f3ebda] hover:bg-[#ffffff]\"\r\n }`}\r\n style={{\r\n color: \"#000000\",\r\n }}\r\n aria-label={undoToolStrings.ariaLabel}\r\n title={undoToolStrings.explanation}\r\n onClick={() => this.undoCallback()}\r\n >\r\n <div class=\"flex items-center gap-1 flex-col\">\r\n <undo-icon />\r\n <span>{undoToolStrings.name}</span>\r\n </div>\r\n </button>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"version":3}
|