@appbaseio/reactivesearch-vue 3.3.0 → 3.3.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/dist/@appbaseio/reactivesearch-vue.umd.js +440 -696
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +4 -4
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{Button-f96a0570.js → Button-7aee17e3.js} +1 -1
- package/dist/cjs/{DropDown-ebe20e81.js → CancelSvg-6094cd37.js} +1 -292
- package/dist/cjs/{Card-63968d94.js → Card-abff695e.js} +2 -2
- package/dist/cjs/{ComponentWrapper-0334c14b.js → ComponentWrapper-3bedbe57.js} +2 -2
- package/dist/cjs/{Container-29f049b2.js → Container-1c05785a.js} +1 -1
- package/dist/cjs/DropDown-815d458e.js +299 -0
- package/dist/cjs/DynamicRangeSlider.js +6 -6
- package/dist/cjs/{Flex-ddde6d26.js → Flex-f7af0673.js} +1 -1
- package/dist/cjs/{FormControlList-fadd792f.js → FormControlList-2c10e01a.js} +1 -1
- package/dist/cjs/{Input-cee51a53.js → Input-55fbd8e1.js} +1 -1
- package/dist/cjs/{ListItem-7a682970.js → ListItem-f272f502.js} +2 -2
- package/dist/cjs/MultiDropdownList.js +11 -10
- package/dist/cjs/MultiList.js +9 -9
- package/dist/cjs/MultiRange.js +7 -7
- package/dist/cjs/{Pagination-c53a18ab.js → Pagination-accd2fbf.js} +1 -1
- package/dist/cjs/{PreferencesConsumer-7bee3c57.js → PreferencesConsumer-37cab7a0.js} +2 -2
- package/dist/cjs/RangeInput.js +9 -9
- package/dist/cjs/RangeSlider.js +7 -7
- package/dist/cjs/ReactiveBase.js +2 -2
- package/dist/cjs/ReactiveComponent.js +4 -4
- package/dist/cjs/ReactiveGoogleMap.js +8 -8
- package/dist/cjs/ReactiveList.js +10 -10
- package/dist/cjs/ResultCard.js +3 -3
- package/dist/cjs/ResultList.js +3 -3
- package/dist/cjs/{install-c61d8b86.js → SearchBox-4dff47b4.js} +39 -1681
- package/dist/cjs/SearchBox.js +38 -0
- package/dist/cjs/SelectedFilters.js +5 -5
- package/dist/cjs/SingleDropdownList.js +11 -10
- package/dist/cjs/SingleList.js +9 -9
- package/dist/cjs/SingleRange.js +7 -7
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/{Title-8802a218.js → Title-d513ac26.js} +1 -1
- package/dist/cjs/ToggleButton.js +7 -7
- package/dist/cjs/{_rollupPluginBabelHelpers-f8b843f8.js → _rollupPluginBabelHelpers-1a877b17.js} +14 -14
- package/dist/cjs/{index-1f41363f.js → index-7ca9570e.js} +1 -1
- package/dist/cjs/index.js +21 -19
- package/dist/cjs/install-246c0dab.js +1683 -0
- package/dist/cjs/install.js +19 -17
- package/dist/cjs/{ssr-8dd13d43.js → ssr-15d936a0.js} +1 -1
- package/dist/cjs/{utils-c9bd5628.js → utils-a3db8765.js} +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/{Button-5c2cf399.js → Button-8178e39a.js} +1 -1
- package/dist/es/{DropDown-36fa9ac5.js → CancelSvg-5b82ad4f.js} +3 -293
- package/dist/es/{Card-54b9e7a0.js → Card-3a81ac7b.js} +2 -2
- package/dist/es/{ComponentWrapper-46d04344.js → ComponentWrapper-90d42a29.js} +2 -2
- package/dist/es/{Container-d00219f7.js → Container-e2261542.js} +1 -1
- package/dist/es/DropDown-f8049812.js +295 -0
- package/dist/es/DynamicRangeSlider.js +6 -6
- package/dist/es/{Flex-25792bc3.js → Flex-5d11362e.js} +1 -1
- package/dist/es/{FormControlList-fe6eaee4.js → FormControlList-968ff972.js} +1 -1
- package/dist/es/{Input-437ae439.js → Input-cda7f4ad.js} +1 -1
- package/dist/es/{ListItem-e3c6acf4.js → ListItem-beea18db.js} +2 -2
- package/dist/es/MultiDropdownList.js +11 -10
- package/dist/es/MultiList.js +9 -9
- package/dist/es/MultiRange.js +7 -7
- package/dist/es/{Pagination-591fdb79.js → Pagination-b2160aac.js} +1 -1
- package/dist/es/{PreferencesConsumer-0856ed43.js → PreferencesConsumer-a2bd59db.js} +2 -2
- package/dist/es/RangeInput.js +9 -9
- package/dist/es/RangeSlider.js +7 -7
- package/dist/es/ReactiveBase.js +2 -2
- package/dist/es/ReactiveComponent.js +4 -4
- package/dist/es/ReactiveGoogleMap.js +8 -8
- package/dist/es/ReactiveList.js +10 -10
- package/dist/es/ResultCard.js +3 -3
- package/dist/es/ResultList.js +3 -3
- package/dist/es/{install-4fe6038c.js → SearchBox-57e3a0ff.js} +14 -1668
- package/dist/es/SearchBox.js +29 -0
- package/dist/es/SelectedFilters.js +5 -5
- package/dist/es/SingleDropdownList.js +11 -10
- package/dist/es/SingleList.js +9 -9
- package/dist/es/SingleRange.js +7 -7
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/{Title-863dfa42.js → Title-100fe896.js} +1 -1
- package/dist/es/ToggleButton.js +7 -7
- package/dist/es/{_rollupPluginBabelHelpers-ded08042.js → _rollupPluginBabelHelpers-5e8399d7.js} +14 -14
- package/dist/es/{index-104f1dfb.js → index-3af85a74.js} +1 -1
- package/dist/es/index.js +21 -19
- package/dist/es/install-74125db1.js +1676 -0
- package/dist/es/install.js +19 -17
- package/dist/es/{ssr-c630ccb9.js → ssr-40133887.js} +1 -1
- package/dist/es/{utils-d7dd4f4e.js → utils-badbb2a8.js} +1 -1
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
}, _typeof(o);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function
|
|
30
|
-
if (
|
|
31
|
-
var
|
|
32
|
-
if (
|
|
33
|
-
var
|
|
34
|
-
if (
|
|
29
|
+
function toPrimitive(t, r) {
|
|
30
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
31
|
+
var e = t[Symbol.toPrimitive];
|
|
32
|
+
if (void 0 !== e) {
|
|
33
|
+
var i = e.call(t, r || "default");
|
|
34
|
+
if ("object" != _typeof(i)) return i;
|
|
35
35
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
36
36
|
}
|
|
37
|
-
return (
|
|
37
|
+
return ("string" === r ? String : Number)(t);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function
|
|
41
|
-
var
|
|
42
|
-
return _typeof(
|
|
40
|
+
function toPropertyKey(t) {
|
|
41
|
+
var i = toPrimitive(t, "string");
|
|
42
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function _defineProperty(obj, key, value) {
|
|
46
|
-
key =
|
|
46
|
+
key = toPropertyKey(key);
|
|
47
47
|
if (key in obj) {
|
|
48
48
|
Object.defineProperty(obj, key, {
|
|
49
49
|
value: value,
|
|
@@ -462,7 +462,6 @@
|
|
|
462
462
|
throw new Error(message);
|
|
463
463
|
} catch (e) {} // eslint-disable-line no-empty
|
|
464
464
|
}
|
|
465
|
-
|
|
466
465
|
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
|
467
466
|
var reducerKeys = Object.keys(reducers);
|
|
468
467
|
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
|
|
@@ -9526,6 +9525,20 @@
|
|
|
9526
9525
|
}
|
|
9527
9526
|
}, e;
|
|
9528
9527
|
}
|
|
9528
|
+
function _toPrimitive(t, r) {
|
|
9529
|
+
if ("object" != typeof t || !t) return t;
|
|
9530
|
+
var e = t[Symbol.toPrimitive];
|
|
9531
|
+
if (void 0 !== e) {
|
|
9532
|
+
var i = e.call(t, r || "default");
|
|
9533
|
+
if ("object" != typeof i) return i;
|
|
9534
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9535
|
+
}
|
|
9536
|
+
return ("string" === r ? String : Number)(t);
|
|
9537
|
+
}
|
|
9538
|
+
function _toPropertyKey(t) {
|
|
9539
|
+
var i = _toPrimitive(t, "string");
|
|
9540
|
+
return "symbol" == typeof i ? i : String(i);
|
|
9541
|
+
}
|
|
9529
9542
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
9530
9543
|
try {
|
|
9531
9544
|
var info = gen[key](arg);
|
|
@@ -9562,7 +9575,7 @@
|
|
|
9562
9575
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
9563
9576
|
descriptor.configurable = true;
|
|
9564
9577
|
if ("value" in descriptor) descriptor.writable = true;
|
|
9565
|
-
Object.defineProperty(target, _toPropertyKey
|
|
9578
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
9566
9579
|
}
|
|
9567
9580
|
}
|
|
9568
9581
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -9649,20 +9662,6 @@
|
|
|
9649
9662
|
}
|
|
9650
9663
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9651
9664
|
}
|
|
9652
|
-
function _toPrimitive$1(input, hint) {
|
|
9653
|
-
if (typeof input !== "object" || input === null) return input;
|
|
9654
|
-
var prim = input[Symbol.toPrimitive];
|
|
9655
|
-
if (prim !== undefined) {
|
|
9656
|
-
var res = prim.call(input, hint || "default");
|
|
9657
|
-
if (typeof res !== "object") return res;
|
|
9658
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9659
|
-
}
|
|
9660
|
-
return (hint === "string" ? String : Number)(input);
|
|
9661
|
-
}
|
|
9662
|
-
function _toPropertyKey$1(arg) {
|
|
9663
|
-
var key = _toPrimitive$1(arg, "string");
|
|
9664
|
-
return typeof key === "symbol" ? key : String(key);
|
|
9665
|
-
}
|
|
9666
9665
|
|
|
9667
9666
|
/*!
|
|
9668
9667
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
@@ -12757,7 +12756,6 @@
|
|
|
12757
12756
|
* @private
|
|
12758
12757
|
*/
|
|
12759
12758
|
};
|
|
12760
|
-
|
|
12761
12759
|
function nameToHex(color) {
|
|
12762
12760
|
if (typeof color !== 'string') return color;
|
|
12763
12761
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -15796,7 +15794,6 @@
|
|
|
15796
15794
|
}
|
|
15797
15795
|
block = block << 8 | charCode; // eslint-disable-line no-bitwise
|
|
15798
15796
|
}
|
|
15799
|
-
|
|
15800
15797
|
return output;
|
|
15801
15798
|
}
|
|
15802
15799
|
function validateRSQuery(query) {
|
|
@@ -15901,7 +15898,6 @@
|
|
|
15901
15898
|
// mongodb
|
|
15902
15899
|
ELASTICSEARCH: 'elasticsearch' // elasticsearch
|
|
15903
15900
|
};
|
|
15904
|
-
|
|
15905
15901
|
var dataTypes = {
|
|
15906
15902
|
ARRAY: 'array',
|
|
15907
15903
|
FUNCTION: 'function',
|
|
@@ -16187,7 +16183,6 @@
|
|
|
16187
16183
|
}) : transformedRequest.headers,
|
|
16188
16184
|
signal: signal // Attach the abort signal to the fetch request
|
|
16189
16185
|
}));
|
|
16190
|
-
|
|
16191
16186
|
var timeoutPromise = new Promise(function (_, rejectTP) {
|
|
16192
16187
|
if (httpRequestTimeout > 0) {
|
|
16193
16188
|
setTimeout(function () {
|
|
@@ -16683,7 +16678,6 @@
|
|
|
16683
16678
|
}
|
|
16684
16679
|
block = block << 8 | charCode; // eslint-disable-line no-bitwise
|
|
16685
16680
|
}
|
|
16686
|
-
|
|
16687
16681
|
return output;
|
|
16688
16682
|
}
|
|
16689
16683
|
function validateIndex(index) {
|
|
@@ -17808,11 +17802,14 @@
|
|
|
17808
17802
|
};
|
|
17809
17803
|
|
|
17810
17804
|
/**!
|
|
17811
|
-
* hotkeys-js v3.
|
|
17805
|
+
* hotkeys-js v3.13.2
|
|
17812
17806
|
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
|
|
17813
17807
|
*
|
|
17814
17808
|
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
|
|
17815
|
-
* https://
|
|
17809
|
+
* https://github.com/jaywcjlove/hotkeys-js.git
|
|
17810
|
+
*
|
|
17811
|
+
* @website: https://jaywcjlove.github.io/hotkeys-js
|
|
17812
|
+
|
|
17816
17813
|
* Licensed under the MIT license
|
|
17817
17814
|
*/
|
|
17818
17815
|
|
|
@@ -18034,7 +18031,6 @@
|
|
|
18034
18031
|
if (typeof keyCode === 'string') {
|
|
18035
18032
|
keyCode = code(keyCode); // 转换成键码
|
|
18036
18033
|
}
|
|
18037
|
-
|
|
18038
18034
|
return _downKeys.indexOf(keyCode) !== -1;
|
|
18039
18035
|
}
|
|
18040
18036
|
|
|
@@ -18078,7 +18074,7 @@
|
|
|
18078
18074
|
_mods[key] = false;
|
|
18079
18075
|
|
|
18080
18076
|
// 将修饰键重置为false
|
|
18081
|
-
for (var
|
|
18077
|
+
for (var _k in _modifier) if (_modifier[_k] === key) hotkeys[_k] = false;
|
|
18082
18078
|
}
|
|
18083
18079
|
}
|
|
18084
18080
|
function unbind(keysInfo) {
|
|
@@ -18220,8 +18216,8 @@
|
|
|
18220
18216
|
_mods[key] = true;
|
|
18221
18217
|
|
|
18222
18218
|
// 将特殊字符的key注册到 hotkeys 上
|
|
18223
|
-
for (var
|
|
18224
|
-
if (_modifier[
|
|
18219
|
+
for (var _k2 in _modifier) {
|
|
18220
|
+
if (_modifier[_k2] === key) hotkeys[_k2] = true;
|
|
18225
18221
|
}
|
|
18226
18222
|
if (!asterisk) return;
|
|
18227
18223
|
}
|
|
@@ -18295,6 +18291,7 @@
|
|
|
18295
18291
|
var keydown = true;
|
|
18296
18292
|
var splitKey = '+';
|
|
18297
18293
|
var capture = false;
|
|
18294
|
+
var single = false; // 单个callback
|
|
18298
18295
|
|
|
18299
18296
|
// 对为设定范围的判断
|
|
18300
18297
|
if (method === undefined && typeof option === 'function') {
|
|
@@ -18307,10 +18304,13 @@
|
|
|
18307
18304
|
if (option.keydown !== undefined) keydown = option.keydown; // eslint-disable-line
|
|
18308
18305
|
if (option.capture !== undefined) capture = option.capture; // eslint-disable-line
|
|
18309
18306
|
if (typeof option.splitKey === 'string') splitKey = option.splitKey; // eslint-disable-line
|
|
18307
|
+
if (option.single === true) single = true; // eslint-disable-line
|
|
18310
18308
|
}
|
|
18311
|
-
|
|
18312
18309
|
if (typeof option === 'string') scope = option;
|
|
18313
18310
|
|
|
18311
|
+
// 如果只允许单个callback,先unbind
|
|
18312
|
+
if (single) unbind(key, scope);
|
|
18313
|
+
|
|
18314
18314
|
// 对于每个快捷键进行处理
|
|
18315
18315
|
for (; i < keys.length; i++) {
|
|
18316
18316
|
key = keys[i].split(splitKey); // 按键列表
|
|
@@ -21743,7 +21743,6 @@
|
|
|
21743
21743
|
this.tShift.push(0);
|
|
21744
21744
|
this.lineMax = this.bMarks.length - 1; // don't count last fake line
|
|
21745
21745
|
}
|
|
21746
|
-
|
|
21747
21746
|
StateBlock.prototype.isEmpty = function isEmpty(line) {
|
|
21748
21747
|
return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
|
|
21749
21748
|
};
|
|
@@ -22609,7 +22608,6 @@
|
|
|
22609
22608
|
var lc = ch | 0x20; // to lower case
|
|
22610
22609
|
return lc >= 0x61 /* a */ && lc <= 0x7a /* z */;
|
|
22611
22610
|
}
|
|
22612
|
-
|
|
22613
22611
|
function htmlblock(state, startLine, endLine, silent) {
|
|
22614
22612
|
var ch,
|
|
22615
22613
|
match,
|
|
@@ -23002,7 +23000,6 @@
|
|
|
23002
23000
|
// go to the next loop iteration:
|
|
23003
23001
|
// insert DD tag and repeat checking
|
|
23004
23002
|
}
|
|
23005
|
-
|
|
23006
23003
|
if (nextLine >= endLine) {
|
|
23007
23004
|
break;
|
|
23008
23005
|
}
|
|
@@ -24440,7 +24437,6 @@
|
|
|
24440
24437
|
var lc = ch | 0x20; // to lower case
|
|
24441
24438
|
return lc >= 0x61 /* a */ && lc <= 0x7a /* z */;
|
|
24442
24439
|
}
|
|
24443
|
-
|
|
24444
24440
|
function htmltag(state, silent) {
|
|
24445
24441
|
var ch,
|
|
24446
24442
|
match,
|
|
@@ -24672,7 +24668,6 @@
|
|
|
24672
24668
|
highlight: null,
|
|
24673
24669
|
maxNesting: 20 // Internal protection, recursion limit
|
|
24674
24670
|
},
|
|
24675
|
-
|
|
24676
24671
|
components: {
|
|
24677
24672
|
core: {
|
|
24678
24673
|
rules: ['block', 'inline', 'references', 'replacements', 'smartquotes', 'references', 'abbr2', 'footnote_tail']
|
|
@@ -24714,7 +24709,6 @@
|
|
|
24714
24709
|
highlight: null,
|
|
24715
24710
|
maxNesting: 20 // Internal protection, recursion limit
|
|
24716
24711
|
},
|
|
24717
|
-
|
|
24718
24712
|
components: {
|
|
24719
24713
|
// Don't restrict core/block/inline rules
|
|
24720
24714
|
core: {},
|
|
@@ -24751,7 +24745,6 @@
|
|
|
24751
24745
|
highlight: null,
|
|
24752
24746
|
maxNesting: 20 // Internal protection, recursion limit
|
|
24753
24747
|
},
|
|
24754
|
-
|
|
24755
24748
|
components: {
|
|
24756
24749
|
core: {
|
|
24757
24750
|
rules: ['block', 'inline', 'references', 'abbr2']
|
|
@@ -25383,7 +25376,6 @@
|
|
|
25383
25376
|
// TODO: implement isMouseDown
|
|
25384
25377
|
// this.reset()
|
|
25385
25378
|
},
|
|
25386
|
-
|
|
25387
25379
|
click: onClick
|
|
25388
25380
|
};
|
|
25389
25381
|
},
|
|
@@ -25511,12 +25503,12 @@
|
|
|
25511
25503
|
/******/
|
|
25512
25504
|
}
|
|
25513
25505
|
/************************************************************************/
|
|
25514
|
-
/******/([/* 0 */
|
|
25506
|
+
/******/([( /* 0 */
|
|
25515
25507
|
/***/function (module, exports, __webpack_require__) {
|
|
25516
25508
|
module.exports = __webpack_require__(1);
|
|
25517
25509
|
|
|
25518
25510
|
/***/
|
|
25519
|
-
}, /* 1 */
|
|
25511
|
+
}), ( /* 1 */
|
|
25520
25512
|
/***/function (module, exports, __webpack_require__) {
|
|
25521
25513
|
|
|
25522
25514
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -25549,7 +25541,7 @@
|
|
|
25549
25541
|
});
|
|
25550
25542
|
|
|
25551
25543
|
/***/
|
|
25552
|
-
}, /* 2 */
|
|
25544
|
+
}), ( /* 2 */
|
|
25553
25545
|
/***/function (module, exports) {
|
|
25554
25546
|
|
|
25555
25547
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -25708,9 +25700,8 @@
|
|
|
25708
25700
|
|
|
25709
25701
|
/***/
|
|
25710
25702
|
}
|
|
25711
|
-
/******/]);
|
|
25703
|
+
/******/)]);
|
|
25712
25704
|
});
|
|
25713
|
-
|
|
25714
25705
|
unwrapExports(dist);
|
|
25715
25706
|
var dist_1 = dist.findAll;
|
|
25716
25707
|
|
|
@@ -30227,14 +30218,14 @@
|
|
|
30227
30218
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
30228
30219
|
var _currentValue = currentValue,
|
|
30229
30220
|
del = _currentValue[selectAllLabel],
|
|
30230
|
-
obj = _objectWithoutPropertiesLoose(_currentValue, [selectAllLabel].map(_toPropertyKey
|
|
30221
|
+
obj = _objectWithoutPropertiesLoose(_currentValue, [selectAllLabel].map(_toPropertyKey));
|
|
30231
30222
|
currentValue = _extends({}, obj);
|
|
30232
30223
|
}
|
|
30233
30224
|
} else {
|
|
30234
30225
|
if (currentValue[value]) {
|
|
30235
30226
|
var _currentValue2 = currentValue,
|
|
30236
30227
|
_del = _currentValue2[value],
|
|
30237
|
-
rest = _objectWithoutPropertiesLoose(_currentValue2, [value].map(_toPropertyKey
|
|
30228
|
+
rest = _objectWithoutPropertiesLoose(_currentValue2, [value].map(_toPropertyKey));
|
|
30238
30229
|
currentValue = _extends({}, rest);
|
|
30239
30230
|
} else if (Array.isArray(value)) {
|
|
30240
30231
|
value.forEach(function (val) {
|
|
@@ -30246,7 +30237,7 @@
|
|
|
30246
30237
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
30247
30238
|
var _currentValue3 = currentValue,
|
|
30248
30239
|
_del2 = _currentValue3[selectAllLabel],
|
|
30249
|
-
_obj = _objectWithoutPropertiesLoose(_currentValue3, [selectAllLabel].map(_toPropertyKey
|
|
30240
|
+
_obj = _objectWithoutPropertiesLoose(_currentValue3, [selectAllLabel].map(_toPropertyKey));
|
|
30250
30241
|
currentValue = _extends({}, _obj);
|
|
30251
30242
|
}
|
|
30252
30243
|
finalValues = Object.keys(currentValue);
|
|
@@ -33226,14 +33217,14 @@
|
|
|
33226
33217
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
33227
33218
|
var _currentValue = currentValue,
|
|
33228
33219
|
del = _currentValue[selectAllLabel],
|
|
33229
|
-
obj = _objectWithoutPropertiesLoose(_currentValue, [selectAllLabel].map(_toPropertyKey
|
|
33220
|
+
obj = _objectWithoutPropertiesLoose(_currentValue, [selectAllLabel].map(_toPropertyKey));
|
|
33230
33221
|
currentValue = _extends({}, obj);
|
|
33231
33222
|
}
|
|
33232
33223
|
} else {
|
|
33233
33224
|
if (currentValue[value]) {
|
|
33234
33225
|
var _currentValue2 = currentValue,
|
|
33235
33226
|
_del = _currentValue2[value],
|
|
33236
|
-
rest = _objectWithoutPropertiesLoose(_currentValue2, [value].map(_toPropertyKey
|
|
33227
|
+
rest = _objectWithoutPropertiesLoose(_currentValue2, [value].map(_toPropertyKey));
|
|
33237
33228
|
currentValue = _extends({}, rest);
|
|
33238
33229
|
} else {
|
|
33239
33230
|
currentValue[value] = true;
|
|
@@ -33241,7 +33232,7 @@
|
|
|
33241
33232
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
33242
33233
|
var _currentValue3 = currentValue,
|
|
33243
33234
|
_del2 = _currentValue3[selectAllLabel],
|
|
33244
|
-
_obj = _objectWithoutPropertiesLoose(_currentValue3, [selectAllLabel].map(_toPropertyKey
|
|
33235
|
+
_obj = _objectWithoutPropertiesLoose(_currentValue3, [selectAllLabel].map(_toPropertyKey));
|
|
33245
33236
|
currentValue = _extends({}, _obj);
|
|
33246
33237
|
}
|
|
33247
33238
|
finalValues = Object.keys(currentValue);
|
|
@@ -36383,7 +36374,7 @@
|
|
|
36383
36374
|
});
|
|
36384
36375
|
var _selectedValues = selectedValues,
|
|
36385
36376
|
del = _selectedValues[item],
|
|
36386
|
-
selected = _objectWithoutPropertiesLoose(_selectedValues, [item].map(_toPropertyKey
|
|
36377
|
+
selected = _objectWithoutPropertiesLoose(_selectedValues, [item].map(_toPropertyKey));
|
|
36387
36378
|
selectedValues = selected;
|
|
36388
36379
|
} else {
|
|
36389
36380
|
var _extends2;
|
|
@@ -38514,10 +38505,9 @@
|
|
|
38514
38505
|
}
|
|
38515
38506
|
|
|
38516
38507
|
script.render = render;
|
|
38517
|
-
script.__file = "node_modules/vue-google-maps-community-fork/src/components/marker.vue";
|
|
38508
|
+
script.__file = "node_modules/@appbaseio/vue-google-maps-community-fork/src/components/marker.vue";
|
|
38518
38509
|
|
|
38519
|
-
|
|
38520
|
-
var fastDeepEqual = function equal(a, b) {
|
|
38510
|
+
function equal(a, b) {
|
|
38521
38511
|
if (a === b) return true;
|
|
38522
38512
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
38523
38513
|
if (a.constructor !== b.constructor) return false;
|
|
@@ -38528,6 +38518,32 @@
|
|
|
38528
38518
|
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
38529
38519
|
return true;
|
|
38530
38520
|
}
|
|
38521
|
+
if (a instanceof Map && b instanceof Map) {
|
|
38522
|
+
if (a.size !== b.size) return false;
|
|
38523
|
+
for (var _iterator = _createForOfIteratorHelperLoose(a.entries()), _step; !(_step = _iterator()).done;) {
|
|
38524
|
+
i = _step.value;
|
|
38525
|
+
if (!b.has(i[0])) return false;
|
|
38526
|
+
}
|
|
38527
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(a.entries()), _step2; !(_step2 = _iterator2()).done;) {
|
|
38528
|
+
i = _step2.value;
|
|
38529
|
+
if (!equal(i[1], b.get(i[0]))) return false;
|
|
38530
|
+
}
|
|
38531
|
+
return true;
|
|
38532
|
+
}
|
|
38533
|
+
if (a instanceof Set && b instanceof Set) {
|
|
38534
|
+
if (a.size !== b.size) return false;
|
|
38535
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose(a.entries()), _step3; !(_step3 = _iterator3()).done;) {
|
|
38536
|
+
i = _step3.value;
|
|
38537
|
+
if (!b.has(i[0])) return false;
|
|
38538
|
+
}
|
|
38539
|
+
return true;
|
|
38540
|
+
}
|
|
38541
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
38542
|
+
length = a.length;
|
|
38543
|
+
if (length != b.length) return false;
|
|
38544
|
+
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
38545
|
+
return true;
|
|
38546
|
+
}
|
|
38531
38547
|
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
38532
38548
|
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
38533
38549
|
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
@@ -38544,254 +38560,16 @@
|
|
|
38544
38560
|
|
|
38545
38561
|
// true if both NaN, false otherwise
|
|
38546
38562
|
return a !== a && b !== b;
|
|
38547
|
-
}
|
|
38548
|
-
|
|
38549
|
-
var ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
|
|
38550
|
-
|
|
38551
|
-
/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */
|
|
38552
|
-
|
|
38553
|
-
var VERSION = 1; // serialized format version
|
|
38554
|
-
var HEADER_SIZE = 8;
|
|
38555
|
-
var KDBush = /*#__PURE__*/function () {
|
|
38556
|
-
/**
|
|
38557
|
-
* Creates an index from raw `ArrayBuffer` data.
|
|
38558
|
-
* @param {ArrayBuffer} data
|
|
38559
|
-
*/
|
|
38560
|
-
KDBush.from = function from(data) {
|
|
38561
|
-
if (!(data instanceof ArrayBuffer)) {
|
|
38562
|
-
throw new Error('Data must be an instance of ArrayBuffer.');
|
|
38563
|
-
}
|
|
38564
|
-
var _Uint8Array = new Uint8Array(data, 0, 2),
|
|
38565
|
-
magic = _Uint8Array[0],
|
|
38566
|
-
versionAndType = _Uint8Array[1];
|
|
38567
|
-
if (magic !== 0xdb) {
|
|
38568
|
-
throw new Error('Data does not appear to be in a KDBush format.');
|
|
38569
|
-
}
|
|
38570
|
-
var version = versionAndType >> 4;
|
|
38571
|
-
if (version !== VERSION) {
|
|
38572
|
-
throw new Error("Got v" + version + " data when expected v" + VERSION + ".");
|
|
38573
|
-
}
|
|
38574
|
-
var ArrayType = ARRAY_TYPES[versionAndType & 0x0f];
|
|
38575
|
-
if (!ArrayType) {
|
|
38576
|
-
throw new Error('Unrecognized array type.');
|
|
38577
|
-
}
|
|
38578
|
-
var _Uint16Array = new Uint16Array(data, 2, 1),
|
|
38579
|
-
nodeSize = _Uint16Array[0];
|
|
38580
|
-
var _Uint32Array = new Uint32Array(data, 4, 1),
|
|
38581
|
-
numItems = _Uint32Array[0];
|
|
38582
|
-
return new KDBush(numItems, nodeSize, ArrayType, data);
|
|
38583
|
-
}
|
|
38584
|
-
|
|
38585
|
-
/**
|
|
38586
|
-
* Creates an index that will hold a given number of items.
|
|
38587
|
-
* @param {number} numItems
|
|
38588
|
-
* @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).
|
|
38589
|
-
* @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
|
|
38590
|
-
* @param {ArrayBuffer} [data] (For internal use only)
|
|
38591
|
-
*/;
|
|
38592
|
-
function KDBush(numItems, nodeSize, ArrayType, data) {
|
|
38593
|
-
if (nodeSize === void 0) {
|
|
38594
|
-
nodeSize = 64;
|
|
38595
|
-
}
|
|
38596
|
-
if (ArrayType === void 0) {
|
|
38597
|
-
ArrayType = Float64Array;
|
|
38598
|
-
}
|
|
38599
|
-
if (isNaN(numItems) || numItems < 0) throw new Error("Unpexpected numItems value: " + numItems + ".");
|
|
38600
|
-
this.numItems = +numItems;
|
|
38601
|
-
this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);
|
|
38602
|
-
this.ArrayType = ArrayType;
|
|
38603
|
-
this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;
|
|
38604
|
-
var arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);
|
|
38605
|
-
var coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;
|
|
38606
|
-
var idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;
|
|
38607
|
-
var padCoords = (8 - idsByteSize % 8) % 8;
|
|
38608
|
-
if (arrayTypeIndex < 0) {
|
|
38609
|
-
throw new Error("Unexpected typed array class: " + ArrayType + ".");
|
|
38610
|
-
}
|
|
38611
|
-
if (data && data instanceof ArrayBuffer) {
|
|
38612
|
-
// reconstruct an index from a buffer
|
|
38613
|
-
this.data = data;
|
|
38614
|
-
this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);
|
|
38615
|
-
this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);
|
|
38616
|
-
this._pos = numItems * 2;
|
|
38617
|
-
this._finished = true;
|
|
38618
|
-
} else {
|
|
38619
|
-
// initialize a new index
|
|
38620
|
-
this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);
|
|
38621
|
-
this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);
|
|
38622
|
-
this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);
|
|
38623
|
-
this._pos = 0;
|
|
38624
|
-
this._finished = false;
|
|
38625
|
-
|
|
38626
|
-
// set header
|
|
38627
|
-
new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);
|
|
38628
|
-
new Uint16Array(this.data, 2, 1)[0] = nodeSize;
|
|
38629
|
-
new Uint32Array(this.data, 4, 1)[0] = numItems;
|
|
38630
|
-
}
|
|
38631
|
-
}
|
|
38632
|
-
|
|
38633
|
-
/**
|
|
38634
|
-
* Add a point to the index.
|
|
38635
|
-
* @param {number} x
|
|
38636
|
-
* @param {number} y
|
|
38637
|
-
* @returns {number} An incremental index associated with the added item (starting from `0`).
|
|
38638
|
-
*/
|
|
38639
|
-
var _proto = KDBush.prototype;
|
|
38640
|
-
_proto.add = function add(x, y) {
|
|
38641
|
-
var index = this._pos >> 1;
|
|
38642
|
-
this.ids[index] = index;
|
|
38643
|
-
this.coords[this._pos++] = x;
|
|
38644
|
-
this.coords[this._pos++] = y;
|
|
38645
|
-
return index;
|
|
38646
|
-
}
|
|
38647
|
-
|
|
38648
|
-
/**
|
|
38649
|
-
* Perform indexing of the added points.
|
|
38650
|
-
*/;
|
|
38651
|
-
_proto.finish = function finish() {
|
|
38652
|
-
var numAdded = this._pos >> 1;
|
|
38653
|
-
if (numAdded !== this.numItems) {
|
|
38654
|
-
throw new Error("Added " + numAdded + " items when expected " + this.numItems + ".");
|
|
38655
|
-
}
|
|
38656
|
-
// kd-sort both arrays for efficient search
|
|
38657
|
-
sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);
|
|
38658
|
-
this._finished = true;
|
|
38659
|
-
return this;
|
|
38660
|
-
}
|
|
38661
|
-
|
|
38662
|
-
/**
|
|
38663
|
-
* Search the index for items within a given bounding box.
|
|
38664
|
-
* @param {number} minX
|
|
38665
|
-
* @param {number} minY
|
|
38666
|
-
* @param {number} maxX
|
|
38667
|
-
* @param {number} maxY
|
|
38668
|
-
* @returns {number[]} An array of indices correponding to the found items.
|
|
38669
|
-
*/;
|
|
38670
|
-
_proto.range = function range(minX, minY, maxX, maxY) {
|
|
38671
|
-
if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');
|
|
38672
|
-
var ids = this.ids,
|
|
38673
|
-
coords = this.coords,
|
|
38674
|
-
nodeSize = this.nodeSize;
|
|
38675
|
-
var stack = [0, ids.length - 1, 0];
|
|
38676
|
-
var result = [];
|
|
38677
|
-
|
|
38678
|
-
// recursively search for items in range in the kd-sorted arrays
|
|
38679
|
-
while (stack.length) {
|
|
38680
|
-
var axis = stack.pop() || 0;
|
|
38681
|
-
var right = stack.pop() || 0;
|
|
38682
|
-
var left = stack.pop() || 0;
|
|
38683
|
-
|
|
38684
|
-
// if we reached "tree node", search linearly
|
|
38685
|
-
if (right - left <= nodeSize) {
|
|
38686
|
-
for (var i = left; i <= right; i++) {
|
|
38687
|
-
var _x = coords[2 * i];
|
|
38688
|
-
var _y = coords[2 * i + 1];
|
|
38689
|
-
if (_x >= minX && _x <= maxX && _y >= minY && _y <= maxY) result.push(ids[i]);
|
|
38690
|
-
}
|
|
38691
|
-
continue;
|
|
38692
|
-
}
|
|
38693
|
-
|
|
38694
|
-
// otherwise find the middle index
|
|
38695
|
-
var m = left + right >> 1;
|
|
38696
|
-
|
|
38697
|
-
// include the middle item if it's in range
|
|
38698
|
-
var x = coords[2 * m];
|
|
38699
|
-
var y = coords[2 * m + 1];
|
|
38700
|
-
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);
|
|
38701
|
-
|
|
38702
|
-
// queue search in halves that intersect the query
|
|
38703
|
-
if (axis === 0 ? minX <= x : minY <= y) {
|
|
38704
|
-
stack.push(left);
|
|
38705
|
-
stack.push(m - 1);
|
|
38706
|
-
stack.push(1 - axis);
|
|
38707
|
-
}
|
|
38708
|
-
if (axis === 0 ? maxX >= x : maxY >= y) {
|
|
38709
|
-
stack.push(m + 1);
|
|
38710
|
-
stack.push(right);
|
|
38711
|
-
stack.push(1 - axis);
|
|
38712
|
-
}
|
|
38713
|
-
}
|
|
38714
|
-
return result;
|
|
38715
|
-
}
|
|
38716
|
-
|
|
38717
|
-
/**
|
|
38718
|
-
* Search the index for items within a given radius.
|
|
38719
|
-
* @param {number} qx
|
|
38720
|
-
* @param {number} qy
|
|
38721
|
-
* @param {number} r Query radius.
|
|
38722
|
-
* @returns {number[]} An array of indices correponding to the found items.
|
|
38723
|
-
*/;
|
|
38724
|
-
_proto.within = function within(qx, qy, r) {
|
|
38725
|
-
if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');
|
|
38726
|
-
var ids = this.ids,
|
|
38727
|
-
coords = this.coords,
|
|
38728
|
-
nodeSize = this.nodeSize;
|
|
38729
|
-
var stack = [0, ids.length - 1, 0];
|
|
38730
|
-
var result = [];
|
|
38731
|
-
var r2 = r * r;
|
|
38732
|
-
|
|
38733
|
-
// recursively search for items within radius in the kd-sorted arrays
|
|
38734
|
-
while (stack.length) {
|
|
38735
|
-
var axis = stack.pop() || 0;
|
|
38736
|
-
var right = stack.pop() || 0;
|
|
38737
|
-
var left = stack.pop() || 0;
|
|
38738
|
-
|
|
38739
|
-
// if we reached "tree node", search linearly
|
|
38740
|
-
if (right - left <= nodeSize) {
|
|
38741
|
-
for (var i = left; i <= right; i++) {
|
|
38742
|
-
if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);
|
|
38743
|
-
}
|
|
38744
|
-
continue;
|
|
38745
|
-
}
|
|
38746
|
-
|
|
38747
|
-
// otherwise find the middle index
|
|
38748
|
-
var m = left + right >> 1;
|
|
38749
|
-
|
|
38750
|
-
// include the middle item if it's in range
|
|
38751
|
-
var x = coords[2 * m];
|
|
38752
|
-
var y = coords[2 * m + 1];
|
|
38753
|
-
if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);
|
|
38563
|
+
}
|
|
38754
38564
|
|
|
38755
|
-
|
|
38756
|
-
if (axis === 0 ? qx - r <= x : qy - r <= y) {
|
|
38757
|
-
stack.push(left);
|
|
38758
|
-
stack.push(m - 1);
|
|
38759
|
-
stack.push(1 - axis);
|
|
38760
|
-
}
|
|
38761
|
-
if (axis === 0 ? qx + r >= x : qy + r >= y) {
|
|
38762
|
-
stack.push(m + 1);
|
|
38763
|
-
stack.push(right);
|
|
38764
|
-
stack.push(1 - axis);
|
|
38765
|
-
}
|
|
38766
|
-
}
|
|
38767
|
-
return result;
|
|
38768
|
-
};
|
|
38769
|
-
return KDBush;
|
|
38770
|
-
}();
|
|
38771
|
-
function sort(ids, coords, nodeSize, left, right, axis) {
|
|
38565
|
+
function sortKD(ids, coords, nodeSize, left, right, depth) {
|
|
38772
38566
|
if (right - left <= nodeSize) return;
|
|
38773
|
-
var m = left + right >> 1;
|
|
38774
|
-
|
|
38775
|
-
|
|
38776
|
-
|
|
38777
|
-
select(ids, coords, m, left, right, axis);
|
|
38778
|
-
|
|
38779
|
-
// recursively kd-sort first half and second half on the opposite axis
|
|
38780
|
-
sort(ids, coords, nodeSize, left, m - 1, 1 - axis);
|
|
38781
|
-
sort(ids, coords, nodeSize, m + 1, right, 1 - axis);
|
|
38567
|
+
var m = left + right >> 1;
|
|
38568
|
+
select(ids, coords, m, left, right, depth % 2);
|
|
38569
|
+
sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);
|
|
38570
|
+
sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);
|
|
38782
38571
|
}
|
|
38783
|
-
|
|
38784
|
-
/**
|
|
38785
|
-
* Custom Floyd-Rivest selection algorithm: sort ids and coords so that
|
|
38786
|
-
* [left..k-1] items are smaller than k-th item (on either x or y axis)
|
|
38787
|
-
* @param {Uint16Array | Uint32Array} ids
|
|
38788
|
-
* @param {InstanceType<TypedArrayConstructor>} coords
|
|
38789
|
-
* @param {number} k
|
|
38790
|
-
* @param {number} left
|
|
38791
|
-
* @param {number} right
|
|
38792
|
-
* @param {number} axis
|
|
38793
|
-
*/
|
|
38794
|
-
function select(ids, coords, k, left, right, axis) {
|
|
38572
|
+
function select(ids, coords, k, left, right, inc) {
|
|
38795
38573
|
while (right > left) {
|
|
38796
38574
|
if (right - left > 600) {
|
|
38797
38575
|
var n = right - left + 1;
|
|
@@ -38801,21 +38579,21 @@
|
|
|
38801
38579
|
var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
|
|
38802
38580
|
var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
|
|
38803
38581
|
var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
|
|
38804
|
-
select(ids, coords, k, newLeft, newRight,
|
|
38582
|
+
select(ids, coords, k, newLeft, newRight, inc);
|
|
38805
38583
|
}
|
|
38806
|
-
var t = coords[2 * k +
|
|
38584
|
+
var t = coords[2 * k + inc];
|
|
38807
38585
|
var i = left;
|
|
38808
38586
|
var j = right;
|
|
38809
38587
|
swapItem(ids, coords, left, k);
|
|
38810
|
-
if (coords[2 * right +
|
|
38588
|
+
if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);
|
|
38811
38589
|
while (i < j) {
|
|
38812
38590
|
swapItem(ids, coords, i, j);
|
|
38813
38591
|
i++;
|
|
38814
38592
|
j--;
|
|
38815
|
-
while (coords[2 * i +
|
|
38816
|
-
while (coords[2 * j +
|
|
38593
|
+
while (coords[2 * i + inc] < t) i++;
|
|
38594
|
+
while (coords[2 * j + inc] > t) j--;
|
|
38817
38595
|
}
|
|
38818
|
-
if (coords[2 * left +
|
|
38596
|
+
if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);else {
|
|
38819
38597
|
j++;
|
|
38820
38598
|
swapItem(ids, coords, j, right);
|
|
38821
38599
|
}
|
|
@@ -38823,42 +38601,132 @@
|
|
|
38823
38601
|
if (k <= j) right = j - 1;
|
|
38824
38602
|
}
|
|
38825
38603
|
}
|
|
38826
|
-
|
|
38827
|
-
/**
|
|
38828
|
-
* @param {Uint16Array | Uint32Array} ids
|
|
38829
|
-
* @param {InstanceType<TypedArrayConstructor>} coords
|
|
38830
|
-
* @param {number} i
|
|
38831
|
-
* @param {number} j
|
|
38832
|
-
*/
|
|
38833
38604
|
function swapItem(ids, coords, i, j) {
|
|
38834
38605
|
swap(ids, i, j);
|
|
38835
38606
|
swap(coords, 2 * i, 2 * j);
|
|
38836
38607
|
swap(coords, 2 * i + 1, 2 * j + 1);
|
|
38837
38608
|
}
|
|
38838
|
-
|
|
38839
|
-
/**
|
|
38840
|
-
* @param {InstanceType<TypedArrayConstructor>} arr
|
|
38841
|
-
* @param {number} i
|
|
38842
|
-
* @param {number} j
|
|
38843
|
-
*/
|
|
38844
38609
|
function swap(arr, i, j) {
|
|
38845
38610
|
var tmp = arr[i];
|
|
38846
38611
|
arr[i] = arr[j];
|
|
38847
38612
|
arr[j] = tmp;
|
|
38848
38613
|
}
|
|
38849
38614
|
|
|
38850
|
-
|
|
38851
|
-
|
|
38852
|
-
|
|
38853
|
-
|
|
38854
|
-
|
|
38855
|
-
|
|
38615
|
+
function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {
|
|
38616
|
+
var stack = [0, ids.length - 1, 0];
|
|
38617
|
+
var result = [];
|
|
38618
|
+
var x, y;
|
|
38619
|
+
while (stack.length) {
|
|
38620
|
+
var axis = stack.pop();
|
|
38621
|
+
var right = stack.pop();
|
|
38622
|
+
var left = stack.pop();
|
|
38623
|
+
if (right - left <= nodeSize) {
|
|
38624
|
+
for (var i = left; i <= right; i++) {
|
|
38625
|
+
x = coords[2 * i];
|
|
38626
|
+
y = coords[2 * i + 1];
|
|
38627
|
+
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);
|
|
38628
|
+
}
|
|
38629
|
+
continue;
|
|
38630
|
+
}
|
|
38631
|
+
var m = Math.floor((left + right) / 2);
|
|
38632
|
+
x = coords[2 * m];
|
|
38633
|
+
y = coords[2 * m + 1];
|
|
38634
|
+
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);
|
|
38635
|
+
var nextAxis = (axis + 1) % 2;
|
|
38636
|
+
if (axis === 0 ? minX <= x : minY <= y) {
|
|
38637
|
+
stack.push(left);
|
|
38638
|
+
stack.push(m - 1);
|
|
38639
|
+
stack.push(nextAxis);
|
|
38640
|
+
}
|
|
38641
|
+
if (axis === 0 ? maxX >= x : maxY >= y) {
|
|
38642
|
+
stack.push(m + 1);
|
|
38643
|
+
stack.push(right);
|
|
38644
|
+
stack.push(nextAxis);
|
|
38645
|
+
}
|
|
38646
|
+
}
|
|
38647
|
+
return result;
|
|
38648
|
+
}
|
|
38649
|
+
|
|
38650
|
+
function within(ids, coords, qx, qy, r, nodeSize) {
|
|
38651
|
+
var stack = [0, ids.length - 1, 0];
|
|
38652
|
+
var result = [];
|
|
38653
|
+
var r2 = r * r;
|
|
38654
|
+
while (stack.length) {
|
|
38655
|
+
var axis = stack.pop();
|
|
38656
|
+
var right = stack.pop();
|
|
38657
|
+
var left = stack.pop();
|
|
38658
|
+
if (right - left <= nodeSize) {
|
|
38659
|
+
for (var i = left; i <= right; i++) {
|
|
38660
|
+
if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);
|
|
38661
|
+
}
|
|
38662
|
+
continue;
|
|
38663
|
+
}
|
|
38664
|
+
var m = Math.floor((left + right) / 2);
|
|
38665
|
+
var x = coords[2 * m];
|
|
38666
|
+
var y = coords[2 * m + 1];
|
|
38667
|
+
if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);
|
|
38668
|
+
var nextAxis = (axis + 1) % 2;
|
|
38669
|
+
if (axis === 0 ? qx - r <= x : qy - r <= y) {
|
|
38670
|
+
stack.push(left);
|
|
38671
|
+
stack.push(m - 1);
|
|
38672
|
+
stack.push(nextAxis);
|
|
38673
|
+
}
|
|
38674
|
+
if (axis === 0 ? qx + r >= x : qy + r >= y) {
|
|
38675
|
+
stack.push(m + 1);
|
|
38676
|
+
stack.push(right);
|
|
38677
|
+
stack.push(nextAxis);
|
|
38678
|
+
}
|
|
38679
|
+
}
|
|
38680
|
+
return result;
|
|
38681
|
+
}
|
|
38856
38682
|
function sqDist(ax, ay, bx, by) {
|
|
38857
38683
|
var dx = ax - bx;
|
|
38858
38684
|
var dy = ay - by;
|
|
38859
38685
|
return dx * dx + dy * dy;
|
|
38860
38686
|
}
|
|
38861
38687
|
|
|
38688
|
+
var defaultGetX = function defaultGetX(p) {
|
|
38689
|
+
return p[0];
|
|
38690
|
+
};
|
|
38691
|
+
var defaultGetY = function defaultGetY(p) {
|
|
38692
|
+
return p[1];
|
|
38693
|
+
};
|
|
38694
|
+
var KDBush = /*#__PURE__*/function () {
|
|
38695
|
+
function KDBush(points, getX, getY, nodeSize, ArrayType) {
|
|
38696
|
+
if (getX === void 0) {
|
|
38697
|
+
getX = defaultGetX;
|
|
38698
|
+
}
|
|
38699
|
+
if (getY === void 0) {
|
|
38700
|
+
getY = defaultGetY;
|
|
38701
|
+
}
|
|
38702
|
+
if (nodeSize === void 0) {
|
|
38703
|
+
nodeSize = 64;
|
|
38704
|
+
}
|
|
38705
|
+
if (ArrayType === void 0) {
|
|
38706
|
+
ArrayType = Float64Array;
|
|
38707
|
+
}
|
|
38708
|
+
this.nodeSize = nodeSize;
|
|
38709
|
+
this.points = points;
|
|
38710
|
+
var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array;
|
|
38711
|
+
var ids = this.ids = new IndexArrayType(points.length);
|
|
38712
|
+
var coords = this.coords = new ArrayType(points.length * 2);
|
|
38713
|
+
for (var i = 0; i < points.length; i++) {
|
|
38714
|
+
ids[i] = i;
|
|
38715
|
+
coords[2 * i] = getX(points[i]);
|
|
38716
|
+
coords[2 * i + 1] = getY(points[i]);
|
|
38717
|
+
}
|
|
38718
|
+
sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0);
|
|
38719
|
+
}
|
|
38720
|
+
var _proto = KDBush.prototype;
|
|
38721
|
+
_proto.range = function range$1(minX, minY, maxX, maxY) {
|
|
38722
|
+
return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);
|
|
38723
|
+
};
|
|
38724
|
+
_proto.within = function within$1(x, y, r) {
|
|
38725
|
+
return within(this.ids, this.coords, x, y, r, this.nodeSize);
|
|
38726
|
+
};
|
|
38727
|
+
return KDBush;
|
|
38728
|
+
}();
|
|
38729
|
+
|
|
38862
38730
|
var defaultOptions = {
|
|
38863
38731
|
minZoom: 0,
|
|
38864
38732
|
// min zoom to generate clusters on
|
|
@@ -38886,62 +38754,36 @@
|
|
|
38886
38754
|
return props;
|
|
38887
38755
|
} // props => ({sum: props.my_value})
|
|
38888
38756
|
};
|
|
38889
|
-
|
|
38890
38757
|
var fround = Math.fround || function (tmp) {
|
|
38891
38758
|
return function (x) {
|
|
38892
38759
|
tmp[0] = +x;
|
|
38893
38760
|
return tmp[0];
|
|
38894
38761
|
};
|
|
38895
38762
|
}(new Float32Array(1));
|
|
38896
|
-
var OFFSET_ZOOM = 2;
|
|
38897
|
-
var OFFSET_ID = 3;
|
|
38898
|
-
var OFFSET_PARENT = 4;
|
|
38899
|
-
var OFFSET_NUM = 5;
|
|
38900
|
-
var OFFSET_PROP = 6;
|
|
38901
38763
|
var Supercluster = /*#__PURE__*/function () {
|
|
38902
38764
|
function Supercluster(options) {
|
|
38903
|
-
this.options =
|
|
38765
|
+
this.options = extend(Object.create(defaultOptions), options);
|
|
38904
38766
|
this.trees = new Array(this.options.maxZoom + 1);
|
|
38905
|
-
this.stride = this.options.reduce ? 7 : 6;
|
|
38906
|
-
this.clusterProps = [];
|
|
38907
38767
|
}
|
|
38908
38768
|
var _proto = Supercluster.prototype;
|
|
38909
38769
|
_proto.load = function load(points) {
|
|
38910
38770
|
var _this$options = this.options,
|
|
38911
38771
|
log = _this$options.log,
|
|
38912
38772
|
minZoom = _this$options.minZoom,
|
|
38913
|
-
maxZoom = _this$options.maxZoom
|
|
38773
|
+
maxZoom = _this$options.maxZoom,
|
|
38774
|
+
nodeSize = _this$options.nodeSize;
|
|
38914
38775
|
if (log) console.time('total time');
|
|
38915
38776
|
var timerId = "prepare " + points.length + " points";
|
|
38916
38777
|
if (log) console.time(timerId);
|
|
38917
38778
|
this.points = points;
|
|
38918
38779
|
|
|
38919
38780
|
// generate a cluster object for each point and index input points into a KD-tree
|
|
38920
|
-
var
|
|
38781
|
+
var clusters = [];
|
|
38921
38782
|
for (var i = 0; i < points.length; i++) {
|
|
38922
|
-
|
|
38923
|
-
|
|
38924
|
-
var _p$geometry$coordinat = p.geometry.coordinates,
|
|
38925
|
-
lng = _p$geometry$coordinat[0],
|
|
38926
|
-
lat = _p$geometry$coordinat[1];
|
|
38927
|
-
var x = fround(lngX(lng));
|
|
38928
|
-
var y = fround(latY(lat));
|
|
38929
|
-
// store internal point/cluster data in flat numeric arrays for performance
|
|
38930
|
-
data.push(x, y,
|
|
38931
|
-
// projected point coordinates
|
|
38932
|
-
Infinity,
|
|
38933
|
-
// the last zoom the point was processed at
|
|
38934
|
-
i,
|
|
38935
|
-
// index of the source feature in the original input array
|
|
38936
|
-
-1,
|
|
38937
|
-
// parent cluster id
|
|
38938
|
-
1 // number of points in a cluster
|
|
38939
|
-
);
|
|
38940
|
-
|
|
38941
|
-
if (this.options.reduce) data.push(0); // noop
|
|
38783
|
+
if (!points[i].geometry) continue;
|
|
38784
|
+
clusters.push(createPointCluster(points[i], i));
|
|
38942
38785
|
}
|
|
38943
|
-
|
|
38944
|
-
var tree = this.trees[maxZoom + 1] = this._createTree(data);
|
|
38786
|
+
this.trees[maxZoom + 1] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);
|
|
38945
38787
|
if (log) console.timeEnd(timerId);
|
|
38946
38788
|
|
|
38947
38789
|
// cluster points on max zoom, then cluster the results on previous zoom, etc.;
|
|
@@ -38950,8 +38792,9 @@
|
|
|
38950
38792
|
var now = +Date.now();
|
|
38951
38793
|
|
|
38952
38794
|
// create a new set of clusters for the zoom and index them with a KD-tree
|
|
38953
|
-
|
|
38954
|
-
|
|
38795
|
+
clusters = this._cluster(clusters, z);
|
|
38796
|
+
this.trees[z] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);
|
|
38797
|
+
if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);
|
|
38955
38798
|
}
|
|
38956
38799
|
if (log) console.timeEnd('total time');
|
|
38957
38800
|
return this;
|
|
@@ -38971,12 +38814,11 @@
|
|
|
38971
38814
|
}
|
|
38972
38815
|
var tree = this.trees[this._limitZoom(zoom)];
|
|
38973
38816
|
var ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));
|
|
38974
|
-
var data = tree.data;
|
|
38975
38817
|
var clusters = [];
|
|
38976
38818
|
for (var _iterator = _createForOfIteratorHelperLoose(ids), _step; !(_step = _iterator()).done;) {
|
|
38977
38819
|
var id = _step.value;
|
|
38978
|
-
var
|
|
38979
|
-
clusters.push(
|
|
38820
|
+
var c = tree.points[id];
|
|
38821
|
+
clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);
|
|
38980
38822
|
}
|
|
38981
38823
|
return clusters;
|
|
38982
38824
|
};
|
|
@@ -38984,20 +38826,18 @@
|
|
|
38984
38826
|
var originId = this._getOriginId(clusterId);
|
|
38985
38827
|
var originZoom = this._getOriginZoom(clusterId);
|
|
38986
38828
|
var errorMsg = 'No cluster with the specified id.';
|
|
38987
|
-
var
|
|
38988
|
-
if (!
|
|
38989
|
-
var
|
|
38990
|
-
if (
|
|
38829
|
+
var index = this.trees[originZoom];
|
|
38830
|
+
if (!index) throw new Error(errorMsg);
|
|
38831
|
+
var origin = index.points[originId];
|
|
38832
|
+
if (!origin) throw new Error(errorMsg);
|
|
38991
38833
|
var r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));
|
|
38992
|
-
var
|
|
38993
|
-
var y = data[originId * this.stride + 1];
|
|
38994
|
-
var ids = tree.within(x, y, r);
|
|
38834
|
+
var ids = index.within(origin.x, origin.y, r);
|
|
38995
38835
|
var children = [];
|
|
38996
38836
|
for (var _iterator2 = _createForOfIteratorHelperLoose(ids), _step2; !(_step2 = _iterator2()).done;) {
|
|
38997
38837
|
var id = _step2.value;
|
|
38998
|
-
var
|
|
38999
|
-
if (
|
|
39000
|
-
children.push(
|
|
38838
|
+
var c = index.points[id];
|
|
38839
|
+
if (c.parentId === clusterId) {
|
|
38840
|
+
children.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);
|
|
39001
38841
|
}
|
|
39002
38842
|
}
|
|
39003
38843
|
if (children.length === 0) throw new Error(errorMsg);
|
|
@@ -39022,12 +38862,12 @@
|
|
|
39022
38862
|
var tile = {
|
|
39023
38863
|
features: []
|
|
39024
38864
|
};
|
|
39025
|
-
this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.
|
|
38865
|
+
this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.points, x, y, z2, tile);
|
|
39026
38866
|
if (x === 0) {
|
|
39027
|
-
this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.
|
|
38867
|
+
this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.points, z2, y, z2, tile);
|
|
39028
38868
|
}
|
|
39029
38869
|
if (x === z2 - 1) {
|
|
39030
|
-
this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.
|
|
38870
|
+
this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.points, -1, y, z2, tile);
|
|
39031
38871
|
}
|
|
39032
38872
|
return tile.features.length ? tile : null;
|
|
39033
38873
|
};
|
|
@@ -39066,33 +38906,23 @@
|
|
|
39066
38906
|
}
|
|
39067
38907
|
return skipped;
|
|
39068
38908
|
};
|
|
39069
|
-
_proto.
|
|
39070
|
-
var tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
|
39071
|
-
for (var i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);
|
|
39072
|
-
tree.finish();
|
|
39073
|
-
tree.data = data;
|
|
39074
|
-
return tree;
|
|
39075
|
-
};
|
|
39076
|
-
_proto._addTileFeatures = function _addTileFeatures(ids, data, x, y, z2, tile) {
|
|
38909
|
+
_proto._addTileFeatures = function _addTileFeatures(ids, points, x, y, z2, tile) {
|
|
39077
38910
|
for (var _iterator4 = _createForOfIteratorHelperLoose(ids), _step4; !(_step4 = _iterator4()).done;) {
|
|
39078
38911
|
var i = _step4.value;
|
|
39079
|
-
var
|
|
39080
|
-
var isCluster =
|
|
38912
|
+
var c = points[i];
|
|
38913
|
+
var isCluster = c.numPoints;
|
|
39081
38914
|
var tags = void 0,
|
|
39082
38915
|
px = void 0,
|
|
39083
38916
|
py = void 0;
|
|
39084
38917
|
if (isCluster) {
|
|
39085
|
-
tags = getClusterProperties(
|
|
39086
|
-
px =
|
|
39087
|
-
py =
|
|
38918
|
+
tags = getClusterProperties(c);
|
|
38919
|
+
px = c.x;
|
|
38920
|
+
py = c.y;
|
|
39088
38921
|
} else {
|
|
39089
|
-
var p = this.points[
|
|
38922
|
+
var p = this.points[c.index];
|
|
39090
38923
|
tags = p.properties;
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
lat = _p$geometry$coordinat2[1];
|
|
39094
|
-
px = lngX(lng);
|
|
39095
|
-
py = latY(lat);
|
|
38924
|
+
px = lngX(p.geometry.coordinates[0]);
|
|
38925
|
+
py = latY(p.geometry.coordinates[1]);
|
|
39096
38926
|
}
|
|
39097
38927
|
var f = {
|
|
39098
38928
|
type: 1,
|
|
@@ -39102,12 +38932,14 @@
|
|
|
39102
38932
|
|
|
39103
38933
|
// assign id
|
|
39104
38934
|
var id = void 0;
|
|
39105
|
-
if (isCluster
|
|
39106
|
-
|
|
39107
|
-
|
|
39108
|
-
|
|
38935
|
+
if (isCluster) {
|
|
38936
|
+
id = c.id;
|
|
38937
|
+
} else if (this.options.generateId) {
|
|
38938
|
+
// optionally generate id
|
|
38939
|
+
id = c.index;
|
|
38940
|
+
} else if (this.points[c.index].id) {
|
|
39109
38941
|
// keep id if already assigned
|
|
39110
|
-
id = this.points[
|
|
38942
|
+
id = this.points[c.index].id;
|
|
39111
38943
|
}
|
|
39112
38944
|
if (id !== undefined) f.id = id;
|
|
39113
38945
|
tile.features.push(f);
|
|
@@ -39116,84 +38948,76 @@
|
|
|
39116
38948
|
_proto._limitZoom = function _limitZoom(z) {
|
|
39117
38949
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
|
|
39118
38950
|
};
|
|
39119
|
-
_proto._cluster = function _cluster(
|
|
38951
|
+
_proto._cluster = function _cluster(points, zoom) {
|
|
38952
|
+
var clusters = [];
|
|
39120
38953
|
var _this$options3 = this.options,
|
|
39121
38954
|
radius = _this$options3.radius,
|
|
39122
38955
|
extent = _this$options3.extent,
|
|
39123
38956
|
reduce = _this$options3.reduce,
|
|
39124
38957
|
minPoints = _this$options3.minPoints;
|
|
39125
38958
|
var r = radius / (extent * Math.pow(2, zoom));
|
|
39126
|
-
var data = tree.data;
|
|
39127
|
-
var nextData = [];
|
|
39128
|
-
var stride = this.stride;
|
|
39129
38959
|
|
|
39130
38960
|
// loop through each point
|
|
39131
|
-
for (var i = 0; i <
|
|
38961
|
+
for (var i = 0; i < points.length; i++) {
|
|
38962
|
+
var p = points[i];
|
|
39132
38963
|
// if we've already visited the point at this zoom level, skip it
|
|
39133
|
-
if (
|
|
39134
|
-
|
|
38964
|
+
if (p.zoom <= zoom) continue;
|
|
38965
|
+
p.zoom = zoom;
|
|
39135
38966
|
|
|
39136
38967
|
// find all nearby points
|
|
39137
|
-
var
|
|
39138
|
-
var
|
|
39139
|
-
var
|
|
39140
|
-
var numPointsOrigin = data[i + OFFSET_NUM];
|
|
38968
|
+
var tree = this.trees[zoom + 1];
|
|
38969
|
+
var neighborIds = tree.within(p.x, p.y, r);
|
|
38970
|
+
var numPointsOrigin = p.numPoints || 1;
|
|
39141
38971
|
var numPoints = numPointsOrigin;
|
|
39142
38972
|
|
|
39143
38973
|
// count the number of points in a potential cluster
|
|
39144
38974
|
for (var _iterator5 = _createForOfIteratorHelperLoose(neighborIds), _step5; !(_step5 = _iterator5()).done;) {
|
|
39145
38975
|
var _neighborId2 = _step5.value;
|
|
39146
|
-
var
|
|
38976
|
+
var _b2 = tree.points[_neighborId2];
|
|
39147
38977
|
// filter out neighbors that are already processed
|
|
39148
|
-
if (
|
|
38978
|
+
if (_b2.zoom > zoom) numPoints += _b2.numPoints || 1;
|
|
39149
38979
|
}
|
|
39150
38980
|
|
|
39151
38981
|
// if there were neighbors to merge, and there are enough points to form a cluster
|
|
39152
38982
|
if (numPoints > numPointsOrigin && numPoints >= minPoints) {
|
|
39153
|
-
var wx = x * numPointsOrigin;
|
|
39154
|
-
var wy = y * numPointsOrigin;
|
|
39155
|
-
var clusterProperties =
|
|
39156
|
-
var clusterPropIndex = -1;
|
|
38983
|
+
var wx = p.x * numPointsOrigin;
|
|
38984
|
+
var wy = p.y * numPointsOrigin;
|
|
38985
|
+
var clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null;
|
|
39157
38986
|
|
|
39158
38987
|
// encode both zoom and point index on which the cluster originated -- offset by total length of features
|
|
39159
|
-
var id = (
|
|
38988
|
+
var id = (i << 5) + (zoom + 1) + this.points.length;
|
|
39160
38989
|
for (var _iterator6 = _createForOfIteratorHelperLoose(neighborIds), _step6; !(_step6 = _iterator6()).done;) {
|
|
39161
38990
|
var neighborId = _step6.value;
|
|
39162
|
-
var
|
|
39163
|
-
if (
|
|
39164
|
-
|
|
39165
|
-
|
|
39166
|
-
var numPoints2 =
|
|
39167
|
-
wx +=
|
|
39168
|
-
wy +=
|
|
39169
|
-
|
|
38991
|
+
var b = tree.points[neighborId];
|
|
38992
|
+
if (b.zoom <= zoom) continue;
|
|
38993
|
+
b.zoom = zoom; // save the zoom (so it doesn't get processed twice)
|
|
38994
|
+
|
|
38995
|
+
var numPoints2 = b.numPoints || 1;
|
|
38996
|
+
wx += b.x * numPoints2; // accumulate coordinates for calculating weighted center
|
|
38997
|
+
wy += b.y * numPoints2;
|
|
38998
|
+
b.parentId = id;
|
|
39170
38999
|
if (reduce) {
|
|
39171
|
-
if (!clusterProperties)
|
|
39172
|
-
|
|
39173
|
-
clusterPropIndex = this.clusterProps.length;
|
|
39174
|
-
this.clusterProps.push(clusterProperties);
|
|
39175
|
-
}
|
|
39176
|
-
reduce(clusterProperties, this._map(data, k));
|
|
39000
|
+
if (!clusterProperties) clusterProperties = this._map(p, true);
|
|
39001
|
+
reduce(clusterProperties, this._map(b));
|
|
39177
39002
|
}
|
|
39178
39003
|
}
|
|
39179
|
-
|
|
39180
|
-
|
|
39181
|
-
if (reduce) nextData.push(clusterPropIndex);
|
|
39004
|
+
p.parentId = id;
|
|
39005
|
+
clusters.push(createCluster(wx / numPoints, wy / numPoints, id, numPoints, clusterProperties));
|
|
39182
39006
|
} else {
|
|
39183
39007
|
// left points as unclustered
|
|
39184
|
-
|
|
39008
|
+
clusters.push(p);
|
|
39185
39009
|
if (numPoints > 1) {
|
|
39186
39010
|
for (var _iterator7 = _createForOfIteratorHelperLoose(neighborIds), _step7; !(_step7 = _iterator7()).done;) {
|
|
39187
39011
|
var _neighborId = _step7.value;
|
|
39188
|
-
var
|
|
39189
|
-
if (
|
|
39190
|
-
|
|
39191
|
-
|
|
39012
|
+
var _b = tree.points[_neighborId];
|
|
39013
|
+
if (_b.zoom <= zoom) continue;
|
|
39014
|
+
_b.zoom = zoom;
|
|
39015
|
+
clusters.push(_b);
|
|
39192
39016
|
}
|
|
39193
39017
|
}
|
|
39194
39018
|
}
|
|
39195
39019
|
}
|
|
39196
|
-
return
|
|
39020
|
+
return clusters;
|
|
39197
39021
|
}
|
|
39198
39022
|
|
|
39199
39023
|
// get index of the point from which the cluster originated
|
|
@@ -39207,36 +39031,63 @@
|
|
|
39207
39031
|
_proto._getOriginZoom = function _getOriginZoom(clusterId) {
|
|
39208
39032
|
return (clusterId - this.points.length) % 32;
|
|
39209
39033
|
};
|
|
39210
|
-
_proto._map = function _map(
|
|
39211
|
-
if (
|
|
39212
|
-
|
|
39213
|
-
return clone ? Object.assign({}, props) : props;
|
|
39034
|
+
_proto._map = function _map(point, clone) {
|
|
39035
|
+
if (point.numPoints) {
|
|
39036
|
+
return clone ? extend({}, point.properties) : point.properties;
|
|
39214
39037
|
}
|
|
39215
|
-
var original = this.points[
|
|
39038
|
+
var original = this.points[point.index].properties;
|
|
39216
39039
|
var result = this.options.map(original);
|
|
39217
|
-
return clone && result === original ?
|
|
39040
|
+
return clone && result === original ? extend({}, result) : result;
|
|
39218
39041
|
};
|
|
39219
39042
|
return Supercluster;
|
|
39220
39043
|
}();
|
|
39221
|
-
function
|
|
39044
|
+
function createCluster(x, y, id, numPoints, properties) {
|
|
39045
|
+
return {
|
|
39046
|
+
x: fround(x),
|
|
39047
|
+
// weighted cluster center; round for consistency with Float32Array index
|
|
39048
|
+
y: fround(y),
|
|
39049
|
+
zoom: Infinity,
|
|
39050
|
+
// the last zoom the cluster was processed at
|
|
39051
|
+
id: id,
|
|
39052
|
+
// encodes index of the first child of the cluster and its zoom level
|
|
39053
|
+
parentId: -1,
|
|
39054
|
+
// parent cluster id
|
|
39055
|
+
numPoints: numPoints,
|
|
39056
|
+
properties: properties
|
|
39057
|
+
};
|
|
39058
|
+
}
|
|
39059
|
+
function createPointCluster(p, id) {
|
|
39060
|
+
var _p$geometry$coordinat = p.geometry.coordinates,
|
|
39061
|
+
x = _p$geometry$coordinat[0],
|
|
39062
|
+
y = _p$geometry$coordinat[1];
|
|
39063
|
+
return {
|
|
39064
|
+
x: fround(lngX(x)),
|
|
39065
|
+
// projected point coordinates
|
|
39066
|
+
y: fround(latY(y)),
|
|
39067
|
+
zoom: Infinity,
|
|
39068
|
+
// the last zoom the point was processed at
|
|
39069
|
+
index: id,
|
|
39070
|
+
// index of the source feature in the original input array,
|
|
39071
|
+
parentId: -1 // parent cluster id
|
|
39072
|
+
};
|
|
39073
|
+
}
|
|
39074
|
+
function getClusterJSON(cluster) {
|
|
39222
39075
|
return {
|
|
39223
39076
|
type: 'Feature',
|
|
39224
|
-
id:
|
|
39225
|
-
properties: getClusterProperties(
|
|
39077
|
+
id: cluster.id,
|
|
39078
|
+
properties: getClusterProperties(cluster),
|
|
39226
39079
|
geometry: {
|
|
39227
39080
|
type: 'Point',
|
|
39228
|
-
coordinates: [xLng(
|
|
39081
|
+
coordinates: [xLng(cluster.x), yLat(cluster.y)]
|
|
39229
39082
|
}
|
|
39230
39083
|
};
|
|
39231
39084
|
}
|
|
39232
|
-
function getClusterProperties(
|
|
39233
|
-
var count =
|
|
39085
|
+
function getClusterProperties(cluster) {
|
|
39086
|
+
var count = cluster.numPoints;
|
|
39234
39087
|
var abbrev = count >= 10000 ? Math.round(count / 1000) + "k" : count >= 1000 ? Math.round(count / 100) / 10 + "k" : count;
|
|
39235
|
-
|
|
39236
|
-
var properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);
|
|
39237
|
-
return Object.assign(properties, {
|
|
39088
|
+
return extend(extend({}, cluster.properties), {
|
|
39238
39089
|
cluster: true,
|
|
39239
|
-
cluster_id:
|
|
39090
|
+
cluster_id: cluster.id,
|
|
39240
39091
|
point_count: count,
|
|
39241
39092
|
point_count_abbreviated: abbrev
|
|
39242
39093
|
});
|
|
@@ -39260,6 +39111,16 @@
|
|
|
39260
39111
|
var y2 = (180 - y * 360) * Math.PI / 180;
|
|
39261
39112
|
return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;
|
|
39262
39113
|
}
|
|
39114
|
+
function extend(dest, src) {
|
|
39115
|
+
for (var id in src) dest[id] = src[id];
|
|
39116
|
+
return dest;
|
|
39117
|
+
}
|
|
39118
|
+
function getX(p) {
|
|
39119
|
+
return p.x;
|
|
39120
|
+
}
|
|
39121
|
+
function getY(p) {
|
|
39122
|
+
return p.y;
|
|
39123
|
+
}
|
|
39263
39124
|
|
|
39264
39125
|
/*! *****************************************************************************
|
|
39265
39126
|
Copyright (c) Microsoft Corporation.
|
|
@@ -39285,71 +39146,6 @@
|
|
|
39285
39146
|
return t;
|
|
39286
39147
|
}
|
|
39287
39148
|
|
|
39288
|
-
/**
|
|
39289
|
-
* Copyright 2023 Google LLC
|
|
39290
|
-
*
|
|
39291
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
39292
|
-
* you may not use this file except in compliance with the License.
|
|
39293
|
-
* You may obtain a copy of the License at
|
|
39294
|
-
*
|
|
39295
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
39296
|
-
*
|
|
39297
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
39298
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
39299
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39300
|
-
* See the License for the specific language governing permissions and
|
|
39301
|
-
* limitations under the License.
|
|
39302
|
-
*/
|
|
39303
|
-
/**
|
|
39304
|
-
* util class that creates a common set of convenience functions to wrap
|
|
39305
|
-
* shared behavior of Advanced Markers and Markers.
|
|
39306
|
-
*/
|
|
39307
|
-
var MarkerUtils = /*#__PURE__*/function () {
|
|
39308
|
-
function MarkerUtils() {}
|
|
39309
|
-
MarkerUtils.isAdvancedMarkerAvailable = function isAdvancedMarkerAvailable(map) {
|
|
39310
|
-
return google.maps.marker && map.getMapCapabilities().isAdvancedMarkersAvailable === true;
|
|
39311
|
-
};
|
|
39312
|
-
MarkerUtils.isAdvancedMarker = function isAdvancedMarker(marker) {
|
|
39313
|
-
return google.maps.marker && marker instanceof google.maps.marker.AdvancedMarkerElement;
|
|
39314
|
-
};
|
|
39315
|
-
MarkerUtils.setMap = function setMap(marker, map) {
|
|
39316
|
-
if (this.isAdvancedMarker(marker)) {
|
|
39317
|
-
marker.map = map;
|
|
39318
|
-
} else {
|
|
39319
|
-
marker.setMap(map);
|
|
39320
|
-
}
|
|
39321
|
-
};
|
|
39322
|
-
MarkerUtils.getPosition = function getPosition(marker) {
|
|
39323
|
-
// SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers
|
|
39324
|
-
if (this.isAdvancedMarker(marker)) {
|
|
39325
|
-
if (marker.position) {
|
|
39326
|
-
if (marker.position instanceof google.maps.LatLng) {
|
|
39327
|
-
return marker.position;
|
|
39328
|
-
}
|
|
39329
|
-
// since we can't cast to LatLngLiteral for reasons =(
|
|
39330
|
-
if (marker.position.lat && marker.position.lng) {
|
|
39331
|
-
return new google.maps.LatLng(marker.position.lat, marker.position.lng);
|
|
39332
|
-
}
|
|
39333
|
-
}
|
|
39334
|
-
return new google.maps.LatLng(null);
|
|
39335
|
-
}
|
|
39336
|
-
return marker.getPosition();
|
|
39337
|
-
};
|
|
39338
|
-
MarkerUtils.getVisible = function getVisible(marker) {
|
|
39339
|
-
if (this.isAdvancedMarker(marker)) {
|
|
39340
|
-
/**
|
|
39341
|
-
* Always return true for Advanced Markers because the clusterer
|
|
39342
|
-
* uses getVisible as a way to count legacy markers not as an actual
|
|
39343
|
-
* indicator of visibility for some reason. Even when markers are hidden
|
|
39344
|
-
* Marker.getVisible returns `true` and this is used to set the marker count
|
|
39345
|
-
* on the cluster. See the behavior of Cluster.count
|
|
39346
|
-
*/
|
|
39347
|
-
return true;
|
|
39348
|
-
}
|
|
39349
|
-
return marker.getVisible();
|
|
39350
|
-
};
|
|
39351
|
-
return MarkerUtils;
|
|
39352
|
-
}();
|
|
39353
39149
|
/**
|
|
39354
39150
|
* Copyright 2021 Google LLC
|
|
39355
39151
|
*
|
|
@@ -39390,8 +39186,8 @@
|
|
|
39390
39186
|
*/;
|
|
39391
39187
|
_proto["delete"] = function _delete() {
|
|
39392
39188
|
if (this.marker) {
|
|
39393
|
-
|
|
39394
|
-
this.marker
|
|
39189
|
+
this.marker.setMap(null);
|
|
39190
|
+
delete this.marker;
|
|
39395
39191
|
}
|
|
39396
39192
|
this.markers.length = 0;
|
|
39397
39193
|
};
|
|
@@ -39399,14 +39195,11 @@
|
|
|
39399
39195
|
key: "bounds",
|
|
39400
39196
|
get: function get() {
|
|
39401
39197
|
if (this.markers.length === 0 && !this._position) {
|
|
39402
|
-
return;
|
|
39403
|
-
}
|
|
39404
|
-
var bounds = new google.maps.LatLngBounds(this._position, this._position);
|
|
39405
|
-
for (var _iterator = _createForOfIteratorHelperLoose(this.markers), _step; !(_step = _iterator()).done;) {
|
|
39406
|
-
var marker = _step.value;
|
|
39407
|
-
bounds.extend(MarkerUtils.getPosition(marker));
|
|
39198
|
+
return undefined;
|
|
39408
39199
|
}
|
|
39409
|
-
return bounds
|
|
39200
|
+
return this.markers.reduce(function (bounds, marker) {
|
|
39201
|
+
return bounds.extend(marker.getPosition());
|
|
39202
|
+
}, new google.maps.LatLngBounds(this._position, this._position));
|
|
39410
39203
|
}
|
|
39411
39204
|
}, {
|
|
39412
39205
|
key: "position",
|
|
@@ -39420,7 +39213,7 @@
|
|
|
39420
39213
|
key: "count",
|
|
39421
39214
|
get: function get() {
|
|
39422
39215
|
return this.markers.filter(function (m) {
|
|
39423
|
-
return
|
|
39216
|
+
return m.getVisible();
|
|
39424
39217
|
}).length;
|
|
39425
39218
|
}
|
|
39426
39219
|
}]);
|
|
@@ -39458,7 +39251,7 @@
|
|
|
39458
39251
|
* ```typescript
|
|
39459
39252
|
* cluster({markers, map}: AlgorithmInput): Cluster[] {
|
|
39460
39253
|
* if (shouldBypassClustering(map)) {
|
|
39461
|
-
* return this.noop({markers})
|
|
39254
|
+
* return this.noop({markers, map})
|
|
39462
39255
|
* }
|
|
39463
39256
|
* }
|
|
39464
39257
|
* ```
|
|
@@ -39476,7 +39269,7 @@
|
|
|
39476
39269
|
var _noop = function _noop(markers) {
|
|
39477
39270
|
var clusters = markers.map(function (marker) {
|
|
39478
39271
|
return new Cluster({
|
|
39479
|
-
position:
|
|
39272
|
+
position: marker.getPosition(),
|
|
39480
39273
|
markers: [marker]
|
|
39481
39274
|
});
|
|
39482
39275
|
});
|
|
@@ -39513,33 +39306,28 @@
|
|
|
39513
39306
|
_this4 = _AbstractAlgorithm3.call(this, {
|
|
39514
39307
|
maxZoom: maxZoom
|
|
39515
39308
|
}) || this;
|
|
39516
|
-
_this4.state = {
|
|
39517
|
-
zoom: -1
|
|
39518
|
-
};
|
|
39519
39309
|
_this4.superCluster = new Supercluster(Object.assign({
|
|
39520
39310
|
maxZoom: _this4.maxZoom,
|
|
39521
39311
|
radius: radius
|
|
39522
39312
|
}, options));
|
|
39313
|
+
_this4.state = {
|
|
39314
|
+
zoom: null
|
|
39315
|
+
};
|
|
39523
39316
|
return _this4;
|
|
39524
39317
|
}
|
|
39525
39318
|
var _proto6 = SuperClusterAlgorithm.prototype;
|
|
39526
39319
|
_proto6.calculate = function calculate(input) {
|
|
39527
39320
|
var changed = false;
|
|
39528
|
-
|
|
39529
|
-
zoom: input.map.getZoom()
|
|
39530
|
-
};
|
|
39531
|
-
if (!fastDeepEqual(input.markers, this.markers)) {
|
|
39321
|
+
if (!equal(input.markers, this.markers)) {
|
|
39532
39322
|
changed = true;
|
|
39533
39323
|
// TODO use proxy to avoid copy?
|
|
39534
39324
|
this.markers = [].concat(input.markers);
|
|
39535
39325
|
var points = this.markers.map(function (marker) {
|
|
39536
|
-
var position = MarkerUtils.getPosition(marker);
|
|
39537
|
-
var coordinates = [position.lng(), position.lat()];
|
|
39538
39326
|
return {
|
|
39539
39327
|
type: "Feature",
|
|
39540
39328
|
geometry: {
|
|
39541
39329
|
type: "Point",
|
|
39542
|
-
coordinates:
|
|
39330
|
+
coordinates: [marker.getPosition().lng(), marker.getPosition().lat()]
|
|
39543
39331
|
},
|
|
39544
39332
|
properties: {
|
|
39545
39333
|
marker: marker
|
|
@@ -39548,9 +39336,12 @@
|
|
|
39548
39336
|
});
|
|
39549
39337
|
this.superCluster.load(points);
|
|
39550
39338
|
}
|
|
39339
|
+
var state = {
|
|
39340
|
+
zoom: input.map.getZoom()
|
|
39341
|
+
};
|
|
39551
39342
|
if (!changed) {
|
|
39552
|
-
if (this.state.zoom
|
|
39553
|
-
changed = !
|
|
39343
|
+
if (this.state.zoom > this.maxZoom && state.zoom > this.maxZoom) ;else {
|
|
39344
|
+
changed = changed || !equal(this.state, state);
|
|
39554
39345
|
}
|
|
39555
39346
|
}
|
|
39556
39347
|
this.state = state;
|
|
@@ -39563,11 +39354,8 @@
|
|
|
39563
39354
|
};
|
|
39564
39355
|
};
|
|
39565
39356
|
_proto6.cluster = function cluster(_ref10) {
|
|
39566
|
-
var _this5 = this;
|
|
39567
39357
|
var map = _ref10.map;
|
|
39568
|
-
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())).map(
|
|
39569
|
-
return _this5.transformCluster(feature);
|
|
39570
|
-
});
|
|
39358
|
+
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())).map(this.transformCluster.bind(this));
|
|
39571
39359
|
};
|
|
39572
39360
|
_proto6.transformCluster = function transformCluster(_ref11) {
|
|
39573
39361
|
var _ref11$geometry$coord = _ref11.geometry.coordinates,
|
|
@@ -39579,17 +39367,18 @@
|
|
|
39579
39367
|
markers: this.superCluster.getLeaves(properties.cluster_id, Infinity).map(function (leaf) {
|
|
39580
39368
|
return leaf.properties.marker;
|
|
39581
39369
|
}),
|
|
39582
|
-
position: {
|
|
39370
|
+
position: new google.maps.LatLng({
|
|
39583
39371
|
lat: lat,
|
|
39584
39372
|
lng: lng
|
|
39585
|
-
}
|
|
39373
|
+
})
|
|
39374
|
+
});
|
|
39375
|
+
} else {
|
|
39376
|
+
var marker = properties.marker;
|
|
39377
|
+
return new Cluster({
|
|
39378
|
+
markers: [marker],
|
|
39379
|
+
position: marker.getPosition()
|
|
39586
39380
|
});
|
|
39587
39381
|
}
|
|
39588
|
-
var marker = properties.marker;
|
|
39589
|
-
return new Cluster({
|
|
39590
|
-
markers: [marker],
|
|
39591
|
-
position: MarkerUtils.getPosition(marker)
|
|
39592
|
-
});
|
|
39593
39382
|
};
|
|
39594
39383
|
return SuperClusterAlgorithm;
|
|
39595
39384
|
}(AbstractAlgorithm);
|
|
@@ -39633,7 +39422,7 @@
|
|
|
39633
39422
|
};
|
|
39634
39423
|
var DefaultRenderer = /*#__PURE__*/function () {
|
|
39635
39424
|
function DefaultRenderer() {}
|
|
39636
|
-
var
|
|
39425
|
+
var _proto7 = DefaultRenderer.prototype;
|
|
39637
39426
|
/**
|
|
39638
39427
|
* The default render function for the library used by {@link MarkerClusterer}.
|
|
39639
39428
|
*
|
|
@@ -39672,40 +39461,29 @@
|
|
|
39672
39461
|
* });
|
|
39673
39462
|
* ```
|
|
39674
39463
|
*/
|
|
39675
|
-
|
|
39676
|
-
var count =
|
|
39677
|
-
position =
|
|
39464
|
+
_proto7.render = function render(_ref12, stats) {
|
|
39465
|
+
var count = _ref12.count,
|
|
39466
|
+
position = _ref12.position;
|
|
39678
39467
|
// change color if this cluster has more markers than the mean cluster
|
|
39679
39468
|
var color = count > Math.max(10, stats.clusters.markers.mean) ? "#ff0000" : "#0000ff";
|
|
39680
|
-
// create svg
|
|
39681
|
-
var svg = "<svg fill=\"" + color + "\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\"
|
|
39682
|
-
|
|
39683
|
-
|
|
39684
|
-
zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;
|
|
39685
|
-
if (MarkerUtils.isAdvancedMarkerAvailable(map)) {
|
|
39686
|
-
// create cluster SVG element
|
|
39687
|
-
var parser = new DOMParser();
|
|
39688
|
-
var svgEl = parser.parseFromString(svg, "image/svg+xml").documentElement;
|
|
39689
|
-
svgEl.setAttribute("transform", "translate(0 25)");
|
|
39690
|
-
var _clusterOptions = {
|
|
39691
|
-
map: map,
|
|
39692
|
-
position: position,
|
|
39693
|
-
zIndex: zIndex,
|
|
39694
|
-
title: title,
|
|
39695
|
-
content: svgEl
|
|
39696
|
-
};
|
|
39697
|
-
return new google.maps.marker.AdvancedMarkerElement(_clusterOptions);
|
|
39698
|
-
}
|
|
39699
|
-
var clusterOptions = {
|
|
39469
|
+
// create svg url with fill color
|
|
39470
|
+
var svg = window.btoa("\n <svg fill=\"" + color + "\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\">\n <circle cx=\"120\" cy=\"120\" opacity=\".6\" r=\"70\" />\n <circle cx=\"120\" cy=\"120\" opacity=\".3\" r=\"90\" />\n <circle cx=\"120\" cy=\"120\" opacity=\".2\" r=\"110\" />\n </svg>");
|
|
39471
|
+
// create marker using svg icon
|
|
39472
|
+
return new google.maps.Marker({
|
|
39700
39473
|
position: position,
|
|
39701
|
-
zIndex: zIndex,
|
|
39702
|
-
title: title,
|
|
39703
39474
|
icon: {
|
|
39704
|
-
url: "data:image/svg+xml;base64," +
|
|
39705
|
-
|
|
39706
|
-
}
|
|
39707
|
-
|
|
39708
|
-
|
|
39475
|
+
url: "data:image/svg+xml;base64," + svg,
|
|
39476
|
+
scaledSize: new google.maps.Size(45, 45)
|
|
39477
|
+
},
|
|
39478
|
+
label: {
|
|
39479
|
+
text: String(count),
|
|
39480
|
+
color: "rgba(255,255,255,0.9)",
|
|
39481
|
+
fontSize: "12px"
|
|
39482
|
+
},
|
|
39483
|
+
title: "Cluster of " + count + " markers",
|
|
39484
|
+
// adjust zIndex to be above other markers
|
|
39485
|
+
zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count
|
|
39486
|
+
});
|
|
39709
39487
|
};
|
|
39710
39488
|
return DefaultRenderer;
|
|
39711
39489
|
}();
|
|
@@ -39732,7 +39510,7 @@
|
|
|
39732
39510
|
* @ignore
|
|
39733
39511
|
*/
|
|
39734
39512
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39735
|
-
function extend(type1, type2) {
|
|
39513
|
+
function extend$1(type1, type2) {
|
|
39736
39514
|
/* istanbul ignore next */
|
|
39737
39515
|
// eslint-disable-next-line prefer-const
|
|
39738
39516
|
for (var property in type2.prototype) {
|
|
@@ -39748,7 +39526,7 @@
|
|
|
39748
39526
|
// because it might not always be available when the code is defined so we
|
|
39749
39527
|
// look for it at the last possible moment. If it doesn't exist now then
|
|
39750
39528
|
// there is no point going ahead :)
|
|
39751
|
-
extend(OverlayViewSafe, google.maps.OverlayView);
|
|
39529
|
+
extend$1(OverlayViewSafe, google.maps.OverlayView);
|
|
39752
39530
|
};
|
|
39753
39531
|
/**
|
|
39754
39532
|
* Copyright 2021 Google LLC
|
|
@@ -39781,32 +39559,32 @@
|
|
|
39781
39559
|
*/
|
|
39782
39560
|
var MarkerClusterer = /*#__PURE__*/function (_OverlayViewSafe) {
|
|
39783
39561
|
_inheritsLoose(MarkerClusterer, _OverlayViewSafe);
|
|
39784
|
-
function MarkerClusterer(
|
|
39785
|
-
var
|
|
39786
|
-
var map =
|
|
39787
|
-
|
|
39788
|
-
markers =
|
|
39789
|
-
|
|
39790
|
-
algorithmOptions =
|
|
39791
|
-
|
|
39792
|
-
algorithm =
|
|
39793
|
-
|
|
39794
|
-
renderer =
|
|
39795
|
-
|
|
39796
|
-
onClusterClick =
|
|
39797
|
-
|
|
39798
|
-
|
|
39799
|
-
|
|
39800
|
-
|
|
39801
|
-
|
|
39802
|
-
|
|
39562
|
+
function MarkerClusterer(_ref13) {
|
|
39563
|
+
var _this5;
|
|
39564
|
+
var map = _ref13.map,
|
|
39565
|
+
_ref13$markers = _ref13.markers,
|
|
39566
|
+
markers = _ref13$markers === void 0 ? [] : _ref13$markers,
|
|
39567
|
+
_ref13$algorithmOptio = _ref13.algorithmOptions,
|
|
39568
|
+
algorithmOptions = _ref13$algorithmOptio === void 0 ? {} : _ref13$algorithmOptio,
|
|
39569
|
+
_ref13$algorithm = _ref13.algorithm,
|
|
39570
|
+
algorithm = _ref13$algorithm === void 0 ? new SuperClusterAlgorithm(algorithmOptions) : _ref13$algorithm,
|
|
39571
|
+
_ref13$renderer = _ref13.renderer,
|
|
39572
|
+
renderer = _ref13$renderer === void 0 ? new DefaultRenderer() : _ref13$renderer,
|
|
39573
|
+
_ref13$onClusterClick = _ref13.onClusterClick,
|
|
39574
|
+
onClusterClick = _ref13$onClusterClick === void 0 ? defaultOnClusterClickHandler : _ref13$onClusterClick;
|
|
39575
|
+
_this5 = _OverlayViewSafe.call(this) || this;
|
|
39576
|
+
_this5.markers = [].concat(markers);
|
|
39577
|
+
_this5.clusters = [];
|
|
39578
|
+
_this5.algorithm = algorithm;
|
|
39579
|
+
_this5.renderer = renderer;
|
|
39580
|
+
_this5.onClusterClick = onClusterClick;
|
|
39803
39581
|
if (map) {
|
|
39804
|
-
|
|
39582
|
+
_this5.setMap(map);
|
|
39805
39583
|
}
|
|
39806
|
-
return
|
|
39584
|
+
return _this5;
|
|
39807
39585
|
}
|
|
39808
|
-
var
|
|
39809
|
-
|
|
39586
|
+
var _proto8 = MarkerClusterer.prototype;
|
|
39587
|
+
_proto8.addMarker = function addMarker(marker, noDraw) {
|
|
39810
39588
|
if (this.markers.includes(marker)) {
|
|
39811
39589
|
return;
|
|
39812
39590
|
}
|
|
@@ -39815,40 +39593,40 @@
|
|
|
39815
39593
|
this.render();
|
|
39816
39594
|
}
|
|
39817
39595
|
};
|
|
39818
|
-
|
|
39819
|
-
var
|
|
39596
|
+
_proto8.addMarkers = function addMarkers(markers, noDraw) {
|
|
39597
|
+
var _this6 = this;
|
|
39820
39598
|
markers.forEach(function (marker) {
|
|
39821
|
-
|
|
39599
|
+
_this6.addMarker(marker, true);
|
|
39822
39600
|
});
|
|
39823
39601
|
if (!noDraw) {
|
|
39824
39602
|
this.render();
|
|
39825
39603
|
}
|
|
39826
39604
|
};
|
|
39827
|
-
|
|
39605
|
+
_proto8.removeMarker = function removeMarker(marker, noDraw) {
|
|
39828
39606
|
var index = this.markers.indexOf(marker);
|
|
39829
39607
|
if (index === -1) {
|
|
39830
39608
|
// Marker is not in our list of markers, so do nothing:
|
|
39831
39609
|
return false;
|
|
39832
39610
|
}
|
|
39833
|
-
|
|
39611
|
+
marker.setMap(null);
|
|
39834
39612
|
this.markers.splice(index, 1); // Remove the marker from the list of managed markers
|
|
39835
39613
|
if (!noDraw) {
|
|
39836
39614
|
this.render();
|
|
39837
39615
|
}
|
|
39838
39616
|
return true;
|
|
39839
39617
|
};
|
|
39840
|
-
|
|
39841
|
-
var
|
|
39618
|
+
_proto8.removeMarkers = function removeMarkers(markers, noDraw) {
|
|
39619
|
+
var _this7 = this;
|
|
39842
39620
|
var removed = false;
|
|
39843
39621
|
markers.forEach(function (marker) {
|
|
39844
|
-
removed =
|
|
39622
|
+
removed = _this7.removeMarker(marker, true) || removed;
|
|
39845
39623
|
});
|
|
39846
39624
|
if (removed && !noDraw) {
|
|
39847
39625
|
this.render();
|
|
39848
39626
|
}
|
|
39849
39627
|
return removed;
|
|
39850
39628
|
};
|
|
39851
|
-
|
|
39629
|
+
_proto8.clearMarkers = function clearMarkers(noDraw) {
|
|
39852
39630
|
this.markers.length = 0;
|
|
39853
39631
|
if (!noDraw) {
|
|
39854
39632
|
this.render();
|
|
@@ -39857,9 +39635,9 @@
|
|
|
39857
39635
|
/**
|
|
39858
39636
|
* Recalculates and draws all the marker clusters.
|
|
39859
39637
|
*/;
|
|
39860
|
-
|
|
39638
|
+
_proto8.render = function render() {
|
|
39861
39639
|
var map = this.getMap();
|
|
39862
|
-
if (map instanceof google.maps.Map &&
|
|
39640
|
+
if (map instanceof google.maps.Map && this.getProjection()) {
|
|
39863
39641
|
google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);
|
|
39864
39642
|
var _this$algorithm$calcu = this.algorithm.calculate({
|
|
39865
39643
|
markers: this.markers,
|
|
@@ -39868,90 +39646,53 @@
|
|
|
39868
39646
|
}),
|
|
39869
39647
|
clusters = _this$algorithm$calcu.clusters,
|
|
39870
39648
|
changed = _this$algorithm$calcu.changed;
|
|
39871
|
-
//
|
|
39649
|
+
// allow algorithms to return flag on whether the clusters/markers have changed
|
|
39872
39650
|
if (changed || changed == undefined) {
|
|
39873
|
-
//
|
|
39874
|
-
|
|
39875
|
-
//
|
|
39876
|
-
var singleMarker = new Set();
|
|
39877
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose(clusters), _step2; !(_step2 = _iterator2()).done;) {
|
|
39878
|
-
var cluster = _step2.value;
|
|
39879
|
-
if (cluster.markers.length == 1) {
|
|
39880
|
-
singleMarker.add(cluster.markers[0]);
|
|
39881
|
-
}
|
|
39882
|
-
}
|
|
39883
|
-
var groupMarkers = [];
|
|
39884
|
-
// Iterate the clusters that are currently rendered.
|
|
39885
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose(this.clusters), _step3; !(_step3 = _iterator3()).done;) {
|
|
39886
|
-
var _cluster2 = _step3.value;
|
|
39887
|
-
if (_cluster2.marker == null) {
|
|
39888
|
-
continue;
|
|
39889
|
-
}
|
|
39890
|
-
if (_cluster2.markers.length == 1) {
|
|
39891
|
-
if (!singleMarker.has(_cluster2.marker)) {
|
|
39892
|
-
// The marker:
|
|
39893
|
-
// - was previously rendered because it is from a cluster with 1 marker,
|
|
39894
|
-
// - should no more be rendered as it is not in singleMarker.
|
|
39895
|
-
MarkerUtils.setMap(_cluster2.marker, null);
|
|
39896
|
-
}
|
|
39897
|
-
} else {
|
|
39898
|
-
// Delay the removal of old group markers to avoid flickering.
|
|
39899
|
-
groupMarkers.push(_cluster2.marker);
|
|
39900
|
-
}
|
|
39901
|
-
}
|
|
39651
|
+
// reset visibility of markers and clusters
|
|
39652
|
+
this.reset();
|
|
39653
|
+
// store new clusters
|
|
39902
39654
|
this.clusters = clusters;
|
|
39903
39655
|
this.renderClusters();
|
|
39904
|
-
// Delayed removal of the markers of the former groups.
|
|
39905
|
-
requestAnimationFrame(function () {
|
|
39906
|
-
return groupMarkers.forEach(function (marker) {
|
|
39907
|
-
return MarkerUtils.setMap(marker, null);
|
|
39908
|
-
});
|
|
39909
|
-
});
|
|
39910
39656
|
}
|
|
39911
39657
|
google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);
|
|
39912
39658
|
}
|
|
39913
39659
|
};
|
|
39914
|
-
|
|
39660
|
+
_proto8.onAdd = function onAdd() {
|
|
39915
39661
|
this.idleListener = this.getMap().addListener("idle", this.render.bind(this));
|
|
39916
39662
|
this.render();
|
|
39917
39663
|
};
|
|
39918
|
-
|
|
39664
|
+
_proto8.onRemove = function onRemove() {
|
|
39919
39665
|
google.maps.event.removeListener(this.idleListener);
|
|
39920
39666
|
this.reset();
|
|
39921
39667
|
};
|
|
39922
|
-
|
|
39668
|
+
_proto8.reset = function reset() {
|
|
39923
39669
|
this.markers.forEach(function (marker) {
|
|
39924
|
-
return
|
|
39670
|
+
return marker.setMap(null);
|
|
39925
39671
|
});
|
|
39926
39672
|
this.clusters.forEach(function (cluster) {
|
|
39927
39673
|
return cluster["delete"]();
|
|
39928
39674
|
});
|
|
39929
39675
|
this.clusters = [];
|
|
39930
39676
|
};
|
|
39931
|
-
|
|
39932
|
-
var
|
|
39933
|
-
//
|
|
39677
|
+
_proto8.renderClusters = function renderClusters() {
|
|
39678
|
+
var _this8 = this;
|
|
39679
|
+
// generate stats to pass to renderers
|
|
39934
39680
|
var stats = new ClusterStats(this.markers, this.clusters);
|
|
39935
39681
|
var map = this.getMap();
|
|
39936
39682
|
this.clusters.forEach(function (cluster) {
|
|
39937
39683
|
if (cluster.markers.length === 1) {
|
|
39938
39684
|
cluster.marker = cluster.markers[0];
|
|
39939
39685
|
} else {
|
|
39940
|
-
|
|
39941
|
-
|
|
39942
|
-
// Make sure all individual markers are removed from the map.
|
|
39943
|
-
cluster.markers.forEach(function (marker) {
|
|
39944
|
-
return MarkerUtils.setMap(marker, null);
|
|
39945
|
-
});
|
|
39946
|
-
if (_this11.onClusterClick) {
|
|
39686
|
+
cluster.marker = _this8.renderer.render(cluster, stats);
|
|
39687
|
+
if (_this8.onClusterClick) {
|
|
39947
39688
|
cluster.marker.addListener("click", /* istanbul ignore next */
|
|
39948
39689
|
function (event) {
|
|
39949
|
-
google.maps.event.trigger(
|
|
39950
|
-
|
|
39690
|
+
google.maps.event.trigger(_this8, MarkerClustererEvents.CLUSTER_CLICK, cluster);
|
|
39691
|
+
_this8.onClusterClick(event, cluster, map);
|
|
39951
39692
|
});
|
|
39952
39693
|
}
|
|
39953
39694
|
}
|
|
39954
|
-
|
|
39695
|
+
cluster.marker.setMap(map);
|
|
39955
39696
|
});
|
|
39956
39697
|
};
|
|
39957
39698
|
return MarkerClusterer;
|
|
@@ -40028,7 +39769,7 @@
|
|
|
40028
39769
|
}
|
|
40029
39770
|
|
|
40030
39771
|
script$1.render = render$1;
|
|
40031
|
-
script$1.__file = "node_modules/vue-google-maps-community-fork/src/components/cluster.vue";
|
|
39772
|
+
script$1.__file = "node_modules/@appbaseio/vue-google-maps-community-fork/src/components/cluster.vue";
|
|
40032
39773
|
|
|
40033
39774
|
var props$7 = {
|
|
40034
39775
|
options: {
|
|
@@ -40111,7 +39852,7 @@
|
|
|
40111
39852
|
}
|
|
40112
39853
|
|
|
40113
39854
|
script$2.render = render$2;
|
|
40114
|
-
script$2.__file = "node_modules/vue-google-maps-community-fork/src/components/infoWindow.vue";
|
|
39855
|
+
script$2.__file = "node_modules/@appbaseio/vue-google-maps-community-fork/src/components/infoWindow.vue";
|
|
40115
39856
|
|
|
40116
39857
|
/*
|
|
40117
39858
|
Mixin for objects that are mounted by Google Maps
|
|
@@ -40404,7 +40145,7 @@
|
|
|
40404
40145
|
styleInject(css_248z$2);
|
|
40405
40146
|
|
|
40406
40147
|
script$3.render = render$3;
|
|
40407
|
-
script$3.__file = "node_modules/vue-google-maps-community-fork/src/components/map.vue";
|
|
40148
|
+
script$3.__file = "node_modules/@appbaseio/vue-google-maps-community-fork/src/components/map.vue";
|
|
40408
40149
|
|
|
40409
40150
|
var props$9 = {
|
|
40410
40151
|
options: {
|
|
@@ -40532,7 +40273,7 @@
|
|
|
40532
40273
|
}
|
|
40533
40274
|
|
|
40534
40275
|
script$4.render = render$4;
|
|
40535
|
-
script$4.__file = "node_modules/vue-google-maps-community-fork/src/components/autocomplete.vue";
|
|
40276
|
+
script$4.__file = "node_modules/@appbaseio/vue-google-maps-community-fork/src/components/autocomplete.vue";
|
|
40536
40277
|
|
|
40537
40278
|
var GMapApi = null;
|
|
40538
40279
|
function install(Vue, options) {
|
|
@@ -42264,7 +42005,7 @@
|
|
|
42264
42005
|
var id = marker.metaData && marker.metaData._id;
|
|
42265
42006
|
var _this$openMarkers = this.openMarkers,
|
|
42266
42007
|
del = _this$openMarkers[id],
|
|
42267
|
-
activeMarkers = _objectWithoutPropertiesLoose(_this$openMarkers, [id].map(_toPropertyKey
|
|
42008
|
+
activeMarkers = _objectWithoutPropertiesLoose(_this$openMarkers, [id].map(_toPropertyKey));
|
|
42268
42009
|
var newOpenMarkers = autoClosePopover ? {} : activeMarkers;
|
|
42269
42010
|
this.setOpenMarkers(newOpenMarkers);
|
|
42270
42011
|
handlePreserveCenter(true);
|
|
@@ -42765,7 +42506,7 @@
|
|
|
42765
42506
|
openMarkers = _this$$props2.openMarkers;
|
|
42766
42507
|
var id = marker._id;
|
|
42767
42508
|
var del = openMarkers[id],
|
|
42768
|
-
activeMarkers = _objectWithoutPropertiesLoose(openMarkers, [id].map(_toPropertyKey
|
|
42509
|
+
activeMarkers = _objectWithoutPropertiesLoose(openMarkers, [id].map(_toPropertyKey));
|
|
42769
42510
|
var newOpenMarkers = autoClosePopover ? {} : activeMarkers;
|
|
42770
42511
|
handleOpenMarkers(newOpenMarkers);
|
|
42771
42512
|
handlePreserveCenter(true);
|
|
@@ -43234,9 +42975,10 @@
|
|
|
43234
42975
|
var EMPTY_OBJ = Object.freeze({}) ;
|
|
43235
42976
|
var EMPTY_ARR = Object.freeze([]) ;
|
|
43236
42977
|
var NOOP = function NOOP() {};
|
|
43237
|
-
var onRE = /^on[^a-z]/;
|
|
43238
42978
|
var isOn = function isOn(key) {
|
|
43239
|
-
return
|
|
42979
|
+
return key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (
|
|
42980
|
+
// uppercase letter
|
|
42981
|
+
key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
43240
42982
|
};
|
|
43241
42983
|
var isArray = Array.isArray;
|
|
43242
42984
|
var isFunction$1 = function isFunction(val) {
|
|
@@ -43266,7 +43008,7 @@
|
|
|
43266
43008
|
var getGlobalThis = function getGlobalThis() {
|
|
43267
43009
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global$1 !== "undefined" ? global$1 : {});
|
|
43268
43010
|
};
|
|
43269
|
-
var PatchFlagNames = (_PatchFlagNames = {}, _PatchFlagNames[1] = "TEXT", _PatchFlagNames[2] = "CLASS", _PatchFlagNames[4] = "STYLE", _PatchFlagNames[8] = "PROPS", _PatchFlagNames[16] = "FULL_PROPS", _PatchFlagNames[32] = "
|
|
43011
|
+
var PatchFlagNames = (_PatchFlagNames = {}, _PatchFlagNames[1] = "TEXT", _PatchFlagNames[2] = "CLASS", _PatchFlagNames[4] = "STYLE", _PatchFlagNames[8] = "PROPS", _PatchFlagNames[16] = "FULL_PROPS", _PatchFlagNames[32] = "NEED_HYDRATION", _PatchFlagNames[64] = "STABLE_FRAGMENT", _PatchFlagNames[128] = "KEYED_FRAGMENT", _PatchFlagNames[256] = "UNKEYED_FRAGMENT", _PatchFlagNames[512] = "NEED_PATCH", _PatchFlagNames[1024] = "DYNAMIC_SLOTS", _PatchFlagNames[2048] = "DEV_ROOT_FRAGMENT", _PatchFlagNames[-1] = "HOISTED", _PatchFlagNames[-2] = "BAIL", _PatchFlagNames);
|
|
43270
43012
|
var slotFlagsText = (_slotFlagsText = {}, _slotFlagsText[1] = "STABLE", _slotFlagsText[2] = "DYNAMIC", _slotFlagsText[3] = "FORWARDED", _slotFlagsText);
|
|
43271
43013
|
function normalizeStyle(value) {
|
|
43272
43014
|
if (isArray(value)) {
|
|
@@ -43526,7 +43268,6 @@
|
|
|
43526
43268
|
var instance = createComponentInstance(vnode, parentComponent, null);
|
|
43527
43269
|
var res = setupComponent(instance, true
|
|
43528
43270
|
/* isSSR */);
|
|
43529
|
-
|
|
43530
43271
|
var hasAsyncSetup = isPromise(res);
|
|
43531
43272
|
var prefetches = instance.sp;
|
|
43532
43273
|
if (hasAsyncSetup || prefetches) {
|
|
@@ -43566,7 +43307,10 @@
|
|
|
43566
43307
|
}
|
|
43567
43308
|
for (var _iterator = _createForOfIteratorHelperLoose(instance.scope.effects), _step; !(_step = _iterator()).done;) {
|
|
43568
43309
|
var e = _step.value;
|
|
43569
|
-
if (e.computed)
|
|
43310
|
+
if (e.computed) {
|
|
43311
|
+
e.computed._dirty = true;
|
|
43312
|
+
e.computed._cacheable = true;
|
|
43313
|
+
}
|
|
43570
43314
|
}
|
|
43571
43315
|
var ssrRender = instance.ssrRender || comp.ssrRender;
|
|
43572
43316
|
if (ssrRender) {
|
|
@@ -44205,7 +43949,7 @@
|
|
|
44205
43949
|
}, queryString, renderFunction);
|
|
44206
43950
|
}
|
|
44207
43951
|
|
|
44208
|
-
var version = "3.3.
|
|
43952
|
+
var version = "3.3.1";
|
|
44209
43953
|
|
|
44210
43954
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4, TreeListConnected, AIConnected];
|
|
44211
43955
|
function install$1 (Vue) {
|