@mapsindoors/map-template 1.83.0 → 1.84.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.
Files changed (45) hide show
  1. package/dist/{GoogleMapsMap-ee5e3f10.mjs → GoogleMapsMap-c8bff8da.mjs} +2 -2
  2. package/dist/MapboxMap-eeac02e3.mjs +37817 -0
  3. package/dist/{combo-box-item.entry-c0caeaf2.mjs → combo-box-item.entry-1ea9084e.mjs} +2 -2
  4. package/dist/mapsindoors-react.es.js +2 -2
  5. package/dist/mapsindoors-react.umd.js +764 -292
  6. package/dist/mapsindoors-webcomponent.es.js +45612 -41242
  7. package/dist/mapsindoors-webcomponent.umd.js +762 -290
  8. package/dist/{mi-card_2.entry-f8d5b457.mjs → mi-card_2.entry-42c369c3.mjs} +2 -2
  9. package/dist/{mi-chip.entry-99891652.mjs → mi-chip.entry-f7009cfd.mjs} +2 -2
  10. package/dist/{mi-column.entry-2397c056.mjs → mi-column.entry-af6eb0a0.mjs} +2 -2
  11. package/dist/{mi-combo-box.entry-78eb13ba.mjs → mi-combo-box.entry-ebcbad0a.mjs} +2 -2
  12. package/dist/{mi-data-table.entry-20edbd50.mjs → mi-data-table.entry-3ff76c86.mjs} +2 -2
  13. package/dist/{mi-distance_2.entry-f863931c.mjs → mi-distance_2.entry-273556bb.mjs} +2 -2
  14. package/dist/{mi-dropdown-item.entry-9865b4b2.mjs → mi-dropdown-item.entry-269fd588.mjs} +2 -2
  15. package/dist/{mi-dropdown.entry-58a3bce3.mjs → mi-dropdown.entry-709914bc.mjs} +2 -2
  16. package/dist/{mi-floor-selector.entry-2f4e66c9.mjs → mi-floor-selector.entry-b1cb1138.mjs} +2 -2
  17. package/dist/{mi-keyboard.entry-c72249d2.mjs → mi-keyboard.entry-8b25e4ab.mjs} +2 -2
  18. package/dist/{mi-list-item-category.entry-810e32d5.mjs → mi-list-item-category.entry-15cea3f1.mjs} +2 -2
  19. package/dist/{mi-list-item-location.entry-0c7c9982.mjs → mi-list-item-location.entry-69ad460b.mjs} +2 -2
  20. package/dist/{mi-list.entry-1d3b0ed2.mjs → mi-list.entry-e317e253.mjs} +2 -2
  21. package/dist/{mi-location-booking.entry-1cd02f85.mjs → mi-location-booking.entry-ffccac8a.mjs} +2 -2
  22. package/dist/{mi-location-info.entry-1432e808.mjs → mi-location-info.entry-97ed8b2d.mjs} +2 -2
  23. package/dist/{mi-map-googlemaps.entry-e05a411c.mjs → mi-map-googlemaps.entry-f7e4a9f0.mjs} +2 -2
  24. package/dist/{mi-map-mapbox.entry-6d491150.mjs → mi-map-mapbox.entry-bc24ac5e.mjs} +2 -2
  25. package/dist/{mi-metric-card.entry-dd0d16f0.mjs → mi-metric-card.entry-7a66d927.mjs} +2 -2
  26. package/dist/mi-my-position.entry-dca1620d.mjs +618 -0
  27. package/dist/{mi-notification.entry-09e31199.mjs → mi-notification.entry-d120ef40.mjs} +2 -2
  28. package/dist/{mi-route-instructions-heading.entry-41fd76e6.mjs → mi-route-instructions-heading.entry-1c4cd946.mjs} +2 -2
  29. package/dist/{mi-route-instructions-maneuver-legacy.entry-d51a5018.mjs → mi-route-instructions-maneuver-legacy.entry-9ed5b338.mjs} +2 -2
  30. package/dist/{mi-route-instructions-maneuver.entry-7abc8c5d.mjs → mi-route-instructions-maneuver.entry-df62d445.mjs} +2 -2
  31. package/dist/{mi-route-instructions-step-legacy.entry-b9c74d0f.mjs → mi-route-instructions-step-legacy.entry-d5d2a202.mjs} +2 -2
  32. package/dist/{mi-route-instructions-step.entry-529df872.mjs → mi-route-instructions-step.entry-26a299cf.mjs} +2 -2
  33. package/dist/{mi-route-instructions.entry-a7a5fda5.mjs → mi-route-instructions.entry-73fd708b.mjs} +2 -2
  34. package/dist/{mi-scroll-buttons.entry-6f79c270.mjs → mi-scroll-buttons.entry-b8fd1d88.mjs} +2 -2
  35. package/dist/{mi-search.entry-bfea09cb.mjs → mi-search.entry-73e0a559.mjs} +2 -2
  36. package/dist/{mi-share-sms.entry-5e673d75.mjs → mi-share-sms.entry-cfae3304.mjs} +2 -2
  37. package/dist/{mi-step-switcher.entry-6124bf72.mjs → mi-step-switcher.entry-eba8d384.mjs} +2 -2
  38. package/dist/{mi-tab-panel.entry-f5d2aecd.mjs → mi-tab-panel.entry-63bb2bf8.mjs} +2 -2
  39. package/dist/{mi-tab.entry-65b7addd.mjs → mi-tab.entry-0aab505c.mjs} +2 -2
  40. package/dist/{mi-tabs.entry-fb7a483a.mjs → mi-tabs.entry-06970416.mjs} +2 -2
  41. package/dist/{mi-time.entry-c44d03ec.mjs → mi-time.entry-3c120b50.mjs} +2 -2
  42. package/dist/{reactcomponent-26e38434.mjs → reactcomponent-bcc53107.mjs} +5333 -5235
  43. package/package.json +2 -2
  44. package/dist/MapboxMap-09b73c3c.mjs +0 -33635
  45. package/dist/mi-my-position.entry-35b014fb.mjs +0 -528
@@ -0,0 +1,618 @@
1
+ import { r as be, c as oe, h as yi, H as pe } from "./reactcomponent-bcc53107.mjs";
2
+ import { c as Ne, a as Ie } from "./_commonjsHelpers-ba3f0406-b96e6d6a.mjs";
3
+ import "react";
4
+ import "react-dom";
5
+ var Zi = Ne(function(t, a) {
6
+ ((h, b) => {
7
+ function T(r) {
8
+ for (var c = {}, d = 0; d < r.length; d++)
9
+ c[r[d].toUpperCase()] = r[d];
10
+ return c;
11
+ }
12
+ var G = 500, pi = "user-agent", A = "", Hi = "?", Ni = "function", Z = "undefined", F = "object", fi = "string", v = "browser", U = "cpu", L = "device", P = "engine", z = "os", J = "result", s = "name", i = "type", o = "vendor", n = "version", E = "architecture", ni = "major", e = "model", ri = "console", l = "mobile", p = "tablet", f = "smarttv", _ = "wearable", ji = "xr", ai = "embedded", ci = "inapp", Ai = "brands", B = "formFactors", vi = "fullVersionList", X = "platform", Ei = "platformVersion", Ii = "bitness", H = "sec-ch-ua", ae = H + "-full-version-list", ce = H + "-arch", ue = H + "-" + Ii, Me = H + "-form-factors", de = H + "-" + l, le = H + "-" + e, Ki = H + "-" + X, he = Ki + "-version", Vi = [Ai, vi, l, e, X, Ei, E, B, Ii], mi = "Amazon", $ = "Apple", Wi = "ASUS", Gi = "BlackBerry", q = "Google", Bi = "Huawei", xi = "Microsoft", zi = "Motorola", Pi = "Nvidia", qi = "OnePlus", Si = "OPPO", ui = "Samsung", Mi = "Sony", ki = "Xiaomi", Ci = "Zebra", Fi = "Chromium", K = "Chromecast", di = "Firefox", S = "Opera", Li = "Facebook", ii = "Mobile ", li = " Browser", _i = "Windows", Ji = typeof h !== Z, x = Ji && h.navigator ? h.navigator : b, V = x && x.userAgentData ? x.userAgentData : b, Ui = function(r, c) {
13
+ if (typeof r === F && 0 < r.length) {
14
+ for (var d in r)
15
+ if (Y(r[d]) == Y(c))
16
+ return !0;
17
+ return !1;
18
+ }
19
+ return !!ei(r) && Y(c).indexOf(Y(r)) !== -1;
20
+ }, Ti = function(r, c) {
21
+ for (var d in r)
22
+ return /^(browser|cpu|device|engine|os)$/.test(d) || !!c && Ti(r[d]);
23
+ }, ei = function(r) {
24
+ return typeof r === fi;
25
+ }, Yi = function(r) {
26
+ if (!r)
27
+ return b;
28
+ for (var c, d = [], y = ti(/\\?\"/g, r).split(","), u = 0; u < y.length; u++)
29
+ -1 < y[u].indexOf(";") ? (c = wi(y[u]).split(";v="), d[u] = { brand: c[0], version: c[1] }) : d[u] = wi(y[u]);
30
+ return d;
31
+ }, Y = function(r) {
32
+ return ei(r) ? r.toLowerCase() : r;
33
+ }, Qi = function(r) {
34
+ return ei(r) ? ti(/[^\d\.]/g, r).split(".")[0] : b;
35
+ }, Q = function(r) {
36
+ for (var c in r)
37
+ c = r[c], typeof c == F && c.length == 2 ? this[c[0]] = c[1] : this[c] = b;
38
+ return this;
39
+ }, ti = function(r, c) {
40
+ return ei(c) ? c.replace(r, A) : c;
41
+ }, hi = function(r) {
42
+ return ti(/\\?\"/g, r);
43
+ }, wi = function(r, c) {
44
+ if (ei(r))
45
+ return r = ti(/^\s\s*/, r), typeof c === Z ? r : r.substring(0, G);
46
+ }, Ri = function(r, c) {
47
+ if (r && c)
48
+ for (var d, y, u, w, N, I = 0; I < c.length && !w; ) {
49
+ for (var g = c[I], m = c[I + 1], D = d = 0; D < g.length && !w && g[D]; )
50
+ if (w = g[D++].exec(r))
51
+ for (y = 0; y < m.length; y++)
52
+ N = w[++d], typeof (u = m[y]) === F && 0 < u.length ? u.length === 2 ? typeof u[1] == Ni ? this[u[0]] = u[1].call(this, N) : this[u[0]] = u[1] : u.length === 3 ? typeof u[1] !== Ni || u[1].exec && u[1].test ? this[u[0]] = N ? N.replace(u[1], u[2]) : b : this[u[0]] = N ? u[1].call(this, N, u[2]) : b : u.length === 4 && (this[u[0]] = N ? u[3].call(this, N.replace(u[1], u[2])) : b) : this[u] = N || b;
53
+ I += 2;
54
+ }
55
+ }, W = function(r, c) {
56
+ for (var d in c)
57
+ if (typeof c[d] === F && 0 < c[d].length) {
58
+ for (var y = 0; y < c[d].length; y++)
59
+ if (Ui(c[d][y], r))
60
+ return d === Hi ? b : d;
61
+ } else if (Ui(c[d], r))
62
+ return d === Hi ? b : d;
63
+ return c.hasOwnProperty("*") ? c["*"] : r;
64
+ }, Xi = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, $i = { embedded: "Automotive", mobile: "Mobile", tablet: ["Tablet", "EInk"], smarttv: "TV", wearable: "Watch", xr: ["VR", "XR"], "?": ["Desktop", "Unknown"], "*": b }, ie = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [n, [s, ii + "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [n, [s, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [s, n], [/opios[\/ ]+([\w\.]+)/i], [n, [s, S + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [n, [s, S + " GX"]], [/\bopr\/([\w\.]+)/i], [n, [s, S]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [n, [s, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [n, [s, "Maxthon"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i, /(heytap|ovi|115|surf)browser\/([\d\.]+)/i, /(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i], [s, n], [/quark(?:pc)?\/([-\w\.]+)/i], [n, [s, "Quark"]], [/\bddg\/([\w\.]+)/i], [n, [s, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [n, [s, "UCBrowser"]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [n, [s, "WeChat"]], [/konqueror\/([\w\.]+)/i], [n, [s, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [n, [s, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [n, [s, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [n, [s, "Smart Lenovo" + li]], [/(avast|avg)\/([\w\.]+)/i], [[s, /(.+)/, "$1 Secure" + li], n], [/\bfocus\/([\w\.]+)/i], [n, [s, di + " Focus"]], [/\bopt\/([\w\.]+)/i], [n, [s, S + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [n, [s, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [n, [s, "Dolphin"]], [/coast\/([\w\.]+)/i], [n, [s, S + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [n, [s, "MIUI" + li]], [/fxios\/([\w\.-]+)/i], [n, [s, ii + di]], [/\bqihoobrowser\/?([\w\.]*)/i], [n, [s, "360"]], [/\b(qq)\/([\w\.]+)/i], [[s, /(.+)/, "$1Browser"], n], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[s, /(.+)/, "$1" + li], n], [/samsungbrowser\/([\w\.]+)/i], [n, [s, ui + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [n, [s, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[s, "Sogou Mobile"], n], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [s, n], [/(lbbrowser|rekonq)/i], [s], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [n, s], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[s, Li], n, [i, ci]], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /(daum)apps[\/ ]([\w\.]+)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(twitter)(?:and| f.+e\/([\w\.]+))/i, /(instagram|snapchat)[\/ ]([-\w\.]+)/i], [s, n, [i, ci]], [/\bgsa\/([\w\.]+) .*safari\//i], [n, [s, "GSA"], [i, ci]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [n, [s, "TikTok"], [i, ci]], [/\[(linkedin)app\]/i], [s, [i, ci]], [/(chromium)[\/ ]([-\w\.]+)/i], [s, n], [/headlesschrome(?:\/([\w\.]+)| )/i], [n, [s, "Chrome Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[s, "Chrome WebView"], n], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [n, [s, "Android" + li]], [/chrome\/([\w\.]+) mobile/i], [n, [s, ii + "Chrome"]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [s, n], [/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i], [n, [s, ii + "Safari"]], [/iphone .*mobile(?:\/\w+ | ?)safari/i], [[s, ii + "Safari"]], [/version\/([\w\.\,]+) .*(safari)/i], [n, s], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [s, [n, "1"]], [/(webkit|khtml)\/([\w\.]+)/i], [s, n], [/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i], [[s, ii + di], n], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[s, "Netscape"], n], [/(wolvic|librewolf)\/([\w\.]+)/i], [s, n], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [n, [s, di + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /\b(links) \(([\w\.]+)/i], [s, [n, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [s, [n, /[^\d\.]+./, A]]], cpu: [[/\b((amd|x|x86[-_]?|wow|win)64)\b/i], [[E, "amd64"]], [/(ia32(?=;))/i, /\b((i[346]|x)86)(pc)?\b/i], [[E, "ia32"]], [/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i], [[E, "arm64"]], [/\b(arm(v[67])?ht?n?[fl]p?)\b/i], [[E, "armhf"]], [/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i], [[E, "arm"]], [/((ppc|powerpc)(64)?)( mac|;|\))/i], [[E, /ower/, A, Y]], [/ sun4\w[;\)]/i], [[E, "sparc"]], [/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i], [[E, Y]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [e, [o, ui], [i, p]], [/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]((?!sm-[lr])[-\w]+)/i, /sec-(sgh\w+)/i], [e, [o, ui], [i, l]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [e, [o, $], [i, l]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [e, [o, $], [i, p]], [/(macintosh);/i], [e, [o, $]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [e, [o, "Sharp"], [i, l]], [/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i], [e, [o, "Honor"], [i, p]], [/honor([-\w ]+)[;\)]/i], [e, [o, "Honor"], [i, l]], [/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i], [e, [o, Bi], [i, p]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [e, [o, Bi], [i, l]], [/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i, /\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i], [[e, /_/g, " "], [o, ki], [i, p]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i, / ([\w ]+) miui\/v?\d/i], [[e, /_/g, " "], [o, ki], [i, l]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [e, [o, Si], [i, l]], [/\b(opd2(\d{3}a?))(?: bui|\))/i], [e, [o, W, { OnePlus: ["304", "403", "203"], "*": Si }], [i, p]], [/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i], [e, [o, "BLU"], [i, l]], [/; vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [e, [o, "Vivo"], [i, l]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [e, [o, "Realme"], [i, l]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [e, [o, zi], [i, l]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [e, [o, zi], [i, p]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [e, [o, "LG"], [i, p]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i, /\blg-?([\d\w]+) bui/i], [e, [o, "LG"], [i, l]], [/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i, /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i], [e, [o, "Lenovo"], [i, p]], [/(nokia) (t[12][01])/i], [o, e, [i, p]], [/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i, /nokia[-_ ]?(([-\w\. ]*))/i], [[e, /_/g, " "], [i, l], [o, "Nokia"]], [/(pixel (c|tablet))\b/i], [e, [o, q], [i, p]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [e, [o, q], [i, l]], [/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [e, [o, Mi], [i, l]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[e, "Xperia Tablet"], [o, Mi], [i, p]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [e, [o, qi], [i, l]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [e, [o, mi], [i, p]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[e, /(.+)/g, "Fire Phone $1"], [o, mi], [i, l]], [/(playbook);[-\w\),; ]+(rim)/i], [e, o, [i, p]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [e, [o, Gi], [i, l]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [e, [o, Wi], [i, p]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [e, [o, Wi], [i, l]], [/(nexus 9)/i], [e, [o, "HTC"], [i, p]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [o, [e, /_/g, " "], [i, l]], [/tcl (xess p17aa)/i, /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i], [e, [o, "TCL"], [i, p]], [/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i], [e, [o, "TCL"], [i, l]], [/(itel) ((\w+))/i], [[o, Y], e, [i, W, { tablet: ["p10001l", "w7001"], "*": "mobile" }]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [e, [o, "Acer"], [i, p]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [e, [o, "Meizu"], [i, l]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [e, [o, "Ulefone"], [i, l]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [e, [o, "Energizer"], [i, l]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [e, [o, "Cat"], [i, l]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [e, [o, "Smartfren"], [i, l]], [/droid.+; (a(?:015|06[35]|142p?))/i], [e, [o, "Nothing"], [i, l]], [/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i, /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i], [e, [o, "Archos"], [i, p]], [/archos ([\w ]+)( b|\))/i, /; (ac[3-6]\d\w{2,8})( b|\))/i], [e, [o, "Archos"], [i, l]], [/(imo) (tab \w+)/i, /(infinix) (x1101b?)/i], [o, e, [i, p]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i, /(hp) ([\w ]+\w)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, /(oppo) ?([\w ]+) bui/i], [o, e, [i, l]], [/(kobo)\s(ereader|touch)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i], [o, e, [i, p]], [/(surface duo)/i], [e, [o, xi], [i, p]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [e, [o, "Fairphone"], [i, l]], [/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i], [e, [o, Pi], [i, p]], [/(sprint) (\w+)/i], [o, e, [i, l]], [/(kin\.[onetw]{3})/i], [[e, /\./g, " "], [o, xi], [i, l]], [/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [e, [o, Ci], [i, p]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [e, [o, Ci], [i, l]], [/smart-tv.+(samsung)/i], [o, [i, f]], [/hbbtv.+maple;(\d+)/i], [[e, /^/, "SmartTV"], [o, ui], [i, f]], [/tcast.+(lg)e?. ([-\w]+)/i], [o, e, [i, f]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[o, "LG"], [i, f]], [/(apple) ?tv/i], [o, [e, $ + " TV"], [i, f]], [/crkey.*devicetype\/chromecast/i], [[e, K + " Third Generation"], [o, q], [i, f]], [/crkey.*devicetype\/([^/]*)/i], [[e, /^/, "Chromecast "], [o, q], [i, f]], [/fuchsia.*crkey/i], [[e, K + " Nest Hub"], [o, q], [i, f]], [/crkey/i], [[e, K], [o, q], [i, f]], [/(portaltv)/i], [e, [o, Li], [i, f]], [/droid.+aft(\w+)( bui|\))/i], [e, [o, mi], [i, f]], [/(shield \w+ tv)/i], [e, [o, Pi], [i, f]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [e, [o, "Sharp"], [i, f]], [/(bravia[\w ]+)( bui|\))/i], [e, [o, Mi], [i, f]], [/(mi(tv|box)-?\w+) bui/i], [e, [o, ki], [i, f]], [/Hbbtv.*(technisat) (.*);/i], [o, e, [i, f]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[o, wi], [e, wi], [i, f]], [/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i], [e, [i, f]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[i, f]], [/(ouya)/i, /(nintendo) (\w+)/i], [o, e, [i, ri]], [/droid.+; (shield)( bui|\))/i], [e, [o, Pi], [i, ri]], [/(playstation \w+)/i], [e, [o, Mi], [i, ri]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [e, [o, xi], [i, ri]], [/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i], [e, [o, ui], [i, _]], [/((pebble))app/i, /(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i], [o, e, [i, _]], [/(ow(?:19|20)?we?[1-3]{1,3})/i], [e, [o, Si], [i, _]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [e, [o, $], [i, _]], [/(opwwe\d{3})/i], [e, [o, qi], [i, _]], [/(moto 360)/i], [e, [o, zi], [i, _]], [/(smartwatch 3)/i], [e, [o, Mi], [i, _]], [/(g watch r)/i], [e, [o, "LG"], [i, _]], [/droid.+; (wt63?0{2,3})\)/i], [e, [o, Ci], [i, _]], [/droid.+; (glass) \d/i], [e, [o, q], [i, ji]], [/(pico) (4|neo3(?: link|pro)?)/i], [o, e, [i, ji]], [/(quest( \d| pro)?s?).+vr/i], [e, [o, Li], [i, ji]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [o, [i, ai]], [/(aeobc)\b/i], [e, [o, mi], [i, ai]], [/(homepod).+mac os/i], [e, [o, $], [i, ai]], [/windows iot/i], [[i, ai]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i], [e, [i, W, { mobile: "Mobile", xr: "VR", "*": p }]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[i, p]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[i, l]], [/droid .+?; ([\w\. -]+)( bui|\))/i], [e, [o, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [n, [s, "EdgeHTML"]], [/(arkweb)\/([\w\.]+)/i], [s, n], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [n, [s, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [s, n], [/ladybird\//i], [[s, "LibWeb"]], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [n, s]], os: [[/microsoft (windows) (vista|xp)/i], [s, n], [/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i], [s, [n, W, Xi]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[n, W, Xi], [s, _i]], [/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[n, /_/g, "."], [s, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[s, "macOS"], [n, /_/g, "."]], [/android ([\d\.]+).*crkey/i], [n, [s, K + " Android"]], [/fuchsia.*crkey\/([\d\.]+)/i], [n, [s, K + " Fuchsia"]], [/crkey\/([\d\.]+).*devicetype\/smartspeaker/i], [n, [s, K + " SmartSpeaker"]], [/linux.*crkey\/([\d\.]+)/i], [n, [s, K + " Linux"]], [/crkey\/([\d\.]+)/i], [n, [s, K]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [n, s], [/(ubuntu) ([\w\.]+) like android/i], [[s, /(.+)/, "$1 Touch"], n], [/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i], [s, n], [/\(bb(10);/i], [n, [s, Gi]], [/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i], [n, [s, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [n, [s, di + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [n, [s, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [n, [s, "watchOS"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[s, "Chrome OS"], n], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) (\w+)/i, /(xbox); +xbox ([^\);]+)/i, /(pico) .+os([\w\.]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [s, n], [/(sunos) ?([\w\.\d]*)/i], [[s, "Solaris"], n], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [s, n]] }, Di = (S = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} }, Q.call(S.init, [[v, [s, n, ni, i]], [U, [E]], [L, [i, e, o]], [P, [s, n]], [z, [s, n]]]), Q.call(S.isIgnore, [[v, [n, ni]], [P, [n]], [z, [n]]]), Q.call(S.isIgnoreRgx, [[v, / ?browser$/i], [z, / ?os$/i]]), Q.call(S.toString, [[v, [s, n]], [U, [E]], [L, [o, e]], [P, [s, n]], [z, [s, n]]]), S), we = function(r, c) {
65
+ var d = Di.init[c], y = Di.isIgnore[c] || 0, u = Di.isIgnoreRgx[c] || 0, w = Di.toString[c] || 0;
66
+ function N() {
67
+ Q.call(this, d);
68
+ }
69
+ return N.prototype.getItem = function() {
70
+ return r;
71
+ }, N.prototype.withClientHints = function() {
72
+ return V ? V.getHighEntropyValues(Vi).then(function(I) {
73
+ return r.setCH(new ee(I, !1)).parseCH().get();
74
+ }) : r.parseCH().get();
75
+ }, N.prototype.withFeatureCheck = function() {
76
+ return r.detectFeature().get();
77
+ }, c != J && (N.prototype.is = function(I) {
78
+ var g, m = !1;
79
+ for (g in this)
80
+ if (this.hasOwnProperty(g) && !Ui(y, g) && Y(u ? ti(u, this[g]) : this[g]) == Y(u ? ti(u, I) : I)) {
81
+ if (m = !0, I != Z)
82
+ break;
83
+ } else if (I == Z && m) {
84
+ m = !m;
85
+ break;
86
+ }
87
+ return m;
88
+ }, N.prototype.toString = function() {
89
+ var I, g = A;
90
+ for (I in w)
91
+ typeof this[w[I]] !== Z && (g += (g ? " " : A) + this[w[I]]);
92
+ return g || Z;
93
+ }), V || (N.prototype.then = function(I) {
94
+ function g() {
95
+ for (var R in m)
96
+ m.hasOwnProperty(R) && (this[R] = m[R]);
97
+ }
98
+ var m = this, D = (g.prototype = { is: N.prototype.is, toString: N.prototype.toString }, new g());
99
+ return I(D), D;
100
+ }), new N();
101
+ };
102
+ function ee(r, c) {
103
+ if (r = r || {}, Q.call(this, Vi), c)
104
+ Q.call(this, [[Ai, Yi(r[H])], [vi, Yi(r[ae])], [l, /\?1/.test(r[de])], [e, hi(r[le])], [X, hi(r[Ki])], [Ei, hi(r[he])], [E, hi(r[ce])], [B, Yi(r[Me])], [Ii, hi(r[ue])]]);
105
+ else
106
+ for (var d in r)
107
+ this.hasOwnProperty(d) && typeof r[d] !== Z && (this[d] = r[d]);
108
+ }
109
+ function te(r, c, d, y) {
110
+ return this.get = function(u) {
111
+ return u ? this.data.hasOwnProperty(u) ? this.data[u] : b : this.data;
112
+ }, this.set = function(u, w) {
113
+ return this.data[u] = w, this;
114
+ }, this.setCH = function(u) {
115
+ return this.uaCH = u, this;
116
+ }, this.detectFeature = function() {
117
+ if (x && x.userAgent == this.ua)
118
+ switch (this.itemType) {
119
+ case v:
120
+ x.brave && typeof x.brave.isBrave == Ni && this.set(s, "Brave");
121
+ break;
122
+ case L:
123
+ !this.get(i) && V && V[l] && this.set(i, l), this.get(e) == "Macintosh" && x && typeof x.standalone !== Z && x.maxTouchPoints && 2 < x.maxTouchPoints && this.set(e, "iPad").set(i, p);
124
+ break;
125
+ case z:
126
+ !this.get(s) && V && V[X] && this.set(s, V[X]);
127
+ break;
128
+ case J:
129
+ var u = this.data, w = function(N) {
130
+ return u[N].getItem().detectFeature().get();
131
+ };
132
+ this.set(v, w(v)).set(U, w(U)).set(L, w(L)).set(P, w(P)).set(z, w(z));
133
+ }
134
+ return this;
135
+ }, this.parseUA = function() {
136
+ return this.itemType != J && Ri.call(this.data, this.ua, this.rgxMap), this.itemType == v && this.set(ni, Qi(this.get(n))), this;
137
+ }, this.parseCH = function() {
138
+ var u, w = this.uaCH, N = this.rgxMap;
139
+ switch (this.itemType) {
140
+ case v:
141
+ case P:
142
+ var I, g = w[vi] || w[Ai];
143
+ if (g)
144
+ for (var m in g) {
145
+ var D = g[m].brand || g[m], m = g[m].version;
146
+ this.itemType != v || /not.a.brand/i.test(D) || I && (!/chrom/i.test(I) || D == Fi) || (D = W(D, { Chrome: "Google Chrome", Edge: "Microsoft Edge", "Chrome WebView": "Android WebView", "Chrome Headless": "HeadlessChrome", "Huawei Browser": "HuaweiBrowser", "MIUI Browser": "Miui Browser", "Opera Mobi": "OperaMobile", Yandex: "YaBrowser" }), this.set(s, D).set(n, m).set(ni, Qi(m)), I = D), this.itemType == P && D == Fi && this.set(n, m);
147
+ }
148
+ break;
149
+ case U:
150
+ var O = w[E];
151
+ O && (w[Ii] == "64" && (O += "64"), Ri.call(this.data, O + ";", N));
152
+ break;
153
+ case L:
154
+ if (w[l] && this.set(i, l), w[e] && (this.set(e, w[e]), this.get(i) && this.get(o) || (Ri.call(O = {}, "droid 9; " + w[e] + ")", N), !this.get(i) && O.type && this.set(i, O.type), !this.get(o) && O.vendor && this.set(o, O.vendor))), w[B]) {
155
+ if (typeof w[B] != "string")
156
+ for (var R = 0; !u && R < w[B].length; )
157
+ u = W(w[B][R++], $i);
158
+ else
159
+ u = W(w[B], $i);
160
+ this.set(i, u);
161
+ }
162
+ break;
163
+ case z:
164
+ var C, O = w[X];
165
+ O && (C = w[Ei], O == _i && (C = 13 <= parseInt(Qi(C), 10) ? "11" : "10"), this.set(s, O).set(n, C)), this.get(s) == _i && w[e] == "Xbox" && this.set(s, "Xbox").set(n, b);
166
+ break;
167
+ case J:
168
+ var Oi = this.data, O = function(ge) {
169
+ return Oi[ge].getItem().setCH(w).parseCH().get();
170
+ };
171
+ this.set(v, O(v)).set(U, O(U)).set(L, O(L)).set(P, O(P)).set(z, O(z));
172
+ }
173
+ return this;
174
+ }, Q.call(this, [["itemType", r], ["ua", c], ["uaCH", y], ["rgxMap", d], ["data", we(this, r)]]), this;
175
+ }
176
+ function k(r, c, d) {
177
+ var y, u, w, N, I;
178
+ return typeof r === F ? (c = Ti(r, !0) ? (typeof c === F && (d = c), r) : (d = r, b), r = b) : typeof r !== fi || Ti(c, !0) || (d = c, c = b), d && typeof d.append === Ni && (y = {}, d.forEach(function(g, m) {
179
+ y[m] = g;
180
+ }), d = y), this instanceof k ? (u = typeof r === fi ? r : d && d[pi] ? d[pi] : x && x.userAgent ? x.userAgent : A, w = new ee(d, !0), N = c ? ((g, m) => {
181
+ var D, R = {}, C = m;
182
+ if (!Ti(m))
183
+ for (var Oi in C = {}, m)
184
+ for (var O in m[Oi])
185
+ C[O] = m[Oi][O].concat(C[O] || []);
186
+ for (D in g)
187
+ R[D] = C[D] && C[D].length % 2 == 0 ? C[D].concat(g[D]) : g[D];
188
+ return R;
189
+ })(ie, c) : ie, Q.call(this, [["getBrowser", (I = function(g) {
190
+ return g == J ? function() {
191
+ return new te(g, u, N, w).set("ua", u).set(v, this.getBrowser()).set(U, this.getCPU()).set(L, this.getDevice()).set(P, this.getEngine()).set(z, this.getOS()).get();
192
+ } : function() {
193
+ return new te(g, u, N[g], w).parseUA().get();
194
+ };
195
+ })(v)], ["getCPU", I(U)], ["getDevice", I(L)], ["getEngine", I(P)], ["getOS", I(z)], ["getResult", I(J)], ["getUA", function() {
196
+ return u;
197
+ }], ["setUA", function(g) {
198
+ return ei(g) && (u = g.length > G ? wi(g, G) : g), this;
199
+ }]]).setUA(u), this) : new k(r, c, d).getResult();
200
+ }
201
+ k.VERSION = "2.0.3", k.BROWSER = T([s, n, ni, i]), k.CPU = T([E]), k.DEVICE = T([e, o, i, ri, l, f, p, _, ai]), k.ENGINE = k.OS = T([s, n]), (a = t.exports ? t.exports = k : a).UAParser = k;
202
+ var gi, oi = Ji && (h.jQuery || h.Zepto);
203
+ oi && !oi.ua && (gi = new k(), oi.ua = gi.getResult(), oi.ua.get = function() {
204
+ return gi.getUA();
205
+ }, oi.ua.set = function(r) {
206
+ gi.setUA(r);
207
+ var c, d = gi.getResult();
208
+ for (c in d)
209
+ oi.ua[c] = d[c];
210
+ });
211
+ })(typeof window == "object" ? window : Ie);
212
+ }), me = function(a) {
213
+ return Te(a) && !De(a);
214
+ };
215
+ function Te(t) {
216
+ return !!t && typeof t == "object";
217
+ }
218
+ function De(t) {
219
+ var a = Object.prototype.toString.call(t);
220
+ return a === "[object RegExp]" || a === "[object Date]" || fe(t);
221
+ }
222
+ var Oe = typeof Symbol == "function" && Symbol.for, ye = Oe ? Symbol.for("react.element") : 60103;
223
+ function fe(t) {
224
+ return t.$$typeof === ye;
225
+ }
226
+ function je(t) {
227
+ return Array.isArray(t) ? [] : {};
228
+ }
229
+ function bi(t, a) {
230
+ return a.clone !== !1 && a.isMergeableObject(t) ? si(je(t), t, a) : t;
231
+ }
232
+ function Ae(t, a, h) {
233
+ return t.concat(a).map(function(b) {
234
+ return bi(b, h);
235
+ });
236
+ }
237
+ function ve(t, a) {
238
+ if (!a.customMerge)
239
+ return si;
240
+ var h = a.customMerge(t);
241
+ return typeof h == "function" ? h : si;
242
+ }
243
+ function Ee(t) {
244
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(a) {
245
+ return Object.propertyIsEnumerable.call(t, a);
246
+ }) : [];
247
+ }
248
+ function se(t) {
249
+ return Object.keys(t).concat(Ee(t));
250
+ }
251
+ function re(t, a) {
252
+ try {
253
+ return a in t;
254
+ } catch {
255
+ return !1;
256
+ }
257
+ }
258
+ function xe(t, a) {
259
+ return re(t, a) && !(Object.hasOwnProperty.call(t, a) && Object.propertyIsEnumerable.call(t, a));
260
+ }
261
+ function ze(t, a, h) {
262
+ var b = {};
263
+ return h.isMergeableObject(t) && se(t).forEach(function(T) {
264
+ b[T] = bi(t[T], h);
265
+ }), se(a).forEach(function(T) {
266
+ xe(t, T) || (re(t, T) && h.isMergeableObject(a[T]) ? b[T] = ve(T, h)(t[T], a[T], h) : b[T] = bi(a[T], h));
267
+ }), b;
268
+ }
269
+ function si(t, a, h) {
270
+ h = h || {}, h.arrayMerge = h.arrayMerge || Ae, h.isMergeableObject = h.isMergeableObject || me, h.cloneUnlessOtherwiseSpecified = bi;
271
+ var b = Array.isArray(a), T = Array.isArray(t), G = b === T;
272
+ return G ? b ? h.arrayMerge(t, a, h) : ze(t, a, h) : bi(a, h);
273
+ }
274
+ si.all = function(a, h) {
275
+ if (!Array.isArray(a))
276
+ throw new Error("first argument should be an array");
277
+ return a.reduce(function(b, T) {
278
+ return si(b, T, h);
279
+ }, {});
280
+ };
281
+ var Pe = si, ne = Pe;
282
+ class j {
283
+ /**
284
+ * Check if it is possible to get the position of the device using the GeoLocation API.
285
+ *
286
+ * @returns {boolean} True if the GeoLocation API is available in the browser, false otherwise.
287
+ */
288
+ isAvailable() {
289
+ return "geolocation" in navigator;
290
+ }
291
+ /**
292
+ * Check if the user has already granted permission to access the device's location.
293
+ *
294
+ * @returns {Promise<boolean>} A promise that resolves to true if permission is granted, false otherwise.
295
+ */
296
+ async isAlreadyGranted() {
297
+ return !("permissions" in navigator) || !("query" in navigator.permissions) ? Promise.resolve(!1) : (await navigator.permissions.query({ name: "geolocation" })).state === "granted";
298
+ }
299
+ /**
300
+ * Listen for position updates from the GeoLocation API.
301
+ *
302
+ * @param {number} maxAccuracy - The maximum accuracy of the position to accept.
303
+ * @param {Function} positionError - Callback function to call when an error occurs while getting the position.
304
+ * @param {Function} positionInaccurate - Callback function to call when the position is inaccurate.
305
+ * @param {Function} positionRequesting - Callback function to call when the position is being requested.
306
+ * @param {Function} positionReceived - Callback function to call when a position is received.
307
+ */
308
+ listenForPosition(a, h, b, T, G) {
309
+ if (!("permissions" in navigator) || !("query" in navigator.permissions)) {
310
+ h();
311
+ return;
312
+ }
313
+ T();
314
+ const pi = Date.now();
315
+ j.positionWatchId = navigator.geolocation.watchPosition((A) => {
316
+ j.currentPosition && A.coords.accuracy === j.currentPosition.coords.accuracy && A.coords.latitude === j.currentPosition.coords.latitude && A.coords.longitude === j.currentPosition.coords.longitude || (j.currentPosition = A, j.currentPosition.coords.accuracy <= a ? G(A) : b(A.coords.accuracy));
317
+ }, (A) => {
318
+ (A.code !== 3 || !j.currentPosition || j.currentPosition.timestamp <= pi) && h(A);
319
+ });
320
+ }
321
+ /**
322
+ * Stop listening for position updates from the GeoLocation API.
323
+ * This will clear the watch set by `listenForPosition` and reset the current position.
324
+ *
325
+ * @returns {void}
326
+ */
327
+ stopListeningForPosition() {
328
+ j.positionWatchId !== null && (navigator.geolocation.clearWatch(j.positionWatchId), j.positionWatchId = null), j.currentPosition = null;
329
+ }
330
+ }
331
+ j.currentPosition = null;
332
+ j.positionWatchId = null;
333
+ const Se = ".mi-my-position{display:flex;flex-direction:column;pointer-events:auto;gap:16px;right:0}.mi-my-position__position-button,.mi-my-position__compass-button{margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;background-repeat:no-repeat;background-position:center;outline:none;border-color:#e5e7eb;border-style:solid;background-color:#fcfcfc}.mi-my-position__position-button{background-size:23px;border-radius:8px}.mi-my-position__position-button--unknown{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY1NTIzIDEuMjIzNTZDMy4yNjQ3IDAuODMzMDMzIDIuNjMxNTQgMC44MzMwMzMgMi4yNDEwMSAxLjIyMzU2QzEuODUwNDkgMS42MTQwOCAxLjg1MDQ5IDIuMjQ3MjUgMi4yNDEwMSAyLjYzNzc3TDIyLjI2NiAyMi42NjI4QzIyLjY1NjUgMjMuMDUzMyAyMy4yODk3IDIzLjA1MzMgMjMuNjgwMiAyMi42NjI4QzI0LjA3MDcgMjIuMjcyMiAyNC4wNzA3IDIxLjYzOTEgMjMuNjgwMiAyMS4yNDg1TDE3LjcxNTcgMTUuMjg0MUwyMC43NzQ4IDcuMzYzMjVDMjEuNTYyOSA1LjMyMzE1IDE5LjU1NjIgMy4zMTY2NiAxNy41MTYyIDQu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jA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzczNzM3MyIvPgo8L3N2Zz4K)}.mi-my-position__position-button--known{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuODkzNDEgMTEuMjgzTDEuOTU2MTYgOS45OTYxMUMwLjA3NjYyOTIgOS41MDYyIC0wLjA3MTg0MTEgNi44OTQ4NSAxLjc0MDA1IDYuMTk1MDdMMTYuMzg4NiAwLjUzNzYxN0MxNy42MTkxIDAuMDYyMzc2NiAxOC44Mjk0IDEuMjcyNjYgMTguMzU0MSAyLjUwMzE2TDEyLjY5NjcgMTcuMTUxN0MxMS45OTY5IDE4Ljk2MzYgOS4zODU2NCAxOC44MTUxIDguODk1NzQgMTYuOTM1Nkw3LjYwODg0IDExLjk5ODRDNy41MTc1NCAxMS42NDggNy4yNDM4NiAxMS4zNzQzIDYuODkzNDEgMTEuMjgzWiIgZmlsbD0iIzczNzM3MyIvPgo8L3N2Zz4K)}.mi-my-position__position-button--centered{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZS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MTkxNSAyLjE3NTI3IDcuMzcyNjIgMi45NjI0MUwxMS41OTI5IDEyLjM2MDZDMTEuOTQ5MSAxMy4xNTM4IDExLjE5MzEgMTMuOTkyMyAxMC4zNjczIDEzLjcxOTlMNi43NzM2NyAxMi41MzQzQzYuNTcwMiAxMi40NjcxIDYuMzUwNTQgMTIuNDY3MSA2LjE0NzA3IDEyLjUzNDNMMi41NTM0MyAxMy43MTk5QzEuNzI3NjggMTMuOTkyMyAwLjk3MTY4MyAxMy4xNTM4IDEuMzI3ODggMTIuMzYwNkw1LjU0ODEzIDIuOTYyNDFaIiBmaWxsPSIjREMyNjI2Ii8+CjxwYXRoIGQ9Ik03LjM3MjUzIDI3Ljg5OTRDNy4wMTkwNiAyOC42ODY1IDUuOTAxNSAyOC42ODY1IDUuNTQ4MDQgMjcuODk5NEwxLjMyNzc5IDE4LjUwMTJDMC45NzE1OTcgMTcuNzA4IDEuNzI3NTkgMTYuODY5NSAyLjU1MzM0IDE3LjE0Mkw2LjE0Njk4IDE4LjMyNzVDNi4zNTA0NiAxOC4zOTQ3IDYuNTcwMTEgMTguMzk0NyA2Ljc3MzU5IDE4LjMyNzVMMTAuMzY3MiAxNy4xNDJDMTEuMTkzIDE2Ljg2OTUgMTEuOTQ5IDE3LjcwOCAxMS41OTI4IDE4LjUwMTJMNy4zNzI1MyAyNy44OTk0WiIgZmlsbD0iIzlDQTNBRiIvPgo8L3N2Zz4K);border-radius:50%}";
334
+ var M;
335
+ (function(t) {
336
+ t.POSITION_UNKNOWN = "POSITION_UNKNOWN", t.POSITION_REQUESTING = "POSITION_REQUESTING", t.POSITION_INACCURATE = "POSITION_INACCURATE", t.POSITION_KNOWN = "POSITION_KNOWN", t.POSITION_CENTERED = "POSITION_CENTERED", t.POSITION_TRACKED = "POSITION_TRACKED", t.POSITION_UNTRACKED = "POSITION_UNTRACKED";
337
+ })(M || (M = {}));
338
+ const ke = class {
339
+ constructor(t) {
340
+ be(this, t), this.position_error = oe(this, "position_error", 7), this.position_received = oe(this, "position_received", 7), this.parser = new Zi.UAParser(), this.handleDeviceOrientationReference = this.handleDeviceOrientation.bind(this), this.onPositionReceivedHandler = null, this.onPositionErrorHandler = null, this.defaultOptions = {
341
+ maxAccuracy: 200,
342
+ positionOptions: {
343
+ timeout: 3e4,
344
+ enableHighAccuracy: !0,
345
+ maximumAge: 0
346
+ },
347
+ positionMarkerStyles: {
348
+ radius: "12px",
349
+ strokeWeight: "2px",
350
+ strokeColor: "white",
351
+ fillColor: "#4169E1",
352
+ fillOpacity: 1
353
+ },
354
+ accuracyCircleStyles: {
355
+ fillColor: "#4169E1",
356
+ fillOpacity: 0.16
357
+ }
358
+ }, this.mapsindoors = void 0, this.myPositionOptions = void 0, this.customPositionProvider = void 0, this.positionState = M.POSITION_UNKNOWN;
359
+ }
360
+ /**
361
+ * Cleans up modern position provider event listeners.
362
+ * Removes registered event handlers and nulls the stored references to prevent memory leaks.
363
+ */
364
+ cleanupModernProviderListeners() {
365
+ if (!this.isModernProvider(this.positionProvider))
366
+ return;
367
+ const t = this.positionProvider;
368
+ this.onPositionReceivedHandler && (t.off("position_received", this.onPositionReceivedHandler), this.onPositionReceivedHandler = null), this.onPositionErrorHandler && (t.off("position_error", this.onPositionErrorHandler), this.onPositionErrorHandler = null);
369
+ }
370
+ /**
371
+ * Sets up event listeners for modern position providers.
372
+ * This ensures that position updates are handled immediately when setPosition() is called.
373
+ *
374
+ * Note: We use this.positionProvider (not this.customPositionProvider) because:
375
+ * - this.positionProvider is the resolved, validated provider
376
+ * - It's guaranteed to exist and be valid
377
+ * - It handles both custom and default providers consistently
378
+ * - All other methods in the component use this.positionProvider for consistency.
379
+ */
380
+ setupModernProviderListeners() {
381
+ if (!this.isModernProvider(this.positionProvider))
382
+ return;
383
+ this.cleanupModernProviderListeners();
384
+ const t = this.positionProvider;
385
+ this.onPositionReceivedHandler = ({ position: a }) => {
386
+ this.currentPosition = a, this.positionIsAccurate = a.coords.accuracy <= this.options.maxAccuracy, this.setPositionProviderOnMapView(), this.positionState === M.POSITION_TRACKED ? this.setPositionState(M.POSITION_UNTRACKED) : this.positionState !== M.POSITION_UNTRACKED && this.setPositionState(M.POSITION_KNOWN), window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference), this.position_received.emit({
387
+ position: this.currentPosition,
388
+ selfInvoked: !1,
389
+ accurate: this.positionIsAccurate
390
+ });
391
+ }, this.onPositionErrorHandler = (a) => {
392
+ this.setPositionState(M.POSITION_UNKNOWN), this.position_error.emit(a);
393
+ }, t.on("position_received", this.onPositionReceivedHandler), t.on("position_error", this.onPositionErrorHandler);
394
+ }
395
+ /**
396
+ * Sets a custom position. Works with any provider that implements setPosition.
397
+ * Uses this.positionProvider (the resolved provider) instead of this.customPositionProvider
398
+ * to ensure we're working with the validated, active provider.
399
+ */
400
+ async setPosition(t) {
401
+ var a;
402
+ !((a = this.positionProvider) === null || a === void 0) && a.setPosition && this.positionProvider.setPosition(t);
403
+ }
404
+ /**
405
+ * Removes the event listener for the device's orientation and resets the position button.
406
+ */
407
+ resetPositionState() {
408
+ window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference), this.positionState === M.POSITION_TRACKED ? this.setPositionState(M.POSITION_UNTRACKED) : this.positionState === M.POSITION_CENTERED && (this.setPositionState(M.POSITION_KNOWN), this.mapView.tilt(0));
409
+ }
410
+ /**
411
+ * Returns if position is known and accurate.
412
+ *
413
+ * @returns {boolean}
414
+ */
415
+ hasValidPosition() {
416
+ return [M.POSITION_KNOWN, M.POSITION_CENTERED, M.POSITION_INACCURATE, M.POSITION_TRACKED, M.POSITION_UNTRACKED].includes(this.positionState);
417
+ }
418
+ /**
419
+ * Sets the PositionControl as PositionProvider on the MapView.
420
+ */
421
+ setPositionProviderOnMapView() {
422
+ this.mapView.isReady ? this.mapView.setPositionProvider(this) : this.mapView.once("ready", () => {
423
+ this.mapView.setPositionProvider(this);
424
+ });
425
+ }
426
+ /**
427
+ * Pan map to center on the current position.
428
+ */
429
+ panToCurrentPosition() {
430
+ this.hasValidPosition() && (this.mapView.once("idle", () => {
431
+ this.mapView.on("user_interaction", () => this.resetPositionState());
432
+ }), this.mapView.panTo({ lat: this.currentPosition.coords.latitude, lng: this.currentPosition.coords.longitude }), this.positionState !== M.POSITION_TRACKED && this.setPositionState(M.POSITION_CENTERED), this.canBeTracked && (DeviceOrientationEvent.requestPermission ? DeviceOrientationEvent.requestPermission().then((t) => {
433
+ t === "granted" && this.positionState === M.POSITION_TRACKED ? window.addEventListener("deviceorientation", this.handleDeviceOrientationReference) : window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference);
434
+ }) : this.positionState === M.POSITION_TRACKED ? window.addEventListener("deviceorientation", this.handleDeviceOrientationReference) : window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference)));
435
+ }
436
+ /**
437
+ * Rotates and tilts the map.
438
+ *
439
+ * @param {DeviceOrientationEvent} e
440
+ */
441
+ handleDeviceOrientation(t) {
442
+ (!this.orientation || this.orientation - (360 - t.alpha) > 1 || this.orientation - (360 - t.alpha) < -1) && (this.orientation = 360 - t.alpha, this.mapView.easeTo({
443
+ center: [this.currentPosition.coords.longitude, this.currentPosition.coords.latitude],
444
+ rotation: this.orientation,
445
+ tilt: 60,
446
+ easing: (a) => a * (2 - a)
447
+ }));
448
+ }
449
+ /**
450
+ * Rotates the compass button using the transform CSS property.
451
+ *
452
+ * @param {number} bearing
453
+ */
454
+ setCompassStyle(t) {
455
+ this.compassButton.style.transform = `rotate(${t}deg)`;
456
+ }
457
+ /**
458
+ * Method for requesting the current position, emitting events and showing position on map based on result.
459
+ *
460
+ * @param {boolean} [selfInvoked=false] - Used to track if call was invoked by clicking on position control or not.
461
+ */
462
+ watchPosition(t = !1) {
463
+ if (this.setPositionProviderOnMapView(), this.isLegacyProvider(this.positionProvider))
464
+ this.positionProvider.listenForPosition(
465
+ this.options.maxAccuracy,
466
+ // Position error callback
467
+ (a) => {
468
+ this.setPositionState(M.POSITION_UNKNOWN), this.position_error.emit(a);
469
+ },
470
+ // Position inaccurate callback
471
+ (a) => {
472
+ this.setPositionState(M.POSITION_INACCURATE), this.position_error.emit({ code: 11, message: "Inaccurate position: " + a });
473
+ },
474
+ // Position requesting callback
475
+ () => {
476
+ this.setPositionState(M.POSITION_REQUESTING);
477
+ },
478
+ // Position received callback
479
+ (a) => {
480
+ this.currentPosition = a, this.positionIsAccurate = this.currentPosition.coords.accuracy <= this.options.maxAccuracy, this.positionState === M.POSITION_TRACKED ? this.setPositionState(M.POSITION_UNTRACKED) : this.positionState !== M.POSITION_UNTRACKED && this.setPositionState(M.POSITION_KNOWN), window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference), this.position_received.emit({
481
+ position: this.currentPosition,
482
+ selfInvoked: t,
483
+ accurate: this.positionIsAccurate
484
+ });
485
+ }
486
+ );
487
+ else {
488
+ const a = this.positionProvider;
489
+ a.hasValidPosition && a.hasValidPosition() ? (this.currentPosition = a.currentPosition, this.positionIsAccurate = this.currentPosition.coords.accuracy <= this.options.maxAccuracy, this.positionState === M.POSITION_TRACKED ? this.setPositionState(M.POSITION_UNTRACKED) : this.positionState !== M.POSITION_UNTRACKED && this.setPositionState(M.POSITION_KNOWN), window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference), this.position_received.emit({
490
+ position: this.currentPosition,
491
+ selfInvoked: t,
492
+ accurate: this.positionIsAccurate
493
+ })) : this.setPositionState(M.POSITION_REQUESTING);
494
+ }
495
+ }
496
+ /**
497
+ * Sets position button state.
498
+ *
499
+ * @param {PositionStateTypes} state
500
+ */
501
+ setPositionState(t) {
502
+ this.positionState = t;
503
+ }
504
+ /**
505
+ * Handle click on the compass button.
506
+ */
507
+ onCompassButtonClicked() {
508
+ this.setCompassStyle(0), this.mapView.rotate(0), this.mapView.tilt(0), window.removeEventListener("deviceorientation", this.handleDeviceOrientationReference), this.positionState === M.POSITION_TRACKED ? this.setPositionState(M.POSITION_CENTERED) : this.positionState === M.POSITION_UNTRACKED && this.setPositionState(M.POSITION_KNOWN);
509
+ }
510
+ /**
511
+ * Handle click on position button.
512
+ * Stops propagation to avoid any map click listeners to fire.
513
+ *
514
+ * @param {Event} event
515
+ */
516
+ onPositionButtonClicked(t) {
517
+ switch (t.stopPropagation(), this.positionState) {
518
+ case M.POSITION_UNKNOWN:
519
+ this.mapView.tilt(0), this.watchPosition(!0);
520
+ break;
521
+ case M.POSITION_KNOWN:
522
+ this.mapView.tilt(0), this.panToCurrentPosition();
523
+ break;
524
+ case M.POSITION_CENTERED:
525
+ this.canBeTracked && this.setPositionState(M.POSITION_TRACKED), this.panToCurrentPosition();
526
+ break;
527
+ case M.POSITION_TRACKED:
528
+ this.mapView.tilt(0), this.mapView.rotate(0), this.setCompassStyle(0), this.setPositionState(M.POSITION_CENTERED), this.panToCurrentPosition();
529
+ break;
530
+ case M.POSITION_UNTRACKED:
531
+ this.setPositionState(M.POSITION_TRACKED), this.panToCurrentPosition();
532
+ break;
533
+ }
534
+ }
535
+ /**
536
+ * Called every time the component has connected to the DOM.
537
+ * 1. Assigning the mapView and options attributes.
538
+ * 2. Checking for the navigator's state.
539
+ * 3. Determining whether the device can be tracked.
540
+ * 4. Asking for permission to track the device.
541
+ * 5. Styling the compass button.
542
+ */
543
+ connectedCallback() {
544
+ var t;
545
+ if (this.mapView = this.mapsindoors.getMapView(), this.options = ne(this.defaultOptions, (t = this.myPositionOptions) !== null && t !== void 0 ? t : {}), this.positionProvider && this.cleanupModernProviderListeners(), this.customPositionProvider && this.isValidPositionProvider(this.customPositionProvider) ? (this.positionProvider = this.customPositionProvider, this.isModernProvider(this.positionProvider) && this.positionProvider.options && (this.options = ne(this.options, this.positionProvider.options)), this.setupModernProviderListeners()) : this.positionProvider = new j(), (this.isLegacyProvider(this.positionProvider) ? this.positionProvider.isAvailable() : !0) === !1) {
546
+ this.setPositionState(M.POSITION_UNKNOWN), this.position_error.emit({ code: 10, message: "Location not available" });
547
+ return;
548
+ }
549
+ const h = this.parser.getDevice().type;
550
+ this.canBeTracked = !!(typeof window.DeviceOrientationEvent == "function" && (h === Zi.UAParser.DEVICE.MOBILE || h === Zi.UAParser.DEVICE.TABLET) && this.mapView.rotatable && this.mapView.tiltable), this.isLegacyProvider(this.positionProvider) ? this.positionProvider.isAlreadyGranted().then((b) => {
551
+ b ? this.watchPosition() : this.setPositionState(M.POSITION_UNKNOWN);
552
+ }) : this.positionProvider.hasValidPosition && this.positionProvider.hasValidPosition() ? (this.currentPosition = this.positionProvider.currentPosition, this.setPositionState(M.POSITION_KNOWN), this.position_received.emit({
553
+ position: this.currentPosition,
554
+ selfInvoked: !1,
555
+ accurate: !0
556
+ })) : this.setPositionState(M.POSITION_UNKNOWN), this.mapView.on("rotateend", () => {
557
+ this.setCompassStyle(this.mapView.getBearing());
558
+ });
559
+ }
560
+ /**
561
+ * Checks if the provider is a valid position provider (either legacy or modern).
562
+ *
563
+ * @param {any} provider - The provider to check.
564
+ * @returns {boolean} True if the provider is valid.
565
+ */
566
+ isValidPositionProvider(t) {
567
+ return t ? typeof t.isAvailable == "function" && typeof t.listenForPosition == "function" ? t.isAvailable() : typeof t.hasValidPosition == "function" && typeof t.on == "function" && typeof t.off == "function" : !1;
568
+ }
569
+ /**
570
+ * Checks if the provider uses the legacy callback-based interface.
571
+ *
572
+ * @param {IPositionProvider} provider - The provider to check.
573
+ * @returns {boolean} True if the provider uses the legacy interface.
574
+ */
575
+ isLegacyProvider(t) {
576
+ return t && typeof t.isAvailable == "function" && typeof t.listenForPosition == "function";
577
+ }
578
+ /**
579
+ * Checks if the provider uses the modern event-based interface.
580
+ *
581
+ * @param {IPositionProvider} provider - The provider to check.
582
+ * @returns {boolean} True if the provider uses the modern interface.
583
+ */
584
+ isModernProvider(t) {
585
+ return t && typeof t.hasValidPosition == "function" && typeof t.on == "function" && typeof t.off == "function";
586
+ }
587
+ /**
588
+ * Component render callback.
589
+ */
590
+ componentDidRender() {
591
+ this.setCompassStyle(this.mapView.getBearing());
592
+ }
593
+ /**
594
+ * Stops listening for position updates.
595
+ */
596
+ disconnectedCallback() {
597
+ this.positionProvider && (this.isLegacyProvider(this.positionProvider) ? this.positionProvider.stopListeningForPosition && this.positionProvider.stopListeningForPosition() : this.cleanupModernProviderListeners());
598
+ }
599
+ /**
600
+ * Renders the floor selector.
601
+ *
602
+ * @returns {JSX.Element}
603
+ */
604
+ render() {
605
+ return yi(pe, null, yi("div", { class: "mi-my-position" }, yi("button", { class: `mi-my-position__position-button
606
+ ${this.positionState === M.POSITION_UNKNOWN || this.positionState === M.POSITION_INACCURATE ? "mi-my-position__position-button--unknown" : ""}
607
+ ${this.positionState === M.POSITION_REQUESTING ? "mi-my-position__position-button--requesting" : ""}
608
+ ${this.positionState === M.POSITION_KNOWN ? "mi-my-position__position-button--known" : ""}
609
+ ${this.positionState === M.POSITION_CENTERED ? "mi-my-position__position-button--centered" : ""}
610
+ ${this.positionState === M.POSITION_TRACKED ? "mi-my-position__position-button--tracked" : ""}
611
+ ${this.positionState === M.POSITION_UNTRACKED ? "mi-my-position__position-button--untracked" : ""}`, onClick: (t) => this.onPositionButtonClicked(t) }), yi("button", { ref: (t) => this.compassButton = t, class: "mi-my-position__compass-button", onClick: () => this.onCompassButtonClicked() })));
612
+ }
613
+ };
614
+ ke.style = Se;
615
+ export {
616
+ ke as mi_my_position
617
+ };
618
+ //# sourceMappingURL=mi-my-position.entry-dca1620d.mjs.map