@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.
- package/README.md +43 -179
- package/dist/neshan-ol-react-sdk.es.js +1050 -0
- package/dist/neshan-ol-react-sdk.umd.js +27 -0
- package/dist/style.css +1 -1
- package/dist/types/App.d.ts +1 -2
- package/dist/types/components/Map.d.ts +0 -1
- package/dist/types/components/Map.model.d.ts +5 -15
- package/dist/types/components/index.d.ts +3 -4
- package/dist/types/parameters/index.d.ts +0 -1
- package/dist/types/utils/location.util.d.ts +1 -1
- package/package.json +9 -11
- package/dist/React-Openlayers.js +0 -836
- package/dist/React-Openlayers.umd.cjs +0 -27
- package/dist/types/assets/ol.model.d.ts +0 -130
- package/dist/types/store/ContextProvider.d.ts +0 -3
- package/dist/types/store/ContextProvider.model.d.ts +0 -11
- package/dist/types/store/context.d.ts +0 -11
package/dist/React-Openlayers.js
DELETED
|
@@ -1,836 +0,0 @@
|
|
|
1
|
-
import Le, { createContext as pr, useReducer as vr, forwardRef as Ne, useContext as mr, useRef as yr, useState as ce, useImperativeHandle as hr, useEffect as gr } from "react";
|
|
2
|
-
var le = {}, _r = {
|
|
3
|
-
get exports() {
|
|
4
|
-
return le;
|
|
5
|
-
},
|
|
6
|
-
set exports(s) {
|
|
7
|
-
le = s;
|
|
8
|
-
}
|
|
9
|
-
}, N = {};
|
|
10
|
-
/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/
|
|
19
|
-
var Fe;
|
|
20
|
-
function Er() {
|
|
21
|
-
if (Fe)
|
|
22
|
-
return N;
|
|
23
|
-
Fe = 1;
|
|
24
|
-
var s = Le, f = Symbol.for("react.element"), P = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, v = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
|
-
function A(O, m, x) {
|
|
26
|
-
var _, T = {}, j = null, C = null;
|
|
27
|
-
x !== void 0 && (j = "" + x), m.key !== void 0 && (j = "" + m.key), m.ref !== void 0 && (C = m.ref);
|
|
28
|
-
for (_ in m)
|
|
29
|
-
b.call(m, _) && !F.hasOwnProperty(_) && (T[_] = m[_]);
|
|
30
|
-
if (O && O.defaultProps)
|
|
31
|
-
for (_ in m = O.defaultProps, m)
|
|
32
|
-
T[_] === void 0 && (T[_] = m[_]);
|
|
33
|
-
return { $$typeof: f, type: O, key: j, ref: C, props: T, _owner: v.current };
|
|
34
|
-
}
|
|
35
|
-
return N.Fragment = P, N.jsx = A, N.jsxs = A, N;
|
|
36
|
-
}
|
|
37
|
-
var W = {};
|
|
38
|
-
/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-jsx-runtime.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/
|
|
47
|
-
var Ie;
|
|
48
|
-
function br() {
|
|
49
|
-
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
-
var s = Le, f = Symbol.for("react.element"), P = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), A = Symbol.for("react.provider"), O = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), S = Symbol.iterator, Y = "@@iterator";
|
|
51
|
-
function H(e) {
|
|
52
|
-
if (e === null || typeof e != "object")
|
|
53
|
-
return null;
|
|
54
|
-
var r = S && e[S] || e[Y];
|
|
55
|
-
return typeof r == "function" ? r : null;
|
|
56
|
-
}
|
|
57
|
-
var w = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
58
|
-
function y(e) {
|
|
59
|
-
{
|
|
60
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
61
|
-
t[n - 1] = arguments[n];
|
|
62
|
-
fe("error", e, t);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function fe(e, r, t) {
|
|
66
|
-
{
|
|
67
|
-
var n = w.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
68
|
-
i !== "" && (r += "%s", t = t.concat([i]));
|
|
69
|
-
var c = t.map(function(o) {
|
|
70
|
-
return String(o);
|
|
71
|
-
});
|
|
72
|
-
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
var X = !1, $ = !1, Z = !1, Q = !1, ee = !1, V;
|
|
76
|
-
V = Symbol.for("react.module.reference");
|
|
77
|
-
function B(e) {
|
|
78
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e === F || ee || e === v || e === x || e === _ || Q || e === C || X || $ || Z || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === T || e.$$typeof === A || e.$$typeof === O || e.$$typeof === m || // This needs to include all possible module reference object
|
|
79
|
-
// types supported by any Flight configuration anywhere since
|
|
80
|
-
// we don't know which Flight build this will end up being used
|
|
81
|
-
// with.
|
|
82
|
-
e.$$typeof === V || e.getModuleId !== void 0));
|
|
83
|
-
}
|
|
84
|
-
function u(e, r, t) {
|
|
85
|
-
var n = e.displayName;
|
|
86
|
-
if (n)
|
|
87
|
-
return n;
|
|
88
|
-
var i = r.displayName || r.name || "";
|
|
89
|
-
return i !== "" ? t + "(" + i + ")" : t;
|
|
90
|
-
}
|
|
91
|
-
function g(e) {
|
|
92
|
-
return e.displayName || "Context";
|
|
93
|
-
}
|
|
94
|
-
function l(e) {
|
|
95
|
-
if (e == null)
|
|
96
|
-
return null;
|
|
97
|
-
if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
98
|
-
return e.displayName || e.name || null;
|
|
99
|
-
if (typeof e == "string")
|
|
100
|
-
return e;
|
|
101
|
-
switch (e) {
|
|
102
|
-
case b:
|
|
103
|
-
return "Fragment";
|
|
104
|
-
case P:
|
|
105
|
-
return "Portal";
|
|
106
|
-
case F:
|
|
107
|
-
return "Profiler";
|
|
108
|
-
case v:
|
|
109
|
-
return "StrictMode";
|
|
110
|
-
case x:
|
|
111
|
-
return "Suspense";
|
|
112
|
-
case _:
|
|
113
|
-
return "SuspenseList";
|
|
114
|
-
}
|
|
115
|
-
if (typeof e == "object")
|
|
116
|
-
switch (e.$$typeof) {
|
|
117
|
-
case O:
|
|
118
|
-
var r = e;
|
|
119
|
-
return g(r) + ".Consumer";
|
|
120
|
-
case A:
|
|
121
|
-
var t = e;
|
|
122
|
-
return g(t._context) + ".Provider";
|
|
123
|
-
case m:
|
|
124
|
-
return u(e, e.render, "ForwardRef");
|
|
125
|
-
case T:
|
|
126
|
-
var n = e.displayName || null;
|
|
127
|
-
return n !== null ? n : l(e.type) || "Memo";
|
|
128
|
-
case j: {
|
|
129
|
-
var i = e, c = i._payload, o = i._init;
|
|
130
|
-
try {
|
|
131
|
-
return l(o(c));
|
|
132
|
-
} catch {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
var h = Object.assign, D = 0, de, pe, ve, me, ye, he, ge;
|
|
140
|
-
function _e() {
|
|
141
|
-
}
|
|
142
|
-
_e.__reactDisabledLog = !0;
|
|
143
|
-
function Ve() {
|
|
144
|
-
{
|
|
145
|
-
if (D === 0) {
|
|
146
|
-
de = console.log, pe = console.info, ve = console.warn, me = console.error, ye = console.group, he = console.groupCollapsed, ge = console.groupEnd;
|
|
147
|
-
var e = {
|
|
148
|
-
configurable: !0,
|
|
149
|
-
enumerable: !0,
|
|
150
|
-
value: _e,
|
|
151
|
-
writable: !0
|
|
152
|
-
};
|
|
153
|
-
Object.defineProperties(console, {
|
|
154
|
-
info: e,
|
|
155
|
-
log: e,
|
|
156
|
-
warn: e,
|
|
157
|
-
error: e,
|
|
158
|
-
group: e,
|
|
159
|
-
groupCollapsed: e,
|
|
160
|
-
groupEnd: e
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
D++;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function Be() {
|
|
167
|
-
{
|
|
168
|
-
if (D--, D === 0) {
|
|
169
|
-
var e = {
|
|
170
|
-
configurable: !0,
|
|
171
|
-
enumerable: !0,
|
|
172
|
-
writable: !0
|
|
173
|
-
};
|
|
174
|
-
Object.defineProperties(console, {
|
|
175
|
-
log: h({}, e, {
|
|
176
|
-
value: de
|
|
177
|
-
}),
|
|
178
|
-
info: h({}, e, {
|
|
179
|
-
value: pe
|
|
180
|
-
}),
|
|
181
|
-
warn: h({}, e, {
|
|
182
|
-
value: ve
|
|
183
|
-
}),
|
|
184
|
-
error: h({}, e, {
|
|
185
|
-
value: me
|
|
186
|
-
}),
|
|
187
|
-
group: h({}, e, {
|
|
188
|
-
value: ye
|
|
189
|
-
}),
|
|
190
|
-
groupCollapsed: h({}, e, {
|
|
191
|
-
value: he
|
|
192
|
-
}),
|
|
193
|
-
groupEnd: h({}, e, {
|
|
194
|
-
value: ge
|
|
195
|
-
})
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
D < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
var re = w.ReactCurrentDispatcher, te;
|
|
202
|
-
function U(e, r, t) {
|
|
203
|
-
{
|
|
204
|
-
if (te === void 0)
|
|
205
|
-
try {
|
|
206
|
-
throw Error();
|
|
207
|
-
} catch (i) {
|
|
208
|
-
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
209
|
-
te = n && n[1] || "";
|
|
210
|
-
}
|
|
211
|
-
return `
|
|
212
|
-
` + te + e;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
var ne = !1, q;
|
|
216
|
-
{
|
|
217
|
-
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
218
|
-
q = new Ue();
|
|
219
|
-
}
|
|
220
|
-
function Ee(e, r) {
|
|
221
|
-
if (!e || ne)
|
|
222
|
-
return "";
|
|
223
|
-
{
|
|
224
|
-
var t = q.get(e);
|
|
225
|
-
if (t !== void 0)
|
|
226
|
-
return t;
|
|
227
|
-
}
|
|
228
|
-
var n;
|
|
229
|
-
ne = !0;
|
|
230
|
-
var i = Error.prepareStackTrace;
|
|
231
|
-
Error.prepareStackTrace = void 0;
|
|
232
|
-
var c;
|
|
233
|
-
c = re.current, re.current = null, Ve();
|
|
234
|
-
try {
|
|
235
|
-
if (r) {
|
|
236
|
-
var o = function() {
|
|
237
|
-
throw Error();
|
|
238
|
-
};
|
|
239
|
-
if (Object.defineProperty(o.prototype, "props", {
|
|
240
|
-
set: function() {
|
|
241
|
-
throw Error();
|
|
242
|
-
}
|
|
243
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
244
|
-
try {
|
|
245
|
-
Reflect.construct(o, []);
|
|
246
|
-
} catch (k) {
|
|
247
|
-
n = k;
|
|
248
|
-
}
|
|
249
|
-
Reflect.construct(e, [], o);
|
|
250
|
-
} else {
|
|
251
|
-
try {
|
|
252
|
-
o.call();
|
|
253
|
-
} catch (k) {
|
|
254
|
-
n = k;
|
|
255
|
-
}
|
|
256
|
-
e.call(o.prototype);
|
|
257
|
-
}
|
|
258
|
-
} else {
|
|
259
|
-
try {
|
|
260
|
-
throw Error();
|
|
261
|
-
} catch (k) {
|
|
262
|
-
n = k;
|
|
263
|
-
}
|
|
264
|
-
e();
|
|
265
|
-
}
|
|
266
|
-
} catch (k) {
|
|
267
|
-
if (k && n && typeof k.stack == "string") {
|
|
268
|
-
for (var a = k.stack.split(`
|
|
269
|
-
`), E = n.stack.split(`
|
|
270
|
-
`), d = a.length - 1, p = E.length - 1; d >= 1 && p >= 0 && a[d] !== E[p]; )
|
|
271
|
-
p--;
|
|
272
|
-
for (; d >= 1 && p >= 0; d--, p--)
|
|
273
|
-
if (a[d] !== E[p]) {
|
|
274
|
-
if (d !== 1 || p !== 1)
|
|
275
|
-
do
|
|
276
|
-
if (d--, p--, p < 0 || a[d] !== E[p]) {
|
|
277
|
-
var R = `
|
|
278
|
-
` + a[d].replace(" at new ", " at ");
|
|
279
|
-
return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, R), R;
|
|
280
|
-
}
|
|
281
|
-
while (d >= 1 && p >= 0);
|
|
282
|
-
break;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
} finally {
|
|
286
|
-
ne = !1, re.current = c, Be(), Error.prepareStackTrace = i;
|
|
287
|
-
}
|
|
288
|
-
var M = e ? e.displayName || e.name : "", De = M ? U(M) : "";
|
|
289
|
-
return typeof e == "function" && q.set(e, De), De;
|
|
290
|
-
}
|
|
291
|
-
function qe(e, r, t) {
|
|
292
|
-
return Ee(e, !1);
|
|
293
|
-
}
|
|
294
|
-
function ze(e) {
|
|
295
|
-
var r = e.prototype;
|
|
296
|
-
return !!(r && r.isReactComponent);
|
|
297
|
-
}
|
|
298
|
-
function z(e, r, t) {
|
|
299
|
-
if (e == null)
|
|
300
|
-
return "";
|
|
301
|
-
if (typeof e == "function")
|
|
302
|
-
return Ee(e, ze(e));
|
|
303
|
-
if (typeof e == "string")
|
|
304
|
-
return U(e);
|
|
305
|
-
switch (e) {
|
|
306
|
-
case x:
|
|
307
|
-
return U("Suspense");
|
|
308
|
-
case _:
|
|
309
|
-
return U("SuspenseList");
|
|
310
|
-
}
|
|
311
|
-
if (typeof e == "object")
|
|
312
|
-
switch (e.$$typeof) {
|
|
313
|
-
case m:
|
|
314
|
-
return qe(e.render);
|
|
315
|
-
case T:
|
|
316
|
-
return z(e.type, r, t);
|
|
317
|
-
case j: {
|
|
318
|
-
var n = e, i = n._payload, c = n._init;
|
|
319
|
-
try {
|
|
320
|
-
return z(c(i), r, t);
|
|
321
|
-
} catch {
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return "";
|
|
326
|
-
}
|
|
327
|
-
var J = Object.prototype.hasOwnProperty, be = {}, Re = w.ReactDebugCurrentFrame;
|
|
328
|
-
function G(e) {
|
|
329
|
-
if (e) {
|
|
330
|
-
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
|
|
331
|
-
Re.setExtraStackFrame(t);
|
|
332
|
-
} else
|
|
333
|
-
Re.setExtraStackFrame(null);
|
|
334
|
-
}
|
|
335
|
-
function Je(e, r, t, n, i) {
|
|
336
|
-
{
|
|
337
|
-
var c = Function.call.bind(J);
|
|
338
|
-
for (var o in e)
|
|
339
|
-
if (c(e, o)) {
|
|
340
|
-
var a = void 0;
|
|
341
|
-
try {
|
|
342
|
-
if (typeof e[o] != "function") {
|
|
343
|
-
var E = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
344
|
-
throw E.name = "Invariant Violation", E;
|
|
345
|
-
}
|
|
346
|
-
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
347
|
-
} catch (d) {
|
|
348
|
-
a = d;
|
|
349
|
-
}
|
|
350
|
-
a && !(a instanceof Error) && (G(i), y("%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).", n || "React class", t, o, typeof a), G(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, G(i), y("Failed %s type: %s", t, a.message), G(null));
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
var Ge = Array.isArray;
|
|
355
|
-
function ae(e) {
|
|
356
|
-
return Ge(e);
|
|
357
|
-
}
|
|
358
|
-
function Ke(e) {
|
|
359
|
-
{
|
|
360
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
361
|
-
return t;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
function He(e) {
|
|
365
|
-
try {
|
|
366
|
-
return Te(e), !1;
|
|
367
|
-
} catch {
|
|
368
|
-
return !0;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
function Te(e) {
|
|
372
|
-
return "" + e;
|
|
373
|
-
}
|
|
374
|
-
function Ce(e) {
|
|
375
|
-
if (He(e))
|
|
376
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), Te(e);
|
|
377
|
-
}
|
|
378
|
-
var L = w.ReactCurrentOwner, Xe = {
|
|
379
|
-
key: !0,
|
|
380
|
-
ref: !0,
|
|
381
|
-
__self: !0,
|
|
382
|
-
__source: !0
|
|
383
|
-
}, Pe, Se, oe;
|
|
384
|
-
oe = {};
|
|
385
|
-
function Ze(e) {
|
|
386
|
-
if (J.call(e, "ref")) {
|
|
387
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
388
|
-
if (r && r.isReactWarning)
|
|
389
|
-
return !1;
|
|
390
|
-
}
|
|
391
|
-
return e.ref !== void 0;
|
|
392
|
-
}
|
|
393
|
-
function Qe(e) {
|
|
394
|
-
if (J.call(e, "key")) {
|
|
395
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
396
|
-
if (r && r.isReactWarning)
|
|
397
|
-
return !1;
|
|
398
|
-
}
|
|
399
|
-
return e.key !== void 0;
|
|
400
|
-
}
|
|
401
|
-
function er(e, r) {
|
|
402
|
-
if (typeof e.ref == "string" && L.current && r && L.current.stateNode !== r) {
|
|
403
|
-
var t = l(L.current.type);
|
|
404
|
-
oe[t] || (y('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', l(L.current.type), e.ref), oe[t] = !0);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
function rr(e, r) {
|
|
408
|
-
{
|
|
409
|
-
var t = function() {
|
|
410
|
-
Pe || (Pe = !0, y("%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)", r));
|
|
411
|
-
};
|
|
412
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
413
|
-
get: t,
|
|
414
|
-
configurable: !0
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
function tr(e, r) {
|
|
419
|
-
{
|
|
420
|
-
var t = function() {
|
|
421
|
-
Se || (Se = !0, y("%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)", r));
|
|
422
|
-
};
|
|
423
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
424
|
-
get: t,
|
|
425
|
-
configurable: !0
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
var nr = function(e, r, t, n, i, c, o) {
|
|
430
|
-
var a = {
|
|
431
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
432
|
-
$$typeof: f,
|
|
433
|
-
// Built-in properties that belong on the element
|
|
434
|
-
type: e,
|
|
435
|
-
key: r,
|
|
436
|
-
ref: t,
|
|
437
|
-
props: o,
|
|
438
|
-
// Record the component responsible for creating this element.
|
|
439
|
-
_owner: c
|
|
440
|
-
};
|
|
441
|
-
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
442
|
-
configurable: !1,
|
|
443
|
-
enumerable: !1,
|
|
444
|
-
writable: !0,
|
|
445
|
-
value: !1
|
|
446
|
-
}), Object.defineProperty(a, "_self", {
|
|
447
|
-
configurable: !1,
|
|
448
|
-
enumerable: !1,
|
|
449
|
-
writable: !1,
|
|
450
|
-
value: n
|
|
451
|
-
}), Object.defineProperty(a, "_source", {
|
|
452
|
-
configurable: !1,
|
|
453
|
-
enumerable: !1,
|
|
454
|
-
writable: !1,
|
|
455
|
-
value: i
|
|
456
|
-
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
457
|
-
};
|
|
458
|
-
function ar(e, r, t, n, i) {
|
|
459
|
-
{
|
|
460
|
-
var c, o = {}, a = null, E = null;
|
|
461
|
-
t !== void 0 && (Ce(t), a = "" + t), Qe(r) && (Ce(r.key), a = "" + r.key), Ze(r) && (E = r.ref, er(r, i));
|
|
462
|
-
for (c in r)
|
|
463
|
-
J.call(r, c) && !Xe.hasOwnProperty(c) && (o[c] = r[c]);
|
|
464
|
-
if (e && e.defaultProps) {
|
|
465
|
-
var d = e.defaultProps;
|
|
466
|
-
for (c in d)
|
|
467
|
-
o[c] === void 0 && (o[c] = d[c]);
|
|
468
|
-
}
|
|
469
|
-
if (a || E) {
|
|
470
|
-
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
471
|
-
a && rr(o, p), E && tr(o, p);
|
|
472
|
-
}
|
|
473
|
-
return nr(e, a, E, i, n, L.current, o);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
var ie = w.ReactCurrentOwner, we = w.ReactDebugCurrentFrame;
|
|
477
|
-
function I(e) {
|
|
478
|
-
if (e) {
|
|
479
|
-
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
|
|
480
|
-
we.setExtraStackFrame(t);
|
|
481
|
-
} else
|
|
482
|
-
we.setExtraStackFrame(null);
|
|
483
|
-
}
|
|
484
|
-
var se;
|
|
485
|
-
se = !1;
|
|
486
|
-
function ue(e) {
|
|
487
|
-
return typeof e == "object" && e !== null && e.$$typeof === f;
|
|
488
|
-
}
|
|
489
|
-
function Oe() {
|
|
490
|
-
{
|
|
491
|
-
if (ie.current) {
|
|
492
|
-
var e = l(ie.current.type);
|
|
493
|
-
if (e)
|
|
494
|
-
return `
|
|
495
|
-
|
|
496
|
-
Check the render method of \`` + e + "`.";
|
|
497
|
-
}
|
|
498
|
-
return "";
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
function or(e) {
|
|
502
|
-
{
|
|
503
|
-
if (e !== void 0) {
|
|
504
|
-
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
505
|
-
return `
|
|
506
|
-
|
|
507
|
-
Check your code at ` + r + ":" + t + ".";
|
|
508
|
-
}
|
|
509
|
-
return "";
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
var xe = {};
|
|
513
|
-
function ir(e) {
|
|
514
|
-
{
|
|
515
|
-
var r = Oe();
|
|
516
|
-
if (!r) {
|
|
517
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
518
|
-
t && (r = `
|
|
519
|
-
|
|
520
|
-
Check the top-level render call using <` + t + ">.");
|
|
521
|
-
}
|
|
522
|
-
return r;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
function je(e, r) {
|
|
526
|
-
{
|
|
527
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
528
|
-
return;
|
|
529
|
-
e._store.validated = !0;
|
|
530
|
-
var t = ir(r);
|
|
531
|
-
if (xe[t])
|
|
532
|
-
return;
|
|
533
|
-
xe[t] = !0;
|
|
534
|
-
var n = "";
|
|
535
|
-
e && e._owner && e._owner !== ie.current && (n = " It was passed a child from " + l(e._owner.type) + "."), I(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), I(null);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
function ke(e, r) {
|
|
539
|
-
{
|
|
540
|
-
if (typeof e != "object")
|
|
541
|
-
return;
|
|
542
|
-
if (ae(e))
|
|
543
|
-
for (var t = 0; t < e.length; t++) {
|
|
544
|
-
var n = e[t];
|
|
545
|
-
ue(n) && je(n, r);
|
|
546
|
-
}
|
|
547
|
-
else if (ue(e))
|
|
548
|
-
e._store && (e._store.validated = !0);
|
|
549
|
-
else if (e) {
|
|
550
|
-
var i = H(e);
|
|
551
|
-
if (typeof i == "function" && i !== e.entries)
|
|
552
|
-
for (var c = i.call(e), o; !(o = c.next()).done; )
|
|
553
|
-
ue(o.value) && je(o.value, r);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
function sr(e) {
|
|
558
|
-
{
|
|
559
|
-
var r = e.type;
|
|
560
|
-
if (r == null || typeof r == "string")
|
|
561
|
-
return;
|
|
562
|
-
var t;
|
|
563
|
-
if (typeof r == "function")
|
|
564
|
-
t = r.propTypes;
|
|
565
|
-
else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
|
|
566
|
-
// Inner props are checked in the reconciler.
|
|
567
|
-
r.$$typeof === T))
|
|
568
|
-
t = r.propTypes;
|
|
569
|
-
else
|
|
570
|
-
return;
|
|
571
|
-
if (t) {
|
|
572
|
-
var n = l(r);
|
|
573
|
-
Je(t, e.props, "prop", n, e);
|
|
574
|
-
} else if (r.PropTypes !== void 0 && !se) {
|
|
575
|
-
se = !0;
|
|
576
|
-
var i = l(r);
|
|
577
|
-
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
578
|
-
}
|
|
579
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
function ur(e) {
|
|
583
|
-
{
|
|
584
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
585
|
-
var n = r[t];
|
|
586
|
-
if (n !== "children" && n !== "key") {
|
|
587
|
-
I(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), I(null);
|
|
588
|
-
break;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
e.ref !== null && (I(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
function Ae(e, r, t, n, i, c) {
|
|
595
|
-
{
|
|
596
|
-
var o = B(e);
|
|
597
|
-
if (!o) {
|
|
598
|
-
var a = "";
|
|
599
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
600
|
-
var E = or(i);
|
|
601
|
-
E ? a += E : a += Oe();
|
|
602
|
-
var d;
|
|
603
|
-
e === null ? d = "null" : ae(e) ? d = "array" : e !== void 0 && e.$$typeof === f ? (d = "<" + (l(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
|
|
604
|
-
}
|
|
605
|
-
var p = ar(e, r, t, i, c);
|
|
606
|
-
if (p == null)
|
|
607
|
-
return p;
|
|
608
|
-
if (o) {
|
|
609
|
-
var R = r.children;
|
|
610
|
-
if (R !== void 0)
|
|
611
|
-
if (n)
|
|
612
|
-
if (ae(R)) {
|
|
613
|
-
for (var M = 0; M < R.length; M++)
|
|
614
|
-
ke(R[M], e);
|
|
615
|
-
Object.freeze && Object.freeze(R);
|
|
616
|
-
} else
|
|
617
|
-
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
618
|
-
else
|
|
619
|
-
ke(R, e);
|
|
620
|
-
}
|
|
621
|
-
return e === b ? ur(p) : sr(p), p;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
function cr(e, r, t) {
|
|
625
|
-
return Ae(e, r, t, !0);
|
|
626
|
-
}
|
|
627
|
-
function lr(e, r, t) {
|
|
628
|
-
return Ae(e, r, t, !1);
|
|
629
|
-
}
|
|
630
|
-
var fr = lr, dr = cr;
|
|
631
|
-
W.Fragment = b, W.jsx = fr, W.jsxs = dr;
|
|
632
|
-
}()), W;
|
|
633
|
-
}
|
|
634
|
-
(function(s) {
|
|
635
|
-
process.env.NODE_ENV === "production" ? s.exports = Er() : s.exports = br();
|
|
636
|
-
})(_r);
|
|
637
|
-
const K = le.jsx;
|
|
638
|
-
const Rr = "_map_1yxt5_2", Tr = "_touch_1yxt5_26", Cr = "_floaten_1yxt5_45", Pr = "_float_1yxt5_45", Sr = {
|
|
639
|
-
map: Rr,
|
|
640
|
-
"map-popup-container": "_map-popup-container_1yxt5_7",
|
|
641
|
-
touch: Tr,
|
|
642
|
-
"mobile-layers-button": "_mobile-layers-button_1yxt5_30",
|
|
643
|
-
floaten: Cr,
|
|
644
|
-
float: Pr
|
|
645
|
-
}, We = (s) => s ? s instanceof Object ? [s.longitude, s.latitude] : s : void 0, wr = async () => {
|
|
646
|
-
try {
|
|
647
|
-
const f = await new Promise(
|
|
648
|
-
(P, b) => {
|
|
649
|
-
navigator.geolocation.getCurrentPosition(
|
|
650
|
-
(v) => {
|
|
651
|
-
P(v);
|
|
652
|
-
},
|
|
653
|
-
(v) => b(v)
|
|
654
|
-
);
|
|
655
|
-
}
|
|
656
|
-
);
|
|
657
|
-
return f && We(f.coords) || Object.values(Me());
|
|
658
|
-
} catch (s) {
|
|
659
|
-
console.error(s);
|
|
660
|
-
const f = Me();
|
|
661
|
-
return [f.longitude, f.latitude];
|
|
662
|
-
}
|
|
663
|
-
}, Me = () => ({
|
|
664
|
-
longitude: 51.36281969540723,
|
|
665
|
-
latitude: 35.69672648316882
|
|
666
|
-
}), Or = {
|
|
667
|
-
reverse: "https://api.neshan.org/v4/reverse",
|
|
668
|
-
search: "https://api.neshan.org/v1/search",
|
|
669
|
-
map: "https://static.neshan.org/sdk/openlayers/5.3.0/ol.js"
|
|
670
|
-
}, Ye = pr({
|
|
671
|
-
map: null,
|
|
672
|
-
mapType: "neshan",
|
|
673
|
-
mapContainer: null,
|
|
674
|
-
setMap: (s) => {
|
|
675
|
-
},
|
|
676
|
-
setMapType: (s) => {
|
|
677
|
-
},
|
|
678
|
-
setMapContainer: (s) => {
|
|
679
|
-
}
|
|
680
|
-
}), $e = {
|
|
681
|
-
map: null,
|
|
682
|
-
mapType: "neshan",
|
|
683
|
-
mapContainer: null
|
|
684
|
-
}, xr = (s, f) => {
|
|
685
|
-
switch (f.type) {
|
|
686
|
-
case "SET_MAP":
|
|
687
|
-
return {
|
|
688
|
-
...s,
|
|
689
|
-
map: f.payload
|
|
690
|
-
};
|
|
691
|
-
case "SET_MAP_TYPE":
|
|
692
|
-
return {
|
|
693
|
-
...s,
|
|
694
|
-
title: f.payload
|
|
695
|
-
};
|
|
696
|
-
default:
|
|
697
|
-
return $e;
|
|
698
|
-
}
|
|
699
|
-
}, jr = (s) => {
|
|
700
|
-
const [f, P] = vr(xr, $e), b = {
|
|
701
|
-
...f,
|
|
702
|
-
setMap: (v) => {
|
|
703
|
-
P({
|
|
704
|
-
type: "SET_MAP",
|
|
705
|
-
payload: v
|
|
706
|
-
});
|
|
707
|
-
},
|
|
708
|
-
setMapType: (v) => {
|
|
709
|
-
P({
|
|
710
|
-
type: "SET_MAP_TYPE",
|
|
711
|
-
payload: v
|
|
712
|
-
});
|
|
713
|
-
},
|
|
714
|
-
setMapContainer: (v) => {
|
|
715
|
-
P({
|
|
716
|
-
type: "SET_MAP_CONTAINER",
|
|
717
|
-
payload: v
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
};
|
|
721
|
-
return /* @__PURE__ */ K(Ye.Provider, { value: b, children: s.children });
|
|
722
|
-
}, kr = Ne(
|
|
723
|
-
({
|
|
724
|
-
options: s,
|
|
725
|
-
mapKey: f,
|
|
726
|
-
serviceKey: P = "",
|
|
727
|
-
zoom: b = 12,
|
|
728
|
-
defaultType: v = "neshan",
|
|
729
|
-
scale: F,
|
|
730
|
-
center: A,
|
|
731
|
-
poi: O = !0,
|
|
732
|
-
traffic: m = !0,
|
|
733
|
-
onInit: x,
|
|
734
|
-
className: _,
|
|
735
|
-
style: T
|
|
736
|
-
}, j) => {
|
|
737
|
-
const C = mr(Ye), S = yr(null), [Y, H] = ce(!1), [w, y] = ce(null), [fe, X] = ce();
|
|
738
|
-
hr(
|
|
739
|
-
j,
|
|
740
|
-
() => ({
|
|
741
|
-
get mapContainer() {
|
|
742
|
-
return S;
|
|
743
|
-
},
|
|
744
|
-
get ol() {
|
|
745
|
-
return typeof ol < "u" ? ol : void 0;
|
|
746
|
-
},
|
|
747
|
-
get map() {
|
|
748
|
-
return C.map;
|
|
749
|
-
},
|
|
750
|
-
get isInitiated() {
|
|
751
|
-
return Y;
|
|
752
|
-
}
|
|
753
|
-
}),
|
|
754
|
-
[Y, C.map]
|
|
755
|
-
);
|
|
756
|
-
const $ = () => {
|
|
757
|
-
var g, l;
|
|
758
|
-
if (w)
|
|
759
|
-
return w;
|
|
760
|
-
const u = (l = (g = S.current) == null ? void 0 : g.querySelector(".ol-viewport")) == null ? void 0 : l.querySelectorAll("div:last-child");
|
|
761
|
-
if (u)
|
|
762
|
-
return y(
|
|
763
|
-
Array.from(u)[u.length - 1]
|
|
764
|
-
), w;
|
|
765
|
-
}, Z = () => {
|
|
766
|
-
const u = $();
|
|
767
|
-
u == null || u.style.setProperty("scale", "" + F);
|
|
768
|
-
}, Q = () => {
|
|
769
|
-
const u = $();
|
|
770
|
-
u == null || u.style.setProperty("bottom", "0.2em"), u == null || u.style.setProperty("left", "0.4em");
|
|
771
|
-
}, ee = (u, g = "my-openlayer") => {
|
|
772
|
-
const l = document.getElementById(g);
|
|
773
|
-
if (l)
|
|
774
|
-
return l;
|
|
775
|
-
const h = document.createElement("script");
|
|
776
|
-
return h.src = u, h.id = g, document.getElementsByTagName("head")[0].appendChild(h), h;
|
|
777
|
-
}, V = async () => {
|
|
778
|
-
var h;
|
|
779
|
-
if (!S.current)
|
|
780
|
-
return;
|
|
781
|
-
const u = We(A);
|
|
782
|
-
X(u);
|
|
783
|
-
const g = u || await wr(), l = new ol.Map({
|
|
784
|
-
target: S.current,
|
|
785
|
-
key: f || "",
|
|
786
|
-
mapType: v,
|
|
787
|
-
// poi: store.state.poiLayer,
|
|
788
|
-
poi: O,
|
|
789
|
-
// traffic: store.state.trafficLayer,
|
|
790
|
-
traffic: m,
|
|
791
|
-
view: new ol.View({
|
|
792
|
-
center: ol.proj.fromLonLat(g),
|
|
793
|
-
zoom: b
|
|
794
|
-
// Not in ol@5
|
|
795
|
-
// smoothExtentConstraint: true,
|
|
796
|
-
// projection: 'EPSG:4326' //Default was EPSG:3857
|
|
797
|
-
}),
|
|
798
|
-
controls: [],
|
|
799
|
-
...s
|
|
800
|
-
});
|
|
801
|
-
l.setMapType(v), C.setMap(l), (h = C.map) == null || h.setMapType(v), C.setMapType(v), H(!0), x && x(ol, l);
|
|
802
|
-
}, B = () => {
|
|
803
|
-
let u, g, l;
|
|
804
|
-
return u = new Promise((h, D) => {
|
|
805
|
-
l = D, g = h, V().then(() => {
|
|
806
|
-
Z(), Q(), g();
|
|
807
|
-
}).catch(() => {
|
|
808
|
-
l();
|
|
809
|
-
});
|
|
810
|
-
}), { promise: u, cancelPromise: () => l() };
|
|
811
|
-
};
|
|
812
|
-
return gr(() => {
|
|
813
|
-
if (S.current && C.setMapContainer(S.current), typeof ol < "u") {
|
|
814
|
-
const u = B();
|
|
815
|
-
return () => u.cancelPromise();
|
|
816
|
-
} else {
|
|
817
|
-
const u = ee(Or.map), g = () => {
|
|
818
|
-
B();
|
|
819
|
-
};
|
|
820
|
-
return u.addEventListener("load", g), () => u.removeEventListener("load", g);
|
|
821
|
-
}
|
|
822
|
-
}, []), /* @__PURE__ */ K(
|
|
823
|
-
"div",
|
|
824
|
-
{
|
|
825
|
-
ref: S,
|
|
826
|
-
className: _ || Sr.map,
|
|
827
|
-
style: T
|
|
828
|
-
}
|
|
829
|
-
);
|
|
830
|
-
}
|
|
831
|
-
), Dr = Ne(
|
|
832
|
-
(s, f) => /* @__PURE__ */ K(jr, { children: /* @__PURE__ */ K(kr, { ref: f, ...s }) })
|
|
833
|
-
);
|
|
834
|
-
export {
|
|
835
|
-
Dr as default
|
|
836
|
-
};
|