@neshan-maps-platform/react-openlayers 2.0.16 → 3.0.1

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.
@@ -0,0 +1,1050 @@
1
+ import qe, { forwardRef as wt, useRef as Ge, useState as We, useImperativeHandle as Pt, useEffect as xt } from "react";
2
+ import { Map as Tt, View as St } from "@neshan-maps-platform/ol";
3
+ var de = { exports: {} }, Y = {};
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var Ne;
14
+ function Ct() {
15
+ if (Ne)
16
+ return Y;
17
+ Ne = 1;
18
+ var a = qe, r = Symbol.for("react.element"), o = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, f = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function j(x, p, C) {
20
+ var y, w = {}, b = null, P = null;
21
+ C !== void 0 && (b = "" + C), p.key !== void 0 && (b = "" + p.key), p.ref !== void 0 && (P = p.ref);
22
+ for (y in p)
23
+ u.call(p, y) && !_.hasOwnProperty(y) && (w[y] = p[y]);
24
+ if (x && x.defaultProps)
25
+ for (y in p = x.defaultProps, p)
26
+ w[y] === void 0 && (w[y] = p[y]);
27
+ return { $$typeof: r, type: x, key: b, ref: P, props: w, _owner: f.current };
28
+ }
29
+ return Y.Fragment = o, Y.jsx = j, Y.jsxs = j, Y;
30
+ }
31
+ var L = {};
32
+ /**
33
+ * @license React
34
+ * react-jsx-runtime.development.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */
41
+ var Ue;
42
+ function Ot() {
43
+ return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var a = qe, r = Symbol.for("react.element"), o = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), x = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), G = Symbol.iterator, ee = "@@iterator";
45
+ function W(e) {
46
+ if (e === null || typeof e != "object")
47
+ return null;
48
+ var t = G && e[G] || e[ee];
49
+ return typeof t == "function" ? t : null;
50
+ }
51
+ var O = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ function m(e) {
53
+ {
54
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
55
+ n[i - 1] = arguments[i];
56
+ te("error", e, n);
57
+ }
58
+ }
59
+ function te(e, t, n) {
60
+ {
61
+ var i = O.ReactDebugCurrentFrame, c = i.getStackAddendum();
62
+ c !== "" && (t += "%s", n = n.concat([c]));
63
+ var d = n.map(function(s) {
64
+ return String(s);
65
+ });
66
+ d.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, d);
67
+ }
68
+ }
69
+ var re = !1, ne = !1, g = !1, z = !1, B = !1, ve;
70
+ ve = Symbol.for("react.module.reference");
71
+ function He(e) {
72
+ return !!(typeof e == "string" || typeof e == "function" || e === u || e === _ || B || e === f || e === C || e === y || z || e === P || re || ne || g || typeof e == "object" && e !== null && (e.$$typeof === b || e.$$typeof === w || e.$$typeof === j || e.$$typeof === x || e.$$typeof === p || // This needs to include all possible module reference object
73
+ // types supported by any Flight configuration anywhere since
74
+ // we don't know which Flight build this will end up being used
75
+ // with.
76
+ e.$$typeof === ve || e.getModuleId !== void 0));
77
+ }
78
+ function Ke(e, t, n) {
79
+ var i = e.displayName;
80
+ if (i)
81
+ return i;
82
+ var c = t.displayName || t.name || "";
83
+ return c !== "" ? n + "(" + c + ")" : n;
84
+ }
85
+ function ge(e) {
86
+ return e.displayName || "Context";
87
+ }
88
+ function T(e) {
89
+ if (e == null)
90
+ return null;
91
+ if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
92
+ return e.displayName || e.name || null;
93
+ if (typeof e == "string")
94
+ return e;
95
+ switch (e) {
96
+ case u:
97
+ return "Fragment";
98
+ case o:
99
+ return "Portal";
100
+ case _:
101
+ return "Profiler";
102
+ case f:
103
+ return "StrictMode";
104
+ case C:
105
+ return "Suspense";
106
+ case y:
107
+ return "SuspenseList";
108
+ }
109
+ if (typeof e == "object")
110
+ switch (e.$$typeof) {
111
+ case x:
112
+ var t = e;
113
+ return ge(t) + ".Consumer";
114
+ case j:
115
+ var n = e;
116
+ return ge(n._context) + ".Provider";
117
+ case p:
118
+ return Ke(e, e.render, "ForwardRef");
119
+ case w:
120
+ var i = e.displayName || null;
121
+ return i !== null ? i : T(e.type) || "Memo";
122
+ case b: {
123
+ var c = e, d = c._payload, s = c._init;
124
+ try {
125
+ return T(s(d));
126
+ } catch {
127
+ return null;
128
+ }
129
+ }
130
+ }
131
+ return null;
132
+ }
133
+ var F = Object.assign, N = 0, he, pe, me, ye, Ee, be, Re;
134
+ function we() {
135
+ }
136
+ we.__reactDisabledLog = !0;
137
+ function Ze() {
138
+ {
139
+ if (N === 0) {
140
+ he = console.log, pe = console.info, me = console.warn, ye = console.error, Ee = console.group, be = console.groupCollapsed, Re = console.groupEnd;
141
+ var e = {
142
+ configurable: !0,
143
+ enumerable: !0,
144
+ value: we,
145
+ writable: !0
146
+ };
147
+ Object.defineProperties(console, {
148
+ info: e,
149
+ log: e,
150
+ warn: e,
151
+ error: e,
152
+ group: e,
153
+ groupCollapsed: e,
154
+ groupEnd: e
155
+ });
156
+ }
157
+ N++;
158
+ }
159
+ }
160
+ function Qe() {
161
+ {
162
+ if (N--, N === 0) {
163
+ var e = {
164
+ configurable: !0,
165
+ enumerable: !0,
166
+ writable: !0
167
+ };
168
+ Object.defineProperties(console, {
169
+ log: F({}, e, {
170
+ value: he
171
+ }),
172
+ info: F({}, e, {
173
+ value: pe
174
+ }),
175
+ warn: F({}, e, {
176
+ value: me
177
+ }),
178
+ error: F({}, e, {
179
+ value: ye
180
+ }),
181
+ group: F({}, e, {
182
+ value: Ee
183
+ }),
184
+ groupCollapsed: F({}, e, {
185
+ value: be
186
+ }),
187
+ groupEnd: F({}, e, {
188
+ value: Re
189
+ })
190
+ });
191
+ }
192
+ N < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
+ }
194
+ }
195
+ var ae = O.ReactCurrentDispatcher, oe;
196
+ function q(e, t, n) {
197
+ {
198
+ if (oe === void 0)
199
+ try {
200
+ throw Error();
201
+ } catch (c) {
202
+ var i = c.stack.trim().match(/\n( *(at )?)/);
203
+ oe = i && i[1] || "";
204
+ }
205
+ return `
206
+ ` + oe + e;
207
+ }
208
+ }
209
+ var ie = !1, X;
210
+ {
211
+ var et = typeof WeakMap == "function" ? WeakMap : Map;
212
+ X = new et();
213
+ }
214
+ function Pe(e, t) {
215
+ if (!e || ie)
216
+ return "";
217
+ {
218
+ var n = X.get(e);
219
+ if (n !== void 0)
220
+ return n;
221
+ }
222
+ var i;
223
+ ie = !0;
224
+ var c = Error.prepareStackTrace;
225
+ Error.prepareStackTrace = void 0;
226
+ var d;
227
+ d = ae.current, ae.current = null, Ze();
228
+ try {
229
+ if (t) {
230
+ var s = function() {
231
+ throw Error();
232
+ };
233
+ if (Object.defineProperty(s.prototype, "props", {
234
+ set: function() {
235
+ throw Error();
236
+ }
237
+ }), typeof Reflect == "object" && Reflect.construct) {
238
+ try {
239
+ Reflect.construct(s, []);
240
+ } catch (S) {
241
+ i = S;
242
+ }
243
+ Reflect.construct(e, [], s);
244
+ } else {
245
+ try {
246
+ s.call();
247
+ } catch (S) {
248
+ i = S;
249
+ }
250
+ e.call(s.prototype);
251
+ }
252
+ } else {
253
+ try {
254
+ throw Error();
255
+ } catch (S) {
256
+ i = S;
257
+ }
258
+ e();
259
+ }
260
+ } catch (S) {
261
+ if (S && i && typeof S.stack == "string") {
262
+ for (var l = S.stack.split(`
263
+ `), E = i.stack.split(`
264
+ `), v = l.length - 1, h = E.length - 1; v >= 1 && h >= 0 && l[v] !== E[h]; )
265
+ h--;
266
+ for (; v >= 1 && h >= 0; v--, h--)
267
+ if (l[v] !== E[h]) {
268
+ if (v !== 1 || h !== 1)
269
+ do
270
+ if (v--, h--, h < 0 || l[v] !== E[h]) {
271
+ var R = `
272
+ ` + l[v].replace(" at new ", " at ");
273
+ return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, R), R;
274
+ }
275
+ while (v >= 1 && h >= 0);
276
+ break;
277
+ }
278
+ }
279
+ } finally {
280
+ ie = !1, ae.current = d, Qe(), Error.prepareStackTrace = c;
281
+ }
282
+ var A = e ? e.displayName || e.name : "", Me = A ? q(A) : "";
283
+ return typeof e == "function" && X.set(e, Me), Me;
284
+ }
285
+ function tt(e, t, n) {
286
+ return Pe(e, !1);
287
+ }
288
+ function rt(e) {
289
+ var t = e.prototype;
290
+ return !!(t && t.isReactComponent);
291
+ }
292
+ function J(e, t, n) {
293
+ if (e == null)
294
+ return "";
295
+ if (typeof e == "function")
296
+ return Pe(e, rt(e));
297
+ if (typeof e == "string")
298
+ return q(e);
299
+ switch (e) {
300
+ case C:
301
+ return q("Suspense");
302
+ case y:
303
+ return q("SuspenseList");
304
+ }
305
+ if (typeof e == "object")
306
+ switch (e.$$typeof) {
307
+ case p:
308
+ return tt(e.render);
309
+ case w:
310
+ return J(e.type, t, n);
311
+ case b: {
312
+ var i = e, c = i._payload, d = i._init;
313
+ try {
314
+ return J(d(c), t, n);
315
+ } catch {
316
+ }
317
+ }
318
+ }
319
+ return "";
320
+ }
321
+ var H = Object.prototype.hasOwnProperty, xe = {}, Te = O.ReactDebugCurrentFrame;
322
+ function K(e) {
323
+ if (e) {
324
+ var t = e._owner, n = J(e.type, e._source, t ? t.type : null);
325
+ Te.setExtraStackFrame(n);
326
+ } else
327
+ Te.setExtraStackFrame(null);
328
+ }
329
+ function nt(e, t, n, i, c) {
330
+ {
331
+ var d = Function.call.bind(H);
332
+ for (var s in e)
333
+ if (d(e, s)) {
334
+ var l = void 0;
335
+ try {
336
+ if (typeof e[s] != "function") {
337
+ var E = Error((i || "React class") + ": " + n + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
338
+ throw E.name = "Invariant Violation", E;
339
+ }
340
+ l = e[s](t, s, i, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
+ } catch (v) {
342
+ l = v;
343
+ }
344
+ l && !(l instanceof Error) && (K(c), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", i || "React class", n, s, typeof l), K(null)), l instanceof Error && !(l.message in xe) && (xe[l.message] = !0, K(c), m("Failed %s type: %s", n, l.message), K(null));
345
+ }
346
+ }
347
+ }
348
+ var at = Array.isArray;
349
+ function le(e) {
350
+ return at(e);
351
+ }
352
+ function ot(e) {
353
+ {
354
+ var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
355
+ return n;
356
+ }
357
+ }
358
+ function it(e) {
359
+ try {
360
+ return Se(e), !1;
361
+ } catch {
362
+ return !0;
363
+ }
364
+ }
365
+ function Se(e) {
366
+ return "" + e;
367
+ }
368
+ function Ce(e) {
369
+ if (it(e))
370
+ return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ot(e)), Se(e);
371
+ }
372
+ var U = O.ReactCurrentOwner, lt = {
373
+ key: !0,
374
+ ref: !0,
375
+ __self: !0,
376
+ __source: !0
377
+ }, Oe, je, se;
378
+ se = {};
379
+ function st(e) {
380
+ if (H.call(e, "ref")) {
381
+ var t = Object.getOwnPropertyDescriptor(e, "ref").get;
382
+ if (t && t.isReactWarning)
383
+ return !1;
384
+ }
385
+ return e.ref !== void 0;
386
+ }
387
+ function ut(e) {
388
+ if (H.call(e, "key")) {
389
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
390
+ if (t && t.isReactWarning)
391
+ return !1;
392
+ }
393
+ return e.key !== void 0;
394
+ }
395
+ function ct(e, t) {
396
+ if (typeof e.ref == "string" && U.current && t && U.current.stateNode !== t) {
397
+ var n = T(U.current.type);
398
+ se[n] || (m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', T(U.current.type), e.ref), se[n] = !0);
399
+ }
400
+ }
401
+ function ft(e, t) {
402
+ {
403
+ var n = function() {
404
+ Oe || (Oe = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
405
+ };
406
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
407
+ get: n,
408
+ configurable: !0
409
+ });
410
+ }
411
+ }
412
+ function dt(e, t) {
413
+ {
414
+ var n = function() {
415
+ je || (je = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
416
+ };
417
+ n.isReactWarning = !0, Object.defineProperty(e, "ref", {
418
+ get: n,
419
+ configurable: !0
420
+ });
421
+ }
422
+ }
423
+ var _t = function(e, t, n, i, c, d, s) {
424
+ var l = {
425
+ // This tag allows us to uniquely identify this as a React Element
426
+ $$typeof: r,
427
+ // Built-in properties that belong on the element
428
+ type: e,
429
+ key: t,
430
+ ref: n,
431
+ props: s,
432
+ // Record the component responsible for creating this element.
433
+ _owner: d
434
+ };
435
+ return l._store = {}, Object.defineProperty(l._store, "validated", {
436
+ configurable: !1,
437
+ enumerable: !1,
438
+ writable: !0,
439
+ value: !1
440
+ }), Object.defineProperty(l, "_self", {
441
+ configurable: !1,
442
+ enumerable: !1,
443
+ writable: !1,
444
+ value: i
445
+ }), Object.defineProperty(l, "_source", {
446
+ configurable: !1,
447
+ enumerable: !1,
448
+ writable: !1,
449
+ value: c
450
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
451
+ };
452
+ function vt(e, t, n, i, c) {
453
+ {
454
+ var d, s = {}, l = null, E = null;
455
+ n !== void 0 && (Ce(n), l = "" + n), ut(t) && (Ce(t.key), l = "" + t.key), st(t) && (E = t.ref, ct(t, c));
456
+ for (d in t)
457
+ H.call(t, d) && !lt.hasOwnProperty(d) && (s[d] = t[d]);
458
+ if (e && e.defaultProps) {
459
+ var v = e.defaultProps;
460
+ for (d in v)
461
+ s[d] === void 0 && (s[d] = v[d]);
462
+ }
463
+ if (l || E) {
464
+ var h = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
465
+ l && ft(s, h), E && dt(s, h);
466
+ }
467
+ return _t(e, l, E, c, i, U.current, s);
468
+ }
469
+ }
470
+ var ue = O.ReactCurrentOwner, Fe = O.ReactDebugCurrentFrame;
471
+ function k(e) {
472
+ if (e) {
473
+ var t = e._owner, n = J(e.type, e._source, t ? t.type : null);
474
+ Fe.setExtraStackFrame(n);
475
+ } else
476
+ Fe.setExtraStackFrame(null);
477
+ }
478
+ var ce;
479
+ ce = !1;
480
+ function fe(e) {
481
+ return typeof e == "object" && e !== null && e.$$typeof === r;
482
+ }
483
+ function Ie() {
484
+ {
485
+ if (ue.current) {
486
+ var e = T(ue.current.type);
487
+ if (e)
488
+ return `
489
+
490
+ Check the render method of \`` + e + "`.";
491
+ }
492
+ return "";
493
+ }
494
+ }
495
+ function gt(e) {
496
+ {
497
+ if (e !== void 0) {
498
+ var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
499
+ return `
500
+
501
+ Check your code at ` + t + ":" + n + ".";
502
+ }
503
+ return "";
504
+ }
505
+ }
506
+ var ke = {};
507
+ function ht(e) {
508
+ {
509
+ var t = Ie();
510
+ if (!t) {
511
+ var n = typeof e == "string" ? e : e.displayName || e.name;
512
+ n && (t = `
513
+
514
+ Check the top-level render call using <` + n + ">.");
515
+ }
516
+ return t;
517
+ }
518
+ }
519
+ function Ae(e, t) {
520
+ {
521
+ if (!e._store || e._store.validated || e.key != null)
522
+ return;
523
+ e._store.validated = !0;
524
+ var n = ht(t);
525
+ if (ke[n])
526
+ return;
527
+ ke[n] = !0;
528
+ var i = "";
529
+ e && e._owner && e._owner !== ue.current && (i = " It was passed a child from " + T(e._owner.type) + "."), k(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, i), k(null);
530
+ }
531
+ }
532
+ function De(e, t) {
533
+ {
534
+ if (typeof e != "object")
535
+ return;
536
+ if (le(e))
537
+ for (var n = 0; n < e.length; n++) {
538
+ var i = e[n];
539
+ fe(i) && Ae(i, t);
540
+ }
541
+ else if (fe(e))
542
+ e._store && (e._store.validated = !0);
543
+ else if (e) {
544
+ var c = W(e);
545
+ if (typeof c == "function" && c !== e.entries)
546
+ for (var d = c.call(e), s; !(s = d.next()).done; )
547
+ fe(s.value) && Ae(s.value, t);
548
+ }
549
+ }
550
+ }
551
+ function pt(e) {
552
+ {
553
+ var t = e.type;
554
+ if (t == null || typeof t == "string")
555
+ return;
556
+ var n;
557
+ if (typeof t == "function")
558
+ n = t.propTypes;
559
+ else if (typeof t == "object" && (t.$$typeof === p || // Note: Memo only checks outer props here.
560
+ // Inner props are checked in the reconciler.
561
+ t.$$typeof === w))
562
+ n = t.propTypes;
563
+ else
564
+ return;
565
+ if (n) {
566
+ var i = T(t);
567
+ nt(n, e.props, "prop", i, e);
568
+ } else if (t.PropTypes !== void 0 && !ce) {
569
+ ce = !0;
570
+ var c = T(t);
571
+ m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown");
572
+ }
573
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
574
+ }
575
+ }
576
+ function mt(e) {
577
+ {
578
+ for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
579
+ var i = t[n];
580
+ if (i !== "children" && i !== "key") {
581
+ k(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), k(null);
582
+ break;
583
+ }
584
+ }
585
+ e.ref !== null && (k(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
586
+ }
587
+ }
588
+ function $e(e, t, n, i, c, d) {
589
+ {
590
+ var s = He(e);
591
+ if (!s) {
592
+ var l = "";
593
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
594
+ var E = gt(c);
595
+ E ? l += E : l += Ie();
596
+ var v;
597
+ e === null ? v = "null" : le(e) ? v = "array" : e !== void 0 && e.$$typeof === r ? (v = "<" + (T(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, l);
598
+ }
599
+ var h = vt(e, t, n, c, d);
600
+ if (h == null)
601
+ return h;
602
+ if (s) {
603
+ var R = t.children;
604
+ if (R !== void 0)
605
+ if (i)
606
+ if (le(R)) {
607
+ for (var A = 0; A < R.length; A++)
608
+ De(R[A], e);
609
+ Object.freeze && Object.freeze(R);
610
+ } else
611
+ m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
612
+ else
613
+ De(R, e);
614
+ }
615
+ return e === u ? mt(h) : pt(h), h;
616
+ }
617
+ }
618
+ function yt(e, t, n) {
619
+ return $e(e, t, n, !0);
620
+ }
621
+ function Et(e, t, n) {
622
+ return $e(e, t, n, !1);
623
+ }
624
+ var bt = Et, Rt = yt;
625
+ L.Fragment = u, L.jsx = bt, L.jsxs = Rt;
626
+ }()), L;
627
+ }
628
+ process.env.NODE_ENV === "production" ? de.exports = Ct() : de.exports = Ot();
629
+ var jt = de.exports;
630
+ const Ft = jt.jsx;
631
+ const It = "_map_1tyvt_2", kt = "_touch_1tyvt_26", At = "_floaten_1tyvt_45", Dt = "_float_1tyvt_45", $t = {
632
+ "ol-box": "_ol-box_1tyvt_1",
633
+ "ol-mouse-position": "_ol-mouse-position_1tyvt_1",
634
+ "ol-scale-line": "_ol-scale-line_1tyvt_1",
635
+ "ol-scale-line-inner": "_ol-scale-line-inner_1tyvt_1",
636
+ "ol-scale-bar": "_ol-scale-bar_1tyvt_1",
637
+ "ol-scale-bar-inner": "_ol-scale-bar-inner_1tyvt_1",
638
+ "ol-scale-step-marker": "_ol-scale-step-marker_1tyvt_1",
639
+ "ol-scale-step-text": "_ol-scale-step-text_1tyvt_1",
640
+ "ol-scale-text": "_ol-scale-text_1tyvt_1",
641
+ "ol-scale-singlebar": "_ol-scale-singlebar_1tyvt_1",
642
+ "ol-scale-singlebar-even": "_ol-scale-singlebar-even_1tyvt_1",
643
+ "ol-scale-singlebar-odd": "_ol-scale-singlebar-odd_1tyvt_1",
644
+ "ol-unsupported": "_ol-unsupported_1tyvt_1",
645
+ "ol-viewport": "_ol-viewport_1tyvt_1",
646
+ "ol-unselectable": "_ol-unselectable_1tyvt_1",
647
+ "ol-selectable": "_ol-selectable_1tyvt_1",
648
+ "ol-grabbing": "_ol-grabbing_1tyvt_1",
649
+ "ol-grab": "_ol-grab_1tyvt_1",
650
+ "ol-control": "_ol-control_1tyvt_1",
651
+ "ol-zoom": "_ol-zoom_1tyvt_1",
652
+ "ol-rotate": "_ol-rotate_1tyvt_1",
653
+ "ol-hidden": "_ol-hidden_1tyvt_1",
654
+ "ol-zoom-extent": "_ol-zoom-extent_1tyvt_1",
655
+ "ol-full-screen": "_ol-full-screen_1tyvt_1",
656
+ "ol-compass": "_ol-compass_1tyvt_1",
657
+ "ol-touch": "_ol-touch_1tyvt_1",
658
+ "ol-zoom-in": "_ol-zoom-in_1tyvt_1",
659
+ "ol-zoom-out": "_ol-zoom-out_1tyvt_1",
660
+ "ol-attribution": "_ol-attribution_1tyvt_1",
661
+ "ol-collapsed": "_ol-collapsed_1tyvt_1",
662
+ "ol-uncollapsible": "_ol-uncollapsible_1tyvt_1",
663
+ "ol-zoomslider": "_ol-zoomslider_1tyvt_1",
664
+ "ol-overviewmap": "_ol-overviewmap_1tyvt_1",
665
+ "ol-overviewmap-map": "_ol-overviewmap-map_1tyvt_1",
666
+ "ol-overviewmap-box": "_ol-overviewmap-box_1tyvt_1",
667
+ map: It,
668
+ "map-popup-container": "_map-popup-container_1tyvt_7",
669
+ touch: kt,
670
+ "mobile-layers-button": "_mobile-layers-button_1tyvt_30",
671
+ floaten: At,
672
+ float: Dt
673
+ }, Mt = {
674
+ // use the radius of the Normal sphere
675
+ radians: 6370997 / (2 * Math.PI),
676
+ degrees: 2 * Math.PI * 6370997 / 360,
677
+ ft: 0.3048,
678
+ m: 1,
679
+ "us-ft": 1200 / 3937
680
+ };
681
+ class Gt {
682
+ /**
683
+ * @param {Options} options Projection options.
684
+ */
685
+ constructor(r) {
686
+ this.code_ = r.code, this.units_ = /** @type {import("./Units.js").Units} */
687
+ r.units, this.extent_ = r.extent !== void 0 ? r.extent : null, this.worldExtent_ = r.worldExtent !== void 0 ? r.worldExtent : null, this.axisOrientation_ = r.axisOrientation !== void 0 ? r.axisOrientation : "enu", this.global_ = r.global !== void 0 ? r.global : !1, this.canWrapX_ = !!(this.global_ && this.extent_), this.getPointResolutionFunc_ = r.getPointResolution, this.defaultTileGrid_ = null, this.metersPerUnit_ = r.metersPerUnit;
688
+ }
689
+ /**
690
+ * @return {boolean} The projection is suitable for wrapping the x-axis
691
+ */
692
+ canWrapX() {
693
+ return this.canWrapX_;
694
+ }
695
+ /**
696
+ * Get the code for this projection, e.g. 'EPSG:4326'.
697
+ * @return {string} Code.
698
+ * @api
699
+ */
700
+ getCode() {
701
+ return this.code_;
702
+ }
703
+ /**
704
+ * Get the validity extent for this projection.
705
+ * @return {import("../extent.js").Extent} Extent.
706
+ * @api
707
+ */
708
+ getExtent() {
709
+ return this.extent_;
710
+ }
711
+ /**
712
+ * Get the units of this projection.
713
+ * @return {import("./Units.js").Units} Units.
714
+ * @api
715
+ */
716
+ getUnits() {
717
+ return this.units_;
718
+ }
719
+ /**
720
+ * Get the amount of meters per unit of this projection. If the projection is
721
+ * not configured with `metersPerUnit` or a units identifier, the return is
722
+ * `undefined`.
723
+ * @return {number|undefined} Meters.
724
+ * @api
725
+ */
726
+ getMetersPerUnit() {
727
+ return this.metersPerUnit_ || Mt[this.units_];
728
+ }
729
+ /**
730
+ * Get the world extent for this projection.
731
+ * @return {import("../extent.js").Extent} Extent.
732
+ * @api
733
+ */
734
+ getWorldExtent() {
735
+ return this.worldExtent_;
736
+ }
737
+ /**
738
+ * Get the axis orientation of this projection.
739
+ * Example values are:
740
+ * enu - the default easting, northing, elevation.
741
+ * neu - northing, easting, up - useful for "lat/long" geographic coordinates,
742
+ * or south orientated transverse mercator.
743
+ * wnu - westing, northing, up - some planetary coordinate systems have
744
+ * "west positive" coordinate systems
745
+ * @return {string} Axis orientation.
746
+ * @api
747
+ */
748
+ getAxisOrientation() {
749
+ return this.axisOrientation_;
750
+ }
751
+ /**
752
+ * Is this projection a global projection which spans the whole world?
753
+ * @return {boolean} Whether the projection is global.
754
+ * @api
755
+ */
756
+ isGlobal() {
757
+ return this.global_;
758
+ }
759
+ /**
760
+ * Set if the projection is a global projection which spans the whole world
761
+ * @param {boolean} global Whether the projection is global.
762
+ * @api
763
+ */
764
+ setGlobal(r) {
765
+ this.global_ = r, this.canWrapX_ = !!(r && this.extent_);
766
+ }
767
+ /**
768
+ * @return {import("../tilegrid/TileGrid.js").default} The default tile grid.
769
+ */
770
+ getDefaultTileGrid() {
771
+ return this.defaultTileGrid_;
772
+ }
773
+ /**
774
+ * @param {import("../tilegrid/TileGrid.js").default} tileGrid The default tile grid.
775
+ */
776
+ setDefaultTileGrid(r) {
777
+ this.defaultTileGrid_ = r;
778
+ }
779
+ /**
780
+ * Set the validity extent for this projection.
781
+ * @param {import("../extent.js").Extent} extent Extent.
782
+ * @api
783
+ */
784
+ setExtent(r) {
785
+ this.extent_ = r, this.canWrapX_ = !!(this.global_ && r);
786
+ }
787
+ /**
788
+ * Set the world extent for this projection.
789
+ * @param {import("../extent.js").Extent} worldExtent World extent
790
+ * [minlon, minlat, maxlon, maxlat].
791
+ * @api
792
+ */
793
+ setWorldExtent(r) {
794
+ this.worldExtent_ = r;
795
+ }
796
+ /**
797
+ * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}
798
+ * for this projection.
799
+ * @param {function(number, import("../coordinate.js").Coordinate):number} func Function
800
+ * @api
801
+ */
802
+ setGetPointResolution(r) {
803
+ this.getPointResolutionFunc_ = r;
804
+ }
805
+ /**
806
+ * Get the custom point resolution function for this projection (if set).
807
+ * @return {function(number, import("../coordinate.js").Coordinate):number|undefined} The custom point
808
+ * resolution function (if set).
809
+ */
810
+ getPointResolutionFunc() {
811
+ return this.getPointResolutionFunc_;
812
+ }
813
+ }
814
+ const Xe = Gt, V = 6378137, $ = Math.PI * V, Wt = [-$, -$, $, $], Nt = [-180, -85, 180, 85], Z = V * Math.log(Math.tan(Math.PI / 2));
815
+ class D extends Xe {
816
+ /**
817
+ * @param {string} code Code.
818
+ */
819
+ constructor(r) {
820
+ super({
821
+ code: r,
822
+ units: "m",
823
+ extent: Wt,
824
+ global: !0,
825
+ worldExtent: Nt,
826
+ getPointResolution: function(o, u) {
827
+ return o / Math.cosh(u[1] / V);
828
+ }
829
+ });
830
+ }
831
+ }
832
+ const Ye = [
833
+ new D("EPSG:3857"),
834
+ new D("EPSG:102100"),
835
+ new D("EPSG:102113"),
836
+ new D("EPSG:900913"),
837
+ new D("http://www.opengis.net/def/crs/EPSG/0/3857"),
838
+ new D("http://www.opengis.net/gml/srs/epsg.xml#3857")
839
+ ];
840
+ function Ut(a, r, o) {
841
+ const u = a.length;
842
+ o = o > 1 ? o : 2, r === void 0 && (o > 2 ? r = a.slice() : r = new Array(u));
843
+ for (let f = 0; f < u; f += o) {
844
+ r[f] = $ * a[f] / 180;
845
+ let _ = V * Math.log(Math.tan(Math.PI * (+a[f + 1] + 90) / 360));
846
+ _ > Z ? _ = Z : _ < -Z && (_ = -Z), r[f + 1] = _;
847
+ }
848
+ return r;
849
+ }
850
+ function Yt(a, r, o) {
851
+ const u = a.length;
852
+ o = o > 1 ? o : 2, r === void 0 && (o > 2 ? r = a.slice() : r = new Array(u));
853
+ for (let f = 0; f < u; f += o)
854
+ r[f] = 180 * a[f] / $, r[f + 1] = 360 * Math.atan(Math.exp(a[f + 1] / V)) / Math.PI - 90;
855
+ return r;
856
+ }
857
+ const Lt = 6378137, Le = [-180, -90, 180, 90], Vt = Math.PI * Lt / 180;
858
+ class I extends Xe {
859
+ /**
860
+ * @param {string} code Code.
861
+ * @param {string} [axisOrientation] Axis orientation.
862
+ */
863
+ constructor(r, o) {
864
+ super({
865
+ code: r,
866
+ units: "degrees",
867
+ extent: Le,
868
+ axisOrientation: o,
869
+ global: !0,
870
+ metersPerUnit: Vt,
871
+ worldExtent: Le
872
+ });
873
+ }
874
+ }
875
+ const Ve = [
876
+ new I("CRS:84"),
877
+ new I("EPSG:4326", "neu"),
878
+ new I("urn:ogc:def:crs:OGC:1.3:CRS84"),
879
+ new I("urn:ogc:def:crs:OGC:2:84"),
880
+ new I("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),
881
+ new I("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
882
+ new I("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
883
+ ];
884
+ let _e = {};
885
+ function zt(a) {
886
+ return _e[a] || _e[a.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
887
+ }
888
+ function Bt(a, r) {
889
+ _e[a] = r;
890
+ }
891
+ let M = {};
892
+ function Q(a, r, o) {
893
+ const u = a.getCode(), f = r.getCode();
894
+ u in M || (M[u] = {}), M[u][f] = o;
895
+ }
896
+ function qt(a, r) {
897
+ let o;
898
+ return a in M && r in M[a] && (o = M[a][r]), o;
899
+ }
900
+ function Je(a, r) {
901
+ if (r !== void 0) {
902
+ for (let o = 0, u = a.length; o < u; ++o)
903
+ r[o] = a[o];
904
+ r = r;
905
+ } else
906
+ r = a.slice();
907
+ return r;
908
+ }
909
+ function Xt(a, r) {
910
+ if (r !== void 0 && a !== r) {
911
+ for (let o = 0, u = a.length; o < u; ++o)
912
+ r[o] = a[o];
913
+ a = r;
914
+ }
915
+ return a;
916
+ }
917
+ function Jt(a) {
918
+ Bt(a.getCode(), a), Q(a, a, Je);
919
+ }
920
+ function Ht(a) {
921
+ a.forEach(Jt);
922
+ }
923
+ function ze(a) {
924
+ return typeof a == "string" ? zt(
925
+ /** @type {string} */
926
+ a
927
+ ) : (
928
+ /** @type {Projection} */
929
+ a || null
930
+ );
931
+ }
932
+ function Be(a) {
933
+ Ht(a), a.forEach(function(r) {
934
+ a.forEach(function(o) {
935
+ r !== o && Q(r, o, Je);
936
+ });
937
+ });
938
+ }
939
+ function Kt(a, r, o, u) {
940
+ a.forEach(function(f) {
941
+ r.forEach(function(_) {
942
+ Q(f, _, o), Q(_, f, u);
943
+ });
944
+ });
945
+ }
946
+ function Zt(a, r) {
947
+ return tr(
948
+ a,
949
+ "EPSG:4326",
950
+ r !== void 0 ? r : "EPSG:3857"
951
+ );
952
+ }
953
+ function Qt(a, r) {
954
+ const o = a.getCode(), u = r.getCode();
955
+ let f = qt(o, u);
956
+ return f || (f = Xt), f;
957
+ }
958
+ function er(a, r) {
959
+ const o = ze(a), u = ze(r);
960
+ return Qt(o, u);
961
+ }
962
+ function tr(a, r, o) {
963
+ return er(r, o)(a, void 0, a.length);
964
+ }
965
+ function rr() {
966
+ Be(Ye), Be(Ve), Kt(
967
+ Ve,
968
+ Ye,
969
+ Ut,
970
+ Yt
971
+ );
972
+ }
973
+ rr();
974
+ const or = wt(
975
+ ({
976
+ options: a,
977
+ mapKey: r,
978
+ zoom: o,
979
+ defaultType: u,
980
+ scale: f,
981
+ center: _,
982
+ poi: j,
983
+ traffic: x,
984
+ onInit: p,
985
+ className: C,
986
+ style: y
987
+ }, w) => {
988
+ const b = Ge(null), P = Ge(null), [G, ee] = We(!1), [W, O] = We(null);
989
+ Pt(
990
+ w,
991
+ () => ({
992
+ get mapContainer() {
993
+ return b;
994
+ },
995
+ get map() {
996
+ return P.current;
997
+ },
998
+ get isInitiated() {
999
+ return G;
1000
+ }
1001
+ }),
1002
+ [G, P.current]
1003
+ );
1004
+ const m = () => {
1005
+ var z, B;
1006
+ if (W)
1007
+ return W;
1008
+ const g = (B = (z = b.current) == null ? void 0 : z.querySelector(".ol-viewport")) == null ? void 0 : B.querySelectorAll("div:last-child");
1009
+ if (g)
1010
+ return O(
1011
+ Array.from(g)[g.length - 1]
1012
+ ), W;
1013
+ }, te = () => {
1014
+ const g = m();
1015
+ g == null || g.style.setProperty("scale", "" + f);
1016
+ }, re = () => {
1017
+ const g = m();
1018
+ g == null || g.style.setProperty("bottom", "0.2em"), g == null || g.style.setProperty("left", "0.4em");
1019
+ }, ne = () => {
1020
+ if (P.current != null || !b.current)
1021
+ return;
1022
+ const g = {};
1023
+ _ != null && _.longitude && _.latitude && (g.center = Zt([_ == null ? void 0 : _.longitude, _ == null ? void 0 : _.latitude])), o && (g.zoom = o), P.current = new Tt({
1024
+ target: b.current,
1025
+ key: r || "",
1026
+ mapType: u,
1027
+ // poi: store.state.poiLayer,
1028
+ poi: j,
1029
+ // traffic: store.state.trafficLayer,
1030
+ traffic: x,
1031
+ view: new St(g),
1032
+ controls: [],
1033
+ ...a
1034
+ }), ee(!0), p && p(P.current);
1035
+ };
1036
+ return xt(() => {
1037
+ ne(), te(), re();
1038
+ }, []), /* @__PURE__ */ Ft(
1039
+ "div",
1040
+ {
1041
+ ref: b,
1042
+ className: C || $t.map,
1043
+ style: y
1044
+ }
1045
+ );
1046
+ }
1047
+ );
1048
+ export {
1049
+ or as default
1050
+ };