@dartcom/ui-kit 10.3.2 → 10.3.4

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/index.cjs CHANGED
@@ -41,6 +41,21 @@ function _interopNamespaceDefault(e) {
41
41
  return Object.freeze(n);
42
42
  }
43
43
 
44
+ function _mergeNamespaces(n, m) {
45
+ m.forEach(function (e) {
46
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
47
+ if (k !== 'default' && !(k in n)) {
48
+ var d = Object.getOwnPropertyDescriptor(e, k);
49
+ Object.defineProperty(n, k, d.get ? d : {
50
+ enumerable: true,
51
+ get: function () { return e[k]; }
52
+ });
53
+ }
54
+ });
55
+ });
56
+ return Object.freeze(n);
57
+ }
58
+
44
59
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
45
60
 
46
61
  exports.Operations = void 0;
@@ -14633,10 +14648,11 @@ function requireLeafletSrc () {
14633
14648
  }
14634
14649
 
14635
14650
  var leafletSrcExports = requireLeafletSrc();
14651
+ var s$3 = /*@__PURE__*/getDefaultExportFromCjs(leafletSrcExports);
14636
14652
 
14637
- function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx$1(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
14653
+ function r$2(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r$2(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx$1(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r$2(e))&&(n&&(n+=" "),n+=t);return n}
14638
14654
 
14639
- let e$1={data:""},t=t=>{if("object"==typeof window){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||e$1},l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$1=/\n+/g,o$2=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o$2(c,n):n+"{"+o$2(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o$2(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o$2.p?o$2.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c$1={},s$2=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s$2(e[r]);return t}return e},i$2=(e,t,r,i,p)=>{let u=s$2(e),d=c$1[u]||(c$1[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c$1[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$1," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$1," ").trim();return o[0]})(e);c$1[d]=o$2(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c$1.g?c$1.g:null;return r&&(c$1.g=c$1[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c$1[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o$2(e,""):false===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i$2(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}u.bind({g:1});u.bind({k:1});
14655
+ let e$1={data:""},t=t=>{if("object"==typeof window){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||e$1},l$1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$1=/\n+/g,o$2=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o$2(c,n):n+"{"+o$2(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o$2(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o$2.p?o$2.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c$1={},s$2=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s$2(e[r]);return t}return e},i$2=(e,t,r,i,p)=>{let u=s$2(e),d=c$1[u]||(c$1[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c$1[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l$1.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$1," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$1," ").trim();return o[0]})(e);c$1[d]=o$2(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c$1.g?c$1.g:null;return r&&(c$1.g=c$1[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c$1[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o$2(e,""):false===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i$2(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}u.bind({g:1});u.bind({k:1});
14640
14656
 
14641
14657
  function _defineProperties$1(target, props) {
14642
14658
  for (var i = 0; i < props.length; i++) {
@@ -16515,7 +16531,7 @@ const getEntityNames = ({ entity, names, }) => {
16515
16531
  return layerNames;
16516
16532
  };
16517
16533
  const getImageSrc = (path) => {
16518
- const imageSrc = `${"$VITE_API_HOST/api-image/images"}/${path}`;
16534
+ const imageSrc = `${"https://dalganmap.ru/api-image/images"}/${path}`;
16519
16535
  return imageSrc;
16520
16536
  };
16521
16537
  const loadState = (name) => {
@@ -26794,6 +26810,30 @@ const DartcomInitializeProvider = ({ children, configOptions }) => {
26794
26810
  return jsxRuntime.jsx(React__namespace.Fragment, { children: children });
26795
26811
  };
26796
26812
 
26813
+ const MapProvider = ({ children }) => {
26814
+ const [isReady, setIsReady] = React__namespace.useState(false);
26815
+ const init = async () => {
26816
+ try {
26817
+ await Promise.resolve().then(function () { return tangram_min; });
26818
+ await Promise.resolve().then(function () { return leaflet_rotatedMarker; });
26819
+ await Promise.resolve().then(function () { return leaflet_polylineoffset$1; });
26820
+ await Promise.resolve().then(function () { return index$1; });
26821
+ await Promise.resolve().then(function () { return index; });
26822
+ await Promise.resolve().then(function () { return leafletArrows$1; });
26823
+ setIsReady(true);
26824
+ }
26825
+ catch {
26826
+ setIsReady(false);
26827
+ }
26828
+ };
26829
+ React__namespace.useEffect(() => {
26830
+ init();
26831
+ }, []);
26832
+ if (!isReady)
26833
+ return null;
26834
+ return jsxRuntime.jsx(React__namespace.Fragment, { children: children });
26835
+ };
26836
+
26797
26837
  const queryClient = new QueryClient();
26798
26838
  const QueryProvider = (props) => (jsxRuntime.jsx(QueryClientProvider, { ...props, client: queryClient }));
26799
26839
 
@@ -26803,7 +26843,7 @@ const DartcomThemeProvider = ({ children, themeOptions }) => {
26803
26843
  };
26804
26844
 
26805
26845
  const DartcomProviders = ({ children, configOptions, themeOptions }) => {
26806
- return (jsxRuntime.jsx(SnackbarProvider, { children: jsxRuntime.jsx(QueryProvider, { children: jsxRuntime.jsx(DartcomMobxProvider, { children: jsxRuntime.jsx(DartcomThemeProvider, { themeOptions: themeOptions, children: jsxRuntime.jsx(Provider, { children: jsxRuntime.jsx(DartcomInitializeProvider, { configOptions: configOptions, children: children }) }) }) }) }) }));
26846
+ return (jsxRuntime.jsx(SnackbarProvider, { children: jsxRuntime.jsx(QueryProvider, { children: jsxRuntime.jsx(DartcomMobxProvider, { children: jsxRuntime.jsx(DartcomThemeProvider, { themeOptions: themeOptions, children: jsxRuntime.jsx(Provider, { children: jsxRuntime.jsx(MapProvider, { children: jsxRuntime.jsx(DartcomInitializeProvider, { configOptions: configOptions, children: children }) }) }) }) }) }) }));
26807
26847
  };
26808
26848
 
26809
26849
  const useSignOut = () => {
@@ -39374,273 +39414,6 @@ exports.TangramSourceNames = void 0;
39374
39414
  TangramSourceNames["MSK"] = "msk";
39375
39415
  })(exports.TangramSourceNames || (exports.TangramSourceNames = {}));
39376
39416
 
39377
- /* eslint-disable no-console */
39378
- class LoggerService {
39379
- constructor() { }
39380
- log({ message, context, meta, }) {
39381
- console.log(context, message, meta);
39382
- }
39383
- warn({ message, context, meta, }) {
39384
- console.warn(context, message, meta);
39385
- }
39386
- error({ message, context, meta, }) {
39387
- console.error(context, message, meta);
39388
- }
39389
- }
39390
- const loggerService = new LoggerService();
39391
-
39392
- const tile_size = 256;
39393
- const sourceUrl = {
39394
- [exports.TangramSourceNames.TILE]: `${"$VITE_API_HOST/api"}/tiles/get_tile/{z}/{x}/{y}.mvt`,
39395
- [exports.TangramSourceNames.NATURE_TILE]: `${"$VITE_API_HOST/api"}/tiles/get_nature_tile/{z}/{x}/{y}.mvt`,
39396
- [exports.TangramSourceNames.MSK]: `${"$VITE_API_HOST/api"}/tiles/get_tile/{z}/{x}/{y}.mvt`,
39397
- };
39398
-
39399
- var data = { global:{ links:{ getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",
39400
- getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",
39401
- getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n" } },
39402
- cameras:{ camera1:{ type:"perspective",
39403
- vanishing_point:[ 0,
39404
- -500 ] } },
39405
- textures:{ arrow:{ url:"https://dalganmap.ru/api-image/images/arrow-20.png",
39406
- sprites:{ base:[ 0,
39407
- 0,
39408
- 20,
39409
- 20 ] } },
39410
- "traffic-signal":{ url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",
39411
- filtering:"mipmap",
39412
- sprites:{ base:[ 0,
39413
- 0,
39414
- 20,
39415
- 20 ] } },
39416
- pedestrian_crossing:{ url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",
39417
- filtering:"mipmap",
39418
- sprites:{ base:[ 0,
39419
- 0,
39420
- 20,
39421
- 20 ] } },
39422
- physical:{ url:"https://dalganmap.ru/api-image/images/conditions/physical.png",
39423
- filtering:"mipmap",
39424
- sprites:{ base:[ 0,
39425
- 0,
39426
- 20,
39427
- 20 ] } },
39428
- gate:{ url:"https://dalganmap.ru/api-image/images/conditions/gate.png",
39429
- filtering:"mipmap",
39430
- sprites:{ base:[ 0,
39431
- 0,
39432
- 20,
39433
- 20 ] } },
39434
- POI_3578:{ url:"https://dalganmap.ru/api-image/images/POI/3578.png",
39435
- filtering:"mipmap",
39436
- sprites:{ base:[ 0,
39437
- 0,
39438
- 20,
39439
- 20 ] } },
39440
- POI_5813:{ url:"https://dalganmap.ru/api-image/images/POI/5813.png",
39441
- filtering:"mipmap",
39442
- sprites:{ base:[ 0,
39443
- 0,
39444
- 20,
39445
- 20 ] } },
39446
- POI_5541:{ url:"https://dalganmap.ru/api-image/images/POI/5541.png",
39447
- filtering:"mipmap",
39448
- sprites:{ base:[ 0,
39449
- 0,
39450
- 20,
39451
- 20 ] } },
39452
- POI_5540:{ url:"https://dalganmap.ru/api-image/images/POI/5540.png",
39453
- filtering:"mipmap",
39454
- sprites:{ base:[ 0,
39455
- 0,
39456
- 20,
39457
- 20 ] } },
39458
- "POI_9530(Mail)":{ url:"https://dalganmap.ru/api-image/images/POI/mail.png",
39459
- filtering:"mipmap",
39460
- sprites:{ base:[ 0,
39461
- 0,
39462
- 20,
39463
- 20 ] } },
39464
- "POI_9530(Delivery)":{ url:"https://dalganmap.ru/api-image/images/POI/delivery.png",
39465
- filtering:"mipmap",
39466
- sprites:{ base:[ 0,
39467
- 0,
39468
- 20,
39469
- 20 ] } },
39470
- POI_5400:{ url:"https://dalganmap.ru/api-image/images/POI/5400.png",
39471
- filtering:"mipmap",
39472
- sprites:{ base:[ 0,
39473
- 0,
39474
- 20,
39475
- 20 ] } },
39476
- POI_6000:{ url:"https://dalganmap.ru/api-image/images/POI/6000.png",
39477
- filtering:"mipmap",
39478
- sprites:{ base:[ 0,
39479
- 0,
39480
- 20,
39481
- 20 ] } },
39482
- POI_9565:{ url:"https://dalganmap.ru/api-image/images/POI/9565.png",
39483
- filtering:"mipmap",
39484
- sprites:{ base:[ 0,
39485
- 0,
39486
- 20,
39487
- 20 ] } },
39488
- POI_9583:{ url:"https://dalganmap.ru/api-image/images/POI/9583.png",
39489
- filtering:"mipmap",
39490
- sprites:{ base:[ 0,
39491
- 0,
39492
- 20,
39493
- 20 ] } },
39494
- POI_8060:{ url:"https://dalganmap.ru/api-image/images/POI/8060.png",
39495
- filtering:"mipmap",
39496
- sprites:{ base:[ 0,
39497
- 0,
39498
- 20,
39499
- 20 ] } },
39500
- POI_5511:{ url:"https://dalganmap.ru/api-image/images/POI/5511.png",
39501
- filtering:"mipmap",
39502
- sprites:{ base:[ 0,
39503
- 0,
39504
- 20,
39505
- 20 ] } },
39506
- POI_5512:{ url:"https://dalganmap.ru/api-image/images/POI/5512.png",
39507
- filtering:"mipmap",
39508
- sprites:{ base:[ 0,
39509
- 0,
39510
- 20,
39511
- 20 ] } },
39512
- POI_5800:{ url:"https://dalganmap.ru/api-image/images/POI/5800.png",
39513
- filtering:"mipmap",
39514
- sprites:{ base:[ 0,
39515
- 0,
39516
- 20,
39517
- 20 ] } },
39518
- POI_5999:{ url:"https://dalganmap.ru/api-image/images/POI/5999.png",
39519
- filtering:"mipmap",
39520
- sprites:{ base:[ 0,
39521
- 0,
39522
- 20,
39523
- 20 ] } },
39524
- POI_7011:{ url:"https://dalganmap.ru/api-image/images/POI/7011.png",
39525
- filtering:"mipmap",
39526
- sprites:{ base:[ 0,
39527
- 0,
39528
- 20,
39529
- 20 ] } },
39530
- POI_7389:{ url:"https://dalganmap.ru/api-image/images/POI/7389.png",
39531
- filtering:"mipmap",
39532
- sprites:{ base:[ 0,
39533
- 0,
39534
- 20,
39535
- 20 ] } },
39536
- POI_7832:{ url:"https://dalganmap.ru/api-image/images/POI/7832.png",
39537
- filtering:"mipmap",
39538
- sprites:{ base:[ 0,
39539
- 0,
39540
- 20,
39541
- 20 ] } },
39542
- POI_7929:{ url:"https://dalganmap.ru/api-image/images/POI/7929.png",
39543
- filtering:"mipmap",
39544
- sprites:{ base:[ 0,
39545
- 0,
39546
- 20,
39547
- 20 ] } },
39548
- POI_7990:{ url:"https://dalganmap.ru/api-image/images/POI/7990.png",
39549
- filtering:"mipmap",
39550
- sprites:{ base:[ 0,
39551
- 0,
39552
- 20,
39553
- 20 ] } },
39554
- POI_7999:{ url:"https://dalganmap.ru/api-image/images/POI/7999.png",
39555
- filtering:"mipmap",
39556
- sprites:{ base:[ 0,
39557
- 0,
39558
- 20,
39559
- 20 ] } },
39560
- POI_8410:{ url:"https://dalganmap.ru/api-image/images/POI/8410.png",
39561
- filtering:"mipmap",
39562
- sprites:{ base:[ 0,
39563
- 0,
39564
- 20,
39565
- 20 ] } },
39566
- POI_9517:{ url:"https://dalganmap.ru/api-image/images/POI/9517.png",
39567
- filtering:"mipmap",
39568
- sprites:{ base:[ 0,
39569
- 0,
39570
- 20,
39571
- 20 ] } },
39572
- POI_9718:{ url:"https://dalganmap.ru/api-image/images/POI/9718.png",
39573
- filtering:"mipmap",
39574
- sprites:{ base:[ 0,
39575
- 0,
39576
- 20,
39577
- 20 ] } },
39578
- "POI_9992(mosque)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",
39579
- filtering:"mipmap",
39580
- sprites:{ base:[ 0,
39581
- 0,
39582
- 20,
39583
- 20 ] } },
39584
- "POI_9992(church)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",
39585
- filtering:"mipmap",
39586
- sprites:{ base:[ 0,
39587
- 0,
39588
- 20,
39589
- 20 ] } },
39590
- "POI_9992(temple)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",
39591
- filtering:"mipmap",
39592
- sprites:{ base:[ 0,
39593
- 0,
39594
- 20,
39595
- 20 ] } },
39596
- "POI_9992(davidStar)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",
39597
- filtering:"mipmap",
39598
- sprites:{ base:[ 0,
39599
- 0,
39600
- 20,
39601
- 20 ] } },
39602
- "POI_9992(mortar)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",
39603
- filtering:"mipmap",
39604
- sprites:{ base:[ 0,
39605
- 0,
39606
- 20,
39607
- 20 ] } },
39608
- "POI_4100(metro)":{ url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",
39609
- filtering:"mipmap",
39610
- sprites:{ base:[ 0,
39611
- 0,
39612
- 20,
39613
- 20 ] } },
39614
- "POI_4100(diameter)":{ url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",
39615
- filtering:"mipmap",
39616
- sprites:{ base:[ 0,
39617
- 0,
39618
- 41,
39619
- 15 ] } },
39620
- POI_4013:{ url:"https://dalganmap.ru/api-image/images/POI/4013.png",
39621
- filtering:"mipmap",
39622
- sprites:{ base:[ 0,
39623
- 0,
39624
- 20,
39625
- 20 ] } } },
39626
- layers:null,
39627
- styles:{ buildings:{ base:"polygons",
39628
- shaders:{ blocks:{ color:"color.rgb;\n" } } } },
39629
- lights:{ light1:{ type:"directional",
39630
- direction:[ 0.1,
39631
- 0.5,
39632
- -1 ],
39633
- diffuse:0.7,
39634
- ambient:0.5 } },
39635
- sources:null };
39636
- data.global;
39637
- data.cameras;
39638
- data.textures;
39639
- data.layers;
39640
- data.styles;
39641
- data.lights;
39642
- data.sources;
39643
-
39644
39417
  const getBuildingLayers = (source) => {
39645
39418
  const layers = [];
39646
39419
  const data = {
@@ -43587,270 +43360,11 @@ const getLayerModalsNames = (layer) => {
43587
43360
  return layerModalsNames;
43588
43361
  };
43589
43362
 
43590
- const useGetLeafletLayer = ({ eventHandlers, defaultLayers, }) => {
43591
- const [layer, setLayer] = React__namespace.useState(null);
43592
- const [config, setConfig] = React__namespace.useState(null);
43593
- const [isReady, setIsReady] = React__namespace.useState(false);
43594
- const scene = React__namespace.useMemo(() => {
43595
- if (layer === null)
43596
- return null;
43597
- const { scene } = layer;
43598
- return scene;
43599
- }, [layer]);
43600
- const getLeafletLayer = React__namespace.useCallback(() => {
43601
- Promise.resolve().then(function () { return tangram_min; }).then(() => {
43602
- if (window.Tangram) {
43603
- const leafletLayer = window.Tangram.leafletLayer({
43604
- scene: data,
43605
- modifyScrollWheel: false,
43606
- modifyZoomBehavior: false,
43607
- });
43608
- const { scene } = leafletLayer;
43609
- scene.subscribe({
43610
- load: ({ config }) => {
43611
- setConfig(config);
43612
- setIsReady(true);
43613
- },
43614
- });
43615
- leafletLayer.on('load', ({ sourceTarget }) => {
43616
- const mapInstance = sourceTarget._map;
43617
- leafletLayer.setSelectionEvents({
43618
- click: ({ feature, leaflet_event }) => {
43619
- if (feature) {
43620
- const { source_layer, properties } = feature;
43621
- eventHandlers?.[source_layer]?.click?.({
43622
- leaflet_event,
43623
- properties,
43624
- });
43625
- }
43626
- },
43627
- hover: ({ feature, leaflet_event }) => {
43628
- const mapContainer = mapInstance.getContainer();
43629
- if (feature) {
43630
- const { source_layer, properties } = feature;
43631
- mapContainer.style.cursor = 'pointer';
43632
- eventHandlers?.[source_layer]?.hover?.({
43633
- leaflet_event,
43634
- properties,
43635
- });
43636
- }
43637
- else {
43638
- mapContainer.style.cursor = 'default';
43639
- }
43640
- },
43641
- });
43642
- });
43643
- setLayer(leafletLayer);
43644
- }
43645
- });
43646
- }, [eventHandlers]);
43647
- const checkConfig = React__namespace.useCallback((callback) => {
43648
- if (config) {
43649
- callback(config);
43650
- }
43651
- else {
43652
- loggerService.warn({
43653
- message: 'Config не инициализирована',
43654
- });
43655
- }
43656
- }, [config]);
43657
- const checkScene = React__namespace.useCallback((callback) => {
43658
- checkConfig((config) => {
43659
- if (scene) {
43660
- callback({
43661
- config,
43662
- scene,
43663
- });
43664
- }
43665
- else {
43666
- loggerService.warn({
43667
- message: 'Scene не инициализирована',
43668
- });
43669
- }
43670
- });
43671
- }, [checkConfig, scene]);
43672
- const addSource = React__namespace.useCallback((sourceName) => {
43673
- checkScene(({ config, scene }) => {
43674
- const url = sourceUrl[sourceName];
43675
- config.sources[sourceName] = {
43676
- tile_size,
43677
- url,
43678
- type: 'MVT',
43679
- };
43680
- scene.updateConfig({ rebuild: true });
43681
- });
43682
- }, [checkScene]);
43683
- const deleteSource = React__namespace.useCallback((sourceName) => {
43684
- checkScene(({ config, scene }) => {
43685
- delete config.sources[sourceName];
43686
- scene.updateConfig({ rebuild: true });
43687
- });
43688
- }, [checkScene]);
43689
- const getSource = React__namespace.useCallback((sourceName) => {
43690
- let source = null;
43691
- checkConfig((config) => {
43692
- source = structuredClone(config.sources[sourceName]);
43693
- });
43694
- return source;
43695
- }, [checkConfig]);
43696
- const updateSource = React__namespace.useCallback((sourceName, newUrl) => {
43697
- checkScene(({ config, scene }) => {
43698
- config.sources[sourceName].url = newUrl;
43699
- scene.updateConfig({ rebuild: true });
43700
- });
43701
- }, [checkScene]);
43702
- const reloadSource = React__namespace.useCallback((sourceName) => {
43703
- deleteSource(sourceName);
43704
- addSource(sourceName);
43705
- }, [deleteSource, addSource]);
43706
- const addLayer = React__namespace.useCallback((layer) => {
43707
- checkScene(({ config, scene }) => {
43708
- const order = getLayers().length + 1;
43709
- const validLayer = getValidLayer({
43710
- layer,
43711
- order,
43712
- eventHandlers,
43713
- });
43714
- const layerName = getLayerName(validLayer);
43715
- const { sublayers, draw, textures } = validLayer;
43716
- if (draw) {
43717
- const { styles } = draw;
43718
- if (styles) {
43719
- validLayer.draw = {
43720
- ...structuredClone(validLayer.draw),
43721
- ...structuredClone(styles),
43722
- };
43723
- }
43724
- }
43725
- config.layers[layerName] = {
43726
- ...structuredClone(validLayer),
43727
- ...structuredClone(sublayers),
43728
- };
43729
- config.textures = {
43730
- ...structuredClone(config.textures),
43731
- ...structuredClone(textures),
43732
- };
43733
- scene.updateConfig({ rebuild: true });
43734
- });
43735
- }, [checkScene]);
43736
- const removeLayer = React__namespace.useCallback((layer) => {
43737
- const layerName = getLayerName(layer);
43738
- checkScene(({ config, scene }) => {
43739
- delete config.layers[layerName];
43740
- scene.updateConfig({ rebuild: true });
43741
- });
43742
- }, [checkScene]);
43743
- const addStyle = React__namespace.useCallback(({ name, style }) => {
43744
- checkScene(({ config, scene }) => {
43745
- config.styles[name] = structuredClone(style);
43746
- scene.updateConfig({ rebuild: true });
43747
- });
43748
- }, [checkScene]);
43749
- const getLayerVisibility = React__namespace.useCallback((layer) => {
43750
- let layerVisibility = true;
43751
- const layerName = getLayerName(layer);
43752
- checkConfig((config) => {
43753
- const { visible = true } = config.layers[layerName];
43754
- layerVisibility = visible;
43755
- });
43756
- return layerVisibility;
43757
- }, [getLayerName, checkConfig]);
43758
- const toggleLayerVisibility = React__namespace.useCallback(({ layer, visible }) => {
43759
- const layerName = getLayerName(layer);
43760
- checkScene(({ config, scene }) => {
43761
- config.layers[layerName].visible = visible;
43762
- scene.updateConfig({ rebuild: true });
43763
- });
43764
- }, [checkScene]);
43765
- const getLayers = React__namespace.useCallback(() => {
43766
- const layers = [];
43767
- checkConfig((config) => {
43768
- layers.push(...Object.keys(config.layers));
43769
- });
43770
- return layers;
43771
- }, [checkConfig]);
43772
- const removeLayers = React__namespace.useCallback(() => {
43773
- checkConfig((config) => {
43774
- const { layers } = config;
43775
- Object.values(layers).forEach(removeLayer);
43776
- });
43777
- }, [checkConfig, removeLayer]);
43778
- const getSources = React__namespace.useCallback(() => {
43779
- const sources = [];
43780
- checkConfig((config) => {
43781
- sources.push(...Object.keys(config.sources));
43782
- });
43783
- return sources;
43784
- }, [config]);
43785
- React__namespace.useEffect(() => {
43786
- if (GlobalConfig.instance.isValidApiKey) {
43787
- getLeafletLayer();
43788
- }
43789
- return () => {
43790
- setLayer(null);
43791
- setConfig(null);
43792
- };
43793
- }, [GlobalConfig.instance.isValidApiKey]);
43794
- React__namespace.useEffect(() => {
43795
- addStyle({
43796
- name: 'zebra_crossing',
43797
- style: {
43798
- base: 'polygons',
43799
- lighting: false,
43800
- shaders: {
43801
- attributes: {
43802
- a_angle: {
43803
- type: 'float',
43804
- default: 0.0,
43805
- },
43806
- },
43807
- uniforms: {
43808
- u_stripe_width: 1,
43809
- },
43810
- blocks: {
43811
- filter: `
43812
- vec3 pos = worldPosition().xyz;
43813
-
43814
- float ang = radians(a_angle);
43815
-
43816
- vec2 dir = vec2(sin(ang), cos(ang));
43817
-
43818
- float positionAlongLine = dot(pos.xy, dir);
43819
-
43820
- float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));
43821
-
43822
- color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);
43823
-
43824
- color.a = 1.0;
43825
- `,
43826
- },
43827
- },
43828
- },
43829
- });
43830
- Object.values(exports.TangramSourceNames).forEach(addSource);
43831
- }, [addStyle, addSource]);
43832
- React__namespace.useEffect(() => {
43833
- if (defaultLayers && isReady) {
43834
- defaultLayers.map(addLayer);
43835
- }
43836
- }, [defaultLayers, addLayer, isReady]);
43837
- return {
43838
- layer,
43839
- scene,
43840
- config,
43841
- addSource,
43842
- getSource,
43843
- updateSource,
43844
- reloadSource,
43845
- addLayer,
43846
- removeLayer,
43847
- addStyle,
43848
- getLayerVisibility,
43849
- toggleLayerVisibility,
43850
- getSources,
43851
- getLayers,
43852
- removeLayers,
43853
- };
43363
+ const tile_size = 256;
43364
+ const sourceUrl = {
43365
+ [exports.TangramSourceNames.TILE]: `${"https://dalganmap.ru/api"}/tiles/get_tile/{z}/{x}/{y}.mvt`,
43366
+ [exports.TangramSourceNames.NATURE_TILE]: `${"https://dalganmap.ru/api"}/tiles/get_nature_tile/{z}/{x}/{y}.mvt`,
43367
+ [exports.TangramSourceNames.MSK]: `${"https://dalganmap.ru/api"}/tiles/get_tile/{z}/{x}/{y}.mvt`,
43854
43368
  };
43855
43369
 
43856
43370
  function extendContext(source, extra) {
@@ -44023,6 +43537,251 @@ LayersControl.Overlay = createControlledLayer(function addOverlay(layersControl,
44023
43537
  layersControl.addOverlay(layer, name);
44024
43538
  });
44025
43539
 
43540
+ var data = { global:{ links:{ getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",
43541
+ getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",
43542
+ getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n" } },
43543
+ cameras:{ camera1:{ type:"perspective",
43544
+ vanishing_point:[ 0,
43545
+ -500 ] } },
43546
+ textures:{ arrow:{ url:"https://dalganmap.ru/api-image/images/arrow-20.png",
43547
+ sprites:{ base:[ 0,
43548
+ 0,
43549
+ 20,
43550
+ 20 ] } },
43551
+ "traffic-signal":{ url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",
43552
+ filtering:"mipmap",
43553
+ sprites:{ base:[ 0,
43554
+ 0,
43555
+ 20,
43556
+ 20 ] } },
43557
+ pedestrian_crossing:{ url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",
43558
+ filtering:"mipmap",
43559
+ sprites:{ base:[ 0,
43560
+ 0,
43561
+ 20,
43562
+ 20 ] } },
43563
+ physical:{ url:"https://dalganmap.ru/api-image/images/conditions/physical.png",
43564
+ filtering:"mipmap",
43565
+ sprites:{ base:[ 0,
43566
+ 0,
43567
+ 20,
43568
+ 20 ] } },
43569
+ gate:{ url:"https://dalganmap.ru/api-image/images/conditions/gate.png",
43570
+ filtering:"mipmap",
43571
+ sprites:{ base:[ 0,
43572
+ 0,
43573
+ 20,
43574
+ 20 ] } },
43575
+ POI_3578:{ url:"https://dalganmap.ru/api-image/images/POI/3578.png",
43576
+ filtering:"mipmap",
43577
+ sprites:{ base:[ 0,
43578
+ 0,
43579
+ 20,
43580
+ 20 ] } },
43581
+ POI_5813:{ url:"https://dalganmap.ru/api-image/images/POI/5813.png",
43582
+ filtering:"mipmap",
43583
+ sprites:{ base:[ 0,
43584
+ 0,
43585
+ 20,
43586
+ 20 ] } },
43587
+ POI_5541:{ url:"https://dalganmap.ru/api-image/images/POI/5541.png",
43588
+ filtering:"mipmap",
43589
+ sprites:{ base:[ 0,
43590
+ 0,
43591
+ 20,
43592
+ 20 ] } },
43593
+ POI_5540:{ url:"https://dalganmap.ru/api-image/images/POI/5540.png",
43594
+ filtering:"mipmap",
43595
+ sprites:{ base:[ 0,
43596
+ 0,
43597
+ 20,
43598
+ 20 ] } },
43599
+ "POI_9530(Mail)":{ url:"https://dalganmap.ru/api-image/images/POI/mail.png",
43600
+ filtering:"mipmap",
43601
+ sprites:{ base:[ 0,
43602
+ 0,
43603
+ 20,
43604
+ 20 ] } },
43605
+ "POI_9530(Delivery)":{ url:"https://dalganmap.ru/api-image/images/POI/delivery.png",
43606
+ filtering:"mipmap",
43607
+ sprites:{ base:[ 0,
43608
+ 0,
43609
+ 20,
43610
+ 20 ] } },
43611
+ POI_5400:{ url:"https://dalganmap.ru/api-image/images/POI/5400.png",
43612
+ filtering:"mipmap",
43613
+ sprites:{ base:[ 0,
43614
+ 0,
43615
+ 20,
43616
+ 20 ] } },
43617
+ POI_6000:{ url:"https://dalganmap.ru/api-image/images/POI/6000.png",
43618
+ filtering:"mipmap",
43619
+ sprites:{ base:[ 0,
43620
+ 0,
43621
+ 20,
43622
+ 20 ] } },
43623
+ POI_9565:{ url:"https://dalganmap.ru/api-image/images/POI/9565.png",
43624
+ filtering:"mipmap",
43625
+ sprites:{ base:[ 0,
43626
+ 0,
43627
+ 20,
43628
+ 20 ] } },
43629
+ POI_9583:{ url:"https://dalganmap.ru/api-image/images/POI/9583.png",
43630
+ filtering:"mipmap",
43631
+ sprites:{ base:[ 0,
43632
+ 0,
43633
+ 20,
43634
+ 20 ] } },
43635
+ POI_8060:{ url:"https://dalganmap.ru/api-image/images/POI/8060.png",
43636
+ filtering:"mipmap",
43637
+ sprites:{ base:[ 0,
43638
+ 0,
43639
+ 20,
43640
+ 20 ] } },
43641
+ POI_5511:{ url:"https://dalganmap.ru/api-image/images/POI/5511.png",
43642
+ filtering:"mipmap",
43643
+ sprites:{ base:[ 0,
43644
+ 0,
43645
+ 20,
43646
+ 20 ] } },
43647
+ POI_5512:{ url:"https://dalganmap.ru/api-image/images/POI/5512.png",
43648
+ filtering:"mipmap",
43649
+ sprites:{ base:[ 0,
43650
+ 0,
43651
+ 20,
43652
+ 20 ] } },
43653
+ POI_5800:{ url:"https://dalganmap.ru/api-image/images/POI/5800.png",
43654
+ filtering:"mipmap",
43655
+ sprites:{ base:[ 0,
43656
+ 0,
43657
+ 20,
43658
+ 20 ] } },
43659
+ POI_5999:{ url:"https://dalganmap.ru/api-image/images/POI/5999.png",
43660
+ filtering:"mipmap",
43661
+ sprites:{ base:[ 0,
43662
+ 0,
43663
+ 20,
43664
+ 20 ] } },
43665
+ POI_7011:{ url:"https://dalganmap.ru/api-image/images/POI/7011.png",
43666
+ filtering:"mipmap",
43667
+ sprites:{ base:[ 0,
43668
+ 0,
43669
+ 20,
43670
+ 20 ] } },
43671
+ POI_7389:{ url:"https://dalganmap.ru/api-image/images/POI/7389.png",
43672
+ filtering:"mipmap",
43673
+ sprites:{ base:[ 0,
43674
+ 0,
43675
+ 20,
43676
+ 20 ] } },
43677
+ POI_7832:{ url:"https://dalganmap.ru/api-image/images/POI/7832.png",
43678
+ filtering:"mipmap",
43679
+ sprites:{ base:[ 0,
43680
+ 0,
43681
+ 20,
43682
+ 20 ] } },
43683
+ POI_7929:{ url:"https://dalganmap.ru/api-image/images/POI/7929.png",
43684
+ filtering:"mipmap",
43685
+ sprites:{ base:[ 0,
43686
+ 0,
43687
+ 20,
43688
+ 20 ] } },
43689
+ POI_7990:{ url:"https://dalganmap.ru/api-image/images/POI/7990.png",
43690
+ filtering:"mipmap",
43691
+ sprites:{ base:[ 0,
43692
+ 0,
43693
+ 20,
43694
+ 20 ] } },
43695
+ POI_7999:{ url:"https://dalganmap.ru/api-image/images/POI/7999.png",
43696
+ filtering:"mipmap",
43697
+ sprites:{ base:[ 0,
43698
+ 0,
43699
+ 20,
43700
+ 20 ] } },
43701
+ POI_8410:{ url:"https://dalganmap.ru/api-image/images/POI/8410.png",
43702
+ filtering:"mipmap",
43703
+ sprites:{ base:[ 0,
43704
+ 0,
43705
+ 20,
43706
+ 20 ] } },
43707
+ POI_9517:{ url:"https://dalganmap.ru/api-image/images/POI/9517.png",
43708
+ filtering:"mipmap",
43709
+ sprites:{ base:[ 0,
43710
+ 0,
43711
+ 20,
43712
+ 20 ] } },
43713
+ POI_9718:{ url:"https://dalganmap.ru/api-image/images/POI/9718.png",
43714
+ filtering:"mipmap",
43715
+ sprites:{ base:[ 0,
43716
+ 0,
43717
+ 20,
43718
+ 20 ] } },
43719
+ "POI_9992(mosque)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",
43720
+ filtering:"mipmap",
43721
+ sprites:{ base:[ 0,
43722
+ 0,
43723
+ 20,
43724
+ 20 ] } },
43725
+ "POI_9992(church)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",
43726
+ filtering:"mipmap",
43727
+ sprites:{ base:[ 0,
43728
+ 0,
43729
+ 20,
43730
+ 20 ] } },
43731
+ "POI_9992(temple)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",
43732
+ filtering:"mipmap",
43733
+ sprites:{ base:[ 0,
43734
+ 0,
43735
+ 20,
43736
+ 20 ] } },
43737
+ "POI_9992(davidStar)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",
43738
+ filtering:"mipmap",
43739
+ sprites:{ base:[ 0,
43740
+ 0,
43741
+ 20,
43742
+ 20 ] } },
43743
+ "POI_9992(mortar)":{ url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",
43744
+ filtering:"mipmap",
43745
+ sprites:{ base:[ 0,
43746
+ 0,
43747
+ 20,
43748
+ 20 ] } },
43749
+ "POI_4100(metro)":{ url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",
43750
+ filtering:"mipmap",
43751
+ sprites:{ base:[ 0,
43752
+ 0,
43753
+ 20,
43754
+ 20 ] } },
43755
+ "POI_4100(diameter)":{ url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",
43756
+ filtering:"mipmap",
43757
+ sprites:{ base:[ 0,
43758
+ 0,
43759
+ 41,
43760
+ 15 ] } },
43761
+ POI_4013:{ url:"https://dalganmap.ru/api-image/images/POI/4013.png",
43762
+ filtering:"mipmap",
43763
+ sprites:{ base:[ 0,
43764
+ 0,
43765
+ 20,
43766
+ 20 ] } } },
43767
+ layers:null,
43768
+ styles:{ buildings:{ base:"polygons",
43769
+ shaders:{ blocks:{ color:"color.rgb;\n" } } } },
43770
+ lights:{ light1:{ type:"directional",
43771
+ direction:[ 0.1,
43772
+ 0.5,
43773
+ -1 ],
43774
+ diffuse:0.7,
43775
+ ambient:0.5 } },
43776
+ sources:null };
43777
+ data.global;
43778
+ data.cameras;
43779
+ data.textures;
43780
+ data.layers;
43781
+ data.styles;
43782
+ data.lights;
43783
+ data.sources;
43784
+
44026
43785
  class TangramLayer {
44027
43786
  props;
44028
43787
  constructor(props) {
@@ -44418,10 +44177,10 @@ function requirePapaparse_min () {
44418
44177
  var papaparse_minExports = requirePapaparse_min();
44419
44178
  var e = /*@__PURE__*/getDefaultExportFromCjs(papaparse_minExports);
44420
44179
 
44421
- "function"==typeof SuppressedError&&SuppressedError;function P(n,t){return e.parse(n,t)}function x$1(n,t){e.parse(n,Object.assign({},{download:true},t));}function O(n,t){return void 0===t&&(t={}),e.unparse(n,t)}function S(){return {readString:P,readRemoteFile:x$1,jsonToCSV:O}}e.BAD_DELIMITERS;e.RECORD_SEP;e.UNIT_SEP;e.WORKERS_SUPPORTED;e.LocalChunkSize;e.DefaultDelimiter;
44180
+ "function"==typeof SuppressedError&&SuppressedError;function P(n,t){return e.parse(n,t)}function x$1(n,t){e.parse(n,Object.assign({},{download:true},t));}function O(n,t){return void 0===t&&(t={}),e.unparse(n,t)}function S$1(){return {readString:P,readRemoteFile:x$1,jsonToCSV:O}}e.BAD_DELIMITERS;e.RECORD_SEP;e.UNIT_SEP;e.WORKERS_SUPPORTED;e.LocalChunkSize;e.DefaultDelimiter;
44422
44181
 
44423
44182
  const CSVUploader = ({ onDataParsed, onError, delimiter = ',', header = true, dynamicTyping = true, skipEmptyLines = true, worker = false, }) => {
44424
- const { readString } = S();
44183
+ const { readString } = S$1();
44425
44184
  const [loading, setLoading] = React__namespace.useState(false);
44426
44185
  const [error, setError] = React__namespace.useState(null);
44427
44186
  return (jsxRuntime.jsx(UploadButton, { accept: ".csv", loading: loading, error: error, onFilesLoad: ({ files }) => {
@@ -46873,7 +46632,7 @@ const defaultValues = {
46873
46632
  password: '',
46874
46633
  };
46875
46634
 
46876
- const r=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o$1=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r(t,o,e));}},s=(r,s)=>{s.shouldUseNativeValidation&&o$1(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n(t);return e.some(e=>n(e).match(`^${r}\\.\\d+`))};function n(e){return e.replace(/\]|\[/g,"")}
46635
+ const r$1=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o$1=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r$1(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r$1(t,o,e));}},s=(r,s)=>{s.shouldUseNativeValidation&&o$1(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n(t);return e.some(e=>n(e).match(`^${r}\\.\\d+`))};function n(e){return e.replace(/\]|\[/g,"")}
46877
46636
 
46878
46637
  function o(o,n,s$1){return void 0===s$1&&(s$1={}),function(a,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(o["sync"===s$1.mode?"validateSync":"validate"](a,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&o$1({},c),{values:s$1.raw?Object.assign({},a):t,errors:{}}}));}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return {values:{},errors:s((o=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,s=o&&o[t.type];e[t.path]=appendErrors(t.path,n,e,t.type,s?[].concat(s,t.message):t.message);}return e},{})),c)};var o,n;}))}catch(e){return Promise.reject(e)}}}
46879
46638
 
@@ -46924,6 +46683,21 @@ const AuthPage = ({ onSuccess, onError }) => {
46924
46683
  }, children: [jsxRuntime.jsx(material.Typography, { variant: "h4", children: "\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F" }), jsxRuntime.jsx(CustomInput, { ...register('username'), label: "\u041B\u043E\u0433\u0438\u043D", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043B\u043E\u0433\u0438\u043D" }), jsxRuntime.jsx(CustomInput, { ...register('password'), label: "\u041F\u0430\u0440\u043E\u043B\u044C", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C", type: "password" }), jsxRuntime.jsx(Button, { type: "submit", disabled: !isValid, children: "\u0412\u043E\u0439\u0442\u0438" })] }) }));
46925
46684
  };
46926
46685
 
46686
+ /* eslint-disable no-console */
46687
+ class LoggerService {
46688
+ constructor() { }
46689
+ log({ message, context, meta, }) {
46690
+ console.log(context, message, meta);
46691
+ }
46692
+ warn({ message, context, meta, }) {
46693
+ console.warn(context, message, meta);
46694
+ }
46695
+ error({ message, context, meta, }) {
46696
+ console.error(context, message, meta);
46697
+ }
46698
+ }
46699
+ const loggerService = new LoggerService();
46700
+
46927
46701
  // define() gets called for each chunk generated by the first Rollup pass.
46928
46702
  // The order the chunks are called in is controlled by the imports in bundle.js:
46929
46703
  //
@@ -46974,10 +46748,1036 @@ try {
46974
46748
  }
46975
46749
  } catch(e) {}
46976
46750
 
46751
+ var Tangram$1 = Tangram;
46752
+
46977
46753
  var tangram_min = /*#__PURE__*/Object.freeze({
46754
+ __proto__: null,
46755
+ default: Tangram$1
46756
+ });
46757
+
46758
+ (function() {
46759
+ // save these original methods before they are overwritten
46760
+ var proto_initIcon = L.Marker.prototype._initIcon;
46761
+ var proto_setPos = L.Marker.prototype._setPos;
46762
+
46763
+ var oldIE = (L.DomUtil.TRANSFORM === 'msTransform');
46764
+
46765
+ L.Marker.addInitHook(function () {
46766
+ var iconOptions = this.options.icon && this.options.icon.options;
46767
+ var iconAnchor = iconOptions && this.options.icon.options.iconAnchor;
46768
+ if (iconAnchor) {
46769
+ iconAnchor = (iconAnchor[0] + 'px ' + iconAnchor[1] + 'px');
46770
+ }
46771
+ this.options.rotationOrigin = this.options.rotationOrigin || iconAnchor || 'center bottom' ;
46772
+ this.options.rotationAngle = this.options.rotationAngle || 0;
46773
+
46774
+ // Ensure marker keeps rotated during dragging
46775
+ this.on('drag', function(e) { e.target._applyRotation(); });
46776
+ });
46777
+
46778
+ L.Marker.include({
46779
+ _initIcon: function() {
46780
+ proto_initIcon.call(this);
46781
+ },
46782
+
46783
+ _setPos: function (pos) {
46784
+ proto_setPos.call(this, pos);
46785
+ this._applyRotation();
46786
+ },
46787
+
46788
+ _applyRotation: function () {
46789
+ if(this.options.rotationAngle) {
46790
+ this._icon.style[L.DomUtil.TRANSFORM+'Origin'] = this.options.rotationOrigin;
46791
+
46792
+ if(oldIE) {
46793
+ // for IE 9, use the 2D rotation
46794
+ this._icon.style[L.DomUtil.TRANSFORM] = 'rotate(' + this.options.rotationAngle + 'deg)';
46795
+ } else {
46796
+ // for modern browsers, prefer the 3D accelerated version
46797
+ this._icon.style[L.DomUtil.TRANSFORM] += ' rotateZ(' + this.options.rotationAngle + 'deg)';
46798
+ }
46799
+ }
46800
+ },
46801
+
46802
+ setRotationAngle: function(angle) {
46803
+ this.options.rotationAngle = angle;
46804
+ this.update();
46805
+ return this;
46806
+ },
46807
+
46808
+ setRotationOrigin: function(origin) {
46809
+ this.options.rotationOrigin = origin;
46810
+ this.update();
46811
+ return this;
46812
+ }
46813
+ });
46814
+ })();
46815
+
46816
+ var leaflet_rotatedMarker = /*#__PURE__*/Object.freeze({
46978
46817
  __proto__: null
46979
46818
  });
46980
46819
 
46820
+ var leaflet_polylineoffset$2 = {exports: {}};
46821
+
46822
+ var hasRequiredLeaflet_polylineoffset;
46823
+
46824
+ function requireLeaflet_polylineoffset () {
46825
+ if (hasRequiredLeaflet_polylineoffset) return leaflet_polylineoffset$2.exports;
46826
+ hasRequiredLeaflet_polylineoffset = 1;
46827
+ (function (module, exports$1) {
46828
+ (function (factory, window) {
46829
+ {
46830
+ module.exports = factory(requireLeafletSrc());
46831
+ }
46832
+ if (typeof window !== 'undefined' && window.L) {
46833
+ window.L.PolylineOffset = factory(L);
46834
+ }
46835
+ }(function (L) {
46836
+
46837
+ function forEachPair(list, callback) {
46838
+ if (!list || list.length < 1) { return; }
46839
+ for (var i = 1, l = list.length; i < l; i++) {
46840
+ callback(list[i-1], list[i]);
46841
+ }
46842
+ }
46843
+
46844
+ /**
46845
+ Find the coefficients (a,b) of a line of equation y = a.x + b,
46846
+ or the constant x for vertical lines
46847
+ Return null if there's no equation possible
46848
+ */
46849
+ function lineEquation(pt1, pt2) {
46850
+ if (pt1.x === pt2.x) {
46851
+ return pt1.y === pt2.y ? null : { x: pt1.x };
46852
+ }
46853
+
46854
+ var a = (pt2.y - pt1.y) / (pt2.x - pt1.x);
46855
+ return {
46856
+ a: a,
46857
+ b: pt1.y - a * pt1.x,
46858
+ };
46859
+ }
46860
+
46861
+ /**
46862
+ Return the intersection point of two lines defined by two points each
46863
+ Return null when there's no unique intersection
46864
+ */
46865
+ function intersection(l1a, l1b, l2a, l2b) {
46866
+ var line1 = lineEquation(l1a, l1b);
46867
+ var line2 = lineEquation(l2a, l2b);
46868
+
46869
+ if (line1 === null || line2 === null) {
46870
+ return null;
46871
+ }
46872
+
46873
+ if (line1.hasOwnProperty('x')) {
46874
+ return line2.hasOwnProperty('x')
46875
+ ? null
46876
+ : {
46877
+ x: line1.x,
46878
+ y: line2.a * line1.x + line2.b,
46879
+ };
46880
+ }
46881
+ if (line2.hasOwnProperty('x')) {
46882
+ return {
46883
+ x: line2.x,
46884
+ y: line1.a * line2.x + line1.b,
46885
+ };
46886
+ }
46887
+
46888
+ if (line1.a === line2.a) {
46889
+ return null;
46890
+ }
46891
+
46892
+ var x = (line2.b - line1.b) / (line1.a - line2.a);
46893
+ return {
46894
+ x: x,
46895
+ y: line1.a * x + line1.b,
46896
+ };
46897
+ }
46898
+
46899
+ function translatePoint(pt, dist, heading) {
46900
+ return {
46901
+ x: pt.x + dist * Math.cos(heading),
46902
+ y: pt.y + dist * Math.sin(heading),
46903
+ };
46904
+ }
46905
+
46906
+ var PolylineOffset = {
46907
+ offsetPointLine: function(points, distance) {
46908
+ var offsetSegments = [];
46909
+
46910
+ forEachPair(points, L.bind(function(a, b) {
46911
+ if (a.x === b.x && a.y === b.y) { return; }
46912
+
46913
+ // angles in (-PI, PI]
46914
+ var segmentAngle = Math.atan2(a.y - b.y, a.x - b.x);
46915
+ var offsetAngle = segmentAngle - Math.PI/2;
46916
+
46917
+ offsetSegments.push({
46918
+ offsetAngle: offsetAngle,
46919
+ original: [a, b],
46920
+ offset: [
46921
+ translatePoint(a, distance, offsetAngle),
46922
+ translatePoint(b, distance, offsetAngle)
46923
+ ]
46924
+ });
46925
+ }, this));
46926
+
46927
+ return offsetSegments;
46928
+ },
46929
+
46930
+ offsetPoints: function(pts, offset) {
46931
+ var offsetSegments = this.offsetPointLine(pts, offset);
46932
+ return this.joinLineSegments(offsetSegments, offset);
46933
+ },
46934
+
46935
+ /**
46936
+ Join 2 line segments defined by 2 points each with a circular arc
46937
+ */
46938
+ joinSegments: function(s1, s2, offset) {
46939
+ // TODO: different join styles
46940
+ return this.circularArc(s1, s2, offset)
46941
+ .filter(function(x) { return x; })
46942
+ },
46943
+
46944
+ joinLineSegments: function(segments, offset) {
46945
+ var joinedPoints = [];
46946
+ var first = segments[0];
46947
+ var last = segments[segments.length - 1];
46948
+
46949
+ if (first && last) {
46950
+ joinedPoints.push(first.offset[0]);
46951
+ forEachPair(segments, L.bind(function(s1, s2) {
46952
+ joinedPoints = joinedPoints.concat(this.joinSegments(s1, s2, offset));
46953
+ }, this));
46954
+ joinedPoints.push(last.offset[1]);
46955
+ }
46956
+
46957
+ return joinedPoints;
46958
+ },
46959
+
46960
+ segmentAsVector: function(s) {
46961
+ return {
46962
+ x: s[1].x - s[0].x,
46963
+ y: s[1].y - s[0].y,
46964
+ };
46965
+ },
46966
+
46967
+ getSignedAngle: function(s1, s2) {
46968
+ const a = this.segmentAsVector(s1);
46969
+ const b = this.segmentAsVector(s2);
46970
+ return Math.atan2(a.x * b.y - a.y * b.x, a.x * b.x + a.y * b.y);
46971
+ },
46972
+
46973
+ /**
46974
+ Interpolates points between two offset segments in a circular form
46975
+ */
46976
+ circularArc: function(s1, s2, distance) {
46977
+ // if the segments are the same angle,
46978
+ // there should be a single join point
46979
+ if (s1.offsetAngle === s2.offsetAngle) {
46980
+ return [s1.offset[1]];
46981
+ }
46982
+
46983
+ const signedAngle = this.getSignedAngle(s1.offset, s2.offset);
46984
+ // for inner angles, just find the offset segments intersection
46985
+ if ((signedAngle * distance > 0) &&
46986
+ (signedAngle * this.getSignedAngle(s1.offset, [s1.offset[0], s2.offset[1]]) > 0)) {
46987
+ return [intersection(s1.offset[0], s1.offset[1], s2.offset[0], s2.offset[1])];
46988
+ }
46989
+
46990
+ // draws a circular arc with R = offset distance, C = original meeting point
46991
+ var points = [];
46992
+ var center = s1.original[1];
46993
+ // ensure angles go in the anti-clockwise direction
46994
+ var rightOffset = distance > 0;
46995
+ var startAngle = rightOffset ? s2.offsetAngle : s1.offsetAngle;
46996
+ var endAngle = rightOffset ? s1.offsetAngle : s2.offsetAngle;
46997
+ // and that the end angle is bigger than the start angle
46998
+ if (endAngle < startAngle) {
46999
+ endAngle += Math.PI * 2;
47000
+ }
47001
+ var step = Math.PI / 8;
47002
+ for (var alpha = startAngle; alpha < endAngle; alpha += step) {
47003
+ points.push(translatePoint(center, distance, alpha));
47004
+ }
47005
+ points.push(translatePoint(center, distance, endAngle));
47006
+
47007
+ return rightOffset ? points.reverse() : points;
47008
+ }
47009
+ };
47010
+
47011
+ // Modify the L.Polyline class by overwriting the projection function
47012
+ L.Polyline.include({
47013
+ _projectLatlngs: function (latlngs, result, projectedBounds) {
47014
+ var isFlat = latlngs.length > 0 && latlngs[0] instanceof L.LatLng;
47015
+
47016
+ if (isFlat) {
47017
+ var ring = latlngs.map(L.bind(function(ll) {
47018
+ var point = this._map.latLngToLayerPoint(ll);
47019
+ if (projectedBounds) {
47020
+ projectedBounds.extend(point);
47021
+ }
47022
+ return point;
47023
+ }, this));
47024
+
47025
+ // Offset management hack ---
47026
+ if (this.options.offset) {
47027
+ ring = L.PolylineOffset.offsetPoints(ring, this.options.offset);
47028
+ }
47029
+ // Offset management hack END ---
47030
+
47031
+ result.push(ring.map(function (xy) {
47032
+ return L.point(xy.x, xy.y);
47033
+ }));
47034
+ } else {
47035
+ latlngs.forEach(L.bind(function(ll) {
47036
+ this._projectLatlngs(ll, result, projectedBounds);
47037
+ }, this));
47038
+ }
47039
+ }
47040
+ });
47041
+
47042
+ L.Polyline.include({
47043
+ setOffset: function(offset) {
47044
+ this.options.offset = offset;
47045
+ this.redraw();
47046
+ return this;
47047
+ }
47048
+ });
47049
+
47050
+ return PolylineOffset;
47051
+
47052
+ }, window));
47053
+ } (leaflet_polylineoffset$2));
47054
+ return leaflet_polylineoffset$2.exports;
47055
+ }
47056
+
47057
+ var leaflet_polylineoffsetExports = requireLeaflet_polylineoffset();
47058
+ var leaflet_polylineoffset = /*@__PURE__*/getDefaultExportFromCjs(leaflet_polylineoffsetExports);
47059
+
47060
+ var leaflet_polylineoffset$1 = /*#__PURE__*/_mergeNamespaces({
47061
+ __proto__: null,
47062
+ default: leaflet_polylineoffset
47063
+ }, [leaflet_polylineoffsetExports]);
47064
+
47065
+ /**
47066
+ * L.Map.SelectArea - Area selection tool for leaflet
47067
+ *
47068
+ * @author Alexander Milevski <info@w8r.name>
47069
+ * @see https://github.com/w8r/leaflet-area-select
47070
+ * @license MIT
47071
+ * @preserve
47072
+ */
47073
+ var r = function() {
47074
+ return true;
47075
+ };
47076
+ s$3.Map.SelectArea = s$3.Map.BoxZoom.extend({
47077
+ statics: {
47078
+ /**
47079
+ * @static
47080
+ * @type {String}
47081
+ */
47082
+ SELECT_AREA_SELECTED: "selectarea:selected",
47083
+ /**
47084
+ * @static
47085
+ * @type {String}
47086
+ */
47087
+ SELECT_AREA_START: "selectarea:start",
47088
+ /**
47089
+ * @static
47090
+ * @type {String}
47091
+ */
47092
+ SELECT_AREA_TOGGLED: "selectarea:toggled"
47093
+ },
47094
+ options: {
47095
+ shiftKey: false,
47096
+ ctrlKey: true,
47097
+ validate: r,
47098
+ autoDisable: false,
47099
+ cursor: "crosshair"
47100
+ },
47101
+ /**
47102
+ * @param {L.Map} map
47103
+ * @constructor
47104
+ */
47105
+ initialize: function(t, e) {
47106
+ s$3.Util.setOptions(this, e || {}), s$3.Map.BoxZoom.prototype.initialize.call(this, t), this._validate = null, this._moved = false, this._autoDisable = !this.options.ctrlKey && this.options.autoDisable, this._lastLayerPoint = null, this._beforeCursor = null, this.setValidate(this.options.validate), this.setAutoDisable(this.options.autoDisable);
47107
+ },
47108
+ /**
47109
+ * @param {Function=} validate
47110
+ * @return {SelectArea}
47111
+ */
47112
+ setValidate: function(t) {
47113
+ var e = this;
47114
+ return typeof t != "function" && (t = r), this._validate = function(i) {
47115
+ return t.call(e, i);
47116
+ }, this;
47117
+ },
47118
+ /**
47119
+ * @param {Boolean} autoDisable
47120
+ */
47121
+ setAutoDisable: function(t) {
47122
+ this._autoDisable = !!t;
47123
+ },
47124
+ /**
47125
+ * @param {Boolean} on
47126
+ */
47127
+ setControlKey: function(t) {
47128
+ var e = this._enabled;
47129
+ e && this.disable(), this.options.ctrlKey = !!t, t && (this.options.shiftKey = false), e && this.enable();
47130
+ },
47131
+ /**
47132
+ * @param {Boolean} on
47133
+ */
47134
+ setShiftKey: function(t) {
47135
+ var e = this._enabled;
47136
+ e && this.disable(), this.options.shiftKey = !!t, t && (this.options.ctrlKey = false), e && this.enable();
47137
+ },
47138
+ /**
47139
+ * Disable dragging or zoombox
47140
+ * @param {Function=} validate
47141
+ * @param {Boolean=} autoDisable
47142
+ */
47143
+ enable: function(t, e) {
47144
+ this.options.shiftKey ? this._map.boxZoom && this._map.boxZoom.disable() : this.options.ctrlKey || this._map.dragging.disable(), s$3.Map.BoxZoom.prototype.enable.call(this), this.options.ctrlKey || this._setCursor(), t && this.setValidate(t), this.setAutoDisable(e), this._map.fire(s$3.Map.SelectArea.SELECT_AREA_TOGGLED);
47145
+ },
47146
+ /**
47147
+ * Re-enable box zoom or dragging
47148
+ */
47149
+ disable: function() {
47150
+ s$3.Map.BoxZoom.prototype.disable.call(this), this.options.ctrlKey || this._restoreCursor(), this.options.shiftKey ? this._map.boxZoom && this._map.boxZoom.enable() : this._map.dragging.enable(), this._map.fire(s$3.Map.SelectArea.SELECT_AREA_TOGGLED);
47151
+ },
47152
+ /**
47153
+ * Also listen to ESC to cancel interaction
47154
+ * @override
47155
+ */
47156
+ addHooks: function() {
47157
+ s$3.Map.BoxZoom.prototype.addHooks.call(this), s$3.DomEvent.on(document, "keyup", this._onKeyUp, this).on(document, "keydown", this._onKeyPress, this).on(document, "contextmenu", this._onMouseDown, this).on(window, "blur", this._onBlur, this), this._map.on("dragstart", this._onMouseDown, this);
47158
+ },
47159
+ /**
47160
+ * @override
47161
+ */
47162
+ removeHooks: function() {
47163
+ s$3.Map.BoxZoom.prototype.removeHooks.call(this), s$3.DomEvent.off(document, "keyup", this._onKeyUp, this).off(document, "keydown", this._onKeyPress, this).off(document, "contextmenu", this._onMouseDown, this).off(window, "blur", this._onBlur, this), this._map.off("dragstart", this._onMouseDown, this);
47164
+ },
47165
+ /**
47166
+ * @override
47167
+ */
47168
+ _onMouseDown: function(t) {
47169
+ if (this._moved = false, this._lastLayerPoint = null, this.options.shiftKey && !t.shiftKey || this.options.ctrlKey && !t.ctrlKey || t.which !== 1 && t.button !== 1)
47170
+ return false;
47171
+ s$3.DomEvent.stop(t);
47172
+ var e = this._map.mouseEventToLayerPoint(t);
47173
+ if (!this._validate(e)) return false;
47174
+ s$3.DomUtil.disableTextSelection(), s$3.DomUtil.disableImageDrag(), this._startLayerPoint = e, s$3.DomEvent.on(document, "mousemove", this._onMouseMove, this).on(document, "mouseup", this._onMouseUp, this).on(document, "keydown", this._onKeyDown, this);
47175
+ },
47176
+ /**
47177
+ * @override
47178
+ */
47179
+ _onMouseMove: function(t) {
47180
+ this._moved || (this._box = s$3.DomUtil.create("div", "leaflet-zoom-box", this._pane), s$3.DomUtil.setPosition(this._box, this._startLayerPoint), this._map.fire(s$3.Map.SelectArea.SELECT_AREA_START));
47181
+ var e = this._startLayerPoint, i = this._box, o = this._map.mouseEventToLayerPoint(t), a = o.subtract(e);
47182
+ if (this._validate(o)) {
47183
+ this._lastLayerPoint = o;
47184
+ var n = new s$3.Point(
47185
+ Math.min(o.x, e.x),
47186
+ Math.min(o.y, e.y)
47187
+ );
47188
+ s$3.DomUtil.setPosition(i, n), this._moved = true, i.style.width = Math.max(0, Math.abs(a.x) - 4) + "px", i.style.height = Math.max(0, Math.abs(a.y) - 4) + "px";
47189
+ }
47190
+ },
47191
+ /**
47192
+ * General on/off toggle
47193
+ * @param {KeyboardEvent} e
47194
+ */
47195
+ _onKeyUp: function(t) {
47196
+ t.keyCode === 27 ? this._moved && this._box && this._finish() : this.options.ctrlKey && (this._restoreCursor(), this._map.dragging.enable());
47197
+ },
47198
+ /**
47199
+ * Key down listener to enable on ctrl-press
47200
+ * @param {KeyboardEvent} e
47201
+ */
47202
+ _onKeyPress: function(t) {
47203
+ this.options.ctrlKey && (t.ctrlKey || t.type === "dragstart") && this._beforeCursor === null && (this._setCursor(), this._map.dragging._draggable._onUp(t), this._map.dragging.disable());
47204
+ },
47205
+ /**
47206
+ * Window blur listener to restore state
47207
+ * @param {Event} e
47208
+ */
47209
+ _onBlur: function(t) {
47210
+ this._restoreCursor(), this._map.dragging.enable();
47211
+ },
47212
+ /**
47213
+ * Set crosshair cursor
47214
+ */
47215
+ _setCursor: function() {
47216
+ this._beforeCursor = this._container.style.cursor, this._container.style.cursor = this.options.cursor;
47217
+ },
47218
+ /**
47219
+ * Restore status quo cursor
47220
+ */
47221
+ _restoreCursor: function() {
47222
+ this._container.style.cursor = this._beforeCursor, this._beforeCursor = null;
47223
+ },
47224
+ /**
47225
+ * @override
47226
+ */
47227
+ _onMouseUp: function(t) {
47228
+ this._finish();
47229
+ var e = this._map, i = this._lastLayerPoint;
47230
+ if (!(!i || this._startLayerPoint.equals(i))) {
47231
+ s$3.DomEvent.stop(t);
47232
+ var o = e.layerPointToLatLng(this._startLayerPoint), a = e.layerPointToLatLng(i), n = new s$3.LatLngBounds(o, a);
47233
+ this._autoDisable ? this.disable() : this._restoreCursor(), this._moved = false, s$3.Util.requestAnimFrame(function() {
47234
+ e.fire(s$3.Map.SelectArea.SELECT_AREA_SELECTED, {
47235
+ bounds: n,
47236
+ start: o,
47237
+ end: a
47238
+ });
47239
+ });
47240
+ }
47241
+ }
47242
+ });
47243
+ s$3.Map.mergeOptions({
47244
+ selectArea: false
47245
+ });
47246
+ s$3.Map.addInitHook("addHandler", "selectArea", s$3.Map.SelectArea);
47247
+ const l = s$3.Map.SelectArea;
47248
+
47249
+ var index$1 = /*#__PURE__*/Object.freeze({
47250
+ __proto__: null,
47251
+ default: l
47252
+ });
47253
+
47254
+ leafletSrcExports.SVG.include({
47255
+ /**
47256
+ * Reset transform matrix
47257
+ */
47258
+ _resetTransformPath: function(t) {
47259
+ t._path.setAttributeNS(null, "transform", "");
47260
+ },
47261
+ /**
47262
+ * Applies matrix transformation to SVG
47263
+ * @param {L.Path} layer
47264
+ * @param {Array.<Number>} matrix
47265
+ */
47266
+ transformPath: function(t, i) {
47267
+ t._path.setAttributeNS(
47268
+ null,
47269
+ "transform",
47270
+ "matrix(" + i.join(" ") + ")"
47271
+ );
47272
+ }
47273
+ });
47274
+ leafletSrcExports.SVG.include(
47275
+ leafletSrcExports.Browser.vml ? {
47276
+ /**
47277
+ * Reset transform matrix
47278
+ */
47279
+ _resetTransformPath: function(t) {
47280
+ t._skew && (t._skew.on = false, t._path.removeChild(t._skew), t._skew = null);
47281
+ },
47282
+ /**
47283
+ * Applies matrix transformation to VML
47284
+ * @param {L.Path} layer
47285
+ * @param {Array.<Number>} matrix
47286
+ */
47287
+ transformPath: function(t, i) {
47288
+ let n = t._skew;
47289
+ n || (n = leafletSrcExports.SVG.create("skew"), t._path.appendChild(n), n.style.behavior = "url(#default#VML)", t._skew = n);
47290
+ const a = i[0].toFixed(8) + " " + i[1].toFixed(8) + " " + i[2].toFixed(8) + " " + i[3].toFixed(8) + " 0 0", r = Math.floor(i[4]).toFixed() + ", " + Math.floor(i[5]).toFixed(), s = this._path.style;
47291
+ let e = parseFloat(s.left), o = parseFloat(s.top), _ = parseFloat(s.width), p = parseFloat(s.height);
47292
+ isNaN(e) && (e = 0), isNaN(o) && (o = 0), (isNaN(_) || !_) && (_ = 1), (isNaN(p) || !p) && (p = 1);
47293
+ const u = (-e / _ - 0.5).toFixed(8) + " " + (-o / p - 0.5).toFixed(8);
47294
+ n.on = "f", n.matrix = a, n.origin = u, n.offset = r, n.on = true;
47295
+ }
47296
+ } : {}
47297
+ );
47298
+ function E() {
47299
+ return true;
47300
+ }
47301
+ leafletSrcExports.Canvas.include({
47302
+ /**
47303
+ * Do nothing
47304
+ * @param {L.Path} layer
47305
+ */
47306
+ _resetTransformPath: function(t) {
47307
+ this._containerCopy && (delete this._containerCopy, t._containsPoint_ && (t._containsPoint = t._containsPoint_, delete t._containsPoint_, this._requestRedraw(t)));
47308
+ },
47309
+ /**
47310
+ * Algorithm outline:
47311
+ *
47312
+ * 1. pre-transform - clear the path out of the canvas, copy canvas state
47313
+ * 2. at every frame:
47314
+ * 2.1. save
47315
+ * 2.2. redraw the canvas from saved one
47316
+ * 2.3. transform
47317
+ * 2.4. draw path
47318
+ * 2.5. restore
47319
+ * 3. Repeat
47320
+ *
47321
+ * @param {L.Path} layer
47322
+ * @param {Array.<Number>} matrix
47323
+ */
47324
+ transformPath: function(t, i) {
47325
+ let n = this._containerCopy;
47326
+ const a = this._ctx;
47327
+ let r;
47328
+ const s = leafletSrcExports.Browser.retina ? 2 : 1, e = this._bounds, o = e.getSize(), _ = e.min;
47329
+ n || (n = this._containerCopy = document.createElement("canvas"), r = n.getContext("2d"), n.width = s * o.x, n.height = s * o.y, this._removePath(t), this._redraw(), r.translate(s * e.min.x, s * e.min.y), r.drawImage(this._container, 0, 0), this._initPath(t), t._containsPoint_ = t._containsPoint, t._containsPoint = E), a.save(), a.clearRect(_.x, _.y, o.x * s, o.y * s), a.setTransform(1, 0, 0, 1, 0, 0), a.restore(), a.save(), a.drawImage(this._containerCopy, 0, 0, o.x, o.y), a.transform.apply(a, i), this._drawing = true, t._updatePath(), this._drawing = false, a.restore();
47330
+ }
47331
+ });
47332
+ /**
47333
+ * Leaflet vector features drag functionality
47334
+ * @author Alexander Milevski <info@w8r.name>
47335
+ * @preserve
47336
+ */
47337
+ leafletSrcExports.Path.include({
47338
+ /**
47339
+ * Applies matrix transformation to SVG
47340
+ * @param {Array.<Number>?} matrix
47341
+ */
47342
+ _transform: function(t) {
47343
+ return this._renderer && (t ? this._renderer.transformPath(this, t) : (this._renderer._resetTransformPath(this), this._update())), this;
47344
+ },
47345
+ /**
47346
+ * Check if the feature was dragged, that'll supress the click event
47347
+ * on mouseup. That fixes popups for example
47348
+ *
47349
+ * @param {MouseEvent} e
47350
+ */
47351
+ _onMouseClick: function(t) {
47352
+ this.dragging && this.dragging.moved() || this._map.dragging && this._map.dragging.moved() || this._fireMouseEvent(t);
47353
+ }
47354
+ });
47355
+ const S = {
47356
+ mousedown: "mouseup",
47357
+ touchstart: "touchend",
47358
+ pointerdown: "touchend",
47359
+ MSPointerDown: "touchend"
47360
+ }, M = {
47361
+ mousedown: "mousemove",
47362
+ touchstart: "touchmove",
47363
+ pointerdown: "touchmove",
47364
+ MSPointerDown: "touchmove"
47365
+ };
47366
+ function k(t, i) {
47367
+ const n = t.x - i.x, a = t.y - i.y;
47368
+ return Math.sqrt(n * n + a * a);
47369
+ }
47370
+ leafletSrcExports.Handler.PathDrag = leafletSrcExports.Handler.extend(
47371
+ /** @lends L.Path.Drag.prototype */
47372
+ {
47373
+ statics: {
47374
+ DRAGGING_CLS: "leaflet-path-draggable"
47375
+ },
47376
+ /**
47377
+ * @param {L.Path} path
47378
+ * @constructor
47379
+ */
47380
+ initialize: function(t) {
47381
+ this._path = t, this._matrix = null, this._startPoint = null, this._dragStartPoint = null, this._mapDraggingWasEnabled = false, this._path._dragMoved = false;
47382
+ },
47383
+ /**
47384
+ * Enable dragging
47385
+ */
47386
+ addHooks: function() {
47387
+ this._path.on("mousedown", this._onDragStart, this), this._path.options.className = this._path.options.className ? this._path.options.className + " " + leafletSrcExports.Handler.PathDrag.DRAGGING_CLS : leafletSrcExports.Handler.PathDrag.DRAGGING_CLS, this._path._path && leafletSrcExports.DomUtil.addClass(this._path._path, leafletSrcExports.Handler.PathDrag.DRAGGING_CLS);
47388
+ },
47389
+ /**
47390
+ * Disable dragging
47391
+ */
47392
+ removeHooks: function() {
47393
+ this._path.off("mousedown", this._onDragStart, this), this._path.options.className = this._path.options.className.replace(
47394
+ new RegExp("\\s+" + leafletSrcExports.Handler.PathDrag.DRAGGING_CLS),
47395
+ ""
47396
+ ), this._path._path && leafletSrcExports.DomUtil.removeClass(this._path._path, leafletSrcExports.Handler.PathDrag.DRAGGING_CLS);
47397
+ },
47398
+ /**
47399
+ * @return {Boolean}
47400
+ */
47401
+ moved: function() {
47402
+ return this._path._dragMoved;
47403
+ },
47404
+ /**
47405
+ * Start drag
47406
+ * @param {L.MouseEvent} evt
47407
+ */
47408
+ _onDragStart: function(t) {
47409
+ const i = t.originalEvent._simulated ? "touchstart" : t.originalEvent.type;
47410
+ this._mapDraggingWasEnabled = false, this._startPoint = t.containerPoint.clone(), this._dragStartPoint = t.containerPoint.clone(), this._matrix = [1, 0, 0, 1, 0, 0], leafletSrcExports.DomEvent.stop(t.originalEvent), leafletSrcExports.DomUtil.addClass(this._path._renderer._container, "leaflet-interactive"), leafletSrcExports.DomEvent.on(document, M[i], this._onDrag, this).on(
47411
+ document,
47412
+ S[i],
47413
+ this._onDragEnd,
47414
+ this
47415
+ ), this._path._map.dragging.enabled() && (this._path._map.dragging.disable(), this._mapDraggingWasEnabled = true), this._path._dragMoved = false, this._path._popup && this._path._popup.close(), this._replaceCoordGetters(t);
47416
+ },
47417
+ /**
47418
+ * Dragging
47419
+ * @param {L.MouseEvent} evt
47420
+ */
47421
+ _onDrag: function(t) {
47422
+ leafletSrcExports.DomEvent.stop(t);
47423
+ const i = t.touches && t.touches.length >= 1 ? t.touches[0] : t, n = this._path._map.mouseEventToContainerPoint(i);
47424
+ if (t.type === "touchmove" && !this._path._dragMoved && this._dragStartPoint.distanceTo(n) <= this._path._map.options.tapTolerance)
47425
+ return;
47426
+ const a = n.x, r = n.y, s = a - this._startPoint.x, e = r - this._startPoint.y;
47427
+ (s || e) && (this._path._dragMoved || (this._path._dragMoved = true, this._path.options.interactive = false, this._path._map.dragging._draggable._moved = true, this._path.fire("dragstart", t), this._path.bringToFront()), this._matrix[4] += s, this._matrix[5] += e, this._startPoint.x = a, this._startPoint.y = r, this._path.fire("predrag", t), this._path._transform(this._matrix), this._path.fire("drag", t));
47428
+ },
47429
+ /**
47430
+ * Dragging stopped, apply
47431
+ * @param {L.MouseEvent} evt
47432
+ */
47433
+ _onDragEnd: function(t) {
47434
+ const i = this._path._map.mouseEventToContainerPoint(t), n = this.moved();
47435
+ if (n && (this._transformPoints(this._matrix), this._path._updatePath(), this._path._project(), this._path._transform(null), leafletSrcExports.DomEvent.stop(t)), leafletSrcExports.DomEvent.off(document, "mousemove touchmove", this._onDrag, this), leafletSrcExports.DomEvent.off(document, "mouseup touchend", this._onDragEnd, this), this._restoreCoordGetters(), n) {
47436
+ this._path.fire("dragend", {
47437
+ distance: k(this._dragStartPoint, i)
47438
+ });
47439
+ const a = this._path._containsPoint;
47440
+ this._path._containsPoint = leafletSrcExports.Util.falseFn, leafletSrcExports.Util.requestAnimFrame(function() {
47441
+ this._path._dragMoved = false, this._path.options.interactive = true, this._path._containsPoint = a;
47442
+ }, this);
47443
+ }
47444
+ this._mapDraggingWasEnabled && this._path._map.dragging.enable();
47445
+ },
47446
+ /**
47447
+ * Applies transformation, does it in one sweep for performance,
47448
+ * so don't be surprised about the code repetition.
47449
+ *
47450
+ * [ x ] [ a b tx ] [ x ] [ a * x + b * y + tx ]
47451
+ * [ y ] = [ c d ty ] [ y ] = [ c * x + d * y + ty ]
47452
+ *
47453
+ * @param {Array.<Number>} matrix
47454
+ */
47455
+ _transformPoints: function(t, i) {
47456
+ const n = this._path, a = L.point(t[4], t[5]), r = n._map.options.crs, s = r.transformation, e = r.scale(n._map.getZoom()), o = r.projection, _ = s.untransform(a, e).subtract(s.untransform(leafletSrcExports.point(0, 0), e)), p = !i;
47457
+ if (n._bounds = new leafletSrcExports.LatLngBounds(), n._point)
47458
+ i = o.unproject(
47459
+ o.project(n._latlng)._add(_)
47460
+ ), p && (n._latlng = i, n._point._add(a));
47461
+ else if (n._rings || n._parts) {
47462
+ const u = n._rings || n._parts;
47463
+ let c = n._latlngs;
47464
+ i = i || c, leafletSrcExports.Util.isArray(c[0]) || (c = [c], i = [i]);
47465
+ for (let g = 0, w = u.length; g < w; g++) {
47466
+ i[g] = i[g] || [];
47467
+ for (let d = 0, v = u[g].length; d < v; d++) {
47468
+ const b = c[g][d];
47469
+ i[g][d] = o.unproject(
47470
+ o.project(b)._add(_)
47471
+ ), p && (n._bounds.extend(c[g][d]), u[g][d]._add(a));
47472
+ }
47473
+ }
47474
+ }
47475
+ return i;
47476
+ },
47477
+ /**
47478
+ * If you want to read the latlngs during the drag - your right,
47479
+ * but they have to be transformed
47480
+ */
47481
+ _replaceCoordGetters: function() {
47482
+ this._path.getLatLng ? (this._path.getLatLng_ = this._path.getLatLng, this._path.getLatLng = leafletSrcExports.Util.bind(function() {
47483
+ return this.dragging._transformPoints(this.dragging._matrix, {});
47484
+ }, this._path)) : this._path.getLatLngs && (this._path.getLatLngs_ = this._path.getLatLngs, this._path.getLatLngs = leafletSrcExports.Util.bind(function() {
47485
+ return this.dragging._transformPoints(this.dragging._matrix, []);
47486
+ }, this._path));
47487
+ },
47488
+ /**
47489
+ * Put back the getters
47490
+ */
47491
+ _restoreCoordGetters: function() {
47492
+ this._path.getLatLng_ ? (this._path.getLatLng = this._path.getLatLng_, delete this._path.getLatLng_) : this._path.getLatLngs_ && (this._path.getLatLngs = this._path.getLatLngs_, delete this._path.getLatLngs_);
47493
+ }
47494
+ }
47495
+ );
47496
+ leafletSrcExports.Handler.PathDrag.makeDraggable = function(t) {
47497
+ return t.dragging = new leafletSrcExports.Handler.PathDrag(t), t;
47498
+ };
47499
+ leafletSrcExports.Path.prototype.makeDraggable = function() {
47500
+ return leafletSrcExports.Handler.PathDrag.makeDraggable(this);
47501
+ };
47502
+ leafletSrcExports.Path.addInitHook(function() {
47503
+ this.options.draggable ? (this.options.interactive = true, this.dragging ? this.dragging.enable() : (leafletSrcExports.Handler.PathDrag.makeDraggable(this), this.dragging.enable())) : this.dragging && this.dragging.disable();
47504
+ });
47505
+ const T = leafletSrcExports.Handler.PathDrag;
47506
+
47507
+ var index = /*#__PURE__*/Object.freeze({
47508
+ __proto__: null,
47509
+ default: T
47510
+ });
47511
+
47512
+ var leafletArrows$2 = {exports: {}};
47513
+
47514
+ var hasRequiredLeafletArrows;
47515
+
47516
+ function requireLeafletArrows () {
47517
+ if (hasRequiredLeafletArrows) return leafletArrows$2.exports;
47518
+ hasRequiredLeafletArrows = 1;
47519
+ (function (module, exports$1) {
47520
+ // Leaflet Arrows by Meteotest
47521
+ // https://github.com/meteotest/leaflet-arrows
47522
+ // Module Loader Boilerplate
47523
+ (function (factory, window) {
47524
+ // define an AMD module that relies on 'leaflet'
47525
+ {
47526
+ module.exports = factory(requireLeafletSrc());
47527
+ }
47528
+ // attach your plugin to the global 'L' variable
47529
+ if (typeof window !== 'undefined' && window.L) {
47530
+ window.L.Arrow = factory(L);
47531
+ }
47532
+ })(function (L) {
47533
+ // beware! the arrow factory
47534
+ const Arrow = L.FeatureGroup.extend({
47535
+ options: {
47536
+ distanceUnit: 'km', // can be [px,km]
47537
+ stretchFactor: 1, // should the distance be stretched?
47538
+ arrowheadLength: 4, // in distance unit
47539
+ arrowheadClosingLine: false, // should a closing third line be drawn?
47540
+ arrowheadDegree: 155, // degree of arrowhead
47541
+ clickableWidth: 10, // defines the width in pixels of the "phantom" path to capture click events on a line
47542
+ //optional: popupContent: function(data) {},
47543
+ // add your own custom validator, probably not needed...
47544
+ // the validator gets the bound data object as argument
47545
+ validator: function (data) {
47546
+ return (typeof data.latlng !== 'undefined' &&
47547
+ typeof data.distance !== 'undefined' &&
47548
+ !isNaN(data.distance));
47549
+ }, // validator is a callback function that takes the data object of the current point and returns whether it is 'valid'. Invalid arrows will be drawn gray
47550
+ colorScheme: function () {
47551
+ return this.color;
47552
+ }, // add own colorscheme callback
47553
+ circleRadiusInvalidPoint: 1000, // Radius of the circle to display missing or '0'-value
47554
+ // path options
47555
+ color: '#333',
47556
+ opacity: 0.9, // stroke opacity
47557
+ fillOpacity: 0.9,
47558
+ weight: 4, // the width of the arrow
47559
+ smoothFactor: 0,
47560
+ radius: 5, // default radius, when distance is 0
47561
+ defaultPointOptions: {
47562
+ stroke: false,
47563
+ fillOpacity: 0.8,
47564
+ fillColor: '#111',
47565
+ radius: 7,
47566
+ },
47567
+ invalidPointOptions: {
47568
+ stroke: false,
47569
+ fillOpacity: 0.8,
47570
+ fillColor: 'red',
47571
+ radius: 7,
47572
+ },
47573
+ drawSourceMarker: false,
47574
+ sourceMarkerOptions: {
47575
+ stroke: false,
47576
+ fillOpacity: 1,
47577
+ fillColor: '#333',
47578
+ radius: 5,
47579
+ },
47580
+ },
47581
+ /**
47582
+ * The data opject needs at least following properties:
47583
+ * - latlng : L.LatLng
47584
+ * - degree : float
47585
+ * - distance: float
47586
+ */
47587
+ initialize: function (data, options) {
47588
+ L.Util.setOptions(this, options);
47589
+ this.setData(data);
47590
+ },
47591
+ onAdd: function (map) {
47592
+ this._map = map;
47593
+ this.redraw();
47594
+ // add a viewreset event listener for updating layer's position
47595
+ map.on('viewreset', this._reset, this);
47596
+ },
47597
+ onRemove: function () {
47598
+ // remove layer's DOM elements and listeners
47599
+ for (const i in this._layers) {
47600
+ if (this._layers.hasOwnProperty(i)) {
47601
+ this._map.removeLayer(this._layers[i]);
47602
+ }
47603
+ }
47604
+ if (typeof this._sourceMarker !== 'undefined') {
47605
+ this._map.removeLayer(this._sourceMarker);
47606
+ }
47607
+ this._map.off('viewreset', this._reset, this);
47608
+ },
47609
+ // draw
47610
+ redraw: function () {
47611
+ // only draw when on map
47612
+ if (!this._map) {
47613
+ return;
47614
+ }
47615
+ this._layers = {};
47616
+ // bind popup to the whole feature group
47617
+ if (typeof this.options.popupContent === 'function') {
47618
+ this.bindPopup(this.options.popupContent(this._data));
47619
+ }
47620
+ if (this._data.valid && typeof this.options.colorScheme === 'function') {
47621
+ this.options.color = this.options.colorScheme(this._data);
47622
+ }
47623
+ this._data.distance = parseFloat(this._data.distance);
47624
+ // if distance or degree is falsy/Zero then draw a point instead of an arrow
47625
+ if (!this._data.valid || !this._data.distance || !this._data.angle) {
47626
+ let circle;
47627
+ const pathOptions = this._data.valid
47628
+ ? this.options.defaultPointOptions
47629
+ : this.options.invalidPointOptions;
47630
+ if (this.options.distanceUnit.toLowerCase() === 'km') {
47631
+ // use a tenth of the supplied radius (usally used in the circlemarker)
47632
+ circle = L.circle(this._data.latlng, this.options.radius / 10, pathOptions);
47633
+ }
47634
+ else {
47635
+ circle = L.circleMarker(this._data.latlng, pathOptions);
47636
+ }
47637
+ this.addLayer(circle);
47638
+ }
47639
+ else {
47640
+ const theLine = [
47641
+ this._data.latlng,
47642
+ this._calculateEndPoint(this._data.latlng, this._data.distance, this._data.angle),
47643
+ ];
47644
+ const theArrow = this._calculateArrowArray(theLine[1]);
47645
+ const backgroundPathOption = L.Util.setOptions({}, this.pathOptions);
47646
+ backgroundPathOption.opacity = 0;
47647
+ backgroundPathOption.weight = this.options.clickableWidth;
47648
+ const invisibleBackgroundPolyline = new L.Polyline([theLine, theArrow], backgroundPathOption);
47649
+ const polyline = new L.Polyline([theLine, theArrow], this.options);
47650
+ this.addLayer(invisibleBackgroundPolyline);
47651
+ this.addLayer(polyline);
47652
+ // that special case, where a circle has to be drawn on the source of the arrow
47653
+ if (this.options.drawSourceMarker) {
47654
+ if (typeof this._sourceMarker === 'undefined') {
47655
+ // use the same coloar as the arrow does
47656
+ this.options.sourceMarkerOptions.fillColor = this.color;
47657
+ this._sourceMarker = L.circleMarker(this._data.latlng, this.options.sourceMarkerOptions);
47658
+ }
47659
+ else {
47660
+ // there is a chance, that the latlng values have been changed by the setData-function
47661
+ this._sourceMarker.setLatLng(this._data.latlng);
47662
+ }
47663
+ }
47664
+ }
47665
+ },
47666
+ // custom methods
47667
+ // just change the angle of the arrow
47668
+ setAngle: function (angle) {
47669
+ if (isNaN(angle)) {
47670
+ this._data.angle = 0; // undefined direction.
47671
+ }
47672
+ else {
47673
+ if (this.options.isWindDegree) {
47674
+ this._data.angle = angle - 180;
47675
+ if (this.options.distanceUnit.toLowerCase() === 'px') {
47676
+ this._data.angle -= 90;
47677
+ }
47678
+ }
47679
+ else {
47680
+ this._data.angle = angle;
47681
+ }
47682
+ }
47683
+ this.redraw();
47684
+ },
47685
+ // just change the length of the arrow
47686
+ setDistance: function (distance) {
47687
+ if (isNaN(distance)) {
47688
+ this._data.distance = 0;
47689
+ }
47690
+ else {
47691
+ this._data.distance = parseFloat(distance);
47692
+ }
47693
+ this.redraw();
47694
+ },
47695
+ // use this method to update the whole dataset that corresponds to the arrow
47696
+ setData: function (data) {
47697
+ this._data = data;
47698
+ if (this.options.validator(this._data)) {
47699
+ this._data.valid = true;
47700
+ this.setAngle(data.degree);
47701
+ }
47702
+ else {
47703
+ this._data.valid = false;
47704
+ this._data.distance = NaN;
47705
+ this._data.degree = NaN;
47706
+ }
47707
+ },
47708
+ // private methods
47709
+ // When using Screen Pixels as unit, the arrows have to be
47710
+ // recalculated after the zoom level has changed
47711
+ _reset: function () {
47712
+ if (this.options.distanceUnit.toLowerCase() === 'px') {
47713
+ this.redraw();
47714
+ }
47715
+ },
47716
+ _calculateEndPoint: function (latlng, dist, degree) {
47717
+ /*
47718
+ * http://www.codeguru.com/cpp/cpp/algorithms/article.php/c5115/Geographic-Distance-and-Azimuth-Calculations.htm
47719
+ */
47720
+ // don't use this._data here.
47721
+ // this function is also used to find the points of the arrow
47722
+ let distance = dist * this.options.stretchFactor, d2r = Math.PI / 180, // degree 2 radius
47723
+ r2d = 180 / Math.PI;
47724
+ if (this.options.distanceUnit.toLowerCase() === 'km') {
47725
+ const R = 6378.137, // earth radius in kmeters
47726
+ bearing = degree * d2r;
47727
+ distance = distance / R;
47728
+ const a = Math.acos(Math.cos(distance) * Math.cos((90 - latlng.lat) * d2r) +
47729
+ Math.sin((90 - latlng.lat) * d2r) *
47730
+ Math.sin(distance) *
47731
+ Math.cos(bearing));
47732
+ const B = Math.asin((Math.sin(distance) * Math.sin(bearing)) / Math.sin(a));
47733
+ return new L.LatLng(90 - a * r2d, B * r2d + latlng.lng);
47734
+ }
47735
+ else if (this.options.distanceUnit.toLowerCase() === 'px') {
47736
+ const sourcePoint = this._map.latLngToLayerPoint(latlng);
47737
+ const rad = degree * d2r;
47738
+ const vector = L.point(Math.cos(rad) * distance, Math.sin(rad) * distance);
47739
+ const targetPoint = sourcePoint.add(vector);
47740
+ return this._map.layerPointToLatLng(targetPoint);
47741
+ }
47742
+ else {
47743
+ throw Error('calculate end point undefined for distanceUnit: ' +
47744
+ this.options.distanceUnit);
47745
+ }
47746
+ },
47747
+ _calculateArrowArray: function (latlng) {
47748
+ // calculates the Array for the arrow
47749
+ // latlng is the position, where the arrow is added
47750
+ const degree = this._data.angle;
47751
+ if (latlng.length !== undefined) {
47752
+ latlng = new L.LatLng(latlng);
47753
+ }
47754
+ const firstEdge = this._calculateEndPoint(latlng, this.options.arrowheadLength, degree - this.options.arrowheadDegree);
47755
+ const arr = [
47756
+ firstEdge,
47757
+ latlng,
47758
+ this._calculateEndPoint(latlng, this.options.arrowheadLength, degree + this.options.arrowheadDegree),
47759
+ ];
47760
+ if (this.options.arrowheadClosingLine) {
47761
+ arr.push(firstEdge);
47762
+ }
47763
+ return arr;
47764
+ },
47765
+ });
47766
+ return Arrow;
47767
+ }, window);
47768
+
47769
+ } (leafletArrows$2));
47770
+ return leafletArrows$2.exports;
47771
+ }
47772
+
47773
+ var leafletArrowsExports = requireLeafletArrows();
47774
+ var leafletArrows = /*@__PURE__*/getDefaultExportFromCjs(leafletArrowsExports);
47775
+
47776
+ var leafletArrows$1 = /*#__PURE__*/_mergeNamespaces({
47777
+ __proto__: null,
47778
+ default: leafletArrows
47779
+ }, [leafletArrowsExports]);
47780
+
46981
47781
  exports.Accordion = Accordion;
46982
47782
  exports.AlertDialog = alertDialog;
46983
47783
  exports.AlertStore = AlertStore;
@@ -47092,7 +47892,6 @@ exports.trafficSignalConfig = trafficSignalConfig;
47092
47892
  exports.trafficSigns = trafficSigns;
47093
47893
  exports.trafficSignsDop = trafficSignsDop;
47094
47894
  exports.useFormContext = useFormContext;
47095
- exports.useGetLeafletLayer = useGetLeafletLayer;
47096
47895
  exports.useGetUser = useGetUser;
47097
47896
  exports.useLazyGetUser = useLazyGetUser;
47098
47897
  exports.useShowErrorSnackbar = useShowErrorSnackbar;