react-three-map 0.0.1 → 0.1.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.
Files changed (97) hide show
  1. package/README.md +4 -0
  2. package/{build/cjs/index.js.js → dist/cjs/main.js.js} +1 -1
  3. package/dist/es/main.js.mjs +5 -0
  4. package/dist/es/main.js.mjs.map +1 -0
  5. package/{build/es/index.js10.mjs → dist/es/main.js10.mjs} +4 -4
  6. package/dist/es/main.js10.mjs.map +1 -0
  7. package/{build/es/index.js11.mjs → dist/es/main.js11.mjs} +3 -3
  8. package/dist/es/main.js11.mjs.map +1 -0
  9. package/{build/es/index.js12.mjs → dist/es/main.js12.mjs} +3 -3
  10. package/dist/es/main.js12.mjs.map +1 -0
  11. package/{build/es/index.js13.mjs → dist/es/main.js13.mjs} +3 -3
  12. package/dist/es/main.js13.mjs.map +1 -0
  13. package/{build/es/index.js14.mjs → dist/es/main.js14.mjs} +3 -3
  14. package/dist/es/main.js14.mjs.map +1 -0
  15. package/{build/es/index.js15.mjs → dist/es/main.js15.mjs} +3 -3
  16. package/dist/es/main.js15.mjs.map +1 -0
  17. package/{build/es/index.js16.mjs → dist/es/main.js16.mjs} +2 -2
  18. package/dist/es/main.js16.mjs.map +1 -0
  19. package/{build/es/index.js17.mjs → dist/es/main.js17.mjs} +1 -1
  20. package/dist/es/main.js17.mjs.map +1 -0
  21. package/{build/es/index.js18.mjs → dist/es/main.js18.mjs} +1 -1
  22. package/dist/es/main.js18.mjs.map +1 -0
  23. package/{build/es/index.js19.mjs → dist/es/main.js19.mjs} +4 -4
  24. package/dist/es/main.js19.mjs.map +1 -0
  25. package/{build/es/index.js2.mjs → dist/es/main.js2.mjs} +6 -6
  26. package/dist/es/main.js2.mjs.map +1 -0
  27. package/{build/es/index.js20.mjs → dist/es/main.js20.mjs} +1 -1
  28. package/dist/es/main.js20.mjs.map +1 -0
  29. package/{build/es/index.js21.mjs → dist/es/main.js21.mjs} +1 -1
  30. package/dist/es/main.js21.mjs.map +1 -0
  31. package/{build/es/index.js22.mjs → dist/es/main.js22.mjs} +1 -1
  32. package/dist/es/main.js22.mjs.map +1 -0
  33. package/{build/es/index.js23.mjs → dist/es/main.js23.mjs} +1 -1
  34. package/dist/es/main.js23.mjs.map +1 -0
  35. package/{build/es/index.js24.mjs → dist/es/main.js24.mjs} +1 -1
  36. package/dist/es/main.js24.mjs.map +1 -0
  37. package/{build/es/index.js25.mjs → dist/es/main.js25.mjs} +2 -2
  38. package/dist/es/main.js25.mjs.map +1 -0
  39. package/{build/es/index.js26.mjs → dist/es/main.js26.mjs} +1 -1
  40. package/dist/es/main.js26.mjs.map +1 -0
  41. package/{build/es/index.js27.mjs → dist/es/main.js27.mjs} +1 -1
  42. package/dist/es/main.js27.mjs.map +1 -0
  43. package/{build/es/index.js28.mjs → dist/es/main.js28.mjs} +1 -1
  44. package/dist/es/main.js28.mjs.map +1 -0
  45. package/dist/es/main.js3.mjs +21 -0
  46. package/dist/es/main.js3.mjs.map +1 -0
  47. package/{build/es/index.js4.mjs → dist/es/main.js4.mjs} +1 -1
  48. package/dist/es/main.js4.mjs.map +1 -0
  49. package/{build/es/index.js5.mjs → dist/es/main.js5.mjs} +3 -3
  50. package/dist/es/main.js5.mjs.map +1 -0
  51. package/{build/es/index.js6.mjs → dist/es/main.js6.mjs} +4 -4
  52. package/dist/es/main.js6.mjs.map +1 -0
  53. package/{build/es/index.js7.mjs → dist/es/main.js7.mjs} +4 -4
  54. package/dist/es/main.js7.mjs.map +1 -0
  55. package/{build/es/index.js8.mjs → dist/es/main.js8.mjs} +6 -6
  56. package/dist/es/main.js8.mjs.map +1 -0
  57. package/{build/es/index.js9.mjs → dist/es/main.js9.mjs} +4 -4
  58. package/dist/es/main.js9.mjs.map +1 -0
  59. package/package.json +9 -8
  60. package/src/canvas/use-render.ts +1 -1
  61. package/src/stories/canvas.stories.tsx +1 -1
  62. package/src/stories/my-scene.tsx +6 -9
  63. package/src/stories/no-map.stories.tsx +2 -2
  64. package/build/es/index.js.mjs +0 -5
  65. package/build/es/index.js.mjs.map +0 -1
  66. package/build/es/index.js10.mjs.map +0 -1
  67. package/build/es/index.js11.mjs.map +0 -1
  68. package/build/es/index.js12.mjs.map +0 -1
  69. package/build/es/index.js13.mjs.map +0 -1
  70. package/build/es/index.js14.mjs.map +0 -1
  71. package/build/es/index.js15.mjs.map +0 -1
  72. package/build/es/index.js16.mjs.map +0 -1
  73. package/build/es/index.js17.mjs.map +0 -1
  74. package/build/es/index.js18.mjs.map +0 -1
  75. package/build/es/index.js19.mjs.map +0 -1
  76. package/build/es/index.js2.mjs.map +0 -1
  77. package/build/es/index.js20.mjs.map +0 -1
  78. package/build/es/index.js21.mjs.map +0 -1
  79. package/build/es/index.js22.mjs.map +0 -1
  80. package/build/es/index.js23.mjs.map +0 -1
  81. package/build/es/index.js24.mjs.map +0 -1
  82. package/build/es/index.js25.mjs.map +0 -1
  83. package/build/es/index.js26.mjs.map +0 -1
  84. package/build/es/index.js27.mjs.map +0 -1
  85. package/build/es/index.js28.mjs.map +0 -1
  86. package/build/es/index.js3.mjs +0 -21
  87. package/build/es/index.js3.mjs.map +0 -1
  88. package/build/es/index.js4.mjs.map +0 -1
  89. package/build/es/index.js5.mjs.map +0 -1
  90. package/build/es/index.js6.mjs.map +0 -1
  91. package/build/es/index.js7.mjs.map +0 -1
  92. package/build/es/index.js8.mjs.map +0 -1
  93. package/build/es/index.js9.mjs.map +0 -1
  94. package/build/vite.svg +0 -1
  95. /package/{build → dist}/cjs/vite.svg +0 -0
  96. /package/{build → dist}/es/vite.svg +0 -0
  97. /package/src/{index.ts → main.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js24.mjs","sources":["../../node_modules/react-map-gl/dist/esm/utils/deep-equal.js"],"sourcesContent":["/**\n * Compare two points\n * @param a\n * @param b\n * @returns true if the points are equal\n */\nexport function arePointsEqual(a, b) {\n const ax = Array.isArray(a) ? a[0] : a ? a.x : 0;\n const ay = Array.isArray(a) ? a[1] : a ? a.y : 0;\n const bx = Array.isArray(b) ? b[0] : b ? b.x : 0;\n const by = Array.isArray(b) ? b[1] : b ? b.y : 0;\n return ax === bx && ay === by;\n}\n/* eslint-disable complexity */\n/**\n * Compare any two objects\n * @param a\n * @param b\n * @returns true if the objects are deep equal\n */\nexport function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n else if (Array.isArray(b)) {\n return false;\n }\n if (typeof a === 'object' && typeof b === 'object') {\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n for (const key of aKeys) {\n if (!b.hasOwnProperty(key)) {\n return false;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n//# sourceMappingURL=deep-equal.js.map"],"names":["arePointsEqual","a","b","ax","ay","bx","by","deepEqual","i","aKeys","bKeys","key"],"mappings":"AAMO,SAASA,EAAeC,GAAGC,GAAG;AACjC,QAAMC,IAAK,MAAM,QAAQF,CAAC,IAAIA,EAAE,CAAC,IAAIA,IAAIA,EAAE,IAAI,GACzCG,IAAK,MAAM,QAAQH,CAAC,IAAIA,EAAE,CAAC,IAAIA,IAAIA,EAAE,IAAI,GACzCI,IAAK,MAAM,QAAQH,CAAC,IAAIA,EAAE,CAAC,IAAIA,IAAIA,EAAE,IAAI,GACzCI,IAAK,MAAM,QAAQJ,CAAC,IAAIA,EAAE,CAAC,IAAIA,IAAIA,EAAE,IAAI;AAC/C,SAAOC,MAAOE,KAAMD,MAAOE;AAC/B;AAQO,SAASC,EAAUN,GAAGC,GAAG;AAC5B,MAAID,MAAMC;AACN,WAAO;AAEX,MAAI,CAACD,KAAK,CAACC;AACP,WAAO;AAEX,MAAI,MAAM,QAAQD,CAAC,GAAG;AAClB,QAAI,CAAC,MAAM,QAAQC,CAAC,KAAKD,EAAE,WAAWC,EAAE;AACpC,aAAO;AAEX,aAASM,IAAI,GAAGA,IAAIP,EAAE,QAAQO;AAC1B,UAAI,CAACD,EAAUN,EAAEO,CAAC,GAAGN,EAAEM,CAAC,CAAC;AACrB,eAAO;AAGf,WAAO;AAAA,aAEF,MAAM,QAAQN,CAAC;AACpB,WAAO;AAEX,MAAI,OAAOD,KAAM,YAAY,OAAOC,KAAM,UAAU;AAChD,UAAMO,IAAQ,OAAO,KAAKR,CAAC,GACrBS,IAAQ,OAAO,KAAKR,CAAC;AAC3B,QAAIO,EAAM,WAAWC,EAAM;AACvB,aAAO;AAEX,eAAWC,KAAOF;AAId,UAHI,CAACP,EAAE,eAAeS,CAAG,KAGrB,CAACJ,EAAUN,EAAEU,CAAG,GAAGT,EAAES,CAAG,CAAC;AACzB,eAAO;AAGf,WAAO;AAAA;AAEX,SAAO;AACX;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js25.mjs","sources":["../../node_modules/react-map-gl/dist/esm/components/use-control.js"],"sourcesContent":["import { useContext, useMemo, useEffect } from 'react';\nimport { MapContext } from './map';\nfunction useControl(onCreate, arg1, arg2, arg3) {\n const context = useContext(MapContext);\n const ctrl = useMemo(() => onCreate(context), []);\n useEffect(() => {\n const opts = (arg3 || arg2 || arg1);\n const onAdd = typeof arg1 === 'function' && typeof arg2 === 'function' ? arg1 : null;\n const onRemove = typeof arg2 === 'function' ? arg2 : typeof arg1 === 'function' ? arg1 : null;\n const { map } = context;\n if (!map.hasControl(ctrl)) {\n map.addControl(ctrl, opts === null || opts === void 0 ? void 0 : opts.position);\n if (onAdd) {\n onAdd(context);\n }\n }\n return () => {\n if (onRemove) {\n onRemove(context);\n }\n // Map might have been removed (parent effects are destroyed before child ones)\n if (map.hasControl(ctrl)) {\n map.removeControl(ctrl);\n }\n };\n }, []);\n return ctrl;\n}\nexport default useControl;\n//# sourceMappingURL=use-control.js.map"],"names":["useControl","onCreate","arg1","arg2","arg3","context","useContext","MapContext","ctrl","useMemo","useEffect","opts","onAdd","onRemove","map"],"mappings":";;AAEA,SAASA,EAAWC,GAAUC,GAAMC,GAAMC,GAAM;AAC5C,QAAMC,IAAUC,EAAWC,CAAU,GAC/BC,IAAOC,EAAQ,MAAMR,EAASI,CAAO,GAAG,CAAA,CAAE;AAChD,SAAAK,EAAU,MAAM;AACZ,UAAMC,IAAQP,KAAQD,KAAQD,GACxBU,IAAQ,OAAOV,KAAS,cAAc,OAAOC,KAAS,aAAaD,IAAO,MAC1EW,IAAW,OAAOV,KAAS,aAAaA,IAAO,OAAOD,KAAS,aAAaA,IAAO,MACnF,EAAE,KAAAY,EAAK,IAAGT;AAChB,WAAKS,EAAI,WAAWN,CAAI,MACpBM,EAAI,WAAWN,GAAMG,KAAS,OAA0B,SAASA,EAAK,QAAQ,GAC1EC,KACAA,EAAMP,CAAO,IAGd,MAAM;AACT,MAAIQ,KACAA,EAASR,CAAO,GAGhBS,EAAI,WAAWN,CAAI,KACnBM,EAAI,cAAcN,CAAI;AAAA,IAEtC;AAAA,EACK,GAAE,CAAE,CAAA,GACEA;AACX;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js26.mjs","sources":["../../node_modules/react-map-gl/dist/esm/utils/assert.js"],"sourcesContent":["export default function assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\n//# sourceMappingURL=assert.js.map"],"names":["assert","condition","message"],"mappings":"AAAe,SAASA,EAAOC,GAAWC,GAAS;AAC/C,MAAI,CAACD;AACD,UAAM,IAAI,MAAMC,CAAO;AAE/B;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js27.mjs","sources":["../../node_modules/react-map-gl/dist/esm/utils/transform.js"],"sourcesContent":["/**\n * Make a copy of a transform\n * @param tr\n */\nexport function cloneTransform(tr) {\n const newTransform = tr.clone();\n // Work around mapbox bug - this value is not assigned in clone(), only in resize()\n newTransform.pixelsToGLUnits = tr.pixelsToGLUnits;\n return newTransform;\n}\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Mutate a transform to match the given view state\n * @param transform\n * @param viewState\n * @returns true if the transform has changed\n */\nexport function applyViewStateToTransform(tr, props) {\n const v = props.viewState || props;\n let changed = false;\n if ('longitude' in v && 'latitude' in v) {\n const center = tr.center;\n // @ts-ignore\n tr.center = new center.constructor(v.longitude, v.latitude);\n changed = changed || center !== tr.center;\n }\n if ('zoom' in v) {\n const zoom = tr.zoom;\n tr.zoom = v.zoom;\n changed = changed || zoom !== tr.zoom;\n }\n if ('bearing' in v) {\n const bearing = tr.bearing;\n tr.bearing = v.bearing;\n changed = changed || bearing !== tr.bearing;\n }\n if ('pitch' in v) {\n const pitch = tr.pitch;\n tr.pitch = v.pitch;\n changed = changed || pitch !== tr.pitch;\n }\n if (v.padding && !tr.isPaddingEqual(v.padding)) {\n changed = true;\n tr.padding = v.padding;\n }\n return changed;\n}\n//# sourceMappingURL=transform.js.map"],"names":["cloneTransform","tr","newTransform","transformToViewState","applyViewStateToTransform","props","v","changed","center","zoom","bearing","pitch"],"mappings":"AAIO,SAASA,EAAeC,GAAI;AAC/B,QAAMC,IAAeD,EAAG;AAExB,SAAAC,EAAa,kBAAkBD,EAAG,iBAC3BC;AACX;AAMO,SAASC,EAAqBF,GAAI;AACrC,SAAO;AAAA,IACH,WAAWA,EAAG,OAAO;AAAA,IACrB,UAAUA,EAAG,OAAO;AAAA,IACpB,MAAMA,EAAG;AAAA,IACT,OAAOA,EAAG;AAAA,IACV,SAASA,EAAG;AAAA,IACZ,SAASA,EAAG;AAAA,EACpB;AACA;AAQO,SAASG,EAA0BH,GAAII,GAAO;AACjD,QAAMC,IAAID,EAAM,aAAaA;AAC7B,MAAIE,IAAU;AACd,MAAI,eAAeD,KAAK,cAAcA,GAAG;AACrC,UAAME,IAASP,EAAG;AAElB,IAAAA,EAAG,SAAS,IAAIO,EAAO,YAAYF,EAAE,WAAWA,EAAE,QAAQ,GAC1DC,IAAUA,KAAWC,MAAWP,EAAG;AAAA;AAEvC,MAAI,UAAUK,GAAG;AACb,UAAMG,IAAOR,EAAG;AAChB,IAAAA,EAAG,OAAOK,EAAE,MACZC,IAAUA,KAAWE,MAASR,EAAG;AAAA;AAErC,MAAI,aAAaK,GAAG;AAChB,UAAMI,IAAUT,EAAG;AACnB,IAAAA,EAAG,UAAUK,EAAE,SACfC,IAAUA,KAAWG,MAAYT,EAAG;AAAA;AAExC,MAAI,WAAWK,GAAG;AACd,UAAMK,IAAQV,EAAG;AACjB,IAAAA,EAAG,QAAQK,EAAE,OACbC,IAAUA,KAAWI,MAAUV,EAAG;AAAA;AAEtC,SAAIK,EAAE,WAAW,CAACL,EAAG,eAAeK,EAAE,OAAO,MACzCC,IAAU,IACVN,EAAG,UAAUK,EAAE,UAEZC;AACX;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js28.mjs","sources":["../../node_modules/react-map-gl/dist/esm/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACD,WAAO;AAQX,MANI,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,SAEd,CAACA,EAAM;AACP,WAAOA;AAEX,QAAMC,IAAa,CAAA;AACnB,aAAWC,KAASF,EAAM;AACtB,IAAAC,EAAWC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAAAE,MAAS;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAE,GAAEF,CAAK,GAGzC,OAAOE,EAAgB;AAI3B,UAAMC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,CAAE,GAAEF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACZD,EAAgBE,CAAQ,IAAID,EAASC,CAAQ;AAAA;AAIzD,WAAOF,KAAmBF;AAAA,EAClC,CAAK;AAED,SAAO,EAAE,GAAGF,GAAO,QAAAG;AACvB;","x_google_ignoreList":[0]}
@@ -1,21 +0,0 @@
1
- import * as t from "react";
2
- import p from "./index.js8.mjs";
3
- import "./index.js9.mjs";
4
- import "./index.js10.mjs";
5
- import "./index.js11.mjs";
6
- import "./index.js12.mjs";
7
- import "./index.js13.mjs";
8
- import "./index.js14.mjs";
9
- import "./index.js15.mjs";
10
- import { useMap as m } from "./index.js16.mjs";
11
- function b() {
12
- return m();
13
- }
14
- const i = import("maplibre-gl");
15
- t.forwardRef(function(r, o) {
16
- return p(r, o, i);
17
- });
18
- export {
19
- b as useMap
20
- };
21
- //# sourceMappingURL=index.js3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js3.mjs","sources":["../../node_modules/react-map-gl/dist/esm/exports-maplibre.js"],"sourcesContent":["import * as React from 'react';\nimport { default as _Map } from './components/map';\nimport { default as _Marker } from './components/marker';\nimport { default as _Popup } from './components/popup';\nimport { default as _AttributionControl } from './components/attribution-control';\nimport { default as _FullscreenControl } from './components/fullscreen-control';\nimport { default as _GeolocateControl } from './components/geolocate-control';\nimport { default as _NavigationControl } from './components/navigation-control';\nimport { default as _ScaleControl } from './components/scale-control';\nimport { useMap as _useMap } from './components/use-map';\nexport function useMap() {\n return _useMap();\n}\nconst mapLib = import('maplibre-gl');\nexport const Map = (() => {\n return React.forwardRef(function Map(props, ref) {\n return _Map(props, ref, mapLib);\n });\n})();\nexport const Marker = _Marker;\nexport const Popup = _Popup;\nexport const AttributionControl = _AttributionControl;\nexport const FullscreenControl = _FullscreenControl;\nexport const NavigationControl = _NavigationControl;\nexport const GeolocateControl = _GeolocateControl;\nexport const ScaleControl = _ScaleControl;\nexport { default as Source } from './components/source';\nexport { default as Layer } from './components/layer';\nexport { default as useControl } from './components/use-control';\nexport { MapProvider } from './components/use-map';\nexport default Map;\n// Types\nexport * from './types/public';\n//# sourceMappingURL=exports-maplibre.js.map"],"names":["useMap","_useMap","mapLib","React","props","ref","_Map"],"mappings":";;;;;;;;;;AAUO,SAASA,IAAS;AACrB,SAAOC,EAAO;AAClB;AACA,MAAMC,IAAS,OAAO,aAAa;AAExBC,EAAM,WAAW,SAAaC,GAAOC,GAAK;AAC7C,SAAOC,EAAKF,GAAOC,GAAKH,CAAM;AACtC,CAAK;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js4.mjs","sources":["../../src/canvas/coords-to-matrix.ts"],"sourcesContent":["import { MercatorCoordinate } from \"maplibre-gl\";\nimport { Euler, Matrix4, Quaternion, Vector3 } from \"three\";\n\nconst quat = new Quaternion();\nconst euler = new Euler();\nconst pos = new Vector3();\nconst scale = new Vector3();\n\n/** calculate Matrix4 from coordinates */\nexport function coordsToMatrix ({ longitude, latitude, altitude }: {\n longitude: number, latitude: number, altitude: number\n}) {\n const center = MercatorCoordinate.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 new Matrix4().compose(pos, quat, scale);\n}\n"],"names":["quat","Quaternion","euler","Euler","pos","Vector3","scale","coordsToMatrix","longitude","latitude","altitude","center","MercatorCoordinate","scaleUnit","Matrix4"],"mappings":";;AAGA,MAAMA,IAAO,IAAIC,KACXC,IAAQ,IAAIC,KACZC,IAAM,IAAIC,KACVC,IAAQ,IAAID;AAGX,SAASE,EAAgB,EAAE,WAAAC,GAAW,UAAAC,GAAU,UAAAC,KAEpD;AACD,QAAMC,IAASC,EAAmB,WAAW,CAACJ,GAAWC,CAAQ,GAAGC,CAAQ,GACtEG,IAAYF,EAAO;AACzB,SAAAP,EAAI,IAAIO,EAAO,GAAGA,EAAO,GAAGA,EAAO,KAAK,CAAC,GACzCL,EAAM,IAAIO,GAAW,CAACA,GAAWA,CAAS,GACrCb,EAAA,aAAaE,EAAM,IAAI,CAAC,KAAK,KAAK,KAAI,GAAG,CAAC,CAAC,GACzC,IAAIY,EAAQ,EAAE,QAAQV,GAAKJ,GAAMM,CAAK;AAC/C;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js5.mjs","sources":["../../src/canvas/use-on-add.ts"],"sourcesContent":["import { RenderProps, createRoot } from \"@react-three/fiber\";\nimport { MapInstance } from \"react-map-gl\";\nimport { createEvents } from \"./create-events\";\nimport { StateRef } from \"./state-ref\";\nimport { useFunction } from \"./use-function\";\nimport { useState } from \"react\";\n\nexport function useOnAdd (ref: StateRef, renderProps: RenderProps<HTMLCanvasElement>) {\n\n const [mounted, setMounted] = useState(false);\n\n const onAdd = useFunction((map: MapInstance, gl: WebGLRenderingContext)=>{\n \n const canvas = map.getCanvas();\n const root = createRoot(canvas);\n root.configure({\n frameloop: \"never\",\n dpr: window.devicePixelRatio,\n shadows: true,\n events: createEvents(),\n ...renderProps,\n gl: {\n context: gl,\n depth: true,\n autoClear: false,\n antialias: true,\n ...renderProps?.gl,\n },\n onCreated: (state) => {\n ref.current = {\n state,\n map,\n root,\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n state.gl.forceContextLoss = () => { };\n },\n camera: {\n matrixAutoUpdate: false,\n },\n size: {\n width: canvas.clientWidth,\n height: canvas.clientHeight,\n top: 0,\n left: 0,\n ...renderProps?.size,\n },\n });\n\n ref.current = {\n map,\n root,\n }\n\n setTimeout(()=>setMounted(true));\n \n })\n\n const onRemove = useFunction(()=>{\n setTimeout(()=>{\n if(!ref.current) return;\n ref.current.root.unmount();\n })\n })\n\n return {onAdd, onRemove, mounted};\n}"],"names":["useOnAdd","ref","renderProps","mounted","setMounted","useState","onAdd","useFunction","map","gl","canvas","root","createRoot","createEvents","state","onRemove"],"mappings":";;;;AAOgB,SAAAA,EAAUC,GAAeC,GAA6C;AAEpF,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK,GAEtCC,IAAQC,EAAY,CAACC,GAAkBC,MAA4B;AAEjE,UAAAC,IAASF,EAAI,aACbG,IAAOC,EAAWF,CAAM;AAC9B,IAAAC,EAAK,UAAU;AAAA,MACb,WAAW;AAAA,MACX,KAAK,OAAO;AAAA,MACZ,SAAS;AAAA,MACT,QAAQE,EAAa;AAAA,MACrB,GAAGX;AAAA,MACH,IAAI;AAAA,QACF,SAASO;AAAA,QACT,OAAO;AAAA,QACP,WAAW;AAAA,QACX,WAAW;AAAA,QACX,GAAGP,KAAA,gBAAAA,EAAa;AAAA,MAClB;AAAA,MACA,WAAW,CAACY,MAAU;AACpB,QAAAb,EAAI,UAAU;AAAA,UACZ,OAAAa;AAAA,UACA,KAAAN;AAAA,UACA,MAAAG;AAAA,QAAA,GAGIG,EAAA,GAAG,mBAAmB,MAAM;AAAA,QAAA;AAAA,MACpC;AAAA,MACA,QAAQ;AAAA,QACN,kBAAkB;AAAA,MACpB;AAAA,MACA,MAAM;AAAA,QACJ,OAAOJ,EAAO;AAAA,QACd,QAAQA,EAAO;AAAA,QACf,KAAK;AAAA,QACL,MAAM;AAAA,QACN,GAAGR,KAAA,gBAAAA,EAAa;AAAA,MAClB;AAAA,IAAA,CACD,GAEDD,EAAI,UAAU;AAAA,MACZ,KAAAO;AAAA,MACA,MAAAG;AAAA,IAAA,GAGS,WAAA,MAAIP,EAAW,EAAI,CAAC;AAAA,EAAA,CAEhC,GAEKW,IAAWR,EAAY,MAAI;AAC/B,eAAW,MAAI;AACb,MAAIN,EAAI,WACJA,EAAA,QAAQ,KAAK;IAAQ,CAC1B;AAAA,EAAA,CACF;AAEM,SAAA,EAAC,OAAAK,GAAO,UAAAS,GAAU,SAAAZ;AAC3B;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js6.mjs","sources":["../../src/canvas/use-render.ts"],"sourcesContent":["import { Matrix4 } from \"three\";\nimport { StateRef } from \"./state-ref\";\nimport { useFunction } from \"./use-function\";\nimport { useMap } from \"react-map-gl/maplibre\";\n\nexport function useRender(\n m4: Matrix4, ref: StateRef\n ) {\n\n const map = useMap()\n\n const render = useFunction((_gl: WebGL2RenderingContext, matrix: number[])=>{\n if(!map.current) return;\n if(!ref.current?.state) return;\n const camera = ref.current.state.camera;\n const gl = ref.current.state.gl;\n const advance = ref.current.state.advance;\n camera.projectionMatrix.fromArray(matrix).multiply(m4);\n camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();\n gl.resetState();\n advance(Date.now(), true);\n map.current.triggerRepaint();\n })\n\n return render;\n\n}"],"names":["useRender","m4","ref","map","useMap","useFunction","_gl","matrix","_a","camera","gl","advance"],"mappings":";;AAKgB,SAAAA,EACdC,GAAaC,GACX;AAEF,QAAMC,IAAMC;AAeL,SAbQC,EAAY,CAACC,GAA6BC,MAAmB;;AAEvE,QADA,CAACJ,EAAI,WACL,GAACK,IAAAN,EAAI,YAAJ,QAAAM,EAAa;AAAO;AAClB,UAAAC,IAASP,EAAI,QAAQ,MAAM,QAC3BQ,IAAKR,EAAI,QAAQ,MAAM,IACvBS,IAAUT,EAAI,QAAQ,MAAM;AAClC,IAAAO,EAAO,iBAAiB,UAAUF,CAAM,EAAE,SAASN,CAAE,GACrDQ,EAAO,wBAAwB,KAAKA,EAAO,gBAAgB,EAAE,UAC7DC,EAAG,WAAW,GACNC,EAAA,KAAK,IAAI,GAAG,EAAI,GACxBR,EAAI,QAAQ;EAAe,CAC5B;AAIH;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js7.mjs","sources":["../../node_modules/react-map-gl/dist/esm/components/layer.js"],"sourcesContent":["import { useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { MapContext } from './map';\nimport assert from '../utils/assert';\nimport { deepEqual } from '../utils/deep-equal';\n/* eslint-disable complexity, max-statements */\nfunction updateLayer(map, id, props, prevProps) {\n assert(props.id === prevProps.id, 'layer id changed');\n assert(props.type === prevProps.type, 'layer type changed');\n if (props.type === 'custom' || prevProps.type === 'custom') {\n return;\n }\n const { layout = {}, paint = {}, \n // @ts-expect-error filter is not defined on some layer types\n filter, minzoom, maxzoom, beforeId } = props;\n if (beforeId !== prevProps.beforeId) {\n map.moveLayer(id, beforeId);\n }\n if (layout !== prevProps.layout) {\n const prevLayout = prevProps.layout || {};\n for (const key in layout) {\n if (!deepEqual(layout[key], prevLayout[key])) {\n map.setLayoutProperty(id, key, layout[key]);\n }\n }\n for (const key in prevLayout) {\n if (!layout.hasOwnProperty(key)) {\n map.setLayoutProperty(id, key, undefined);\n }\n }\n }\n if (paint !== prevProps.paint) {\n const prevPaint = prevProps.paint || {};\n for (const key in paint) {\n if (!deepEqual(paint[key], prevPaint[key])) {\n map.setPaintProperty(id, key, paint[key]);\n }\n }\n for (const key in prevPaint) {\n if (!paint.hasOwnProperty(key)) {\n map.setPaintProperty(id, key, undefined);\n }\n }\n }\n // @ts-expect-error filter is not defined on some layer types\n if (!deepEqual(filter, prevProps.filter)) {\n map.setFilter(id, filter);\n }\n if (minzoom !== prevProps.minzoom || maxzoom !== prevProps.maxzoom) {\n map.setLayerZoomRange(id, minzoom, maxzoom);\n }\n}\nfunction createLayer(map, id, props) {\n // @ts-ignore\n if (map.style && map.style._loaded && (!('source' in props) || map.getSource(props.source))) {\n const options = { ...props, id };\n delete options.beforeId;\n // @ts-ignore\n map.addLayer(options, props.beforeId);\n }\n}\n/* eslint-enable complexity, max-statements */\nlet layerCounter = 0;\nfunction Layer(props) {\n const map = useContext(MapContext).map.getMap();\n const propsRef = useRef(props);\n const [, setStyleLoaded] = useState(0);\n const id = useMemo(() => props.id || `jsx-layer-${layerCounter++}`, []);\n useEffect(() => {\n if (map) {\n const forceUpdate = () => setStyleLoaded(version => version + 1);\n map.on('styledata', forceUpdate);\n forceUpdate();\n return () => {\n map.off('styledata', forceUpdate);\n // @ts-ignore\n if (map.style && map.style._loaded && map.getLayer(id)) {\n map.removeLayer(id);\n }\n };\n }\n return undefined;\n }, [map]);\n // @ts-ignore\n const layer = map && map.style && map.getLayer(id);\n if (layer) {\n try {\n updateLayer(map, id, props, propsRef.current);\n }\n catch (error) {\n console.warn(error); // eslint-disable-line\n }\n }\n else {\n createLayer(map, id, props);\n }\n // Store last rendered props\n propsRef.current = props;\n return null;\n}\nexport default Layer;\n//# sourceMappingURL=layer.js.map"],"names":["updateLayer","map","id","props","prevProps","assert","layout","paint","filter","minzoom","maxzoom","beforeId","prevLayout","key","deepEqual","prevPaint","createLayer","options","layerCounter","Layer","useContext","MapContext","propsRef","useRef","setStyleLoaded","useState","useMemo","useEffect","forceUpdate","version","error"],"mappings":";;;;AAKA,SAASA,EAAYC,GAAKC,GAAIC,GAAOC,GAAW;AAG5C,MAFAC,EAAOF,EAAM,OAAOC,EAAU,IAAI,kBAAkB,GACpDC,EAAOF,EAAM,SAASC,EAAU,MAAM,oBAAoB,GACtDD,EAAM,SAAS,YAAYC,EAAU,SAAS;AAC9C;AAEJ,QAAM;AAAA,IAAE,QAAAE,IAAS;IAAI,OAAAC,IAAQ,CAAE;AAAA;AAAA,IAE/B,QAAAC;AAAA,IAAQ,SAAAC;AAAA,IAAS,SAAAC;AAAA,IAAS,UAAAC;AAAA,EAAQ,IAAKR;AAIvC,MAHIQ,MAAaP,EAAU,YACvBH,EAAI,UAAUC,GAAIS,CAAQ,GAE1BL,MAAWF,EAAU,QAAQ;AAC7B,UAAMQ,IAAaR,EAAU,UAAU;AACvC,eAAWS,KAAOP;AACd,MAAKQ,EAAUR,EAAOO,CAAG,GAAGD,EAAWC,CAAG,CAAC,KACvCZ,EAAI,kBAAkBC,GAAIW,GAAKP,EAAOO,CAAG,CAAC;AAGlD,eAAWA,KAAOD;AACd,MAAKN,EAAO,eAAeO,CAAG,KAC1BZ,EAAI,kBAAkBC,GAAIW,GAAK,MAAS;AAAA;AAIpD,MAAIN,MAAUH,EAAU,OAAO;AAC3B,UAAMW,IAAYX,EAAU,SAAS;AACrC,eAAWS,KAAON;AACd,MAAKO,EAAUP,EAAMM,CAAG,GAAGE,EAAUF,CAAG,CAAC,KACrCZ,EAAI,iBAAiBC,GAAIW,GAAKN,EAAMM,CAAG,CAAC;AAGhD,eAAWA,KAAOE;AACd,MAAK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AAQ,KAAKA,CAAK;AAAA,IACrB;AAAA;AAGD,IAAAd,EAAYf,GAAKC,GAAIC,CAAK;AAG9B,SAAAmB,EAAS,UAAUnB,GACZ;AACX;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js8.mjs","sources":["../../node_modules/react-map-gl/dist/esm/components/map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useRef, useEffect, useContext, useMemo, useImperativeHandle } from 'react';\nimport { MountedMapsContext } from './use-map';\nimport Mapbox from '../mapbox/mapbox';\nimport createRef from '../mapbox/create-ref';\nimport useIsomorphicLayoutEffect from '../utils/use-isomorphic-layout-effect';\nimport setGlobals from '../utils/set-globals';\nexport const MapContext = React.createContext(null);\nexport default function Map(props, ref, defaultLib) {\n const mountedMapsContext = useContext(MountedMapsContext);\n const [mapInstance, setMapInstance] = useState(null);\n const containerRef = useRef();\n const { current: contextValue } = useRef({ mapLib: null, map: null });\n useEffect(() => {\n const mapLib = props.mapLib;\n let isMounted = true;\n let mapbox;\n Promise.resolve(mapLib || defaultLib)\n .then((module) => {\n if (!isMounted) {\n return;\n }\n if (!module) {\n throw new Error('Invalid mapLib');\n }\n const mapboxgl = 'Map' in module ? module : module.default;\n if (!mapboxgl.Map) {\n throw new Error('Invalid mapLib');\n }\n // workerUrl & workerClass may change the result of supported()\n // https://github.com/visgl/react-map-gl/discussions/2027\n setGlobals(mapboxgl, props);\n if (!mapboxgl.supported || mapboxgl.supported(props)) {\n if (props.reuseMaps) {\n mapbox = Mapbox.reuse(props, containerRef.current);\n }\n if (!mapbox) {\n mapbox = new Mapbox(mapboxgl.Map, props, containerRef.current);\n }\n contextValue.map = createRef(mapbox);\n contextValue.mapLib = mapboxgl;\n setMapInstance(mapbox);\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapMount(contextValue.map, props.id);\n }\n else {\n throw new Error('Map is not supported by this browser');\n }\n })\n .catch(error => {\n const { onError } = props;\n if (onError) {\n onError({\n type: 'error',\n target: null,\n originalEvent: null,\n error\n });\n }\n else {\n console.error(error); // eslint-disable-line\n }\n });\n return () => {\n isMounted = false;\n if (mapbox) {\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapUnmount(props.id);\n if (props.reuseMaps) {\n mapbox.recycle();\n }\n else {\n mapbox.destroy();\n }\n }\n };\n }, []);\n useIsomorphicLayoutEffect(() => {\n if (mapInstance) {\n mapInstance.setProps(props);\n }\n });\n useImperativeHandle(ref, () => contextValue.map, [mapInstance]);\n const style = useMemo(() => ({\n position: 'relative',\n width: '100%',\n height: '100%',\n ...props.style\n }), [props.style]);\n const CHILD_CONTAINER_STYLE = {\n height: '100%'\n };\n return (React.createElement(\"div\", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(MapContext.Provider, { value: contextValue },\n React.createElement(\"div\", { \"mapboxgl-children\": \"\", style: CHILD_CONTAINER_STYLE }, props.children)))));\n}\n//# sourceMappingURL=map.js.map"],"names":["MapContext","React","Map","props","ref","defaultLib","mountedMapsContext","useContext","MountedMapsContext","mapInstance","setMapInstance","useState","containerRef","useRef","contextValue","useEffect","mapLib","isMounted","mapbox","module","mapboxgl","setGlobals","Mapbox","createRef","error","onError","useIsomorphicLayoutEffect","useImperativeHandle","style","useMemo","CHILD_CONTAINER_STYLE"],"mappings":";;;;;;;AAOY,MAACA,IAAaC,EAAM,cAAc,IAAI;AACnC,SAASC,EAAIC,GAAOC,GAAKC,GAAY;AAChD,QAAMC,IAAqBC,EAAWC,CAAkB,GAClD,CAACC,GAAaC,CAAc,IAAIC,EAAS,IAAI,GAC7CC,IAAeC,KACf,EAAE,SAASC,EAAY,IAAKD,EAAO,EAAE,QAAQ,MAAM,KAAK,KAAI,CAAE;AACpE,EAAAE,EAAU,MAAM;AACZ,UAAMC,IAASb,EAAM;AACrB,QAAIc,IAAY,IACZC;AACJ,mBAAQ,QAAQF,KAAUX,CAAU,EAC/B,KAAK,CAACc,MAAW;AAClB,UA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1B,EAAM;AAAA,EACZ,IAAG,CAACA,EAAM,KAAK,CAAC,GACX2B,IAAwB;AAAA,IAC1B,QAAQ;AAAA,EAChB;AACI,SAAQ7B,EAAM,cAAc,OAAO,EAAE,IAAIE,EAAM,IAAI,KAAKS,GAAc,OAAOgB,EAAO,GAAEnB,KAAgBR,EAAM;AAAA,IAAcD,EAAW;AAAA,IAAU,EAAE,OAAOc,EAAc;AAAA,IAClKb,EAAM,cAAc,OAAO,EAAE,qBAAqB,IAAI,OAAO6B,EAAuB,GAAE3B,EAAM,QAAQ;AAAA,EAAC,CAAE;AAC/G;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js9.mjs","sources":["../../node_modules/react-map-gl/dist/esm/components/marker.js"],"sourcesContent":["/* global document */\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { useImperativeHandle, useEffect, useMemo, useRef, useContext, forwardRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport { MapContext } from './map';\nimport { arePointsEqual } from '../utils/deep-equal';\n/* eslint-disable complexity,max-statements */\nfunction Marker(props, ref) {\n const { map, mapLib } = useContext(MapContext);\n const thisRef = useRef({ props });\n thisRef.current.props = props;\n const marker = useMemo(() => {\n let hasChildren = false;\n React.Children.forEach(props.children, el => {\n if (el) {\n hasChildren = true;\n }\n });\n const options = {\n ...props,\n element: hasChildren ? document.createElement('div') : null\n };\n const mk = new mapLib.Marker(options);\n mk.setLngLat([props.longitude, props.latitude]);\n mk.getElement().addEventListener('click', (e) => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, {\n type: 'click',\n target: mk,\n originalEvent: e\n });\n });\n mk.on('dragstart', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDragStart) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n mk.on('drag', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDrag) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n mk.on('dragend', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDragEnd) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n return mk;\n }, []);\n useEffect(() => {\n marker.addTo(map.getMap());\n return () => {\n marker.remove();\n };\n }, []);\n const { longitude, latitude, offset, style, draggable = false, popup = null, rotation = 0, rotationAlignment = 'auto', pitchAlignment = 'auto' } = props;\n useEffect(() => {\n applyReactStyle(marker.getElement(), style);\n }, [style]);\n useImperativeHandle(ref, () => marker, []);\n if (marker.getLngLat().lng !== longitude || marker.getLngLat().lat !== latitude) {\n marker.setLngLat([longitude, latitude]);\n }\n if (offset && !arePointsEqual(marker.getOffset(), offset)) {\n marker.setOffset(offset);\n }\n if (marker.isDraggable() !== draggable) {\n marker.setDraggable(draggable);\n }\n if (marker.getRotation() !== rotation) {\n marker.setRotation(rotation);\n }\n if (marker.getRotationAlignment() !== rotationAlignment) {\n marker.setRotationAlignment(rotationAlignment);\n }\n if (marker.getPitchAlignment() !== pitchAlignment) {\n marker.setPitchAlignment(pitchAlignment);\n }\n if (marker.getPopup() !== popup) {\n marker.setPopup(popup);\n }\n return createPortal(props.children, marker.getElement());\n}\nexport default memo(forwardRef(Marker));\n//# sourceMappingURL=marker.js.map"],"names":["Marker","props","ref","map","mapLib","useContext","MapContext","thisRef","useRef","marker","useMemo","hasChildren","React","el","options","mk","e","_a","_b","evt","useEffect","longitude","latitude","offset","style","draggable","popup","rotation","rotationAlignment","pitchAlignment","applyReactStyle","useImperativeHandle","arePointsEqual","createPortal","memo","forwardRef"],"mappings":";;;;;;AAQA,SAASA,EAAOC,GAAOC,GAAK;AACxB,QAAM,EAAE,KAAAC,GAAK,QAAAC,EAAQ,IAAGC,EAAWC,CAAU,GACvCC,IAAUC,EAAO,EAAE,OAAAP,EA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,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
File without changes
File without changes
File without changes