react-three-map 0.4.3 → 0.6.0
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/CHANGELOG.md +16 -0
- package/README.md +14 -0
- package/dist/cjs/main.js +91 -85
- package/dist/es/main.mjs +5 -2
- package/dist/es/main.mjs.map +1 -1
- package/dist/es/main10.mjs +20 -19
- package/dist/es/main10.mjs.map +1 -1
- package/dist/es/main11.mjs +17 -72
- package/dist/es/main11.mjs.map +1 -1
- package/dist/es/main12.mjs +75 -9
- package/dist/es/main12.mjs.map +1 -1
- package/dist/es/main13.mjs +8 -67
- package/dist/es/main13.mjs.map +1 -1
- package/dist/es/main14.mjs +71 -0
- package/dist/es/main14.mjs.map +1 -0
- package/dist/es/main2.mjs +5 -23
- package/dist/es/main2.mjs.map +1 -1
- package/dist/es/main4.mjs +24 -22
- package/dist/es/main4.mjs.map +1 -1
- package/dist/es/main7.mjs +1 -1
- package/dist/es/main8.mjs +21 -14
- package/dist/es/main8.mjs.map +1 -1
- package/dist/es/main9.mjs +15 -21
- package/dist/es/main9.mjs.map +1 -1
- package/dist/maplibre/cjs/main.js +91 -85
- package/dist/maplibre/es/main.mjs +5 -2
- package/dist/maplibre/es/main.mjs.map +1 -1
- package/dist/maplibre/es/main10.mjs +21 -15
- package/dist/maplibre/es/main10.mjs.map +1 -1
- package/dist/maplibre/es/main11.mjs +17 -72
- package/dist/maplibre/es/main11.mjs.map +1 -1
- package/dist/maplibre/es/main12.mjs +75 -9
- package/dist/maplibre/es/main12.mjs.map +1 -1
- package/dist/maplibre/es/main13.mjs +8 -67
- package/dist/maplibre/es/main13.mjs.map +1 -1
- package/dist/maplibre/es/main14.mjs +71 -0
- package/dist/maplibre/es/main14.mjs.map +1 -0
- package/dist/maplibre/es/main2.mjs +5 -23
- package/dist/maplibre/es/main2.mjs.map +1 -1
- package/dist/maplibre/es/main4.mjs +24 -22
- package/dist/maplibre/es/main4.mjs.map +1 -1
- package/dist/maplibre/es/main7.mjs +1 -1
- package/dist/maplibre/es/main8.mjs +20 -19
- package/dist/maplibre/es/main8.mjs.map +1 -1
- package/dist/maplibre/es/main9.mjs +14 -19
- package/dist/maplibre/es/main9.mjs.map +1 -1
- package/dist/maplibre/types/api/use-map.d.ts +2 -0
- package/dist/maplibre/types/maplibre.index.d.ts +3 -1
- package/dist/types/api/use-map.d.ts +2 -0
- package/dist/types/mapbox.index.d.ts +3 -1
- package/package.json +1 -1
package/dist/es/main13.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main13.mjs","sources":["../../src/core/
|
|
1
|
+
{"version":3,"file":"main13.mjs","sources":["../../src/core/use-function.ts"],"sourcesContent":["import { useCallback, useRef } from 'react';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const useFunction = <T extends (...args: any[]) => any>(callback: T): T => {\n const callbackRef = useRef(callback);\n callbackRef.current = callback;\n return useCallback((...args: any[]) => {\n return callbackRef.current(...args);\n }, []) as T;\n};\n"],"names":[],"mappings":";AAGa,MAAA,cAAc,CAAoC,aAAmB;AAC1E,QAAA,cAAc,OAAO,QAAQ;AACnC,cAAY,UAAU;AACf,SAAA,YAAY,IAAI,SAAgB;AAC9B,WAAA,YAAY,QAAQ,GAAG,IAAI;AAAA,EACpC,GAAG,CAAE,CAAA;AACP;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createEvents as createEvents$1 } from "@react-three/fiber";
|
|
2
|
+
import { Matrix4 } from "three";
|
|
3
|
+
const DOM_EVENTS = {
|
|
4
|
+
onClick: ["click", false],
|
|
5
|
+
onContextMenu: ["contextmenu", false],
|
|
6
|
+
onDoubleClick: ["dblclick", false],
|
|
7
|
+
onWheel: ["wheel", true],
|
|
8
|
+
onPointerDown: ["pointerdown", true],
|
|
9
|
+
onPointerUp: ["pointerup", true],
|
|
10
|
+
onPointerLeave: ["pointerleave", true],
|
|
11
|
+
onPointerMove: ["pointermove", true],
|
|
12
|
+
onPointerCancel: ["pointercancel", true],
|
|
13
|
+
onLostPointerCapture: ["lostpointercapture", true]
|
|
14
|
+
};
|
|
15
|
+
const projByViewInv = new Matrix4();
|
|
16
|
+
function createEvents() {
|
|
17
|
+
return (store) => {
|
|
18
|
+
const { handlePointer } = createEvents$1(store);
|
|
19
|
+
return {
|
|
20
|
+
priority: 1,
|
|
21
|
+
enabled: true,
|
|
22
|
+
compute(event, state) {
|
|
23
|
+
state.pointer.x = event.offsetX / state.size.width * 2 - 1;
|
|
24
|
+
state.pointer.y = 1 - event.offsetY / state.size.height * 2;
|
|
25
|
+
if (state.camera.userData.projByViewInv)
|
|
26
|
+
projByViewInv.fromArray(state.camera.userData.projByViewInv);
|
|
27
|
+
state.raycaster.camera = state.camera;
|
|
28
|
+
state.raycaster.ray.origin.setScalar(0).applyMatrix4(projByViewInv);
|
|
29
|
+
state.raycaster.ray.direction.set(state.pointer.x, state.pointer.y, 1).applyMatrix4(projByViewInv).sub(state.raycaster.ray.origin).normalize();
|
|
30
|
+
},
|
|
31
|
+
connected: void 0,
|
|
32
|
+
handlers: Object.keys(DOM_EVENTS).reduce(
|
|
33
|
+
(acc, key) => ({ ...acc, [key]: handlePointer(key) }),
|
|
34
|
+
{}
|
|
35
|
+
),
|
|
36
|
+
update: () => {
|
|
37
|
+
var _a;
|
|
38
|
+
const { events, internal } = store.getState();
|
|
39
|
+
if (((_a = internal.lastEvent) == null ? void 0 : _a.current) && events.handlers) {
|
|
40
|
+
events.handlers.onPointerMove(internal.lastEvent.current);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
connect: (target) => {
|
|
44
|
+
var _a;
|
|
45
|
+
const { set, events } = store.getState();
|
|
46
|
+
(_a = events.disconnect) == null ? void 0 : _a.call(events);
|
|
47
|
+
set((state) => ({ events: { ...state.events, connected: target.parentNode } }));
|
|
48
|
+
Object.entries(events.handlers ?? []).forEach(([name, event]) => {
|
|
49
|
+
const [eventName, passive] = DOM_EVENTS[name];
|
|
50
|
+
target.addEventListener(eventName, event, { passive });
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
disconnect: () => {
|
|
54
|
+
const { set, events } = store.getState();
|
|
55
|
+
if (events.connected) {
|
|
56
|
+
Object.entries(events.handlers ?? []).forEach(([name, event]) => {
|
|
57
|
+
if (events && events.connected instanceof HTMLElement) {
|
|
58
|
+
const [eventName] = DOM_EVENTS[name];
|
|
59
|
+
events.connected.removeEventListener(eventName, event);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
set((state) => ({ events: { ...state.events, connected: void 0 } }));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
createEvents
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=main14.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main14.mjs","sources":["../../src/core/create-events.ts"],"sourcesContent":["import { Events, RenderProps, RootState, createEvents as createFiberEvents } from \"@react-three/fiber\";\nimport { Matrix4 } from \"three\";\nimport { UseBoundStore } from \"zustand\";\n\ntype DomEvent = PointerEvent | MouseEvent | WheelEvent;\n\nconst DOM_EVENTS = {\n onClick: [\"click\", false],\n onContextMenu: [\"contextmenu\", false],\n onDoubleClick: [\"dblclick\", false],\n onWheel: [\"wheel\", true],\n onPointerDown: [\"pointerdown\", true],\n onPointerUp: [\"pointerup\", true],\n onPointerLeave: [\"pointerleave\", true],\n onPointerMove: [\"pointermove\", true],\n onPointerCancel: [\"pointercancel\", true],\n onLostPointerCapture: [\"lostpointercapture\", true],\n} as const;\n\nconst projByViewInv = new Matrix4()\n\n/** ThreeLayer event manager for MapLibre and Mapbox */\nexport function createEvents(): RenderProps<HTMLCanvasElement>[\"events\"] {\n return (store: UseBoundStore<RootState>) => {\n const { handlePointer } = createFiberEvents(store);\n\n return {\n priority: 1,\n enabled: true,\n compute(event: DomEvent, state: RootState) {\n\n state.pointer.x = (event.offsetX / state.size.width) * 2 - 1;\n state.pointer.y = 1 - (event.offsetY / state.size.height) * 2;\n\n if (state.camera.userData.projByViewInv) projByViewInv.fromArray(state.camera.userData.projByViewInv);\n\n state.raycaster.camera = state.camera;\n state.raycaster.ray.origin.setScalar(0).applyMatrix4(projByViewInv);\n state.raycaster.ray.direction\n .set(state.pointer.x, state.pointer.y, 1)\n .applyMatrix4(projByViewInv)\n .sub(state.raycaster.ray.origin)\n .normalize();\n },\n connected: undefined,\n handlers: Object.keys(DOM_EVENTS).reduce(\n (acc, key) => ({ ...acc, [key]: handlePointer(key) }),\n {}\n ) as unknown as Events,\n update: () => {\n const { events, internal } = store.getState();\n if (internal.lastEvent?.current && events.handlers) {\n events.handlers.onPointerMove(internal.lastEvent.current);\n }\n },\n connect: (target: HTMLElement) => {\n const { set, events } = store.getState();\n events.disconnect?.();\n set((state) => ({ events: { ...state.events, connected: target.parentNode } }));\n Object.entries(events.handlers ?? []).forEach(([name, event]) => {\n const [eventName, passive] = DOM_EVENTS[name as keyof typeof DOM_EVENTS];\n target.addEventListener(eventName, event, { passive });\n });\n },\n disconnect: () => {\n const { set, events } = store.getState();\n if (events.connected) {\n Object.entries(events.handlers ?? []).forEach(([name, event]) => {\n if (events && events.connected instanceof HTMLElement) {\n const [eventName] = DOM_EVENTS[name as keyof typeof DOM_EVENTS];\n events.connected.removeEventListener(eventName, event);\n }\n });\n set((state) => ({ events: { ...state.events, connected: undefined } }));\n }\n },\n };\n };\n}\n"],"names":["createFiberEvents"],"mappings":";;AAMA,MAAM,aAAa;AAAA,EACjB,SAAS,CAAC,SAAS,KAAK;AAAA,EACxB,eAAe,CAAC,eAAe,KAAK;AAAA,EACpC,eAAe,CAAC,YAAY,KAAK;AAAA,EACjC,SAAS,CAAC,SAAS,IAAI;AAAA,EACvB,eAAe,CAAC,eAAe,IAAI;AAAA,EACnC,aAAa,CAAC,aAAa,IAAI;AAAA,EAC/B,gBAAgB,CAAC,gBAAgB,IAAI;AAAA,EACrC,eAAe,CAAC,eAAe,IAAI;AAAA,EACnC,iBAAiB,CAAC,iBAAiB,IAAI;AAAA,EACvC,sBAAsB,CAAC,sBAAsB,IAAI;AACnD;AAEA,MAAM,gBAAgB,IAAI;AAGnB,SAAS,eAAyD;AACvE,SAAO,CAAC,UAAoC;AAC1C,UAAM,EAAE,cAAA,IAAkBA,eAAkB,KAAK;AAE1C,WAAA;AAAA,MACL,UAAU;AAAA,MACV,SAAS;AAAA,MACT,QAAQ,OAAiB,OAAkB;AAEzC,cAAM,QAAQ,IAAK,MAAM,UAAU,MAAM,KAAK,QAAS,IAAI;AAC3D,cAAM,QAAQ,IAAI,IAAK,MAAM,UAAU,MAAM,KAAK,SAAU;AAExD,YAAA,MAAM,OAAO,SAAS;AAAe,wBAAc,UAAU,MAAM,OAAO,SAAS,aAAa;AAE9F,cAAA,UAAU,SAAS,MAAM;AAC/B,cAAM,UAAU,IAAI,OAAO,UAAU,CAAC,EAAE,aAAa,aAAa;AAC5D,cAAA,UAAU,IAAI,UACjB,IAAI,MAAM,QAAQ,GAAG,MAAM,QAAQ,GAAG,CAAC,EACvC,aAAa,aAAa,EAC1B,IAAI,MAAM,UAAU,IAAI,MAAM,EAC9B;MACL;AAAA,MACA,WAAW;AAAA,MACX,UAAU,OAAO,KAAK,UAAU,EAAE;AAAA,QAChC,CAAC,KAAK,SAAS,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,cAAc,GAAG;QACjD,CAAC;AAAA,MACH;AAAA,MACA,QAAQ,MAAM;;AACZ,cAAM,EAAE,QAAQ,SAAS,IAAI,MAAM,SAAS;AAC5C,cAAI,cAAS,cAAT,mBAAoB,YAAW,OAAO,UAAU;AAClD,iBAAO,SAAS,cAAc,SAAS,UAAU,OAAO;AAAA,QAC1D;AAAA,MACF;AAAA,MACA,SAAS,CAAC,WAAwB;;AAChC,cAAM,EAAE,KAAK,OAAO,IAAI,MAAM,SAAS;AACvC,qBAAO,eAAP;AACA,YAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,MAAM,QAAQ,WAAW,OAAO,WAAW,EAAA,EAAI;AACvE,eAAA,QAAQ,OAAO,YAAY,CAAA,CAAE,EAAE,QAAQ,CAAC,CAAC,MAAM,KAAK,MAAM;AAC/D,gBAAM,CAAC,WAAW,OAAO,IAAI,WAAW,IAA+B;AACvE,iBAAO,iBAAiB,WAAW,OAAO,EAAE,QAAS,CAAA;AAAA,QAAA,CACtD;AAAA,MACH;AAAA,MACA,YAAY,MAAM;AAChB,cAAM,EAAE,KAAK,OAAO,IAAI,MAAM,SAAS;AACvC,YAAI,OAAO,WAAW;AACb,iBAAA,QAAQ,OAAO,YAAY,CAAA,CAAE,EAAE,QAAQ,CAAC,CAAC,MAAM,KAAK,MAAM;AAC3D,gBAAA,UAAU,OAAO,qBAAqB,aAAa;AACrD,oBAAM,CAAC,SAAS,IAAI,WAAW,IAA+B;AACvD,qBAAA,UAAU,oBAAoB,WAAW,KAAK;AAAA,YACvD;AAAA,UAAA,CACD;AACG,cAAA,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,MAAM,QAAQ,WAAW,OAAU,EAAA,EAAI;AAAA,QACxE;AAAA,MACF;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
package/dist/es/main2.mjs
CHANGED
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Layer } from "react-map-gl";
|
|
6
|
-
import * as THREE from "three";
|
|
7
|
-
import { useCanvas } from "./main4.mjs";
|
|
8
|
-
extend(THREE);
|
|
9
|
-
const fromLngLat = MercatorCoordinate.fromLngLat;
|
|
10
|
-
const Canvas = memo((props) => {
|
|
11
|
-
const { id, onAdd, onRemove, render } = useCanvas({ ...props, fromLngLat });
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
13
|
-
Layer,
|
|
14
|
-
{
|
|
15
|
-
id,
|
|
16
|
-
type: "custom",
|
|
17
|
-
renderingMode: "3d",
|
|
18
|
-
onAdd,
|
|
19
|
-
onRemove,
|
|
20
|
-
render
|
|
21
|
-
}
|
|
22
|
-
);
|
|
1
|
+
import { useThree } from "@react-three/fiber";
|
|
2
|
+
const useMap = () => useThree((s) => {
|
|
3
|
+
var _a;
|
|
4
|
+
return (_a = s.r3m) == null ? void 0 : _a.map;
|
|
23
5
|
});
|
|
24
6
|
export {
|
|
25
|
-
|
|
7
|
+
useMap
|
|
26
8
|
};
|
|
27
9
|
//# sourceMappingURL=main2.mjs.map
|
package/dist/es/main2.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main2.mjs","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"main2.mjs","sources":["../../src/api/use-map.ts"],"sourcesContent":["import { useThree } from \"@react-three/fiber\";\nimport { MapInstance } from \"../core/generic-map\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const useMap = <T extends MapInstance = MapInstance>(): T | undefined => useThree((s) => (s as any as { r3m?: {map: T}}).r3m?.map);"],"names":[],"mappings":";AAIO,MAAM,SAAS,MAA0D,SAAS,CAAC,MAAO;;AAAA,iBAA+B,QAA/B,mBAAoC;AAAA,CAAG;"}
|
package/dist/es/main4.mjs
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { extend } from "@react-three/fiber";
|
|
3
|
+
import { MercatorCoordinate } from "mapbox-gl";
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
import { Layer } from "react-map-gl";
|
|
6
|
+
import * as THREE from "three";
|
|
7
|
+
import { useCanvas } from "./main8.mjs";
|
|
8
|
+
extend(THREE);
|
|
9
|
+
const fromLngLat = MercatorCoordinate.fromLngLat;
|
|
10
|
+
const Canvas = memo((props) => {
|
|
11
|
+
const { id, onAdd, onRemove, render } = useCanvas({ ...props, fromLngLat });
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Layer,
|
|
14
|
+
{
|
|
15
|
+
id,
|
|
16
|
+
type: "custom",
|
|
17
|
+
renderingMode: "3d",
|
|
18
|
+
onAdd,
|
|
19
|
+
onRemove,
|
|
20
|
+
render
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
});
|
|
22
24
|
export {
|
|
23
|
-
|
|
25
|
+
Canvas
|
|
24
26
|
};
|
|
25
27
|
//# sourceMappingURL=main4.mjs.map
|
package/dist/es/main4.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main4.mjs","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"main4.mjs","sources":["../../src/mapbox/canvas.tsx"],"sourcesContent":["import { extend } from \"@react-three/fiber\";\nimport { MercatorCoordinate } from \"mapbox-gl\";\nimport { memo } from \"react\";\nimport { Layer } from \"react-map-gl\";\nimport * as THREE from \"three\";\nimport { CanvasProps } from \"../api/canvas-props\";\nimport { useCanvas } from \"../core/use-canvas\";\n\nextend(THREE);\n\nconst fromLngLat = MercatorCoordinate.fromLngLat\n\n/** react`-three-fiber` canvas inside `Mapbox` */\nexport const Canvas = memo<CanvasProps>((props) => {\n\n const { id, onAdd, onRemove, render } = useCanvas({ ...props, fromLngLat });\n\n return <Layer\n id={id}\n type=\"custom\"\n renderingMode=\"3d\"\n onAdd={onAdd}\n onRemove={onRemove}\n render={render}\n />\n})"],"names":[],"mappings":";;;;;;;AAQA,OAAO,KAAK;AAEZ,MAAM,aAAa,mBAAmB;AAGzB,MAAA,SAAS,KAAkB,CAAC,UAAU;AAE3C,QAAA,EAAE,IAAI,OAAO,UAAU,OAAA,IAAW,UAAU,EAAE,GAAG,OAAO,WAAA,CAAY;AAEnE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACN;AAAA,MACA,MAAK;AAAA,MACL,eAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAEJ,CAAC;"}
|
package/dist/es/main7.mjs
CHANGED
package/dist/es/main8.mjs
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useCoords } from "./main7.mjs";
|
|
2
|
+
import { useCreateRoot } from "./main10.mjs";
|
|
3
|
+
import { useRender } from "./main11.mjs";
|
|
4
|
+
function useCanvas({
|
|
5
|
+
longitude,
|
|
6
|
+
latitude,
|
|
7
|
+
altitude = 0,
|
|
8
|
+
frameloop = "always",
|
|
9
|
+
fromLngLat,
|
|
10
|
+
...renderProps
|
|
11
|
+
}) {
|
|
12
|
+
const m4 = useCoords({
|
|
13
|
+
latitude,
|
|
14
|
+
longitude,
|
|
15
|
+
altitude,
|
|
16
|
+
fromLngLat
|
|
17
|
+
});
|
|
18
|
+
const { id, onAdd, onRemove, r3mRef } = useCreateRoot({ frameloop, fromLngLat, ...renderProps });
|
|
19
|
+
const render = useRender(m4, r3mRef, frameloop);
|
|
20
|
+
return { id, onAdd, onRemove, render };
|
|
14
21
|
}
|
|
15
22
|
export {
|
|
16
|
-
|
|
23
|
+
useCanvas
|
|
17
24
|
};
|
|
18
25
|
//# sourceMappingURL=main8.mjs.map
|
package/dist/es/main8.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main8.mjs","sources":["../../src/core/
|
|
1
|
+
{"version":3,"file":"main8.mjs","sources":["../../src/core/use-canvas.ts"],"sourcesContent":["import { CanvasProps } from \"../api/canvas-props\";\nimport { FromLngLat } from \"./generic-map\";\nimport { useCoords } from \"./use-coords\";\nimport { useCreateRoot } from \"./use-create-root\";\nimport { useRender } from \"./use-render\";\n\nexport interface useCanvasProps extends CanvasProps {\n fromLngLat: FromLngLat,\n}\n\nexport function useCanvas({\n longitude, latitude, altitude = 0,\n frameloop = 'always',\n fromLngLat,\n ...renderProps\n}: useCanvasProps) {\n\n const m4 = useCoords({\n latitude, longitude, altitude, fromLngLat,\n });\n\n const { id, onAdd, onRemove, r3mRef } = useCreateRoot({ frameloop, fromLngLat, ...renderProps });\n\n const render = useRender(m4, r3mRef, frameloop);\n\n return { id, onAdd, onRemove, render }\n}"],"names":[],"mappings":";;;AAUO,SAAS,UAAU;AAAA,EACxB;AAAA,EAAW;AAAA,EAAU,WAAW;AAAA,EAChC,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,GAAmB;AAEjB,QAAM,KAAK,UAAU;AAAA,IACnB;AAAA,IAAU;AAAA,IAAW;AAAA,IAAU;AAAA,EAAA,CAChC;AAED,QAAM,EAAE,IAAI,OAAO,UAAU,OAAO,IAAI,cAAc,EAAE,WAAW,YAAY,GAAG,YAAa,CAAA;AAE/F,QAAM,SAAS,UAAU,IAAI,QAAQ,SAAS;AAE9C,SAAO,EAAE,IAAI,OAAO,UAAU,OAAO;AACvC;"}
|
package/dist/es/main9.mjs
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (!r3mRef.current.root)
|
|
16
|
-
return;
|
|
17
|
-
r3mRef.current.root.render(/* @__PURE__ */ jsx(Fragment, { children }));
|
|
18
|
-
}, [r3mRef, mounted, children]);
|
|
19
|
-
return { id, onAdd, onRemove, r3mRef };
|
|
20
|
-
};
|
|
1
|
+
import { Quaternion, Euler, Vector3, Matrix4 } from "three";
|
|
2
|
+
const quat = new Quaternion();
|
|
3
|
+
const euler = new Euler();
|
|
4
|
+
const pos = new Vector3();
|
|
5
|
+
const scale = new Vector3();
|
|
6
|
+
const m4 = new Matrix4();
|
|
7
|
+
function coordsToMatrix({ longitude, latitude, altitude, fromLngLat }) {
|
|
8
|
+
const center = fromLngLat([longitude, latitude], altitude);
|
|
9
|
+
const scaleUnit = center.meterInMercatorCoordinateUnits();
|
|
10
|
+
pos.set(center.x, center.y, center.z || 0);
|
|
11
|
+
scale.set(scaleUnit, -scaleUnit, scaleUnit);
|
|
12
|
+
quat.setFromEuler(euler.set(-Math.PI * 0.5, 0, 0));
|
|
13
|
+
return m4.compose(pos, quat, scale).toArray();
|
|
14
|
+
}
|
|
21
15
|
export {
|
|
22
|
-
|
|
16
|
+
coordsToMatrix
|
|
23
17
|
};
|
|
24
18
|
//# sourceMappingURL=main9.mjs.map
|
package/dist/es/main9.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main9.mjs","sources":["../../src/core/
|
|
1
|
+
{"version":3,"file":"main9.mjs","sources":["../../src/core/coords-to-matrix.ts"],"sourcesContent":["import { Euler, Matrix4, Quaternion, Vector3 } from \"three\";\nimport { FromLngLat } from \"./generic-map\";\n\nconst quat = new Quaternion();\nconst euler = new Euler();\nconst pos = new Vector3();\nconst scale = new Vector3();\nconst m4 = new Matrix4();\n\n/** calculate Matrix4 from coordinates */\nexport function coordsToMatrix({ longitude, latitude, altitude, fromLngLat }: {\n longitude: number, latitude: number, altitude: number, fromLngLat: FromLngLat\n}) {\n const center = fromLngLat([longitude, latitude], altitude);\n const scaleUnit = center.meterInMercatorCoordinateUnits();\n pos.set(center.x, center.y, center.z || 0);\n scale.set(scaleUnit, -scaleUnit, scaleUnit);\n quat.setFromEuler(euler.set(-Math.PI * .5, 0, 0));\n return m4.compose(pos, quat, scale).toArray();\n}\n"],"names":[],"mappings":";AAGA,MAAM,OAAO,IAAI;AACjB,MAAM,QAAQ,IAAI;AAClB,MAAM,MAAM,IAAI;AAChB,MAAM,QAAQ,IAAI;AAClB,MAAM,KAAK,IAAI;AAGR,SAAS,eAAe,EAAE,WAAW,UAAU,UAAU,cAE7D;AACD,QAAM,SAAS,WAAW,CAAC,WAAW,QAAQ,GAAG,QAAQ;AACnD,QAAA,YAAY,OAAO;AACzB,MAAI,IAAI,OAAO,GAAG,OAAO,GAAG,OAAO,KAAK,CAAC;AACzC,QAAM,IAAI,WAAW,CAAC,WAAW,SAAS;AACrC,OAAA,aAAa,MAAM,IAAI,CAAC,KAAK,KAAK,KAAI,GAAG,CAAC,CAAC;AAChD,SAAO,GAAG,QAAQ,KAAK,MAAM,KAAK,EAAE;AACtC;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
3
|
const fiber = require("@react-three/fiber");
|
|
5
|
-
const
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
6
5
|
const react = require("react");
|
|
7
|
-
const maplibre = require("react-map-gl/maplibre");
|
|
8
6
|
const THREE = require("three");
|
|
7
|
+
const maplibreGl = require("maplibre-gl");
|
|
8
|
+
const maplibre = require("react-map-gl/maplibre");
|
|
9
9
|
function _interopNamespaceDefault(e) {
|
|
10
10
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
11
11
|
if (e) {
|
|
@@ -23,6 +23,43 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
return Object.freeze(n);
|
|
24
24
|
}
|
|
25
25
|
const THREE__namespace = /* @__PURE__ */ _interopNamespaceDefault(THREE);
|
|
26
|
+
const useMap$1 = () => fiber.useThree((s) => {
|
|
27
|
+
var _a;
|
|
28
|
+
return (_a = s.r3m) == null ? void 0 : _a.map;
|
|
29
|
+
});
|
|
30
|
+
const useR3M = () => fiber.useThree((s) => s.r3m);
|
|
31
|
+
const originMx = new THREE.Matrix4();
|
|
32
|
+
const projByView = new THREE.Matrix4();
|
|
33
|
+
const projByViewInv$1 = new THREE.Matrix4();
|
|
34
|
+
const fwd = new THREE.Vector3();
|
|
35
|
+
function syncCamera(camera, origin, mapCamMx) {
|
|
36
|
+
projByView.fromArray(mapCamMx).multiply(originMx.fromArray(origin));
|
|
37
|
+
projByViewInv$1.copy(projByView).invert();
|
|
38
|
+
updateCamera(camera, projByViewInv$1);
|
|
39
|
+
camera.updateMatrix();
|
|
40
|
+
camera.updateMatrixWorld(true);
|
|
41
|
+
camera.projectionMatrix.copy(camera.matrix).premultiply(projByView);
|
|
42
|
+
camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();
|
|
43
|
+
camera.far = calculateFar(
|
|
44
|
+
camera.matrix.elements[10],
|
|
45
|
+
camera.matrix.elements[14],
|
|
46
|
+
camera.near
|
|
47
|
+
);
|
|
48
|
+
camera.userData.projByView = projByView.toArray();
|
|
49
|
+
camera.userData.projByViewInv = projByViewInv$1.toArray();
|
|
50
|
+
}
|
|
51
|
+
const updateCamera = (target, projByViewInv2) => {
|
|
52
|
+
target.position.setScalar(0).applyMatrix4(projByViewInv2);
|
|
53
|
+
target.up.set(0, -1, 0).applyMatrix4(projByViewInv2).negate().add(target.position).normalize();
|
|
54
|
+
fwd.set(0, 0, 1).applyMatrix4(projByViewInv2);
|
|
55
|
+
target.lookAt(fwd);
|
|
56
|
+
};
|
|
57
|
+
function calculateFar(c, d, near) {
|
|
58
|
+
const numerator = d * (c - 1);
|
|
59
|
+
const denominator = c * near + near;
|
|
60
|
+
const far = numerator / denominator;
|
|
61
|
+
return far;
|
|
62
|
+
}
|
|
26
63
|
const quat = new THREE.Quaternion();
|
|
27
64
|
const euler = new THREE.Euler();
|
|
28
65
|
const pos = new THREE.Vector3();
|
|
@@ -45,6 +82,51 @@ function useCoords({ latitude, longitude, altitude, fromLngLat: fromLngLat2 }) {
|
|
|
45
82
|
}), [latitude, longitude, altitude, fromLngLat2]);
|
|
46
83
|
return m42;
|
|
47
84
|
}
|
|
85
|
+
const Coordinates = react.memo(({
|
|
86
|
+
latitude,
|
|
87
|
+
longitude,
|
|
88
|
+
altitude = 0,
|
|
89
|
+
children
|
|
90
|
+
}) => {
|
|
91
|
+
const [scene] = react.useState(() => new THREE.Scene());
|
|
92
|
+
const r3m = useR3M();
|
|
93
|
+
const origin = useCoords({
|
|
94
|
+
latitude,
|
|
95
|
+
longitude,
|
|
96
|
+
altitude,
|
|
97
|
+
fromLngLat: r3m.fromLngLat
|
|
98
|
+
});
|
|
99
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fiber.createPortal(/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx(RenderAtCoords, { r3m, origin }),
|
|
101
|
+
children
|
|
102
|
+
] }), scene, { events: { priority: 2 } }) });
|
|
103
|
+
});
|
|
104
|
+
Coordinates.displayName = "Coordinates";
|
|
105
|
+
function RenderAtCoords({ r3m, origin }) {
|
|
106
|
+
const { gl, scene, set } = fiber.useThree();
|
|
107
|
+
const cameraRef = react.useRef(null);
|
|
108
|
+
fiber.useFrame(() => {
|
|
109
|
+
if (!r3m.mapCamMx)
|
|
110
|
+
return;
|
|
111
|
+
if (!cameraRef.current)
|
|
112
|
+
return;
|
|
113
|
+
syncCamera(cameraRef.current, origin, r3m.mapCamMx);
|
|
114
|
+
gl.render(scene, cameraRef.current);
|
|
115
|
+
});
|
|
116
|
+
react.useLayoutEffect(() => {
|
|
117
|
+
if (!cameraRef.current)
|
|
118
|
+
return;
|
|
119
|
+
set({
|
|
120
|
+
invalidate: () => {
|
|
121
|
+
if (!r3m.map)
|
|
122
|
+
return;
|
|
123
|
+
r3m.map.triggerRepaint();
|
|
124
|
+
},
|
|
125
|
+
camera: cameraRef.current
|
|
126
|
+
});
|
|
127
|
+
}, [set, r3m]);
|
|
128
|
+
return /* @__PURE__ */ jsxRuntime.jsx("perspectiveCamera", { ref: cameraRef });
|
|
129
|
+
}
|
|
48
130
|
const DOM_EVENTS = {
|
|
49
131
|
onClick: ["click", false],
|
|
50
132
|
onContextMenu: ["contextmenu", false],
|
|
@@ -57,7 +139,7 @@ const DOM_EVENTS = {
|
|
|
57
139
|
onPointerCancel: ["pointercancel", true],
|
|
58
140
|
onLostPointerCapture: ["lostpointercapture", true]
|
|
59
141
|
};
|
|
60
|
-
const projByViewInv
|
|
142
|
+
const projByViewInv = new THREE.Matrix4();
|
|
61
143
|
function createEvents() {
|
|
62
144
|
return (store) => {
|
|
63
145
|
const { handlePointer } = fiber.createEvents(store);
|
|
@@ -68,10 +150,10 @@ function createEvents() {
|
|
|
68
150
|
state.pointer.x = event.offsetX / state.size.width * 2 - 1;
|
|
69
151
|
state.pointer.y = 1 - event.offsetY / state.size.height * 2;
|
|
70
152
|
if (state.camera.userData.projByViewInv)
|
|
71
|
-
projByViewInv
|
|
153
|
+
projByViewInv.fromArray(state.camera.userData.projByViewInv);
|
|
72
154
|
state.raycaster.camera = state.camera;
|
|
73
|
-
state.raycaster.ray.origin.setScalar(0).applyMatrix4(projByViewInv
|
|
74
|
-
state.raycaster.ray.direction.set(state.pointer.x, state.pointer.y, 1).applyMatrix4(projByViewInv
|
|
155
|
+
state.raycaster.ray.origin.setScalar(0).applyMatrix4(projByViewInv);
|
|
156
|
+
state.raycaster.ray.direction.set(state.pointer.x, state.pointer.y, 1).applyMatrix4(projByViewInv).sub(state.raycaster.ray.origin).normalize();
|
|
75
157
|
},
|
|
76
158
|
connected: void 0,
|
|
77
159
|
handlers: Object.keys(DOM_EVENTS).reduce(
|
|
@@ -204,38 +286,6 @@ const useCreateRoot = ({
|
|
|
204
286
|
}, [r3mRef, mounted, children]);
|
|
205
287
|
return { id, onAdd, onRemove, r3mRef };
|
|
206
288
|
};
|
|
207
|
-
const originMx = new THREE.Matrix4();
|
|
208
|
-
const projByView = new THREE.Matrix4();
|
|
209
|
-
const projByViewInv = new THREE.Matrix4();
|
|
210
|
-
const fwd = new THREE.Vector3();
|
|
211
|
-
function syncCamera(camera, origin, mapCamMx) {
|
|
212
|
-
projByView.fromArray(mapCamMx).multiply(originMx.fromArray(origin));
|
|
213
|
-
projByViewInv.copy(projByView).invert();
|
|
214
|
-
updateCamera(camera, projByViewInv);
|
|
215
|
-
camera.updateMatrix();
|
|
216
|
-
camera.updateMatrixWorld(true);
|
|
217
|
-
camera.projectionMatrix.copy(camera.matrix).premultiply(projByView);
|
|
218
|
-
camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();
|
|
219
|
-
camera.far = calculateFar(
|
|
220
|
-
camera.matrix.elements[10],
|
|
221
|
-
camera.matrix.elements[14],
|
|
222
|
-
camera.near
|
|
223
|
-
);
|
|
224
|
-
camera.userData.projByView = projByView.toArray();
|
|
225
|
-
camera.userData.projByViewInv = projByViewInv.toArray();
|
|
226
|
-
}
|
|
227
|
-
const updateCamera = (target, projByViewInv2) => {
|
|
228
|
-
target.position.setScalar(0).applyMatrix4(projByViewInv2);
|
|
229
|
-
target.up.set(0, -1, 0).applyMatrix4(projByViewInv2).negate().add(target.position).normalize();
|
|
230
|
-
fwd.set(0, 0, 1).applyMatrix4(projByViewInv2);
|
|
231
|
-
target.lookAt(fwd);
|
|
232
|
-
};
|
|
233
|
-
function calculateFar(c, d, near) {
|
|
234
|
-
const numerator = d * (c - 1);
|
|
235
|
-
const denominator = c * near + near;
|
|
236
|
-
const far = numerator / denominator;
|
|
237
|
-
return far;
|
|
238
|
-
}
|
|
239
289
|
function useRender(origin, r3mRef, frameloop) {
|
|
240
290
|
const render = useFunction((_gl, mapCamMx) => {
|
|
241
291
|
const r3m = r3mRef.current;
|
|
@@ -287,51 +337,7 @@ const Canvas = react.memo((props) => {
|
|
|
287
337
|
}
|
|
288
338
|
);
|
|
289
339
|
});
|
|
290
|
-
const
|
|
291
|
-
const Coordinates = react.memo(({
|
|
292
|
-
latitude,
|
|
293
|
-
longitude,
|
|
294
|
-
altitude = 0,
|
|
295
|
-
children
|
|
296
|
-
}) => {
|
|
297
|
-
const [scene] = react.useState(() => new THREE.Scene());
|
|
298
|
-
const r3m = useR3M();
|
|
299
|
-
const origin = useCoords({
|
|
300
|
-
latitude,
|
|
301
|
-
longitude,
|
|
302
|
-
altitude,
|
|
303
|
-
fromLngLat: r3m.fromLngLat
|
|
304
|
-
});
|
|
305
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fiber.createPortal(/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
306
|
-
/* @__PURE__ */ jsxRuntime.jsx(RenderAtCoords, { r3m, origin }),
|
|
307
|
-
children
|
|
308
|
-
] }), scene, { events: { priority: 2 } }) });
|
|
309
|
-
});
|
|
310
|
-
Coordinates.displayName = "Coordinates";
|
|
311
|
-
function RenderAtCoords({ r3m, origin }) {
|
|
312
|
-
const { gl, scene, set } = fiber.useThree();
|
|
313
|
-
const cameraRef = react.useRef(null);
|
|
314
|
-
fiber.useFrame(() => {
|
|
315
|
-
if (!r3m.mapCamMx)
|
|
316
|
-
return;
|
|
317
|
-
if (!cameraRef.current)
|
|
318
|
-
return;
|
|
319
|
-
syncCamera(cameraRef.current, origin, r3m.mapCamMx);
|
|
320
|
-
gl.render(scene, cameraRef.current);
|
|
321
|
-
});
|
|
322
|
-
react.useLayoutEffect(() => {
|
|
323
|
-
if (!cameraRef.current)
|
|
324
|
-
return;
|
|
325
|
-
set({
|
|
326
|
-
invalidate: () => {
|
|
327
|
-
if (!r3m.map)
|
|
328
|
-
return;
|
|
329
|
-
r3m.map.triggerRepaint();
|
|
330
|
-
},
|
|
331
|
-
camera: cameraRef.current
|
|
332
|
-
});
|
|
333
|
-
}, [set, r3m]);
|
|
334
|
-
return /* @__PURE__ */ jsxRuntime.jsx("perspectiveCamera", { ref: cameraRef });
|
|
335
|
-
}
|
|
340
|
+
const useMap = useMap$1;
|
|
336
341
|
exports.Canvas = Canvas;
|
|
337
342
|
exports.Coordinates = Coordinates;
|
|
343
|
+
exports.useMap = useMap;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMap as useMap$1 } from "./main2.mjs";
|
|
2
2
|
import { Coordinates } from "./main3.mjs";
|
|
3
|
+
import { Canvas } from "./main4.mjs";
|
|
4
|
+
const useMap = useMap$1;
|
|
3
5
|
export {
|
|
4
6
|
Canvas,
|
|
5
|
-
Coordinates
|
|
7
|
+
Coordinates,
|
|
8
|
+
useMap
|
|
6
9
|
};
|
|
7
10
|
//# sourceMappingURL=main.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.mjs","sources":["../../../src/maplibre.index.ts"],"sourcesContent":["import type { Map } from 'maplibre-gl';\nimport { useMap as useMapGeneric } from './api/use-map';\n\nexport * from './api/canvas-props';\nexport * from './api/coordinates';\nexport * from './maplibre/canvas';\n\nexport const useMap = useMapGeneric<Map>;"],"names":["useMapGeneric"],"mappings":";;;AAOO,MAAM,SAASA;"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useEffect } from "react";
|
|
3
|
+
import { useOnAdd } from "./main12.mjs";
|
|
4
|
+
const useCreateRoot = ({
|
|
5
|
+
children,
|
|
6
|
+
frameloop,
|
|
7
|
+
fromLngLat,
|
|
8
|
+
...renderProps
|
|
9
|
+
}) => {
|
|
10
|
+
const id = useId();
|
|
11
|
+
const { onAdd, onRemove, mounted, r3mRef } = useOnAdd(fromLngLat, { frameloop, ...renderProps });
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!mounted)
|
|
14
|
+
return;
|
|
15
|
+
if (!r3mRef.current.root)
|
|
16
|
+
return;
|
|
17
|
+
r3mRef.current.root.render(/* @__PURE__ */ jsx(Fragment, { children }));
|
|
18
|
+
}, [r3mRef, mounted, children]);
|
|
19
|
+
return { id, onAdd, onRemove, r3mRef };
|
|
20
|
+
};
|
|
15
21
|
export {
|
|
16
|
-
|
|
22
|
+
useCreateRoot
|
|
17
23
|
};
|
|
18
24
|
//# sourceMappingURL=main10.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main10.mjs","sources":["../../../src/core/
|
|
1
|
+
{"version":3,"file":"main10.mjs","sources":["../../../src/core/use-create-root.tsx"],"sourcesContent":["import { RenderProps } from \"@react-three/fiber\";\nimport { PropsWithChildren, useEffect, useId } from \"react\";\nimport { FromLngLat } from \"./generic-map\";\nimport { useOnAdd } from \"./use-on-add\";\n\nexport interface useCanvasProps extends Omit<RenderProps<HTMLCanvasElement>, 'frameloop'>, PropsWithChildren {\n frameloop: 'always' | 'demand',\n fromLngLat: FromLngLat\n}\n\nexport const useCreateRoot = (({\n children, frameloop, fromLngLat, ...renderProps\n}: useCanvasProps) => {\n\n const id = useId();\n\n const { onAdd, onRemove, mounted, r3mRef } = useOnAdd(fromLngLat, { frameloop, ...renderProps });\n\n useEffect(() => {\n if (!mounted) return;\n if (!r3mRef.current.root) return;\n r3mRef.current.root.render(<>\n {children}\n </>);\n }, [r3mRef, mounted, children])\n\n return { id, onAdd, onRemove, r3mRef }\n})"],"names":[],"mappings":";;;AAUO,MAAM,gBAAiB,CAAC;AAAA,EAC7B;AAAA,EAAU;AAAA,EAAW;AAAA,EAAY,GAAG;AACtC,MAAsB;AAEpB,QAAM,KAAK;AAEX,QAAM,EAAE,OAAO,UAAU,SAAS,OAAO,IAAI,SAAS,YAAY,EAAE,WAAW,GAAG,YAAa,CAAA;AAE/F,YAAU,MAAM;AACd,QAAI,CAAC;AAAS;AACV,QAAA,CAAC,OAAO,QAAQ;AAAM;AAC1B,WAAO,QAAQ,KAAK,OAAO,oBAAA,UAAA,EACxB,SACH,CAAA,CAAG;AAAA,EACF,GAAA,CAAC,QAAQ,SAAS,QAAQ,CAAC;AAE9B,SAAO,EAAE,IAAI,OAAO,UAAU,OAAO;AACvC;"}
|