@appbaseio/reactivesearch-vue 3.0.0-rc.6.1 → 3.0.0-rc.6.3
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 +961 -735
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/MultiDropdownList.js +1 -1
- package/dist/cjs/{Pagination-58a0cf3f.js → Pagination-bcf8af5f.js} +1 -1
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +2 -2
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +1 -1
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{install-7fb595b8.js → install-547d13b9.js} +37 -15
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/MultiDropdownList.js +1 -1
- package/dist/es/{Pagination-ae401c33.js → Pagination-50fc3ef5.js} +1 -1
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +2 -2
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +1 -1
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/{install-3f345819.js → install-b0a1fd33.js} +37 -15
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +89 -89
- package/dist/cjs/{Button-9e179864.js → Button-f96a0570.js} +2 -2
- package/dist/es/{Button-c2ff5178.js → Button-5c2cf399.js} +2 -2
|
@@ -7294,17 +7294,14 @@
|
|
|
7294
7294
|
dispatch((0, misc.setPromotedResults)([], component));
|
|
7295
7295
|
}
|
|
7296
7296
|
dispatch((0, misc.setRawData)(component, response));
|
|
7297
|
-
if (response.
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
(0,
|
|
7303
|
-
|
|
7304
|
-
hits: response.hits || {}
|
|
7305
|
-
}, props[component].componentType === constants$1.componentTypes.searchBox));
|
|
7297
|
+
if (response.AIAnswer) {
|
|
7298
|
+
if (response.AIAnswer.error) {
|
|
7299
|
+
dispatch((0, misc.setAIResponseError)(component, {
|
|
7300
|
+
message: response.AIAnswer.error
|
|
7301
|
+
}));
|
|
7302
|
+
dispatch((0, misc.setLoading)(component, false));
|
|
7303
|
+
return;
|
|
7306
7304
|
}
|
|
7307
|
-
} else if (response.AIAnswer) {
|
|
7308
7305
|
var input = response.AIAnswer;
|
|
7309
7306
|
var finalResponse = {
|
|
7310
7307
|
answer: {
|
|
@@ -7313,11 +7310,25 @@
|
|
|
7313
7310
|
text: input.choices[0].message.content
|
|
7314
7311
|
}
|
|
7315
7312
|
};
|
|
7316
|
-
|
|
7313
|
+
var finalResponseObj = {
|
|
7317
7314
|
response: finalResponse,
|
|
7318
7315
|
meta: response.hits,
|
|
7319
7316
|
isTyping: false
|
|
7320
|
-
}
|
|
7317
|
+
};
|
|
7318
|
+
if (response.AISessionId) {
|
|
7319
|
+
finalResponseObj.sessionId = response.AISessionId;
|
|
7320
|
+
}
|
|
7321
|
+
dispatch((0, misc.setAIResponse)(component, finalResponseObj));
|
|
7322
|
+
} else if (response.AISessionId) {
|
|
7323
|
+
var localCache = ((0, helper.getObjectFromLocalStorage)(constants$1.AI_LOCAL_CACHE_KEY) || {})[props.componentId];
|
|
7324
|
+
if (localCache && localCache.sessionId && localCache.sessionId === response.AISessionId) {
|
|
7325
|
+
dispatch((0, misc.setAIResponse)(component, localCache));
|
|
7326
|
+
} else {
|
|
7327
|
+
(0, helper.setObjectInLocalStorage)('AISessions', _defineProperty({}, component, {}));
|
|
7328
|
+
dispatch((0, query.fetchAIResponse)(response.AISessionId, component, '', {
|
|
7329
|
+
hits: response.hits || {}
|
|
7330
|
+
}, props[component].componentType === constants$1.componentTypes.searchBox));
|
|
7331
|
+
}
|
|
7321
7332
|
}
|
|
7322
7333
|
dispatch((0, misc.setCustomData)(response.customData, component));
|
|
7323
7334
|
if (response.hits && !((response.AIAnswer || response.AISessionId) && props[component].componentType === constants$1.componentTypes.searchBox)) {
|
|
@@ -9478,8 +9489,18 @@
|
|
|
9478
9489
|
function t(e, t) {
|
|
9479
9490
|
for (var n = 0; n < t.length; n++) {
|
|
9480
9491
|
var r = t[n];
|
|
9481
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
9492
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, "symbol" == typeof (i = function (e, t) {
|
|
9493
|
+
if ("object" != typeof e || null === e) return e;
|
|
9494
|
+
var n = e[Symbol.toPrimitive];
|
|
9495
|
+
if (void 0 !== n) {
|
|
9496
|
+
var r = n.call(e, "string");
|
|
9497
|
+
if ("object" != typeof r) return r;
|
|
9498
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9499
|
+
}
|
|
9500
|
+
return String(e);
|
|
9501
|
+
}(r.key)) ? i : String(i), r);
|
|
9482
9502
|
}
|
|
9503
|
+
var i;
|
|
9483
9504
|
}
|
|
9484
9505
|
function n(e, n, r) {
|
|
9485
9506
|
return n && t(e.prototype, n), r && t(e, r), Object.defineProperty(e, "prototype", {
|
|
@@ -9520,26 +9541,26 @@
|
|
|
9520
9541
|
l = Object.prototype,
|
|
9521
9542
|
c = l.toString,
|
|
9522
9543
|
s = l.hasOwnProperty,
|
|
9523
|
-
|
|
9524
|
-
function
|
|
9544
|
+
v = /^\s*function (\w+)/;
|
|
9545
|
+
function d(e) {
|
|
9525
9546
|
var t,
|
|
9526
9547
|
n = null !== (t = null == e ? void 0 : e.type) && void 0 !== t ? t : e;
|
|
9527
9548
|
if (n) {
|
|
9528
|
-
var r = n.toString().match(
|
|
9549
|
+
var r = n.toString().match(v);
|
|
9529
9550
|
return r ? r[1] : "";
|
|
9530
9551
|
}
|
|
9531
9552
|
return "";
|
|
9532
9553
|
}
|
|
9533
|
-
var
|
|
9534
|
-
|
|
9554
|
+
var y = isPlainObject$1,
|
|
9555
|
+
p = function p(e) {
|
|
9535
9556
|
return e;
|
|
9536
9557
|
},
|
|
9537
|
-
h =
|
|
9558
|
+
h = p;
|
|
9538
9559
|
{
|
|
9539
9560
|
var b = "undefined" != typeof console;
|
|
9540
9561
|
h = b ? function (e, t) {
|
|
9541
9562
|
void 0 === t && (t = a.logLevel), !1 === a.silent && console[t]("[VueTypes warn]: " + e);
|
|
9542
|
-
} :
|
|
9563
|
+
} : p;
|
|
9543
9564
|
}
|
|
9544
9565
|
var g = function g(e, t) {
|
|
9545
9566
|
return s.call(e, t);
|
|
@@ -9554,10 +9575,10 @@
|
|
|
9554
9575
|
return "[object Function]" === c.call(e);
|
|
9555
9576
|
},
|
|
9556
9577
|
_ = function _(e, t) {
|
|
9557
|
-
return
|
|
9578
|
+
return y(e) && g(e, "_vueTypes_name") && (!t || e._vueTypes_name === t);
|
|
9558
9579
|
},
|
|
9559
9580
|
T = function T(e) {
|
|
9560
|
-
return
|
|
9581
|
+
return y(e) && (g(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function (t) {
|
|
9561
9582
|
return g(e, t);
|
|
9562
9583
|
}));
|
|
9563
9584
|
};
|
|
@@ -9566,25 +9587,25 @@
|
|
|
9566
9587
|
value: e
|
|
9567
9588
|
});
|
|
9568
9589
|
}
|
|
9569
|
-
function
|
|
9590
|
+
function P(e, t, n) {
|
|
9570
9591
|
var r;
|
|
9571
9592
|
void 0 === n && (n = !1);
|
|
9572
9593
|
var i = !0,
|
|
9573
9594
|
o = "";
|
|
9574
|
-
r =
|
|
9595
|
+
r = y(e) ? e : {
|
|
9575
9596
|
type: e
|
|
9576
9597
|
};
|
|
9577
9598
|
var u = _(r) ? r._vueTypes_name + " - " : "";
|
|
9578
9599
|
if (T(r) && null !== r.type) {
|
|
9579
9600
|
if (void 0 === r.type || !0 === r.type) return i;
|
|
9580
|
-
if (!r.required &&
|
|
9601
|
+
if (!r.required && null == t) return i;
|
|
9581
9602
|
m(r.type) ? (i = r.type.some(function (e) {
|
|
9582
|
-
return !0 ===
|
|
9603
|
+
return !0 === P(e, t, !0);
|
|
9583
9604
|
}), o = r.type.map(function (e) {
|
|
9584
|
-
return
|
|
9585
|
-
}).join(" or ")) : i = "Array" === (o =
|
|
9605
|
+
return d(e);
|
|
9606
|
+
}).join(" or ")) : i = "Array" === (o = d(r)) ? m(t) : "Object" === o ? y(t) : "String" === o || "Number" === o || "Boolean" === o || "Function" === o ? function (e) {
|
|
9586
9607
|
if (null == e) return "";
|
|
9587
|
-
var t = e.constructor.toString().match(
|
|
9608
|
+
var t = e.constructor.toString().match(v);
|
|
9588
9609
|
return t ? t[1] : "";
|
|
9589
9610
|
}(t) === o : t instanceof r.type;
|
|
9590
9611
|
}
|
|
@@ -9604,7 +9625,7 @@
|
|
|
9604
9625
|
}
|
|
9605
9626
|
return i;
|
|
9606
9627
|
}
|
|
9607
|
-
function
|
|
9628
|
+
function k(e, t) {
|
|
9608
9629
|
var n = Object.defineProperties(t, {
|
|
9609
9630
|
_vueTypes_name: {
|
|
9610
9631
|
value: e,
|
|
@@ -9617,9 +9638,9 @@
|
|
|
9617
9638
|
},
|
|
9618
9639
|
def: {
|
|
9619
9640
|
value: function value(e) {
|
|
9620
|
-
return void 0 === e ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this["default"] = void 0) : (g(this, "default") && delete this["default"], this) : j(e) || !0 ===
|
|
9641
|
+
return void 0 === e ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this["default"] = void 0) : (g(this, "default") && delete this["default"], this) : j(e) || !0 === P(this, e, !0) ? (this["default"] = m(e) ? function () {
|
|
9621
9642
|
return [].concat(e);
|
|
9622
|
-
} :
|
|
9643
|
+
} : y(e) ? function () {
|
|
9623
9644
|
return Object.assign({}, e);
|
|
9624
9645
|
} : e, this) : (h(this._vueTypes_name + ' - invalid default value: "' + e + '"'), this);
|
|
9625
9646
|
}
|
|
@@ -9629,28 +9650,28 @@
|
|
|
9629
9650
|
return j(r) && (n.validator = w(r, n)), n;
|
|
9630
9651
|
}
|
|
9631
9652
|
function x(e, t) {
|
|
9632
|
-
var n =
|
|
9653
|
+
var n = k(e, t);
|
|
9633
9654
|
return Object.defineProperty(n, "validate", {
|
|
9634
9655
|
value: function value(e) {
|
|
9635
9656
|
return j(this.validator) && h(this._vueTypes_name + " - calling .validate() will overwrite the current custom validator function. Validator info:\n" + JSON.stringify(this)), this.validator = w(e, this), this;
|
|
9636
9657
|
}
|
|
9637
9658
|
});
|
|
9638
9659
|
}
|
|
9639
|
-
function
|
|
9660
|
+
function S(e, t, n) {
|
|
9640
9661
|
var r,
|
|
9641
9662
|
i,
|
|
9642
9663
|
o = (r = t, i = {}, Object.getOwnPropertyNames(r).forEach(function (e) {
|
|
9643
9664
|
i[e] = Object.getOwnPropertyDescriptor(r, e);
|
|
9644
9665
|
}), Object.defineProperties({}, i));
|
|
9645
|
-
if (o._vueTypes_name = e, !
|
|
9666
|
+
if (o._vueTypes_name = e, !y(n)) return o;
|
|
9646
9667
|
var a,
|
|
9647
9668
|
l,
|
|
9648
9669
|
c = n.validator,
|
|
9649
9670
|
s = u(n, f);
|
|
9650
9671
|
if (j(c)) {
|
|
9651
|
-
var
|
|
9652
|
-
|
|
9653
|
-
return
|
|
9672
|
+
var v = o.validator;
|
|
9673
|
+
v && (v = null !== (l = (a = v).__original) && void 0 !== l ? l : a), o.validator = w(v ? function (e) {
|
|
9674
|
+
return v.call(this, e) && c.call(this, e);
|
|
9654
9675
|
} : c, o);
|
|
9655
9676
|
}
|
|
9656
9677
|
return Object.assign(o, s);
|
|
@@ -9658,7 +9679,7 @@
|
|
|
9658
9679
|
function E(e) {
|
|
9659
9680
|
return e.replace(/^(?!\s*$)/gm, " ");
|
|
9660
9681
|
}
|
|
9661
|
-
var
|
|
9682
|
+
var A = function A() {
|
|
9662
9683
|
return x("any", {});
|
|
9663
9684
|
},
|
|
9664
9685
|
N = function N() {
|
|
@@ -9692,7 +9713,7 @@
|
|
|
9692
9713
|
});
|
|
9693
9714
|
},
|
|
9694
9715
|
F = function F() {
|
|
9695
|
-
return
|
|
9716
|
+
return k("integer", {
|
|
9696
9717
|
type: Number,
|
|
9697
9718
|
validator: function validator(e) {
|
|
9698
9719
|
var t = O(e);
|
|
@@ -9701,7 +9722,7 @@
|
|
|
9701
9722
|
});
|
|
9702
9723
|
},
|
|
9703
9724
|
Y = function Y() {
|
|
9704
|
-
return
|
|
9725
|
+
return k("symbol", {
|
|
9705
9726
|
validator: function validator(e) {
|
|
9706
9727
|
var t = "symbol" == typeof e;
|
|
9707
9728
|
return !1 === t && h('symbol - invalid value "' + e + '"'), t;
|
|
@@ -9721,7 +9742,7 @@
|
|
|
9721
9742
|
};
|
|
9722
9743
|
function J(e, t) {
|
|
9723
9744
|
if (void 0 === t && (t = "custom validation failed"), "function" != typeof e) throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
|
9724
|
-
return
|
|
9745
|
+
return k(e.name || "<<anonymous function>>", {
|
|
9725
9746
|
type: null,
|
|
9726
9747
|
validator: function validator(n) {
|
|
9727
9748
|
var r = e(n);
|
|
@@ -9750,7 +9771,7 @@
|
|
|
9750
9771
|
}, []);
|
|
9751
9772
|
r.length > 0 && (n.type = r);
|
|
9752
9773
|
}
|
|
9753
|
-
return
|
|
9774
|
+
return k("oneOf", n);
|
|
9754
9775
|
}
|
|
9755
9776
|
function R(e) {
|
|
9756
9777
|
if (!m(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
|
@@ -9776,12 +9797,12 @@
|
|
|
9776
9797
|
return r.indexOf(e) === t;
|
|
9777
9798
|
});
|
|
9778
9799
|
var u = !1 === n && r.length > 0 ? r : null;
|
|
9779
|
-
return
|
|
9800
|
+
return k("oneOfType", t ? {
|
|
9780
9801
|
type: u,
|
|
9781
9802
|
validator: function validator(t) {
|
|
9782
9803
|
var n = [],
|
|
9783
9804
|
r = e.some(function (e) {
|
|
9784
|
-
var r =
|
|
9805
|
+
var r = P(e, t, !0);
|
|
9785
9806
|
return "string" == typeof r && n.push(r), !0 === r;
|
|
9786
9807
|
});
|
|
9787
9808
|
return r || h("oneOfType - provided value does not match any of the " + n.length + " passed-in validators:\n" + E(n.join("\n"))), r;
|
|
@@ -9791,29 +9812,29 @@
|
|
|
9791
9812
|
});
|
|
9792
9813
|
}
|
|
9793
9814
|
function U(e) {
|
|
9794
|
-
return
|
|
9815
|
+
return k("arrayOf", {
|
|
9795
9816
|
type: Array,
|
|
9796
9817
|
validator: function validator(t) {
|
|
9797
9818
|
var n = "",
|
|
9798
9819
|
r = t.every(function (t) {
|
|
9799
|
-
return !0 === (n =
|
|
9820
|
+
return !0 === (n = P(e, t, !0));
|
|
9800
9821
|
});
|
|
9801
9822
|
return r || h("arrayOf - value validation error:\n" + E(n)), r;
|
|
9802
9823
|
}
|
|
9803
9824
|
});
|
|
9804
9825
|
}
|
|
9805
9826
|
function $(e) {
|
|
9806
|
-
return
|
|
9827
|
+
return k("instanceOf", {
|
|
9807
9828
|
type: e
|
|
9808
9829
|
});
|
|
9809
9830
|
}
|
|
9810
9831
|
function z(e) {
|
|
9811
|
-
return
|
|
9832
|
+
return k("objectOf", {
|
|
9812
9833
|
type: Object,
|
|
9813
9834
|
validator: function validator(t) {
|
|
9814
9835
|
var n = "",
|
|
9815
9836
|
r = Object.keys(t).every(function (r) {
|
|
9816
|
-
return !0 === (n =
|
|
9837
|
+
return !0 === (n = P(e, t[r], !0));
|
|
9817
9838
|
});
|
|
9818
9839
|
return r || h("objectOf - value validation error:\n" + E(n)), r;
|
|
9819
9840
|
}
|
|
@@ -9825,11 +9846,11 @@
|
|
|
9825
9846
|
var n;
|
|
9826
9847
|
return !(null === (n = e[t]) || void 0 === n || !n.required);
|
|
9827
9848
|
}),
|
|
9828
|
-
r =
|
|
9849
|
+
r = k("shape", {
|
|
9829
9850
|
type: Object,
|
|
9830
9851
|
validator: function validator(r) {
|
|
9831
9852
|
var i = this;
|
|
9832
|
-
if (!
|
|
9853
|
+
if (!y(r)) return !1;
|
|
9833
9854
|
var o = Object.keys(r);
|
|
9834
9855
|
if (n.length > 0 && n.some(function (e) {
|
|
9835
9856
|
return -1 === o.indexOf(e);
|
|
@@ -9841,7 +9862,7 @@
|
|
|
9841
9862
|
}
|
|
9842
9863
|
return o.every(function (n) {
|
|
9843
9864
|
if (-1 === t.indexOf(n)) return !0 === i._vueTypes_isLoose || (h('shape - shape definition does not include a "' + n + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
|
|
9844
|
-
var o =
|
|
9865
|
+
var o = P(e[n], r[n], !0);
|
|
9845
9866
|
return "string" == typeof o && h('shape - "' + n + '" property validation error:\n ' + E(o)), !0 === o;
|
|
9846
9867
|
});
|
|
9847
9868
|
}
|
|
@@ -9876,18 +9897,18 @@
|
|
|
9876
9897
|
c = f.type;
|
|
9877
9898
|
return _(c) ? (delete f.type, Object.defineProperty(this, n, a ? {
|
|
9878
9899
|
get: function get() {
|
|
9879
|
-
return
|
|
9900
|
+
return S(n, c, f);
|
|
9880
9901
|
}
|
|
9881
9902
|
} : {
|
|
9882
9903
|
value: function value() {
|
|
9883
9904
|
var e,
|
|
9884
|
-
t =
|
|
9905
|
+
t = S(n, c, f);
|
|
9885
9906
|
return t.validator && (t.validator = (e = t.validator).bind.apply(e, [t].concat([].slice.call(arguments)))), t;
|
|
9886
9907
|
}
|
|
9887
9908
|
})) : (l = a ? {
|
|
9888
9909
|
get: function get() {
|
|
9889
9910
|
var e = Object.assign({}, f);
|
|
9890
|
-
return i ? x(n, e) :
|
|
9911
|
+
return i ? x(n, e) : k(n, e);
|
|
9891
9912
|
},
|
|
9892
9913
|
enumerable: !0
|
|
9893
9914
|
} : {
|
|
@@ -9895,14 +9916,14 @@
|
|
|
9895
9916
|
var e,
|
|
9896
9917
|
t,
|
|
9897
9918
|
r = Object.assign({}, f);
|
|
9898
|
-
return e = i ? x(n, r) :
|
|
9919
|
+
return e = i ? x(n, r) : k(n, r), r.validator && (e.validator = (t = r.validator).bind.apply(t, [e].concat([].slice.call(arguments)))), e;
|
|
9899
9920
|
},
|
|
9900
9921
|
enumerable: !0
|
|
9901
9922
|
}, Object.defineProperty(this, n, l));
|
|
9902
9923
|
}, n(e, null, [{
|
|
9903
9924
|
key: "any",
|
|
9904
9925
|
get: function get() {
|
|
9905
|
-
return
|
|
9926
|
+
return A();
|
|
9906
9927
|
}
|
|
9907
9928
|
}, {
|
|
9908
9929
|
key: "func",
|
|
@@ -9952,10 +9973,10 @@
|
|
|
9952
9973
|
}]), e;
|
|
9953
9974
|
}(), e.defaults = {}, e.sensibleDefaults = void 0, e.config = a, e.custom = J, e.oneOf = M, e.instanceOf = $, e.oneOfType = R, e.arrayOf = U, e.objectOf = z, e.shape = C, e.utils = {
|
|
9954
9975
|
validate: function validate(e, t) {
|
|
9955
|
-
return !0 ===
|
|
9976
|
+
return !0 === P(t, e, !0);
|
|
9956
9977
|
},
|
|
9957
9978
|
toType: function toType(e, t, n) {
|
|
9958
|
-
return void 0 === n && (n = !1), n ? x(e, t) :
|
|
9979
|
+
return void 0 === n && (n = !1), n ? x(e, t) : k(e, t);
|
|
9959
9980
|
}
|
|
9960
9981
|
}, e;
|
|
9961
9982
|
}();
|
|
@@ -10126,7 +10147,7 @@
|
|
|
10126
10147
|
return StyleSheet;
|
|
10127
10148
|
}();
|
|
10128
10149
|
|
|
10129
|
-
var e="-ms-";var r$1="-moz-";var a$1="-webkit-";var n$1="comm";var c$1="rule";var s$1="decl";var i$1="@import";var h$1="@keyframes";var $$1=Math.abs;var k$1=String.fromCharCode;var
|
|
10150
|
+
var e="-ms-";var r$1="-moz-";var a$1="-webkit-";var n$1="comm";var c$1="rule";var s$1="decl";var i$1="@import";var h$1="@keyframes";var $$1="@layer";var g$1=Math.abs;var k$1=String.fromCharCode;var m$1=Object.assign;function x$1(e,r){return O$1(e,0)^45?(((r<<2^O$1(e,0))<<2^O$1(e,1))<<2^O$1(e,2))<<2^O$1(e,3):0}function y$1(e){return e.trim()}function j$1(e,r){return (e=r.exec(e))?e[0]:e}function z$1(e,r,a){return e.replace(r,a)}function C$1(e,r){return e.indexOf(r)}function O$1(e,r){return e.charCodeAt(r)|0}function A$1(e,r,a){return e.slice(r,a)}function M$1(e){return e.length}function S$1(e){return e.length}function q$1(e,r){return r.push(e),e}function B$1(e,r){return e.map(r).join("")}var D$1=1;var E$1=1;var F$1=0;var G$1=0;var H$1=0;var I$1="";function J$1(e,r,a,n,c,s,t){return {value:e,root:r,parent:a,type:n,props:c,children:s,line:D$1,column:E$1,length:t,return:""}}function K$1(e,r){return m$1(J$1("",null,null,"",null,null,0),e,{length:-e.length},r)}function L$1(){return H$1}function N$1(){H$1=G$1>0?O$1(I$1,--G$1):0;if(E$1--,H$1===10)E$1=1,D$1--;return H$1}function P$1(){H$1=G$1<F$1?O$1(I$1,G$1++):0;if(E$1++,H$1===10)E$1=1,D$1++;return H$1}function Q$1(){return O$1(I$1,G$1)}function R$1(){return G$1}function T$1(e,r){return A$1(I$1,e,r)}function U$1(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V$1(e){return D$1=E$1=1,F$1=M$1(I$1=e),G$1=0,[]}function W(e){return I$1="",e}function X(e){return y$1(T$1(G$1-1,re(e===91?e+2:e===40?e+1:e)))}function Z(e){while(H$1=Q$1())if(H$1<33)P$1();else break;return U$1(e)>2||U$1(H$1)>3?"":" "}function ee(e,r){while(--r&&P$1())if(H$1<48||H$1>102||H$1>57&&H$1<65||H$1>70&&H$1<97)break;return T$1(e,R$1()+(r<6&&Q$1()==32&&P$1()==32))}function re(e){while(P$1())switch(H$1){case e:return G$1;case 34:case 39:if(e!==34&&e!==39)re(H$1);break;case 40:if(e===41)re(e);break;case 92:P$1();break}return G$1}function ae(e,r){while(P$1())if(e+H$1===47+10)break;else if(e+H$1===42+42&&Q$1()===47)break;return "/*"+T$1(r,G$1-1)+"*"+k$1(e===47?e:P$1())}function ne(e){while(!U$1(Q$1()))P$1();return T$1(e,G$1)}function ce(e){return W(se("",null,null,null,[""],e=V$1(e),0,[0],e))}function se(e,r,a,n,c,s,t,u,i){var f=0;var o=0;var l=t;var v=0;var p=0;var h=0;var b=1;var w=1;var d=1;var $=0;var g="";var m=c;var x=s;var y=n;var j=g;while(w)switch(h=$,$=P$1()){case 40:if(h!=108&&O$1(j,l-1)==58){if(C$1(j+=z$1(X($),"&","&\f"),"&\f")!=-1)d=-1;break}case 34:case 39:case 91:j+=X($);break;case 9:case 10:case 13:case 32:j+=Z(h);break;case 92:j+=ee(R$1()-1,7);continue;case 47:switch(Q$1()){case 42:case 47:q$1(ue(ae(P$1(),R$1()),r,a),i);break;default:j+="/";}break;case 123*b:u[f++]=M$1(j)*d;case 125*b:case 59:case 0:switch($){case 0:case 125:w=0;case 59+o:if(d==-1)j=z$1(j,/\f/g,"");if(p>0&&M$1(j)-l)q$1(p>32?ie(j+";",n,a,l-1):ie(z$1(j," ","")+";",n,a,l-2),i);break;case 59:j+=";";default:q$1(y=te(j,r,a,f,o,c,u,g,m=[],x=[],l),s);if($===123)if(o===0)se(j,r,y,y,m,s,l,u,x);else switch(v===99&&O$1(j,3)===110?100:v){case 100:case 108:case 109:case 115:se(e,y,y,n&&q$1(te(e,y,y,0,0,c,u,g,c,m=[],l),x),c,x,l,u,n?m:x);break;default:se(j,y,y,y,[""],x,0,u,x);}}f=o=p=0,b=d=1,g=j="",l=t;break;case 58:l=1+M$1(j),p=h;default:if(b<1)if($==123)--b;else if($==125&&b++==0&&N$1()==125)continue;switch(j+=k$1($),$*b){case 38:d=o>0?1:(j+="\f",-1);break;case 44:u[f++]=(M$1(j)-1)*d,d=1;break;case 64:if(Q$1()===45)j+=X(P$1());v=Q$1(),o=l=M$1(g=j+=ne(R$1())),$++;break;case 45:if(h===45&&M$1(j)==2)b=0;}}return s}function te(e,r,a,n,s,t,u,i,f,o,l){var v=s-1;var p=s===0?t:[""];var h=S$1(p);for(var b=0,w=0,d=0;b<n;++b)for(var $=0,k=A$1(e,v+1,v=g$1(w=u[b])),m=e;$<h;++$)if(m=y$1(w>0?p[$]+" "+k:z$1(k,/&\f/g,p[$])))f[d++]=m;return J$1(e,r,a,s===0?c$1:i,f,o,l)}function ue(e,r,a){return J$1(e,r,a,n$1,k$1(L$1()),A$1(e,2,-2),0)}function ie(e,r,a,n){return J$1(e,r,a,s$1,A$1(e,0,n),A$1(e,n+1,-1),n)}function oe(e,r){var a="";var n=S$1(e);for(var c=0;c<n;c++)a+=r(e[c],c,e,r)||"";return a}function le(e,r,a,t){switch(e.type){case $$1:if(e.children.length)break;case i$1:case s$1:return e.return=e.return||e.value;case n$1:return "";case h$1:return e.return=e.value+"{"+oe(e.children,t)+"}";case c$1:e.value=e.props.join(",");}return M$1(a=oe(e.children,t))?e.return=e.value+"{"+a+"}":""}function ve(e){var r=S$1(e);return function(a,n,c,s){var t="";for(var u=0;u<r;u++)t+=e[u](a,n,c,s)||"";return t}}
|
|
10130
10151
|
|
|
10131
10152
|
function memoize(fn) {
|
|
10132
10153
|
var cache = Object.create(null);
|
|
@@ -10141,43 +10162,43 @@
|
|
|
10141
10162
|
var character = 0;
|
|
10142
10163
|
while (true) {
|
|
10143
10164
|
previous = character;
|
|
10144
|
-
character =
|
|
10165
|
+
character = Q$1(); // &\f
|
|
10145
10166
|
|
|
10146
10167
|
if (previous === 38 && character === 12) {
|
|
10147
10168
|
points[index] = 1;
|
|
10148
10169
|
}
|
|
10149
|
-
if (
|
|
10170
|
+
if (U$1(character)) {
|
|
10150
10171
|
break;
|
|
10151
10172
|
}
|
|
10152
|
-
|
|
10173
|
+
P$1();
|
|
10153
10174
|
}
|
|
10154
|
-
return
|
|
10175
|
+
return T$1(begin, G$1);
|
|
10155
10176
|
};
|
|
10156
10177
|
var toRules = function toRules(parsed, points) {
|
|
10157
10178
|
// pretend we've started with a comma
|
|
10158
10179
|
var index = -1;
|
|
10159
10180
|
var character = 44;
|
|
10160
10181
|
do {
|
|
10161
|
-
switch (
|
|
10182
|
+
switch (U$1(character)) {
|
|
10162
10183
|
case 0:
|
|
10163
10184
|
// &\f
|
|
10164
|
-
if (character === 38 &&
|
|
10185
|
+
if (character === 38 && Q$1() === 12) {
|
|
10165
10186
|
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
10166
10187
|
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
10167
10188
|
// and when it should just concatenate the outer and inner selectors
|
|
10168
10189
|
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
10169
10190
|
points[index] = 1;
|
|
10170
10191
|
}
|
|
10171
|
-
parsed[index] += identifierWithPointTracking(
|
|
10192
|
+
parsed[index] += identifierWithPointTracking(G$1 - 1, points, index);
|
|
10172
10193
|
break;
|
|
10173
10194
|
case 2:
|
|
10174
|
-
parsed[index] +=
|
|
10195
|
+
parsed[index] += X(character);
|
|
10175
10196
|
break;
|
|
10176
10197
|
case 4:
|
|
10177
10198
|
// comma
|
|
10178
10199
|
if (character === 44) {
|
|
10179
10200
|
// colon
|
|
10180
|
-
parsed[++index] =
|
|
10201
|
+
parsed[++index] = Q$1() === 58 ? '&\f' : '';
|
|
10181
10202
|
points[index] = parsed[index].length;
|
|
10182
10203
|
break;
|
|
10183
10204
|
}
|
|
@@ -10187,11 +10208,11 @@
|
|
|
10187
10208
|
default:
|
|
10188
10209
|
parsed[index] += k$1(character);
|
|
10189
10210
|
}
|
|
10190
|
-
} while (character =
|
|
10211
|
+
} while (character = P$1());
|
|
10191
10212
|
return parsed;
|
|
10192
10213
|
};
|
|
10193
10214
|
var getRules = function getRules(value, points) {
|
|
10194
|
-
return
|
|
10215
|
+
return W(toRules(V$1(value), points));
|
|
10195
10216
|
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
10196
10217
|
|
|
10197
10218
|
var fixedElements = /* #__PURE__ */new WeakMap();
|
|
@@ -10252,7 +10273,7 @@
|
|
|
10252
10273
|
if (element.type !== 'rule' || cache.compat) return;
|
|
10253
10274
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
10254
10275
|
if (unsafePseudoClasses) {
|
|
10255
|
-
var isNested = element.parent
|
|
10276
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
10256
10277
|
//
|
|
10257
10278
|
// considering this input:
|
|
10258
10279
|
// .a {
|
|
@@ -10268,7 +10289,7 @@
|
|
|
10268
10289
|
// .b {}
|
|
10269
10290
|
// }
|
|
10270
10291
|
|
|
10271
|
-
var commentContainer = isNested ?
|
|
10292
|
+
var commentContainer = isNested ? element.parent.children :
|
|
10272
10293
|
// global rule at the root level
|
|
10273
10294
|
children;
|
|
10274
10295
|
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
@@ -10342,7 +10363,7 @@
|
|
|
10342
10363
|
/* eslint-disable no-fallthrough */
|
|
10343
10364
|
|
|
10344
10365
|
function prefix(value, length) {
|
|
10345
|
-
switch (
|
|
10366
|
+
switch (x$1(value, length)) {
|
|
10346
10367
|
// color-adjust
|
|
10347
10368
|
case 5103:
|
|
10348
10369
|
return a$1 + 'print-' + value + value;
|
|
@@ -10397,51 +10418,51 @@
|
|
|
10397
10418
|
// align-items
|
|
10398
10419
|
|
|
10399
10420
|
case 5187:
|
|
10400
|
-
return a$1 + value +
|
|
10421
|
+
return a$1 + value + z$1(value, /(\w+).+(:[^]+)/, a$1 + 'box-$1$2' + e + 'flex-$1$2') + value;
|
|
10401
10422
|
// align-self
|
|
10402
10423
|
|
|
10403
10424
|
case 5443:
|
|
10404
|
-
return a$1 + value + e + 'flex-item-' +
|
|
10425
|
+
return a$1 + value + e + 'flex-item-' + z$1(value, /flex-|-self/, '') + value;
|
|
10405
10426
|
// align-content
|
|
10406
10427
|
|
|
10407
10428
|
case 4675:
|
|
10408
|
-
return a$1 + value + e + 'flex-line-pack' +
|
|
10429
|
+
return a$1 + value + e + 'flex-line-pack' + z$1(value, /align-content|flex-|-self/, '') + value;
|
|
10409
10430
|
// flex-shrink
|
|
10410
10431
|
|
|
10411
10432
|
case 5548:
|
|
10412
|
-
return a$1 + value + e +
|
|
10433
|
+
return a$1 + value + e + z$1(value, 'shrink', 'negative') + value;
|
|
10413
10434
|
// flex-basis
|
|
10414
10435
|
|
|
10415
10436
|
case 5292:
|
|
10416
|
-
return a$1 + value + e +
|
|
10437
|
+
return a$1 + value + e + z$1(value, 'basis', 'preferred-size') + value;
|
|
10417
10438
|
// flex-grow
|
|
10418
10439
|
|
|
10419
10440
|
case 6060:
|
|
10420
|
-
return a$1 + 'box-' +
|
|
10441
|
+
return a$1 + 'box-' + z$1(value, '-grow', '') + a$1 + value + e + z$1(value, 'grow', 'positive') + value;
|
|
10421
10442
|
// transition
|
|
10422
10443
|
|
|
10423
10444
|
case 4554:
|
|
10424
|
-
return a$1 +
|
|
10445
|
+
return a$1 + z$1(value, /([^-])(transform)/g, '$1' + a$1 + '$2') + value;
|
|
10425
10446
|
// cursor
|
|
10426
10447
|
|
|
10427
10448
|
case 6187:
|
|
10428
|
-
return
|
|
10449
|
+
return z$1(z$1(z$1(value, /(zoom-|grab)/, a$1 + '$1'), /(image-set)/, a$1 + '$1'), value, '') + value;
|
|
10429
10450
|
// background, background-image
|
|
10430
10451
|
|
|
10431
10452
|
case 5495:
|
|
10432
10453
|
case 3959:
|
|
10433
|
-
return
|
|
10454
|
+
return z$1(value, /(image-set\([^]*)/, a$1 + '$1' + '$`$1');
|
|
10434
10455
|
// justify-content
|
|
10435
10456
|
|
|
10436
10457
|
case 4968:
|
|
10437
|
-
return
|
|
10458
|
+
return z$1(z$1(value, /(.+:)(flex-)?(.*)/, a$1 + 'box-pack:$3' + e + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + a$1 + value + value;
|
|
10438
10459
|
// (margin|padding)-inline-(start|end)
|
|
10439
10460
|
|
|
10440
10461
|
case 4095:
|
|
10441
10462
|
case 3583:
|
|
10442
10463
|
case 4068:
|
|
10443
10464
|
case 2532:
|
|
10444
|
-
return
|
|
10465
|
+
return z$1(value, /(.+)-inline(.+)/, a$1 + '$1$2') + value;
|
|
10445
10466
|
// (min|max)?(width|height|inline-size|block-size)
|
|
10446
10467
|
|
|
10447
10468
|
case 8116:
|
|
@@ -10457,54 +10478,54 @@
|
|
|
10457
10478
|
case 5021:
|
|
10458
10479
|
case 4765:
|
|
10459
10480
|
// stretch, max-content, min-content, fill-available
|
|
10460
|
-
if (
|
|
10481
|
+
if (M$1(value) - 1 - length > 6) switch (O$1(value, length + 1)) {
|
|
10461
10482
|
// (m)ax-content, (m)in-content
|
|
10462
10483
|
case 109:
|
|
10463
10484
|
// -
|
|
10464
|
-
if (
|
|
10485
|
+
if (O$1(value, length + 4) !== 45) break;
|
|
10465
10486
|
// (f)ill-available, (f)it-content
|
|
10466
10487
|
|
|
10467
10488
|
case 102:
|
|
10468
|
-
return
|
|
10489
|
+
return z$1(value, /(.+:)(.+)-([^]+)/, '$1' + a$1 + '$2-$3' + '$1' + r$1 + (O$1(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
10469
10490
|
// (s)tretch
|
|
10470
10491
|
|
|
10471
10492
|
case 115:
|
|
10472
|
-
return ~
|
|
10493
|
+
return ~C$1(value, 'stretch') ? prefix(z$1(value, 'stretch', 'fill-available'), length) + value : value;
|
|
10473
10494
|
}
|
|
10474
10495
|
break;
|
|
10475
10496
|
// position: sticky
|
|
10476
10497
|
|
|
10477
10498
|
case 4949:
|
|
10478
10499
|
// (s)ticky?
|
|
10479
|
-
if (
|
|
10500
|
+
if (O$1(value, length + 1) !== 115) break;
|
|
10480
10501
|
// display: (flex|inline-flex)
|
|
10481
10502
|
|
|
10482
10503
|
case 6444:
|
|
10483
|
-
switch (
|
|
10504
|
+
switch (O$1(value, M$1(value) - 3 - (~C$1(value, '!important') && 10))) {
|
|
10484
10505
|
// stic(k)y
|
|
10485
10506
|
case 107:
|
|
10486
|
-
return
|
|
10507
|
+
return z$1(value, ':', ':' + a$1) + value;
|
|
10487
10508
|
// (inline-)?fl(e)x
|
|
10488
10509
|
|
|
10489
10510
|
case 101:
|
|
10490
|
-
return
|
|
10511
|
+
return z$1(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + a$1 + (O$1(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + a$1 + '$2$3' + '$1' + e + '$2box$3') + value;
|
|
10491
10512
|
}
|
|
10492
10513
|
break;
|
|
10493
10514
|
// writing-mode
|
|
10494
10515
|
|
|
10495
10516
|
case 5936:
|
|
10496
|
-
switch (
|
|
10517
|
+
switch (O$1(value, length + 11)) {
|
|
10497
10518
|
// vertical-l(r)
|
|
10498
10519
|
case 114:
|
|
10499
|
-
return a$1 + value + e +
|
|
10520
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
10500
10521
|
// vertical-r(l)
|
|
10501
10522
|
|
|
10502
10523
|
case 108:
|
|
10503
|
-
return a$1 + value + e +
|
|
10524
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
10504
10525
|
// horizontal(-)tb
|
|
10505
10526
|
|
|
10506
10527
|
case 45:
|
|
10507
|
-
return a$1 + value + e +
|
|
10528
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
10508
10529
|
}
|
|
10509
10530
|
return a$1 + value + e + value + value;
|
|
10510
10531
|
}
|
|
@@ -10516,27 +10537,27 @@
|
|
|
10516
10537
|
element["return"] = prefix(element.value, element.length);
|
|
10517
10538
|
break;
|
|
10518
10539
|
case h$1:
|
|
10519
|
-
return
|
|
10520
|
-
value:
|
|
10540
|
+
return oe([K$1(element, {
|
|
10541
|
+
value: z$1(element.value, '@', '@' + a$1)
|
|
10521
10542
|
})], callback);
|
|
10522
10543
|
case c$1:
|
|
10523
|
-
if (element.length) return
|
|
10524
|
-
switch (
|
|
10544
|
+
if (element.length) return B$1(element.props, function (value) {
|
|
10545
|
+
switch (j$1(value, /(::plac\w+|:read-\w+)/)) {
|
|
10525
10546
|
// :read-(only|write)
|
|
10526
10547
|
case ':read-only':
|
|
10527
10548
|
case ':read-write':
|
|
10528
|
-
return
|
|
10529
|
-
props: [
|
|
10549
|
+
return oe([K$1(element, {
|
|
10550
|
+
props: [z$1(value, /:(read-\w+)/, ':' + r$1 + '$1')]
|
|
10530
10551
|
})], callback);
|
|
10531
10552
|
// :placeholder
|
|
10532
10553
|
|
|
10533
10554
|
case '::placeholder':
|
|
10534
|
-
return
|
|
10535
|
-
props: [
|
|
10536
|
-
}),
|
|
10537
|
-
props: [
|
|
10538
|
-
}),
|
|
10539
|
-
props: [
|
|
10555
|
+
return oe([K$1(element, {
|
|
10556
|
+
props: [z$1(value, /:(plac\w+)/, ':' + a$1 + 'input-$1')]
|
|
10557
|
+
}), K$1(element, {
|
|
10558
|
+
props: [z$1(value, /:(plac\w+)/, ':' + r$1 + '$1')]
|
|
10559
|
+
}), K$1(element, {
|
|
10560
|
+
props: [z$1(value, /:(plac\w+)/, e + 'input-$1')]
|
|
10540
10561
|
})], callback);
|
|
10541
10562
|
}
|
|
10542
10563
|
return '';
|
|
@@ -10605,7 +10626,7 @@
|
|
|
10605
10626
|
}
|
|
10606
10627
|
{
|
|
10607
10628
|
var currentSheet;
|
|
10608
|
-
var finalizingPlugins = [
|
|
10629
|
+
var finalizingPlugins = [le, function (element) {
|
|
10609
10630
|
if (!element.root) {
|
|
10610
10631
|
if (element["return"]) {
|
|
10611
10632
|
currentSheet.insert(element["return"]);
|
|
@@ -10616,9 +10637,9 @@
|
|
|
10616
10637
|
}
|
|
10617
10638
|
}
|
|
10618
10639
|
} ];
|
|
10619
|
-
var serializer =
|
|
10640
|
+
var serializer = ve(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
10620
10641
|
var stylis = function stylis(styles) {
|
|
10621
|
-
return
|
|
10642
|
+
return oe(ce(styles), serializer);
|
|
10622
10643
|
};
|
|
10623
10644
|
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
10624
10645
|
currentSheet = sheet;
|
|
@@ -10689,7 +10710,7 @@
|
|
|
10689
10710
|
if (cache.inserted[serialized.name] === undefined) {
|
|
10690
10711
|
var current = serialized;
|
|
10691
10712
|
do {
|
|
10692
|
-
|
|
10713
|
+
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
10693
10714
|
current = current.next;
|
|
10694
10715
|
} while (current !== undefined);
|
|
10695
10716
|
}
|
|
@@ -10740,6 +10761,7 @@
|
|
|
10740
10761
|
|
|
10741
10762
|
var unitlessKeys = {
|
|
10742
10763
|
animationIterationCount: 1,
|
|
10764
|
+
aspectRatio: 1,
|
|
10743
10765
|
borderImageOutset: 1,
|
|
10744
10766
|
borderImageSlice: 1,
|
|
10745
10767
|
borderImageWidth: 1,
|
|
@@ -11287,43 +11309,43 @@
|
|
|
11287
11309
|
var character = 0;
|
|
11288
11310
|
while (true) {
|
|
11289
11311
|
previous = character;
|
|
11290
|
-
character =
|
|
11312
|
+
character = Q$1(); // &\f
|
|
11291
11313
|
|
|
11292
11314
|
if (previous === 38 && character === 12) {
|
|
11293
11315
|
points[index] = 1;
|
|
11294
11316
|
}
|
|
11295
|
-
if (
|
|
11317
|
+
if (U$1(character)) {
|
|
11296
11318
|
break;
|
|
11297
11319
|
}
|
|
11298
|
-
|
|
11320
|
+
P$1();
|
|
11299
11321
|
}
|
|
11300
|
-
return
|
|
11322
|
+
return T$1(begin, G$1);
|
|
11301
11323
|
};
|
|
11302
11324
|
var toRules$1 = function toRules(parsed, points) {
|
|
11303
11325
|
// pretend we've started with a comma
|
|
11304
11326
|
var index = -1;
|
|
11305
11327
|
var character = 44;
|
|
11306
11328
|
do {
|
|
11307
|
-
switch (
|
|
11329
|
+
switch (U$1(character)) {
|
|
11308
11330
|
case 0:
|
|
11309
11331
|
// &\f
|
|
11310
|
-
if (character === 38 &&
|
|
11332
|
+
if (character === 38 && Q$1() === 12) {
|
|
11311
11333
|
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
11312
11334
|
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
11313
11335
|
// and when it should just concatenate the outer and inner selectors
|
|
11314
11336
|
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
11315
11337
|
points[index] = 1;
|
|
11316
11338
|
}
|
|
11317
|
-
parsed[index] += identifierWithPointTracking$1(
|
|
11339
|
+
parsed[index] += identifierWithPointTracking$1(G$1 - 1, points, index);
|
|
11318
11340
|
break;
|
|
11319
11341
|
case 2:
|
|
11320
|
-
parsed[index] +=
|
|
11342
|
+
parsed[index] += X(character);
|
|
11321
11343
|
break;
|
|
11322
11344
|
case 4:
|
|
11323
11345
|
// comma
|
|
11324
11346
|
if (character === 44) {
|
|
11325
11347
|
// colon
|
|
11326
|
-
parsed[++index] =
|
|
11348
|
+
parsed[++index] = Q$1() === 58 ? '&\f' : '';
|
|
11327
11349
|
points[index] = parsed[index].length;
|
|
11328
11350
|
break;
|
|
11329
11351
|
}
|
|
@@ -11333,11 +11355,11 @@
|
|
|
11333
11355
|
default:
|
|
11334
11356
|
parsed[index] += k$1(character);
|
|
11335
11357
|
}
|
|
11336
|
-
} while (character =
|
|
11358
|
+
} while (character = P$1());
|
|
11337
11359
|
return parsed;
|
|
11338
11360
|
};
|
|
11339
11361
|
var getRules$1 = function getRules(value, points) {
|
|
11340
|
-
return
|
|
11362
|
+
return W(toRules$1(V$1(value), points));
|
|
11341
11363
|
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
11342
11364
|
|
|
11343
11365
|
var fixedElements$1 = /* #__PURE__ */new WeakMap();
|
|
@@ -11398,7 +11420,7 @@
|
|
|
11398
11420
|
if (element.type !== 'rule' || cache.compat) return;
|
|
11399
11421
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
11400
11422
|
if (unsafePseudoClasses) {
|
|
11401
|
-
var isNested = element.parent
|
|
11423
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
11402
11424
|
//
|
|
11403
11425
|
// considering this input:
|
|
11404
11426
|
// .a {
|
|
@@ -11414,7 +11436,7 @@
|
|
|
11414
11436
|
// .b {}
|
|
11415
11437
|
// }
|
|
11416
11438
|
|
|
11417
|
-
var commentContainer = isNested ?
|
|
11439
|
+
var commentContainer = isNested ? element.parent.children :
|
|
11418
11440
|
// global rule at the root level
|
|
11419
11441
|
children;
|
|
11420
11442
|
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
@@ -11488,7 +11510,7 @@
|
|
|
11488
11510
|
/* eslint-disable no-fallthrough */
|
|
11489
11511
|
|
|
11490
11512
|
function prefix$1(value, length) {
|
|
11491
|
-
switch (
|
|
11513
|
+
switch (x$1(value, length)) {
|
|
11492
11514
|
// color-adjust
|
|
11493
11515
|
case 5103:
|
|
11494
11516
|
return a$1 + 'print-' + value + value;
|
|
@@ -11543,51 +11565,51 @@
|
|
|
11543
11565
|
// align-items
|
|
11544
11566
|
|
|
11545
11567
|
case 5187:
|
|
11546
|
-
return a$1 + value +
|
|
11568
|
+
return a$1 + value + z$1(value, /(\w+).+(:[^]+)/, a$1 + 'box-$1$2' + e + 'flex-$1$2') + value;
|
|
11547
11569
|
// align-self
|
|
11548
11570
|
|
|
11549
11571
|
case 5443:
|
|
11550
|
-
return a$1 + value + e + 'flex-item-' +
|
|
11572
|
+
return a$1 + value + e + 'flex-item-' + z$1(value, /flex-|-self/, '') + value;
|
|
11551
11573
|
// align-content
|
|
11552
11574
|
|
|
11553
11575
|
case 4675:
|
|
11554
|
-
return a$1 + value + e + 'flex-line-pack' +
|
|
11576
|
+
return a$1 + value + e + 'flex-line-pack' + z$1(value, /align-content|flex-|-self/, '') + value;
|
|
11555
11577
|
// flex-shrink
|
|
11556
11578
|
|
|
11557
11579
|
case 5548:
|
|
11558
|
-
return a$1 + value + e +
|
|
11580
|
+
return a$1 + value + e + z$1(value, 'shrink', 'negative') + value;
|
|
11559
11581
|
// flex-basis
|
|
11560
11582
|
|
|
11561
11583
|
case 5292:
|
|
11562
|
-
return a$1 + value + e +
|
|
11584
|
+
return a$1 + value + e + z$1(value, 'basis', 'preferred-size') + value;
|
|
11563
11585
|
// flex-grow
|
|
11564
11586
|
|
|
11565
11587
|
case 6060:
|
|
11566
|
-
return a$1 + 'box-' +
|
|
11588
|
+
return a$1 + 'box-' + z$1(value, '-grow', '') + a$1 + value + e + z$1(value, 'grow', 'positive') + value;
|
|
11567
11589
|
// transition
|
|
11568
11590
|
|
|
11569
11591
|
case 4554:
|
|
11570
|
-
return a$1 +
|
|
11592
|
+
return a$1 + z$1(value, /([^-])(transform)/g, '$1' + a$1 + '$2') + value;
|
|
11571
11593
|
// cursor
|
|
11572
11594
|
|
|
11573
11595
|
case 6187:
|
|
11574
|
-
return
|
|
11596
|
+
return z$1(z$1(z$1(value, /(zoom-|grab)/, a$1 + '$1'), /(image-set)/, a$1 + '$1'), value, '') + value;
|
|
11575
11597
|
// background, background-image
|
|
11576
11598
|
|
|
11577
11599
|
case 5495:
|
|
11578
11600
|
case 3959:
|
|
11579
|
-
return
|
|
11601
|
+
return z$1(value, /(image-set\([^]*)/, a$1 + '$1' + '$`$1');
|
|
11580
11602
|
// justify-content
|
|
11581
11603
|
|
|
11582
11604
|
case 4968:
|
|
11583
|
-
return
|
|
11605
|
+
return z$1(z$1(value, /(.+:)(flex-)?(.*)/, a$1 + 'box-pack:$3' + e + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + a$1 + value + value;
|
|
11584
11606
|
// (margin|padding)-inline-(start|end)
|
|
11585
11607
|
|
|
11586
11608
|
case 4095:
|
|
11587
11609
|
case 3583:
|
|
11588
11610
|
case 4068:
|
|
11589
11611
|
case 2532:
|
|
11590
|
-
return
|
|
11612
|
+
return z$1(value, /(.+)-inline(.+)/, a$1 + '$1$2') + value;
|
|
11591
11613
|
// (min|max)?(width|height|inline-size|block-size)
|
|
11592
11614
|
|
|
11593
11615
|
case 8116:
|
|
@@ -11603,54 +11625,54 @@
|
|
|
11603
11625
|
case 5021:
|
|
11604
11626
|
case 4765:
|
|
11605
11627
|
// stretch, max-content, min-content, fill-available
|
|
11606
|
-
if (
|
|
11628
|
+
if (M$1(value) - 1 - length > 6) switch (O$1(value, length + 1)) {
|
|
11607
11629
|
// (m)ax-content, (m)in-content
|
|
11608
11630
|
case 109:
|
|
11609
11631
|
// -
|
|
11610
|
-
if (
|
|
11632
|
+
if (O$1(value, length + 4) !== 45) break;
|
|
11611
11633
|
// (f)ill-available, (f)it-content
|
|
11612
11634
|
|
|
11613
11635
|
case 102:
|
|
11614
|
-
return
|
|
11636
|
+
return z$1(value, /(.+:)(.+)-([^]+)/, '$1' + a$1 + '$2-$3' + '$1' + r$1 + (O$1(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
11615
11637
|
// (s)tretch
|
|
11616
11638
|
|
|
11617
11639
|
case 115:
|
|
11618
|
-
return ~
|
|
11640
|
+
return ~C$1(value, 'stretch') ? prefix$1(z$1(value, 'stretch', 'fill-available'), length) + value : value;
|
|
11619
11641
|
}
|
|
11620
11642
|
break;
|
|
11621
11643
|
// position: sticky
|
|
11622
11644
|
|
|
11623
11645
|
case 4949:
|
|
11624
11646
|
// (s)ticky?
|
|
11625
|
-
if (
|
|
11647
|
+
if (O$1(value, length + 1) !== 115) break;
|
|
11626
11648
|
// display: (flex|inline-flex)
|
|
11627
11649
|
|
|
11628
11650
|
case 6444:
|
|
11629
|
-
switch (
|
|
11651
|
+
switch (O$1(value, M$1(value) - 3 - (~C$1(value, '!important') && 10))) {
|
|
11630
11652
|
// stic(k)y
|
|
11631
11653
|
case 107:
|
|
11632
|
-
return
|
|
11654
|
+
return z$1(value, ':', ':' + a$1) + value;
|
|
11633
11655
|
// (inline-)?fl(e)x
|
|
11634
11656
|
|
|
11635
11657
|
case 101:
|
|
11636
|
-
return
|
|
11658
|
+
return z$1(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + a$1 + (O$1(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + a$1 + '$2$3' + '$1' + e + '$2box$3') + value;
|
|
11637
11659
|
}
|
|
11638
11660
|
break;
|
|
11639
11661
|
// writing-mode
|
|
11640
11662
|
|
|
11641
11663
|
case 5936:
|
|
11642
|
-
switch (
|
|
11664
|
+
switch (O$1(value, length + 11)) {
|
|
11643
11665
|
// vertical-l(r)
|
|
11644
11666
|
case 114:
|
|
11645
|
-
return a$1 + value + e +
|
|
11667
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
11646
11668
|
// vertical-r(l)
|
|
11647
11669
|
|
|
11648
11670
|
case 108:
|
|
11649
|
-
return a$1 + value + e +
|
|
11671
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
11650
11672
|
// horizontal(-)tb
|
|
11651
11673
|
|
|
11652
11674
|
case 45:
|
|
11653
|
-
return a$1 + value + e +
|
|
11675
|
+
return a$1 + value + e + z$1(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
11654
11676
|
}
|
|
11655
11677
|
return a$1 + value + e + value + value;
|
|
11656
11678
|
}
|
|
@@ -11662,27 +11684,27 @@
|
|
|
11662
11684
|
element["return"] = prefix$1(element.value, element.length);
|
|
11663
11685
|
break;
|
|
11664
11686
|
case h$1:
|
|
11665
|
-
return
|
|
11666
|
-
value:
|
|
11687
|
+
return oe([K$1(element, {
|
|
11688
|
+
value: z$1(element.value, '@', '@' + a$1)
|
|
11667
11689
|
})], callback);
|
|
11668
11690
|
case c$1:
|
|
11669
|
-
if (element.length) return
|
|
11670
|
-
switch (
|
|
11691
|
+
if (element.length) return B$1(element.props, function (value) {
|
|
11692
|
+
switch (j$1(value, /(::plac\w+|:read-\w+)/)) {
|
|
11671
11693
|
// :read-(only|write)
|
|
11672
11694
|
case ':read-only':
|
|
11673
11695
|
case ':read-write':
|
|
11674
|
-
return
|
|
11675
|
-
props: [
|
|
11696
|
+
return oe([K$1(element, {
|
|
11697
|
+
props: [z$1(value, /:(read-\w+)/, ':' + r$1 + '$1')]
|
|
11676
11698
|
})], callback);
|
|
11677
11699
|
// :placeholder
|
|
11678
11700
|
|
|
11679
11701
|
case '::placeholder':
|
|
11680
|
-
return
|
|
11681
|
-
props: [
|
|
11682
|
-
}),
|
|
11683
|
-
props: [
|
|
11684
|
-
}),
|
|
11685
|
-
props: [
|
|
11702
|
+
return oe([K$1(element, {
|
|
11703
|
+
props: [z$1(value, /:(plac\w+)/, ':' + a$1 + 'input-$1')]
|
|
11704
|
+
}), K$1(element, {
|
|
11705
|
+
props: [z$1(value, /:(plac\w+)/, ':' + r$1 + '$1')]
|
|
11706
|
+
}), K$1(element, {
|
|
11707
|
+
props: [z$1(value, /:(plac\w+)/, e + 'input-$1')]
|
|
11686
11708
|
})], callback);
|
|
11687
11709
|
}
|
|
11688
11710
|
return '';
|
|
@@ -11751,7 +11773,7 @@
|
|
|
11751
11773
|
}
|
|
11752
11774
|
{
|
|
11753
11775
|
var currentSheet;
|
|
11754
|
-
var finalizingPlugins = [
|
|
11776
|
+
var finalizingPlugins = [le, function (element) {
|
|
11755
11777
|
if (!element.root) {
|
|
11756
11778
|
if (element["return"]) {
|
|
11757
11779
|
currentSheet.insert(element["return"]);
|
|
@@ -11762,9 +11784,9 @@
|
|
|
11762
11784
|
}
|
|
11763
11785
|
}
|
|
11764
11786
|
} ];
|
|
11765
|
-
var serializer =
|
|
11787
|
+
var serializer = ve(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
11766
11788
|
var stylis = function stylis(styles) {
|
|
11767
|
-
return
|
|
11789
|
+
return oe(ce(styles), serializer);
|
|
11768
11790
|
};
|
|
11769
11791
|
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
11770
11792
|
currentSheet = sheet;
|
|
@@ -11845,6 +11867,7 @@
|
|
|
11845
11867
|
|
|
11846
11868
|
var unitlessKeys$1 = {
|
|
11847
11869
|
animationIterationCount: 1,
|
|
11870
|
+
aspectRatio: 1,
|
|
11848
11871
|
borderImageOutset: 1,
|
|
11849
11872
|
borderImageSlice: 1,
|
|
11850
11873
|
borderImageWidth: 1,
|
|
@@ -12181,7 +12204,7 @@
|
|
|
12181
12204
|
if (cache.inserted[serialized.name] === undefined) {
|
|
12182
12205
|
var current = serialized;
|
|
12183
12206
|
do {
|
|
12184
|
-
|
|
12207
|
+
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
12185
12208
|
current = current.next;
|
|
12186
12209
|
} while (current !== undefined);
|
|
12187
12210
|
}
|
|
@@ -13062,12 +13085,12 @@
|
|
|
13062
13085
|
return theme.colors && theme.colors.primaryColor ? "0 0 0 2px " + rgba(theme.colors.primaryColor, 0.3) : '';
|
|
13063
13086
|
}, function (props) {
|
|
13064
13087
|
return props.info ? info : null;
|
|
13065
|
-
}, function (props) {
|
|
13066
|
-
return props.primary ? primary : null;
|
|
13067
13088
|
}, function (props) {
|
|
13068
13089
|
return props.disabled ? disabled : null;
|
|
13069
13090
|
}, function (props) {
|
|
13070
13091
|
return props.large && large;
|
|
13092
|
+
}, function (props) {
|
|
13093
|
+
return props.primary ? primary : null;
|
|
13071
13094
|
});
|
|
13072
13095
|
var loadMoreContainer = css({
|
|
13073
13096
|
margin: '5px 0',
|
|
@@ -17539,10 +17562,10 @@
|
|
|
17539
17562
|
};
|
|
17540
17563
|
|
|
17541
17564
|
/**!
|
|
17542
|
-
* hotkeys-js v3.10.
|
|
17565
|
+
* hotkeys-js v3.10.2
|
|
17543
17566
|
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
|
|
17544
17567
|
*
|
|
17545
|
-
* Copyright (c)
|
|
17568
|
+
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
|
|
17546
17569
|
* http://jaywcjlove.github.io/hotkeys
|
|
17547
17570
|
* Licensed under the MIT license
|
|
17548
17571
|
*/
|
|
@@ -24800,7 +24823,7 @@
|
|
|
24800
24823
|
var enterButton = _ref.enterButton;
|
|
24801
24824
|
return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
|
|
24802
24825
|
});
|
|
24803
|
-
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n"])));
|
|
24826
|
+
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n"])));
|
|
24804
24827
|
var AIFeedbackContainer = styled('div')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t.--feedback-svgs-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t\tgap: 5px;\n\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\ttransition: all ease-in 0.1s;\n\t\t\t&.selected {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t\tcursor: default;\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t}\n\t\t}\n\t}\n\n\t.--feedback-input-wrapper {\n\t\tdisplay: flex;\n\t\tgap: 7px;\n\t}\n"])));
|
|
24805
24828
|
|
|
24806
24829
|
var _templateObject$k, _templateObject2$8, _templateObject3$6, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$1;
|
|
@@ -26436,6 +26459,9 @@
|
|
|
26436
26459
|
},
|
|
26437
26460
|
shouldShowComponent: function shouldShowComponent() {
|
|
26438
26461
|
return this.showComponent;
|
|
26462
|
+
},
|
|
26463
|
+
errorMessageForMissingSessionId: function errorMessageForMissingSessionId() {
|
|
26464
|
+
return "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.";
|
|
26439
26465
|
}
|
|
26440
26466
|
},
|
|
26441
26467
|
props: {
|
|
@@ -26472,7 +26498,8 @@
|
|
|
26472
26498
|
renderError: types.title,
|
|
26473
26499
|
isLoading: types.boolRequired,
|
|
26474
26500
|
sessionIdFromStore: Q.string,
|
|
26475
|
-
showComponent: types.boolRequired
|
|
26501
|
+
showComponent: types.boolRequired,
|
|
26502
|
+
style: types.style
|
|
26476
26503
|
},
|
|
26477
26504
|
mounted: function mounted() {},
|
|
26478
26505
|
watch: {
|
|
@@ -26493,9 +26520,15 @@
|
|
|
26493
26520
|
finalMessages.push.apply(finalMessages, messagesHistory.filter(function (msg) {
|
|
26494
26521
|
return msg.role !== constants_7$1.SYSTEM;
|
|
26495
26522
|
}));
|
|
26523
|
+
} else if (response && response.answer && response.answer.text) {
|
|
26524
|
+
finalMessages.push({
|
|
26525
|
+
role: constants_7$1.ASSISTANT,
|
|
26526
|
+
content: response.answer.text
|
|
26527
|
+
});
|
|
26528
|
+
this.error = {
|
|
26529
|
+
message: this.errorMessageForMissingSessionId
|
|
26530
|
+
};
|
|
26496
26531
|
}
|
|
26497
|
-
// fresh response
|
|
26498
|
-
if (response && response.answer) ;
|
|
26499
26532
|
this.messages = finalMessages;
|
|
26500
26533
|
} else if (!newVal && !this.error) {
|
|
26501
26534
|
this.messages = [];
|
|
@@ -26514,7 +26547,7 @@
|
|
|
26514
26547
|
this.$emit('on-data', {
|
|
26515
26548
|
data: this.messages,
|
|
26516
26549
|
rawData: this.$props.rawData,
|
|
26517
|
-
loading: newVal || this
|
|
26550
|
+
loading: newVal || this.isLoading,
|
|
26518
26551
|
error: this.$props.AIResponseError
|
|
26519
26552
|
});
|
|
26520
26553
|
},
|
|
@@ -26523,7 +26556,7 @@
|
|
|
26523
26556
|
this.$emit('on-data', {
|
|
26524
26557
|
data: this.messages,
|
|
26525
26558
|
rawData: this.$props.rawData,
|
|
26526
|
-
loading: newVal || this
|
|
26559
|
+
loading: newVal || this.isAIResponseLoading,
|
|
26527
26560
|
error: this.$props.AIResponseError
|
|
26528
26561
|
});
|
|
26529
26562
|
},
|
|
@@ -26535,10 +26568,17 @@
|
|
|
26535
26568
|
AIResponseError: function AIResponseError(newVal) {
|
|
26536
26569
|
this.error = newVal;
|
|
26537
26570
|
this.AISessionId = ((helper_2(constants_8$1) || {})[this.$props.componentId] || {}).sessionId || null;
|
|
26571
|
+
if (this.error && !this.AISessionId) {
|
|
26572
|
+
var errorMessage = this.errorMessageForMissingSessionId;
|
|
26573
|
+
this.error = {
|
|
26574
|
+
message: errorMessage
|
|
26575
|
+
};
|
|
26576
|
+
console.error(errorMessage);
|
|
26577
|
+
}
|
|
26538
26578
|
this.$emit('on-data', {
|
|
26539
26579
|
data: this.messages,
|
|
26540
26580
|
rawData: this.$props.rawData,
|
|
26541
|
-
loading: this
|
|
26581
|
+
loading: this.isAIResponseLoading || this.isLoading,
|
|
26542
26582
|
error: newVal
|
|
26543
26583
|
});
|
|
26544
26584
|
},
|
|
@@ -26583,9 +26623,9 @@
|
|
|
26583
26623
|
}]);
|
|
26584
26624
|
this.getAIResponse(this.AISessionId, this.componentId, text);
|
|
26585
26625
|
} else {
|
|
26586
|
-
console.error(
|
|
26626
|
+
console.error(this.errorMessageForMissingSessionId);
|
|
26587
26627
|
this.error = {
|
|
26588
|
-
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an
|
|
26628
|
+
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Trying reloading the App."
|
|
26589
26629
|
};
|
|
26590
26630
|
}
|
|
26591
26631
|
this.inputMessage = '';
|
|
@@ -26599,7 +26639,7 @@
|
|
|
26599
26639
|
this.getAIResponse(this.AISessionId, this.componentId, lastUserRequestMessage);
|
|
26600
26640
|
this.inputMessage = '';
|
|
26601
26641
|
} else {
|
|
26602
|
-
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an
|
|
26642
|
+
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.");
|
|
26603
26643
|
}
|
|
26604
26644
|
}
|
|
26605
26645
|
},
|
|
@@ -26682,7 +26722,7 @@
|
|
|
26682
26722
|
"positionType": "absolute"
|
|
26683
26723
|
}, {
|
|
26684
26724
|
"default": function _default() {
|
|
26685
|
-
return [_this2.shouldMicRender(showVoiceInput) && vue.createVNode(Mic, {
|
|
26725
|
+
return [!_this2.isLoadingState && _this2.AISessionId && _this2.shouldMicRender(showVoiceInput) && vue.createVNode(Mic, {
|
|
26686
26726
|
"getInstance": getMicInstance,
|
|
26687
26727
|
"render": renderMic,
|
|
26688
26728
|
"handleResult": _this2.handleVoiceResults,
|
|
@@ -26727,7 +26767,8 @@
|
|
|
26727
26767
|
"tabIndex": 0,
|
|
26728
26768
|
"onClick": _this3.handleSendMessage,
|
|
26729
26769
|
"onKeyPress": _this3.handleKeyPress,
|
|
26730
|
-
"class": "
|
|
26770
|
+
"class": "ask-btn " + helper_31(innerClass, 'ai-enter-button'),
|
|
26771
|
+
"disabled": _this3.isLoadingState || !_this3.AISessionId
|
|
26731
26772
|
}, {
|
|
26732
26773
|
"default": function _default() {
|
|
26733
26774
|
return [vue.createTextVNode("Send")];
|
|
@@ -26790,7 +26831,10 @@
|
|
|
26790
26831
|
if (!this.shouldShowComponent) {
|
|
26791
26832
|
return null;
|
|
26792
26833
|
}
|
|
26793
|
-
return vue.createVNode(Chatbox,
|
|
26834
|
+
return vue.createVNode(Chatbox, {
|
|
26835
|
+
"style": props.style,
|
|
26836
|
+
"class": "--ai-chat-box-wrapper"
|
|
26837
|
+
}, {
|
|
26794
26838
|
"default": function _default() {
|
|
26795
26839
|
return [_this4.$props.title && vue.createVNode(Title, {
|
|
26796
26840
|
"class": helper_31(_this4.$props.innerClass, 'title') || ''
|
|
@@ -26799,6 +26843,7 @@
|
|
|
26799
26843
|
return [_this4.$props.title];
|
|
26800
26844
|
}
|
|
26801
26845
|
}), vue.createVNode(ChatContainer, {
|
|
26846
|
+
"class": "--ai-chat-container",
|
|
26802
26847
|
"theme": props.theme,
|
|
26803
26848
|
"showInput": props.showInput
|
|
26804
26849
|
}, {
|
|
@@ -26886,7 +26931,7 @@
|
|
|
26886
26931
|
"showIcon": props.showIcon,
|
|
26887
26932
|
"iconPosition": props.iconPosition,
|
|
26888
26933
|
"themePreset": _this4.themePreset,
|
|
26889
|
-
"disabled": _this4.isLoadingState,
|
|
26934
|
+
"disabled": _this4.isLoadingState || !_this4.AISessionId,
|
|
26890
26935
|
"class": helper_31(props.innerClass, 'ai-input') || null
|
|
26891
26936
|
}, null), ' ', _this4.renderIcons()];
|
|
26892
26937
|
}
|
|
@@ -34250,7 +34295,7 @@
|
|
|
34250
34295
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
34251
34296
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
34252
34297
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
34253
|
-
|
|
34298
|
+
console.log('sdfsd');
|
|
34254
34299
|
})
|
|
34255
34300
|
}, [vue.renderSlot(_ctx.$slots, "default")]);
|
|
34256
34301
|
}
|
|
@@ -34288,14 +34333,252 @@
|
|
|
34288
34333
|
return a !== a && b !== b;
|
|
34289
34334
|
};
|
|
34290
34335
|
|
|
34291
|
-
|
|
34336
|
+
var ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
|
|
34337
|
+
|
|
34338
|
+
/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */
|
|
34339
|
+
|
|
34340
|
+
var VERSION = 1; // serialized format version
|
|
34341
|
+
var HEADER_SIZE = 8;
|
|
34342
|
+
var KDBush = /*#__PURE__*/function () {
|
|
34343
|
+
/**
|
|
34344
|
+
* Creates an index from raw `ArrayBuffer` data.
|
|
34345
|
+
* @param {ArrayBuffer} data
|
|
34346
|
+
*/
|
|
34347
|
+
KDBush.from = function from(data) {
|
|
34348
|
+
if (!(data instanceof ArrayBuffer)) {
|
|
34349
|
+
throw new Error('Data must be an instance of ArrayBuffer.');
|
|
34350
|
+
}
|
|
34351
|
+
var _Uint8Array = new Uint8Array(data, 0, 2),
|
|
34352
|
+
magic = _Uint8Array[0],
|
|
34353
|
+
versionAndType = _Uint8Array[1];
|
|
34354
|
+
if (magic !== 0xdb) {
|
|
34355
|
+
throw new Error('Data does not appear to be in a KDBush format.');
|
|
34356
|
+
}
|
|
34357
|
+
var version = versionAndType >> 4;
|
|
34358
|
+
if (version !== VERSION) {
|
|
34359
|
+
throw new Error("Got v" + version + " data when expected v" + VERSION + ".");
|
|
34360
|
+
}
|
|
34361
|
+
var ArrayType = ARRAY_TYPES[versionAndType & 0x0f];
|
|
34362
|
+
if (!ArrayType) {
|
|
34363
|
+
throw new Error('Unrecognized array type.');
|
|
34364
|
+
}
|
|
34365
|
+
var _Uint16Array = new Uint16Array(data, 2, 1),
|
|
34366
|
+
nodeSize = _Uint16Array[0];
|
|
34367
|
+
var _Uint32Array = new Uint32Array(data, 4, 1),
|
|
34368
|
+
numItems = _Uint32Array[0];
|
|
34369
|
+
return new KDBush(numItems, nodeSize, ArrayType, data);
|
|
34370
|
+
}
|
|
34371
|
+
|
|
34372
|
+
/**
|
|
34373
|
+
* Creates an index that will hold a given number of items.
|
|
34374
|
+
* @param {number} numItems
|
|
34375
|
+
* @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).
|
|
34376
|
+
* @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
|
|
34377
|
+
* @param {ArrayBuffer} [data] (For internal use only)
|
|
34378
|
+
*/;
|
|
34379
|
+
function KDBush(numItems, nodeSize, ArrayType, data) {
|
|
34380
|
+
if (nodeSize === void 0) {
|
|
34381
|
+
nodeSize = 64;
|
|
34382
|
+
}
|
|
34383
|
+
if (ArrayType === void 0) {
|
|
34384
|
+
ArrayType = Float64Array;
|
|
34385
|
+
}
|
|
34386
|
+
if (isNaN(numItems) || numItems < 0) throw new Error("Unpexpected numItems value: " + numItems + ".");
|
|
34387
|
+
this.numItems = +numItems;
|
|
34388
|
+
this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);
|
|
34389
|
+
this.ArrayType = ArrayType;
|
|
34390
|
+
this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;
|
|
34391
|
+
var arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);
|
|
34392
|
+
var coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;
|
|
34393
|
+
var idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;
|
|
34394
|
+
var padCoords = (8 - idsByteSize % 8) % 8;
|
|
34395
|
+
if (arrayTypeIndex < 0) {
|
|
34396
|
+
throw new Error("Unexpected typed array class: " + ArrayType + ".");
|
|
34397
|
+
}
|
|
34398
|
+
if (data && data instanceof ArrayBuffer) {
|
|
34399
|
+
// reconstruct an index from a buffer
|
|
34400
|
+
this.data = data;
|
|
34401
|
+
this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);
|
|
34402
|
+
this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);
|
|
34403
|
+
this._pos = numItems * 2;
|
|
34404
|
+
this._finished = true;
|
|
34405
|
+
} else {
|
|
34406
|
+
// initialize a new index
|
|
34407
|
+
this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);
|
|
34408
|
+
this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);
|
|
34409
|
+
this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);
|
|
34410
|
+
this._pos = 0;
|
|
34411
|
+
this._finished = false;
|
|
34412
|
+
|
|
34413
|
+
// set header
|
|
34414
|
+
new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);
|
|
34415
|
+
new Uint16Array(this.data, 2, 1)[0] = nodeSize;
|
|
34416
|
+
new Uint32Array(this.data, 4, 1)[0] = numItems;
|
|
34417
|
+
}
|
|
34418
|
+
}
|
|
34419
|
+
|
|
34420
|
+
/**
|
|
34421
|
+
* Add a point to the index.
|
|
34422
|
+
* @param {number} x
|
|
34423
|
+
* @param {number} y
|
|
34424
|
+
* @returns {number} An incremental index associated with the added item (starting from `0`).
|
|
34425
|
+
*/
|
|
34426
|
+
var _proto = KDBush.prototype;
|
|
34427
|
+
_proto.add = function add(x, y) {
|
|
34428
|
+
var index = this._pos >> 1;
|
|
34429
|
+
this.ids[index] = index;
|
|
34430
|
+
this.coords[this._pos++] = x;
|
|
34431
|
+
this.coords[this._pos++] = y;
|
|
34432
|
+
return index;
|
|
34433
|
+
}
|
|
34434
|
+
|
|
34435
|
+
/**
|
|
34436
|
+
* Perform indexing of the added points.
|
|
34437
|
+
*/;
|
|
34438
|
+
_proto.finish = function finish() {
|
|
34439
|
+
var numAdded = this._pos >> 1;
|
|
34440
|
+
if (numAdded !== this.numItems) {
|
|
34441
|
+
throw new Error("Added " + numAdded + " items when expected " + this.numItems + ".");
|
|
34442
|
+
}
|
|
34443
|
+
// kd-sort both arrays for efficient search
|
|
34444
|
+
sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);
|
|
34445
|
+
this._finished = true;
|
|
34446
|
+
return this;
|
|
34447
|
+
}
|
|
34448
|
+
|
|
34449
|
+
/**
|
|
34450
|
+
* Search the index for items within a given bounding box.
|
|
34451
|
+
* @param {number} minX
|
|
34452
|
+
* @param {number} minY
|
|
34453
|
+
* @param {number} maxX
|
|
34454
|
+
* @param {number} maxY
|
|
34455
|
+
* @returns {number[]} An array of indices correponding to the found items.
|
|
34456
|
+
*/;
|
|
34457
|
+
_proto.range = function range(minX, minY, maxX, maxY) {
|
|
34458
|
+
if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');
|
|
34459
|
+
var ids = this.ids,
|
|
34460
|
+
coords = this.coords,
|
|
34461
|
+
nodeSize = this.nodeSize;
|
|
34462
|
+
var stack = [0, ids.length - 1, 0];
|
|
34463
|
+
var result = [];
|
|
34464
|
+
|
|
34465
|
+
// recursively search for items in range in the kd-sorted arrays
|
|
34466
|
+
while (stack.length) {
|
|
34467
|
+
var axis = stack.pop() || 0;
|
|
34468
|
+
var right = stack.pop() || 0;
|
|
34469
|
+
var left = stack.pop() || 0;
|
|
34470
|
+
|
|
34471
|
+
// if we reached "tree node", search linearly
|
|
34472
|
+
if (right - left <= nodeSize) {
|
|
34473
|
+
for (var i = left; i <= right; i++) {
|
|
34474
|
+
var _x = coords[2 * i];
|
|
34475
|
+
var _y = coords[2 * i + 1];
|
|
34476
|
+
if (_x >= minX && _x <= maxX && _y >= minY && _y <= maxY) result.push(ids[i]);
|
|
34477
|
+
}
|
|
34478
|
+
continue;
|
|
34479
|
+
}
|
|
34480
|
+
|
|
34481
|
+
// otherwise find the middle index
|
|
34482
|
+
var m = left + right >> 1;
|
|
34483
|
+
|
|
34484
|
+
// include the middle item if it's in range
|
|
34485
|
+
var x = coords[2 * m];
|
|
34486
|
+
var y = coords[2 * m + 1];
|
|
34487
|
+
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);
|
|
34488
|
+
|
|
34489
|
+
// queue search in halves that intersect the query
|
|
34490
|
+
if (axis === 0 ? minX <= x : minY <= y) {
|
|
34491
|
+
stack.push(left);
|
|
34492
|
+
stack.push(m - 1);
|
|
34493
|
+
stack.push(1 - axis);
|
|
34494
|
+
}
|
|
34495
|
+
if (axis === 0 ? maxX >= x : maxY >= y) {
|
|
34496
|
+
stack.push(m + 1);
|
|
34497
|
+
stack.push(right);
|
|
34498
|
+
stack.push(1 - axis);
|
|
34499
|
+
}
|
|
34500
|
+
}
|
|
34501
|
+
return result;
|
|
34502
|
+
}
|
|
34503
|
+
|
|
34504
|
+
/**
|
|
34505
|
+
* Search the index for items within a given radius.
|
|
34506
|
+
* @param {number} qx
|
|
34507
|
+
* @param {number} qy
|
|
34508
|
+
* @param {number} r Query radius.
|
|
34509
|
+
* @returns {number[]} An array of indices correponding to the found items.
|
|
34510
|
+
*/;
|
|
34511
|
+
_proto.within = function within(qx, qy, r) {
|
|
34512
|
+
if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');
|
|
34513
|
+
var ids = this.ids,
|
|
34514
|
+
coords = this.coords,
|
|
34515
|
+
nodeSize = this.nodeSize;
|
|
34516
|
+
var stack = [0, ids.length - 1, 0];
|
|
34517
|
+
var result = [];
|
|
34518
|
+
var r2 = r * r;
|
|
34519
|
+
|
|
34520
|
+
// recursively search for items within radius in the kd-sorted arrays
|
|
34521
|
+
while (stack.length) {
|
|
34522
|
+
var axis = stack.pop() || 0;
|
|
34523
|
+
var right = stack.pop() || 0;
|
|
34524
|
+
var left = stack.pop() || 0;
|
|
34525
|
+
|
|
34526
|
+
// if we reached "tree node", search linearly
|
|
34527
|
+
if (right - left <= nodeSize) {
|
|
34528
|
+
for (var i = left; i <= right; i++) {
|
|
34529
|
+
if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);
|
|
34530
|
+
}
|
|
34531
|
+
continue;
|
|
34532
|
+
}
|
|
34533
|
+
|
|
34534
|
+
// otherwise find the middle index
|
|
34535
|
+
var m = left + right >> 1;
|
|
34536
|
+
|
|
34537
|
+
// include the middle item if it's in range
|
|
34538
|
+
var x = coords[2 * m];
|
|
34539
|
+
var y = coords[2 * m + 1];
|
|
34540
|
+
if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);
|
|
34541
|
+
|
|
34542
|
+
// queue search in halves that intersect the query
|
|
34543
|
+
if (axis === 0 ? qx - r <= x : qy - r <= y) {
|
|
34544
|
+
stack.push(left);
|
|
34545
|
+
stack.push(m - 1);
|
|
34546
|
+
stack.push(1 - axis);
|
|
34547
|
+
}
|
|
34548
|
+
if (axis === 0 ? qx + r >= x : qy + r >= y) {
|
|
34549
|
+
stack.push(m + 1);
|
|
34550
|
+
stack.push(right);
|
|
34551
|
+
stack.push(1 - axis);
|
|
34552
|
+
}
|
|
34553
|
+
}
|
|
34554
|
+
return result;
|
|
34555
|
+
};
|
|
34556
|
+
return KDBush;
|
|
34557
|
+
}();
|
|
34558
|
+
function sort(ids, coords, nodeSize, left, right, axis) {
|
|
34292
34559
|
if (right - left <= nodeSize) return;
|
|
34293
|
-
var m = left + right >> 1;
|
|
34294
|
-
|
|
34295
|
-
|
|
34296
|
-
|
|
34560
|
+
var m = left + right >> 1; // middle index
|
|
34561
|
+
|
|
34562
|
+
// sort ids and coords around the middle index so that the halves lie
|
|
34563
|
+
// either left/right or top/bottom correspondingly (taking turns)
|
|
34564
|
+
select(ids, coords, m, left, right, axis);
|
|
34565
|
+
|
|
34566
|
+
// recursively kd-sort first half and second half on the opposite axis
|
|
34567
|
+
sort(ids, coords, nodeSize, left, m - 1, 1 - axis);
|
|
34568
|
+
sort(ids, coords, nodeSize, m + 1, right, 1 - axis);
|
|
34297
34569
|
}
|
|
34298
|
-
|
|
34570
|
+
|
|
34571
|
+
/**
|
|
34572
|
+
* Custom Floyd-Rivest selection algorithm: sort ids and coords so that
|
|
34573
|
+
* [left..k-1] items are smaller than k-th item (on either x or y axis)
|
|
34574
|
+
* @param {Uint16Array | Uint32Array} ids
|
|
34575
|
+
* @param {InstanceType<TypedArrayConstructor>} coords
|
|
34576
|
+
* @param {number} k
|
|
34577
|
+
* @param {number} left
|
|
34578
|
+
* @param {number} right
|
|
34579
|
+
* @param {number} axis
|
|
34580
|
+
*/
|
|
34581
|
+
function select(ids, coords, k, left, right, axis) {
|
|
34299
34582
|
while (right > left) {
|
|
34300
34583
|
if (right - left > 600) {
|
|
34301
34584
|
var n = right - left + 1;
|
|
@@ -34305,21 +34588,21 @@
|
|
|
34305
34588
|
var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
|
|
34306
34589
|
var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
|
|
34307
34590
|
var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
|
|
34308
|
-
select(ids, coords, k, newLeft, newRight,
|
|
34591
|
+
select(ids, coords, k, newLeft, newRight, axis);
|
|
34309
34592
|
}
|
|
34310
|
-
var t = coords[2 * k +
|
|
34593
|
+
var t = coords[2 * k + axis];
|
|
34311
34594
|
var i = left;
|
|
34312
34595
|
var j = right;
|
|
34313
34596
|
swapItem(ids, coords, left, k);
|
|
34314
|
-
if (coords[2 * right +
|
|
34597
|
+
if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);
|
|
34315
34598
|
while (i < j) {
|
|
34316
34599
|
swapItem(ids, coords, i, j);
|
|
34317
34600
|
i++;
|
|
34318
34601
|
j--;
|
|
34319
|
-
while (coords[2 * i +
|
|
34320
|
-
while (coords[2 * j +
|
|
34602
|
+
while (coords[2 * i + axis] < t) i++;
|
|
34603
|
+
while (coords[2 * j + axis] > t) j--;
|
|
34321
34604
|
}
|
|
34322
|
-
if (coords[2 * left +
|
|
34605
|
+
if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);else {
|
|
34323
34606
|
j++;
|
|
34324
34607
|
swapItem(ids, coords, j, right);
|
|
34325
34608
|
}
|
|
@@ -34327,132 +34610,42 @@
|
|
|
34327
34610
|
if (k <= j) right = j - 1;
|
|
34328
34611
|
}
|
|
34329
34612
|
}
|
|
34613
|
+
|
|
34614
|
+
/**
|
|
34615
|
+
* @param {Uint16Array | Uint32Array} ids
|
|
34616
|
+
* @param {InstanceType<TypedArrayConstructor>} coords
|
|
34617
|
+
* @param {number} i
|
|
34618
|
+
* @param {number} j
|
|
34619
|
+
*/
|
|
34330
34620
|
function swapItem(ids, coords, i, j) {
|
|
34331
34621
|
swap(ids, i, j);
|
|
34332
34622
|
swap(coords, 2 * i, 2 * j);
|
|
34333
34623
|
swap(coords, 2 * i + 1, 2 * j + 1);
|
|
34334
34624
|
}
|
|
34625
|
+
|
|
34626
|
+
/**
|
|
34627
|
+
* @param {InstanceType<TypedArrayConstructor>} arr
|
|
34628
|
+
* @param {number} i
|
|
34629
|
+
* @param {number} j
|
|
34630
|
+
*/
|
|
34335
34631
|
function swap(arr, i, j) {
|
|
34336
34632
|
var tmp = arr[i];
|
|
34337
34633
|
arr[i] = arr[j];
|
|
34338
34634
|
arr[j] = tmp;
|
|
34339
34635
|
}
|
|
34340
34636
|
|
|
34341
|
-
|
|
34342
|
-
|
|
34343
|
-
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
var right = stack.pop();
|
|
34348
|
-
var left = stack.pop();
|
|
34349
|
-
if (right - left <= nodeSize) {
|
|
34350
|
-
for (var i = left; i <= right; i++) {
|
|
34351
|
-
x = coords[2 * i];
|
|
34352
|
-
y = coords[2 * i + 1];
|
|
34353
|
-
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);
|
|
34354
|
-
}
|
|
34355
|
-
continue;
|
|
34356
|
-
}
|
|
34357
|
-
var m = Math.floor((left + right) / 2);
|
|
34358
|
-
x = coords[2 * m];
|
|
34359
|
-
y = coords[2 * m + 1];
|
|
34360
|
-
if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);
|
|
34361
|
-
var nextAxis = (axis + 1) % 2;
|
|
34362
|
-
if (axis === 0 ? minX <= x : minY <= y) {
|
|
34363
|
-
stack.push(left);
|
|
34364
|
-
stack.push(m - 1);
|
|
34365
|
-
stack.push(nextAxis);
|
|
34366
|
-
}
|
|
34367
|
-
if (axis === 0 ? maxX >= x : maxY >= y) {
|
|
34368
|
-
stack.push(m + 1);
|
|
34369
|
-
stack.push(right);
|
|
34370
|
-
stack.push(nextAxis);
|
|
34371
|
-
}
|
|
34372
|
-
}
|
|
34373
|
-
return result;
|
|
34374
|
-
}
|
|
34375
|
-
|
|
34376
|
-
function within(ids, coords, qx, qy, r, nodeSize) {
|
|
34377
|
-
var stack = [0, ids.length - 1, 0];
|
|
34378
|
-
var result = [];
|
|
34379
|
-
var r2 = r * r;
|
|
34380
|
-
while (stack.length) {
|
|
34381
|
-
var axis = stack.pop();
|
|
34382
|
-
var right = stack.pop();
|
|
34383
|
-
var left = stack.pop();
|
|
34384
|
-
if (right - left <= nodeSize) {
|
|
34385
|
-
for (var i = left; i <= right; i++) {
|
|
34386
|
-
if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);
|
|
34387
|
-
}
|
|
34388
|
-
continue;
|
|
34389
|
-
}
|
|
34390
|
-
var m = Math.floor((left + right) / 2);
|
|
34391
|
-
var x = coords[2 * m];
|
|
34392
|
-
var y = coords[2 * m + 1];
|
|
34393
|
-
if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);
|
|
34394
|
-
var nextAxis = (axis + 1) % 2;
|
|
34395
|
-
if (axis === 0 ? qx - r <= x : qy - r <= y) {
|
|
34396
|
-
stack.push(left);
|
|
34397
|
-
stack.push(m - 1);
|
|
34398
|
-
stack.push(nextAxis);
|
|
34399
|
-
}
|
|
34400
|
-
if (axis === 0 ? qx + r >= x : qy + r >= y) {
|
|
34401
|
-
stack.push(m + 1);
|
|
34402
|
-
stack.push(right);
|
|
34403
|
-
stack.push(nextAxis);
|
|
34404
|
-
}
|
|
34405
|
-
}
|
|
34406
|
-
return result;
|
|
34407
|
-
}
|
|
34637
|
+
/**
|
|
34638
|
+
* @param {number} ax
|
|
34639
|
+
* @param {number} ay
|
|
34640
|
+
* @param {number} bx
|
|
34641
|
+
* @param {number} by
|
|
34642
|
+
*/
|
|
34408
34643
|
function sqDist(ax, ay, bx, by) {
|
|
34409
34644
|
var dx = ax - bx;
|
|
34410
34645
|
var dy = ay - by;
|
|
34411
34646
|
return dx * dx + dy * dy;
|
|
34412
34647
|
}
|
|
34413
34648
|
|
|
34414
|
-
var defaultGetX = function defaultGetX(p) {
|
|
34415
|
-
return p[0];
|
|
34416
|
-
};
|
|
34417
|
-
var defaultGetY = function defaultGetY(p) {
|
|
34418
|
-
return p[1];
|
|
34419
|
-
};
|
|
34420
|
-
var KDBush = /*#__PURE__*/function () {
|
|
34421
|
-
function KDBush(points, getX, getY, nodeSize, ArrayType) {
|
|
34422
|
-
if (getX === void 0) {
|
|
34423
|
-
getX = defaultGetX;
|
|
34424
|
-
}
|
|
34425
|
-
if (getY === void 0) {
|
|
34426
|
-
getY = defaultGetY;
|
|
34427
|
-
}
|
|
34428
|
-
if (nodeSize === void 0) {
|
|
34429
|
-
nodeSize = 64;
|
|
34430
|
-
}
|
|
34431
|
-
if (ArrayType === void 0) {
|
|
34432
|
-
ArrayType = Float64Array;
|
|
34433
|
-
}
|
|
34434
|
-
this.nodeSize = nodeSize;
|
|
34435
|
-
this.points = points;
|
|
34436
|
-
var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array;
|
|
34437
|
-
var ids = this.ids = new IndexArrayType(points.length);
|
|
34438
|
-
var coords = this.coords = new ArrayType(points.length * 2);
|
|
34439
|
-
for (var i = 0; i < points.length; i++) {
|
|
34440
|
-
ids[i] = i;
|
|
34441
|
-
coords[2 * i] = getX(points[i]);
|
|
34442
|
-
coords[2 * i + 1] = getY(points[i]);
|
|
34443
|
-
}
|
|
34444
|
-
sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0);
|
|
34445
|
-
}
|
|
34446
|
-
var _proto = KDBush.prototype;
|
|
34447
|
-
_proto.range = function range$1(minX, minY, maxX, maxY) {
|
|
34448
|
-
return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);
|
|
34449
|
-
};
|
|
34450
|
-
_proto.within = function within$1(x, y, r) {
|
|
34451
|
-
return within(this.ids, this.coords, x, y, r, this.nodeSize);
|
|
34452
|
-
};
|
|
34453
|
-
return KDBush;
|
|
34454
|
-
}();
|
|
34455
|
-
|
|
34456
34649
|
var defaultOptions = {
|
|
34457
34650
|
minZoom: 0,
|
|
34458
34651
|
// min zoom to generate clusters on
|
|
@@ -34487,30 +34680,55 @@
|
|
|
34487
34680
|
return tmp[0];
|
|
34488
34681
|
};
|
|
34489
34682
|
}(new Float32Array(1));
|
|
34683
|
+
var OFFSET_ZOOM = 2;
|
|
34684
|
+
var OFFSET_ID = 3;
|
|
34685
|
+
var OFFSET_PARENT = 4;
|
|
34686
|
+
var OFFSET_NUM = 5;
|
|
34687
|
+
var OFFSET_PROP = 6;
|
|
34490
34688
|
var Supercluster = /*#__PURE__*/function () {
|
|
34491
34689
|
function Supercluster(options) {
|
|
34492
|
-
this.options =
|
|
34690
|
+
this.options = Object.assign(Object.create(defaultOptions), options);
|
|
34493
34691
|
this.trees = new Array(this.options.maxZoom + 1);
|
|
34692
|
+
this.stride = this.options.reduce ? 7 : 6;
|
|
34693
|
+
this.clusterProps = [];
|
|
34494
34694
|
}
|
|
34495
34695
|
var _proto = Supercluster.prototype;
|
|
34496
34696
|
_proto.load = function load(points) {
|
|
34497
34697
|
var _this$options = this.options,
|
|
34498
34698
|
log = _this$options.log,
|
|
34499
34699
|
minZoom = _this$options.minZoom,
|
|
34500
|
-
maxZoom = _this$options.maxZoom
|
|
34501
|
-
nodeSize = _this$options.nodeSize;
|
|
34700
|
+
maxZoom = _this$options.maxZoom;
|
|
34502
34701
|
if (log) console.time('total time');
|
|
34503
34702
|
var timerId = "prepare " + points.length + " points";
|
|
34504
34703
|
if (log) console.time(timerId);
|
|
34505
34704
|
this.points = points;
|
|
34506
34705
|
|
|
34507
34706
|
// generate a cluster object for each point and index input points into a KD-tree
|
|
34508
|
-
var
|
|
34707
|
+
var data = [];
|
|
34509
34708
|
for (var i = 0; i < points.length; i++) {
|
|
34510
|
-
|
|
34511
|
-
|
|
34709
|
+
var p = points[i];
|
|
34710
|
+
if (!p.geometry) continue;
|
|
34711
|
+
var _p$geometry$coordinat = p.geometry.coordinates,
|
|
34712
|
+
lng = _p$geometry$coordinat[0],
|
|
34713
|
+
lat = _p$geometry$coordinat[1];
|
|
34714
|
+
var x = fround(lngX(lng));
|
|
34715
|
+
var y = fround(latY(lat));
|
|
34716
|
+
// store internal point/cluster data in flat numeric arrays for performance
|
|
34717
|
+
data.push(x, y,
|
|
34718
|
+
// projected point coordinates
|
|
34719
|
+
Infinity,
|
|
34720
|
+
// the last zoom the point was processed at
|
|
34721
|
+
i,
|
|
34722
|
+
// index of the source feature in the original input array
|
|
34723
|
+
-1,
|
|
34724
|
+
// parent cluster id
|
|
34725
|
+
1 // number of points in a cluster
|
|
34726
|
+
);
|
|
34727
|
+
|
|
34728
|
+
if (this.options.reduce) data.push(0); // noop
|
|
34512
34729
|
}
|
|
34513
|
-
|
|
34730
|
+
|
|
34731
|
+
var tree = this.trees[maxZoom + 1] = this._createTree(data);
|
|
34514
34732
|
if (log) console.timeEnd(timerId);
|
|
34515
34733
|
|
|
34516
34734
|
// cluster points on max zoom, then cluster the results on previous zoom, etc.;
|
|
@@ -34519,9 +34737,8 @@
|
|
|
34519
34737
|
var now = +Date.now();
|
|
34520
34738
|
|
|
34521
34739
|
// create a new set of clusters for the zoom and index them with a KD-tree
|
|
34522
|
-
|
|
34523
|
-
|
|
34524
|
-
if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);
|
|
34740
|
+
tree = this.trees[z] = this._createTree(this._cluster(tree, z));
|
|
34741
|
+
if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);
|
|
34525
34742
|
}
|
|
34526
34743
|
if (log) console.timeEnd('total time');
|
|
34527
34744
|
return this;
|
|
@@ -34541,11 +34758,12 @@
|
|
|
34541
34758
|
}
|
|
34542
34759
|
var tree = this.trees[this._limitZoom(zoom)];
|
|
34543
34760
|
var ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));
|
|
34761
|
+
var data = tree.data;
|
|
34544
34762
|
var clusters = [];
|
|
34545
34763
|
for (var _iterator = _createForOfIteratorHelperLoose(ids), _step; !(_step = _iterator()).done;) {
|
|
34546
34764
|
var id = _step.value;
|
|
34547
|
-
var
|
|
34548
|
-
clusters.push(
|
|
34765
|
+
var k = this.stride * id;
|
|
34766
|
+
clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);
|
|
34549
34767
|
}
|
|
34550
34768
|
return clusters;
|
|
34551
34769
|
};
|
|
@@ -34553,18 +34771,20 @@
|
|
|
34553
34771
|
var originId = this._getOriginId(clusterId);
|
|
34554
34772
|
var originZoom = this._getOriginZoom(clusterId);
|
|
34555
34773
|
var errorMsg = 'No cluster with the specified id.';
|
|
34556
|
-
var
|
|
34557
|
-
if (!
|
|
34558
|
-
var
|
|
34559
|
-
if (
|
|
34774
|
+
var tree = this.trees[originZoom];
|
|
34775
|
+
if (!tree) throw new Error(errorMsg);
|
|
34776
|
+
var data = tree.data;
|
|
34777
|
+
if (originId * this.stride >= data.length) throw new Error(errorMsg);
|
|
34560
34778
|
var r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));
|
|
34561
|
-
var
|
|
34779
|
+
var x = data[originId * this.stride];
|
|
34780
|
+
var y = data[originId * this.stride + 1];
|
|
34781
|
+
var ids = tree.within(x, y, r);
|
|
34562
34782
|
var children = [];
|
|
34563
34783
|
for (var _iterator2 = _createForOfIteratorHelperLoose(ids), _step2; !(_step2 = _iterator2()).done;) {
|
|
34564
34784
|
var id = _step2.value;
|
|
34565
|
-
var
|
|
34566
|
-
if (
|
|
34567
|
-
children.push(
|
|
34785
|
+
var k = id * this.stride;
|
|
34786
|
+
if (data[k + OFFSET_PARENT] === clusterId) {
|
|
34787
|
+
children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);
|
|
34568
34788
|
}
|
|
34569
34789
|
}
|
|
34570
34790
|
if (children.length === 0) throw new Error(errorMsg);
|
|
@@ -34589,12 +34809,12 @@
|
|
|
34589
34809
|
var tile = {
|
|
34590
34810
|
features: []
|
|
34591
34811
|
};
|
|
34592
|
-
this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.
|
|
34812
|
+
this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.data, x, y, z2, tile);
|
|
34593
34813
|
if (x === 0) {
|
|
34594
|
-
this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.
|
|
34814
|
+
this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.data, z2, y, z2, tile);
|
|
34595
34815
|
}
|
|
34596
34816
|
if (x === z2 - 1) {
|
|
34597
|
-
this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.
|
|
34817
|
+
this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.data, -1, y, z2, tile);
|
|
34598
34818
|
}
|
|
34599
34819
|
return tile.features.length ? tile : null;
|
|
34600
34820
|
};
|
|
@@ -34633,23 +34853,33 @@
|
|
|
34633
34853
|
}
|
|
34634
34854
|
return skipped;
|
|
34635
34855
|
};
|
|
34636
|
-
_proto.
|
|
34856
|
+
_proto._createTree = function _createTree(data) {
|
|
34857
|
+
var tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
|
34858
|
+
for (var i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);
|
|
34859
|
+
tree.finish();
|
|
34860
|
+
tree.data = data;
|
|
34861
|
+
return tree;
|
|
34862
|
+
};
|
|
34863
|
+
_proto._addTileFeatures = function _addTileFeatures(ids, data, x, y, z2, tile) {
|
|
34637
34864
|
for (var _iterator4 = _createForOfIteratorHelperLoose(ids), _step4; !(_step4 = _iterator4()).done;) {
|
|
34638
34865
|
var i = _step4.value;
|
|
34639
|
-
var
|
|
34640
|
-
var isCluster =
|
|
34866
|
+
var k = i * this.stride;
|
|
34867
|
+
var isCluster = data[k + OFFSET_NUM] > 1;
|
|
34641
34868
|
var tags = void 0,
|
|
34642
34869
|
px = void 0,
|
|
34643
34870
|
py = void 0;
|
|
34644
34871
|
if (isCluster) {
|
|
34645
|
-
tags = getClusterProperties(
|
|
34646
|
-
px =
|
|
34647
|
-
py =
|
|
34872
|
+
tags = getClusterProperties(data, k, this.clusterProps);
|
|
34873
|
+
px = data[k];
|
|
34874
|
+
py = data[k + 1];
|
|
34648
34875
|
} else {
|
|
34649
|
-
var p = this.points[
|
|
34876
|
+
var p = this.points[data[k + OFFSET_ID]];
|
|
34650
34877
|
tags = p.properties;
|
|
34651
|
-
|
|
34652
|
-
|
|
34878
|
+
var _p$geometry$coordinat2 = p.geometry.coordinates,
|
|
34879
|
+
lng = _p$geometry$coordinat2[0],
|
|
34880
|
+
lat = _p$geometry$coordinat2[1];
|
|
34881
|
+
px = lngX(lng);
|
|
34882
|
+
py = latY(lat);
|
|
34653
34883
|
}
|
|
34654
34884
|
var f = {
|
|
34655
34885
|
type: 1,
|
|
@@ -34659,14 +34889,12 @@
|
|
|
34659
34889
|
|
|
34660
34890
|
// assign id
|
|
34661
34891
|
var id = void 0;
|
|
34662
|
-
if (isCluster) {
|
|
34663
|
-
id
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
id = c.index;
|
|
34667
|
-
} else if (this.points[c.index].id) {
|
|
34892
|
+
if (isCluster || this.options.generateId) {
|
|
34893
|
+
// optionally generate id for points
|
|
34894
|
+
id = data[k + OFFSET_ID];
|
|
34895
|
+
} else {
|
|
34668
34896
|
// keep id if already assigned
|
|
34669
|
-
id = this.points[
|
|
34897
|
+
id = this.points[data[k + OFFSET_ID]].id;
|
|
34670
34898
|
}
|
|
34671
34899
|
if (id !== undefined) f.id = id;
|
|
34672
34900
|
tile.features.push(f);
|
|
@@ -34675,76 +34903,84 @@
|
|
|
34675
34903
|
_proto._limitZoom = function _limitZoom(z) {
|
|
34676
34904
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
|
|
34677
34905
|
};
|
|
34678
|
-
_proto._cluster = function _cluster(
|
|
34679
|
-
var clusters = [];
|
|
34906
|
+
_proto._cluster = function _cluster(tree, zoom) {
|
|
34680
34907
|
var _this$options3 = this.options,
|
|
34681
34908
|
radius = _this$options3.radius,
|
|
34682
34909
|
extent = _this$options3.extent,
|
|
34683
34910
|
reduce = _this$options3.reduce,
|
|
34684
34911
|
minPoints = _this$options3.minPoints;
|
|
34685
34912
|
var r = radius / (extent * Math.pow(2, zoom));
|
|
34913
|
+
var data = tree.data;
|
|
34914
|
+
var nextData = [];
|
|
34915
|
+
var stride = this.stride;
|
|
34686
34916
|
|
|
34687
34917
|
// loop through each point
|
|
34688
|
-
for (var i = 0; i <
|
|
34689
|
-
var p = points[i];
|
|
34918
|
+
for (var i = 0; i < data.length; i += stride) {
|
|
34690
34919
|
// if we've already visited the point at this zoom level, skip it
|
|
34691
|
-
if (
|
|
34692
|
-
|
|
34920
|
+
if (data[i + OFFSET_ZOOM] <= zoom) continue;
|
|
34921
|
+
data[i + OFFSET_ZOOM] = zoom;
|
|
34693
34922
|
|
|
34694
34923
|
// find all nearby points
|
|
34695
|
-
var
|
|
34696
|
-
var
|
|
34697
|
-
var
|
|
34924
|
+
var x = data[i];
|
|
34925
|
+
var y = data[i + 1];
|
|
34926
|
+
var neighborIds = tree.within(data[i], data[i + 1], r);
|
|
34927
|
+
var numPointsOrigin = data[i + OFFSET_NUM];
|
|
34698
34928
|
var numPoints = numPointsOrigin;
|
|
34699
34929
|
|
|
34700
34930
|
// count the number of points in a potential cluster
|
|
34701
34931
|
for (var _iterator5 = _createForOfIteratorHelperLoose(neighborIds), _step5; !(_step5 = _iterator5()).done;) {
|
|
34702
34932
|
var _neighborId2 = _step5.value;
|
|
34703
|
-
var
|
|
34933
|
+
var _k2 = _neighborId2 * stride;
|
|
34704
34934
|
// filter out neighbors that are already processed
|
|
34705
|
-
if (
|
|
34935
|
+
if (data[_k2 + OFFSET_ZOOM] > zoom) numPoints += data[_k2 + OFFSET_NUM];
|
|
34706
34936
|
}
|
|
34707
34937
|
|
|
34708
34938
|
// if there were neighbors to merge, and there are enough points to form a cluster
|
|
34709
34939
|
if (numPoints > numPointsOrigin && numPoints >= minPoints) {
|
|
34710
|
-
var wx =
|
|
34711
|
-
var wy =
|
|
34712
|
-
var clusterProperties =
|
|
34940
|
+
var wx = x * numPointsOrigin;
|
|
34941
|
+
var wy = y * numPointsOrigin;
|
|
34942
|
+
var clusterProperties = void 0;
|
|
34943
|
+
var clusterPropIndex = -1;
|
|
34713
34944
|
|
|
34714
34945
|
// encode both zoom and point index on which the cluster originated -- offset by total length of features
|
|
34715
|
-
var id = (i << 5) + (zoom + 1) + this.points.length;
|
|
34946
|
+
var id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;
|
|
34716
34947
|
for (var _iterator6 = _createForOfIteratorHelperLoose(neighborIds), _step6; !(_step6 = _iterator6()).done;) {
|
|
34717
34948
|
var neighborId = _step6.value;
|
|
34718
|
-
var
|
|
34719
|
-
if (
|
|
34720
|
-
|
|
34721
|
-
|
|
34722
|
-
var numPoints2 =
|
|
34723
|
-
wx +=
|
|
34724
|
-
wy +=
|
|
34725
|
-
|
|
34949
|
+
var k = neighborId * stride;
|
|
34950
|
+
if (data[k + OFFSET_ZOOM] <= zoom) continue;
|
|
34951
|
+
data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)
|
|
34952
|
+
|
|
34953
|
+
var numPoints2 = data[k + OFFSET_NUM];
|
|
34954
|
+
wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center
|
|
34955
|
+
wy += data[k + 1] * numPoints2;
|
|
34956
|
+
data[k + OFFSET_PARENT] = id;
|
|
34726
34957
|
if (reduce) {
|
|
34727
|
-
if (!clusterProperties)
|
|
34728
|
-
|
|
34958
|
+
if (!clusterProperties) {
|
|
34959
|
+
clusterProperties = this._map(data, i, true);
|
|
34960
|
+
clusterPropIndex = this.clusterProps.length;
|
|
34961
|
+
this.clusterProps.push(clusterProperties);
|
|
34962
|
+
}
|
|
34963
|
+
reduce(clusterProperties, this._map(data, k));
|
|
34729
34964
|
}
|
|
34730
34965
|
}
|
|
34731
|
-
|
|
34732
|
-
|
|
34966
|
+
data[i + OFFSET_PARENT] = id;
|
|
34967
|
+
nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);
|
|
34968
|
+
if (reduce) nextData.push(clusterPropIndex);
|
|
34733
34969
|
} else {
|
|
34734
34970
|
// left points as unclustered
|
|
34735
|
-
|
|
34971
|
+
for (var j = 0; j < stride; j++) nextData.push(data[i + j]);
|
|
34736
34972
|
if (numPoints > 1) {
|
|
34737
34973
|
for (var _iterator7 = _createForOfIteratorHelperLoose(neighborIds), _step7; !(_step7 = _iterator7()).done;) {
|
|
34738
34974
|
var _neighborId = _step7.value;
|
|
34739
|
-
var
|
|
34740
|
-
if (
|
|
34741
|
-
|
|
34742
|
-
|
|
34975
|
+
var _k = _neighborId * stride;
|
|
34976
|
+
if (data[_k + OFFSET_ZOOM] <= zoom) continue;
|
|
34977
|
+
data[_k + OFFSET_ZOOM] = zoom;
|
|
34978
|
+
for (var _j = 0; _j < stride; _j++) nextData.push(data[_k + _j]);
|
|
34743
34979
|
}
|
|
34744
34980
|
}
|
|
34745
34981
|
}
|
|
34746
34982
|
}
|
|
34747
|
-
return
|
|
34983
|
+
return nextData;
|
|
34748
34984
|
}
|
|
34749
34985
|
|
|
34750
34986
|
// get index of the point from which the cluster originated
|
|
@@ -34758,64 +34994,36 @@
|
|
|
34758
34994
|
_proto._getOriginZoom = function _getOriginZoom(clusterId) {
|
|
34759
34995
|
return (clusterId - this.points.length) % 32;
|
|
34760
34996
|
};
|
|
34761
|
-
_proto._map = function _map(
|
|
34762
|
-
if (
|
|
34763
|
-
|
|
34997
|
+
_proto._map = function _map(data, i, clone) {
|
|
34998
|
+
if (data[i + OFFSET_NUM] > 1) {
|
|
34999
|
+
var props = this.clusterProps[data[i + OFFSET_PROP]];
|
|
35000
|
+
return clone ? Object.assign({}, props) : props;
|
|
34764
35001
|
}
|
|
34765
|
-
var original = this.points[
|
|
35002
|
+
var original = this.points[data[i + OFFSET_ID]].properties;
|
|
34766
35003
|
var result = this.options.map(original);
|
|
34767
|
-
return clone && result === original ?
|
|
35004
|
+
return clone && result === original ? Object.assign({}, result) : result;
|
|
34768
35005
|
};
|
|
34769
35006
|
return Supercluster;
|
|
34770
35007
|
}();
|
|
34771
|
-
function
|
|
34772
|
-
return {
|
|
34773
|
-
x: fround(x),
|
|
34774
|
-
// weighted cluster center; round for consistency with Float32Array index
|
|
34775
|
-
y: fround(y),
|
|
34776
|
-
zoom: Infinity,
|
|
34777
|
-
// the last zoom the cluster was processed at
|
|
34778
|
-
id: id,
|
|
34779
|
-
// encodes index of the first child of the cluster and its zoom level
|
|
34780
|
-
parentId: -1,
|
|
34781
|
-
// parent cluster id
|
|
34782
|
-
numPoints: numPoints,
|
|
34783
|
-
properties: properties
|
|
34784
|
-
};
|
|
34785
|
-
}
|
|
34786
|
-
function createPointCluster(p, id) {
|
|
34787
|
-
var _p$geometry$coordinat = p.geometry.coordinates,
|
|
34788
|
-
x = _p$geometry$coordinat[0],
|
|
34789
|
-
y = _p$geometry$coordinat[1];
|
|
34790
|
-
return {
|
|
34791
|
-
x: fround(lngX(x)),
|
|
34792
|
-
// projected point coordinates
|
|
34793
|
-
y: fround(latY(y)),
|
|
34794
|
-
zoom: Infinity,
|
|
34795
|
-
// the last zoom the point was processed at
|
|
34796
|
-
index: id,
|
|
34797
|
-
// index of the source feature in the original input array,
|
|
34798
|
-
parentId: -1 // parent cluster id
|
|
34799
|
-
};
|
|
34800
|
-
}
|
|
34801
|
-
|
|
34802
|
-
function getClusterJSON(cluster) {
|
|
35008
|
+
function getClusterJSON(data, i, clusterProps) {
|
|
34803
35009
|
return {
|
|
34804
35010
|
type: 'Feature',
|
|
34805
|
-
id:
|
|
34806
|
-
properties: getClusterProperties(
|
|
35011
|
+
id: data[i + OFFSET_ID],
|
|
35012
|
+
properties: getClusterProperties(data, i, clusterProps),
|
|
34807
35013
|
geometry: {
|
|
34808
35014
|
type: 'Point',
|
|
34809
|
-
coordinates: [xLng(
|
|
35015
|
+
coordinates: [xLng(data[i]), yLat(data[i + 1])]
|
|
34810
35016
|
}
|
|
34811
35017
|
};
|
|
34812
35018
|
}
|
|
34813
|
-
function getClusterProperties(
|
|
34814
|
-
var count =
|
|
35019
|
+
function getClusterProperties(data, i, clusterProps) {
|
|
35020
|
+
var count = data[i + OFFSET_NUM];
|
|
34815
35021
|
var abbrev = count >= 10000 ? Math.round(count / 1000) + "k" : count >= 1000 ? Math.round(count / 100) / 10 + "k" : count;
|
|
34816
|
-
|
|
35022
|
+
var propIndex = data[i + OFFSET_PROP];
|
|
35023
|
+
var properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);
|
|
35024
|
+
return Object.assign(properties, {
|
|
34817
35025
|
cluster: true,
|
|
34818
|
-
cluster_id:
|
|
35026
|
+
cluster_id: data[i + OFFSET_ID],
|
|
34819
35027
|
point_count: count,
|
|
34820
35028
|
point_count_abbreviated: abbrev
|
|
34821
35029
|
});
|
|
@@ -34839,16 +35047,6 @@
|
|
|
34839
35047
|
var y2 = (180 - y * 360) * Math.PI / 180;
|
|
34840
35048
|
return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;
|
|
34841
35049
|
}
|
|
34842
|
-
function extend(dest, src) {
|
|
34843
|
-
for (var id in src) dest[id] = src[id];
|
|
34844
|
-
return dest;
|
|
34845
|
-
}
|
|
34846
|
-
function getX(p) {
|
|
34847
|
-
return p.x;
|
|
34848
|
-
}
|
|
34849
|
-
function getY(p) {
|
|
34850
|
-
return p.y;
|
|
34851
|
-
}
|
|
34852
35050
|
|
|
34853
35051
|
/*! *****************************************************************************
|
|
34854
35052
|
Copyright (c) Microsoft Corporation.
|
|
@@ -34874,6 +35072,64 @@
|
|
|
34874
35072
|
return t;
|
|
34875
35073
|
}
|
|
34876
35074
|
|
|
35075
|
+
/**
|
|
35076
|
+
* Copyright 2023 Google LLC
|
|
35077
|
+
*
|
|
35078
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
35079
|
+
* you may not use this file except in compliance with the License.
|
|
35080
|
+
* You may obtain a copy of the License at
|
|
35081
|
+
*
|
|
35082
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35083
|
+
*
|
|
35084
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
35085
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
35086
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
35087
|
+
* See the License for the specific language governing permissions and
|
|
35088
|
+
* limitations under the License.
|
|
35089
|
+
*/
|
|
35090
|
+
var MarkerUtils = /*#__PURE__*/function () {
|
|
35091
|
+
function MarkerUtils() {}
|
|
35092
|
+
MarkerUtils.isAdvancedMarker = function isAdvancedMarker(marker) {
|
|
35093
|
+
return google.maps.marker && marker instanceof google.maps.marker.AdvancedMarkerElement;
|
|
35094
|
+
};
|
|
35095
|
+
MarkerUtils.setMap = function setMap(marker, map) {
|
|
35096
|
+
if (this.isAdvancedMarker(marker)) {
|
|
35097
|
+
marker.map = map;
|
|
35098
|
+
} else {
|
|
35099
|
+
marker.setMap(map);
|
|
35100
|
+
}
|
|
35101
|
+
};
|
|
35102
|
+
MarkerUtils.getPosition = function getPosition(marker) {
|
|
35103
|
+
// SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers
|
|
35104
|
+
if (this.isAdvancedMarker(marker)) {
|
|
35105
|
+
if (marker.position) {
|
|
35106
|
+
if (marker.position instanceof google.maps.LatLng) {
|
|
35107
|
+
return marker.position;
|
|
35108
|
+
}
|
|
35109
|
+
// since we can't cast to LatLngLiteral for reasons =(
|
|
35110
|
+
if (marker.position.lat && marker.position.lng) {
|
|
35111
|
+
return new google.maps.LatLng(marker.position.lat, marker.position.lng);
|
|
35112
|
+
}
|
|
35113
|
+
}
|
|
35114
|
+
return new google.maps.LatLng(null);
|
|
35115
|
+
}
|
|
35116
|
+
return marker.getPosition();
|
|
35117
|
+
};
|
|
35118
|
+
MarkerUtils.getVisible = function getVisible(marker) {
|
|
35119
|
+
if (this.isAdvancedMarker(marker)) {
|
|
35120
|
+
/**
|
|
35121
|
+
* Always return true for Advanced Markers because the clusterer
|
|
35122
|
+
* uses getVisible as a way to count legacy markers not as an actual
|
|
35123
|
+
* indicator of visibility for some reason. Even when markers are hidden
|
|
35124
|
+
* Marker.getVisible returns `true` and this is used to set the marker count
|
|
35125
|
+
* on the cluster. See the behavior of Cluster.count
|
|
35126
|
+
*/
|
|
35127
|
+
return true;
|
|
35128
|
+
}
|
|
35129
|
+
return marker.getVisible();
|
|
35130
|
+
};
|
|
35131
|
+
return MarkerUtils;
|
|
35132
|
+
}();
|
|
34877
35133
|
/**
|
|
34878
35134
|
* Copyright 2021 Google LLC
|
|
34879
35135
|
*
|
|
@@ -34914,8 +35170,8 @@
|
|
|
34914
35170
|
*/;
|
|
34915
35171
|
_proto["delete"] = function _delete() {
|
|
34916
35172
|
if (this.marker) {
|
|
34917
|
-
this.marker
|
|
34918
|
-
|
|
35173
|
+
MarkerUtils.setMap(this.marker, null);
|
|
35174
|
+
this.marker = undefined;
|
|
34919
35175
|
}
|
|
34920
35176
|
this.markers.length = 0;
|
|
34921
35177
|
};
|
|
@@ -34923,11 +35179,14 @@
|
|
|
34923
35179
|
key: "bounds",
|
|
34924
35180
|
get: function get() {
|
|
34925
35181
|
if (this.markers.length === 0 && !this._position) {
|
|
34926
|
-
return
|
|
35182
|
+
return;
|
|
34927
35183
|
}
|
|
34928
|
-
|
|
34929
|
-
|
|
34930
|
-
|
|
35184
|
+
var bounds = new google.maps.LatLngBounds(this._position, this._position);
|
|
35185
|
+
for (var _iterator = _createForOfIteratorHelperLoose(this.markers), _step; !(_step = _iterator()).done;) {
|
|
35186
|
+
var marker = _step.value;
|
|
35187
|
+
bounds.extend(MarkerUtils.getPosition(marker));
|
|
35188
|
+
}
|
|
35189
|
+
return bounds;
|
|
34931
35190
|
}
|
|
34932
35191
|
}, {
|
|
34933
35192
|
key: "position",
|
|
@@ -34941,7 +35200,7 @@
|
|
|
34941
35200
|
key: "count",
|
|
34942
35201
|
get: function get() {
|
|
34943
35202
|
return this.markers.filter(function (m) {
|
|
34944
|
-
return
|
|
35203
|
+
return MarkerUtils.getVisible(m);
|
|
34945
35204
|
}).length;
|
|
34946
35205
|
}
|
|
34947
35206
|
}]);
|
|
@@ -34979,7 +35238,7 @@
|
|
|
34979
35238
|
* ```typescript
|
|
34980
35239
|
* cluster({markers, map}: AlgorithmInput): Cluster[] {
|
|
34981
35240
|
* if (shouldBypassClustering(map)) {
|
|
34982
|
-
* return this.noop({markers
|
|
35241
|
+
* return this.noop({markers})
|
|
34983
35242
|
* }
|
|
34984
35243
|
* }
|
|
34985
35244
|
* ```
|
|
@@ -34997,7 +35256,7 @@
|
|
|
34997
35256
|
var _noop = function _noop(markers) {
|
|
34998
35257
|
var clusters = markers.map(function (marker) {
|
|
34999
35258
|
return new Cluster({
|
|
35000
|
-
position:
|
|
35259
|
+
position: MarkerUtils.getPosition(marker),
|
|
35001
35260
|
markers: [marker]
|
|
35002
35261
|
});
|
|
35003
35262
|
});
|
|
@@ -35046,16 +35305,21 @@
|
|
|
35046
35305
|
var _proto6 = SuperClusterAlgorithm.prototype;
|
|
35047
35306
|
_proto6.calculate = function calculate(input) {
|
|
35048
35307
|
var changed = false;
|
|
35308
|
+
var state = {
|
|
35309
|
+
zoom: input.map.getZoom()
|
|
35310
|
+
};
|
|
35049
35311
|
if (!fastDeepEqual(input.markers, this.markers)) {
|
|
35050
35312
|
changed = true;
|
|
35051
35313
|
// TODO use proxy to avoid copy?
|
|
35052
35314
|
this.markers = [].concat(input.markers);
|
|
35053
35315
|
var points = this.markers.map(function (marker) {
|
|
35316
|
+
var position = MarkerUtils.getPosition(marker);
|
|
35317
|
+
var coordinates = [position.lng(), position.lat()];
|
|
35054
35318
|
return {
|
|
35055
35319
|
type: "Feature",
|
|
35056
35320
|
geometry: {
|
|
35057
35321
|
type: "Point",
|
|
35058
|
-
coordinates:
|
|
35322
|
+
coordinates: coordinates
|
|
35059
35323
|
},
|
|
35060
35324
|
properties: {
|
|
35061
35325
|
marker: marker
|
|
@@ -35064,12 +35328,9 @@
|
|
|
35064
35328
|
});
|
|
35065
35329
|
this.superCluster.load(points);
|
|
35066
35330
|
}
|
|
35067
|
-
var state = {
|
|
35068
|
-
zoom: input.map.getZoom()
|
|
35069
|
-
};
|
|
35070
35331
|
if (!changed) {
|
|
35071
|
-
if (this.state.zoom
|
|
35072
|
-
changed =
|
|
35332
|
+
if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) {
|
|
35333
|
+
changed = !fastDeepEqual(this.state, state);
|
|
35073
35334
|
}
|
|
35074
35335
|
}
|
|
35075
35336
|
this.state = state;
|
|
@@ -35082,8 +35343,11 @@
|
|
|
35082
35343
|
};
|
|
35083
35344
|
};
|
|
35084
35345
|
_proto6.cluster = function cluster(_ref10) {
|
|
35346
|
+
var _this5 = this;
|
|
35085
35347
|
var map = _ref10.map;
|
|
35086
|
-
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())).map(
|
|
35348
|
+
return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())).map(function (feature) {
|
|
35349
|
+
return _this5.transformCluster(feature);
|
|
35350
|
+
});
|
|
35087
35351
|
};
|
|
35088
35352
|
_proto6.transformCluster = function transformCluster(_ref11) {
|
|
35089
35353
|
var _ref11$geometry$coord = _ref11.geometry.coordinates,
|
|
@@ -35095,18 +35359,17 @@
|
|
|
35095
35359
|
markers: this.superCluster.getLeaves(properties.cluster_id, Infinity).map(function (leaf) {
|
|
35096
35360
|
return leaf.properties.marker;
|
|
35097
35361
|
}),
|
|
35098
|
-
position:
|
|
35362
|
+
position: {
|
|
35099
35363
|
lat: lat,
|
|
35100
35364
|
lng: lng
|
|
35101
|
-
}
|
|
35102
|
-
});
|
|
35103
|
-
} else {
|
|
35104
|
-
var marker = properties.marker;
|
|
35105
|
-
return new Cluster({
|
|
35106
|
-
markers: [marker],
|
|
35107
|
-
position: marker.getPosition()
|
|
35365
|
+
}
|
|
35108
35366
|
});
|
|
35109
35367
|
}
|
|
35368
|
+
var marker = properties.marker;
|
|
35369
|
+
return new Cluster({
|
|
35370
|
+
markers: [marker],
|
|
35371
|
+
position: MarkerUtils.getPosition(marker)
|
|
35372
|
+
});
|
|
35110
35373
|
};
|
|
35111
35374
|
return SuperClusterAlgorithm;
|
|
35112
35375
|
}(AbstractAlgorithm);
|
|
@@ -35189,29 +35452,57 @@
|
|
|
35189
35452
|
* });
|
|
35190
35453
|
* ```
|
|
35191
35454
|
*/
|
|
35192
|
-
_proto7.render = function render(_ref12, stats) {
|
|
35455
|
+
_proto7.render = function render(_ref12, stats, map) {
|
|
35193
35456
|
var count = _ref12.count,
|
|
35194
35457
|
position = _ref12.position;
|
|
35195
35458
|
// change color if this cluster has more markers than the mean cluster
|
|
35196
35459
|
var color = count > Math.max(10, stats.clusters.markers.mean) ? "#ff0000" : "#0000ff";
|
|
35197
35460
|
// create svg url with fill color
|
|
35198
|
-
var svg =
|
|
35199
|
-
|
|
35200
|
-
|
|
35461
|
+
var svg = "<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>";
|
|
35462
|
+
var title = "Cluster of " + count + " markers",
|
|
35463
|
+
// adjust zIndex to be above other markers
|
|
35464
|
+
zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;
|
|
35465
|
+
if (google.maps.marker && map.getMapCapabilities().isAdvancedMarkersAvailable) {
|
|
35466
|
+
// create cluster SVG element
|
|
35467
|
+
var div = document.createElement("div");
|
|
35468
|
+
div.innerHTML = svg;
|
|
35469
|
+
var svgEl = div.firstElementChild;
|
|
35470
|
+
svgEl.setAttribute("width", "50");
|
|
35471
|
+
svgEl.setAttribute("height", "50");
|
|
35472
|
+
// create and append marker label to SVG
|
|
35473
|
+
var label = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
35474
|
+
label.setAttribute("x", "50%");
|
|
35475
|
+
label.setAttribute("y", "50%");
|
|
35476
|
+
label.setAttribute("style", "fill: #FFF");
|
|
35477
|
+
label.setAttribute("text-anchor", "middle");
|
|
35478
|
+
label.setAttribute("font-size", "50");
|
|
35479
|
+
label.setAttribute("dominant-baseline", "middle");
|
|
35480
|
+
label.appendChild(document.createTextNode("" + count));
|
|
35481
|
+
svgEl.appendChild(label);
|
|
35482
|
+
var _clusterOptions = {
|
|
35483
|
+
map: map,
|
|
35484
|
+
position: position,
|
|
35485
|
+
zIndex: zIndex,
|
|
35486
|
+
title: title,
|
|
35487
|
+
content: div.firstElementChild
|
|
35488
|
+
};
|
|
35489
|
+
return new google.maps.marker.AdvancedMarkerElement(_clusterOptions);
|
|
35490
|
+
}
|
|
35491
|
+
var clusterOptions = {
|
|
35201
35492
|
position: position,
|
|
35493
|
+
zIndex: zIndex,
|
|
35494
|
+
title: title,
|
|
35202
35495
|
icon: {
|
|
35203
|
-
url: "data:image/svg+xml;base64," + svg,
|
|
35496
|
+
url: "data:image/svg+xml;base64," + window.btoa(svg),
|
|
35204
35497
|
scaledSize: new google.maps.Size(45, 45)
|
|
35205
35498
|
},
|
|
35206
35499
|
label: {
|
|
35207
35500
|
text: String(count),
|
|
35208
35501
|
color: "rgba(255,255,255,0.9)",
|
|
35209
35502
|
fontSize: "12px"
|
|
35210
|
-
}
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count
|
|
35214
|
-
});
|
|
35503
|
+
}
|
|
35504
|
+
};
|
|
35505
|
+
return new google.maps.Marker(clusterOptions);
|
|
35215
35506
|
};
|
|
35216
35507
|
return DefaultRenderer;
|
|
35217
35508
|
}();
|
|
@@ -35238,7 +35529,7 @@
|
|
|
35238
35529
|
* @ignore
|
|
35239
35530
|
*/
|
|
35240
35531
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35241
|
-
function extend
|
|
35532
|
+
function extend(type1, type2) {
|
|
35242
35533
|
/* istanbul ignore next */
|
|
35243
35534
|
// eslint-disable-next-line prefer-const
|
|
35244
35535
|
for (var property in type2.prototype) {
|
|
@@ -35254,7 +35545,7 @@
|
|
|
35254
35545
|
// because it might not always be available when the code is defined so we
|
|
35255
35546
|
// look for it at the last possible moment. If it doesn't exist now then
|
|
35256
35547
|
// there is no point going ahead :)
|
|
35257
|
-
extend
|
|
35548
|
+
extend(OverlayViewSafe, google.maps.OverlayView);
|
|
35258
35549
|
};
|
|
35259
35550
|
/**
|
|
35260
35551
|
* Copyright 2021 Google LLC
|
|
@@ -35288,26 +35579,28 @@
|
|
|
35288
35579
|
var MarkerClusterer = /*#__PURE__*/function (_OverlayViewSafe) {
|
|
35289
35580
|
_inheritsLoose(MarkerClusterer, _OverlayViewSafe);
|
|
35290
35581
|
function MarkerClusterer(_ref13) {
|
|
35291
|
-
var
|
|
35582
|
+
var _this6;
|
|
35292
35583
|
var map = _ref13.map,
|
|
35293
35584
|
_ref13$markers = _ref13.markers,
|
|
35294
35585
|
markers = _ref13$markers === void 0 ? [] : _ref13$markers,
|
|
35586
|
+
_ref13$algorithmOptio = _ref13.algorithmOptions,
|
|
35587
|
+
algorithmOptions = _ref13$algorithmOptio === void 0 ? {} : _ref13$algorithmOptio,
|
|
35295
35588
|
_ref13$algorithm = _ref13.algorithm,
|
|
35296
|
-
algorithm = _ref13$algorithm === void 0 ? new SuperClusterAlgorithm(
|
|
35589
|
+
algorithm = _ref13$algorithm === void 0 ? new SuperClusterAlgorithm(algorithmOptions) : _ref13$algorithm,
|
|
35297
35590
|
_ref13$renderer = _ref13.renderer,
|
|
35298
35591
|
renderer = _ref13$renderer === void 0 ? new DefaultRenderer() : _ref13$renderer,
|
|
35299
35592
|
_ref13$onClusterClick = _ref13.onClusterClick,
|
|
35300
35593
|
onClusterClick = _ref13$onClusterClick === void 0 ? defaultOnClusterClickHandler : _ref13$onClusterClick;
|
|
35301
|
-
|
|
35302
|
-
|
|
35303
|
-
|
|
35304
|
-
|
|
35305
|
-
|
|
35306
|
-
|
|
35594
|
+
_this6 = _OverlayViewSafe.call(this) || this;
|
|
35595
|
+
_this6.markers = [].concat(markers);
|
|
35596
|
+
_this6.clusters = [];
|
|
35597
|
+
_this6.algorithm = algorithm;
|
|
35598
|
+
_this6.renderer = renderer;
|
|
35599
|
+
_this6.onClusterClick = onClusterClick;
|
|
35307
35600
|
if (map) {
|
|
35308
|
-
|
|
35601
|
+
_this6.setMap(map);
|
|
35309
35602
|
}
|
|
35310
|
-
return
|
|
35603
|
+
return _this6;
|
|
35311
35604
|
}
|
|
35312
35605
|
var _proto8 = MarkerClusterer.prototype;
|
|
35313
35606
|
_proto8.addMarker = function addMarker(marker, noDraw) {
|
|
@@ -35320,9 +35613,9 @@
|
|
|
35320
35613
|
}
|
|
35321
35614
|
};
|
|
35322
35615
|
_proto8.addMarkers = function addMarkers(markers, noDraw) {
|
|
35323
|
-
var
|
|
35616
|
+
var _this7 = this;
|
|
35324
35617
|
markers.forEach(function (marker) {
|
|
35325
|
-
|
|
35618
|
+
_this7.addMarker(marker, true);
|
|
35326
35619
|
});
|
|
35327
35620
|
if (!noDraw) {
|
|
35328
35621
|
this.render();
|
|
@@ -35334,7 +35627,7 @@
|
|
|
35334
35627
|
// Marker is not in our list of markers, so do nothing:
|
|
35335
35628
|
return false;
|
|
35336
35629
|
}
|
|
35337
|
-
|
|
35630
|
+
MarkerUtils.setMap(marker, null);
|
|
35338
35631
|
this.markers.splice(index, 1); // Remove the marker from the list of managed markers
|
|
35339
35632
|
if (!noDraw) {
|
|
35340
35633
|
this.render();
|
|
@@ -35342,10 +35635,10 @@
|
|
|
35342
35635
|
return true;
|
|
35343
35636
|
};
|
|
35344
35637
|
_proto8.removeMarkers = function removeMarkers(markers, noDraw) {
|
|
35345
|
-
var
|
|
35638
|
+
var _this8 = this;
|
|
35346
35639
|
var removed = false;
|
|
35347
35640
|
markers.forEach(function (marker) {
|
|
35348
|
-
removed =
|
|
35641
|
+
removed = _this8.removeMarker(marker, true) || removed;
|
|
35349
35642
|
});
|
|
35350
35643
|
if (removed && !noDraw) {
|
|
35351
35644
|
this.render();
|
|
@@ -35363,7 +35656,7 @@
|
|
|
35363
35656
|
*/;
|
|
35364
35657
|
_proto8.render = function render() {
|
|
35365
35658
|
var map = this.getMap();
|
|
35366
|
-
if (map instanceof google.maps.Map &&
|
|
35659
|
+
if (map instanceof google.maps.Map && map.getProjection()) {
|
|
35367
35660
|
google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);
|
|
35368
35661
|
var _this$algorithm$calcu = this.algorithm.calculate({
|
|
35369
35662
|
markers: this.markers,
|
|
@@ -35393,7 +35686,7 @@
|
|
|
35393
35686
|
};
|
|
35394
35687
|
_proto8.reset = function reset() {
|
|
35395
35688
|
this.markers.forEach(function (marker) {
|
|
35396
|
-
return
|
|
35689
|
+
return MarkerUtils.setMap(marker, null);
|
|
35397
35690
|
});
|
|
35398
35691
|
this.clusters.forEach(function (cluster) {
|
|
35399
35692
|
return cluster["delete"]();
|
|
@@ -35401,7 +35694,7 @@
|
|
|
35401
35694
|
this.clusters = [];
|
|
35402
35695
|
};
|
|
35403
35696
|
_proto8.renderClusters = function renderClusters() {
|
|
35404
|
-
var
|
|
35697
|
+
var _this9 = this;
|
|
35405
35698
|
// generate stats to pass to renderers
|
|
35406
35699
|
var stats = new ClusterStats(this.markers, this.clusters);
|
|
35407
35700
|
var map = this.getMap();
|
|
@@ -35409,16 +35702,16 @@
|
|
|
35409
35702
|
if (cluster.markers.length === 1) {
|
|
35410
35703
|
cluster.marker = cluster.markers[0];
|
|
35411
35704
|
} else {
|
|
35412
|
-
cluster.marker =
|
|
35413
|
-
if (
|
|
35705
|
+
cluster.marker = _this9.renderer.render(cluster, stats, map);
|
|
35706
|
+
if (_this9.onClusterClick) {
|
|
35414
35707
|
cluster.marker.addListener("click", /* istanbul ignore next */
|
|
35415
35708
|
function (event) {
|
|
35416
|
-
google.maps.event.trigger(
|
|
35417
|
-
|
|
35709
|
+
google.maps.event.trigger(_this9, MarkerClustererEvents.CLUSTER_CLICK, cluster);
|
|
35710
|
+
_this9.onClusterClick(event, cluster, map);
|
|
35418
35711
|
});
|
|
35419
35712
|
}
|
|
35420
35713
|
}
|
|
35421
|
-
cluster.marker
|
|
35714
|
+
MarkerUtils.setMap(cluster.marker, map);
|
|
35422
35715
|
});
|
|
35423
35716
|
};
|
|
35424
35717
|
return MarkerClusterer;
|
|
@@ -38669,16 +38962,9 @@
|
|
|
38669
38962
|
ReactiveGoogleMap.componentType = constants_1$1.reactiveMap;
|
|
38670
38963
|
|
|
38671
38964
|
var _PatchFlagNames, _slotFlagsText;
|
|
38672
|
-
/**
|
|
38673
|
-
* Make a map and return a function for checking if a key
|
|
38674
|
-
* is in that map.
|
|
38675
|
-
* IMPORTANT: all calls of this function must be prefixed with
|
|
38676
|
-
* \/\*#\_\_PURE\_\_\*\/
|
|
38677
|
-
* So that rollup can tree-shake them if necessary.
|
|
38678
|
-
*/
|
|
38679
38965
|
function makeMap(str, expectsLowerCase) {
|
|
38680
|
-
var map = Object.create(null);
|
|
38681
|
-
var list = str.split(
|
|
38966
|
+
var map = /* @__PURE__ */Object.create(null);
|
|
38967
|
+
var list = str.split(",");
|
|
38682
38968
|
for (var i = 0; i < list.length; i++) {
|
|
38683
38969
|
map[list[i]] = true;
|
|
38684
38970
|
}
|
|
@@ -38688,16 +38974,43 @@
|
|
|
38688
38974
|
return !!map[val];
|
|
38689
38975
|
};
|
|
38690
38976
|
}
|
|
38691
|
-
|
|
38692
|
-
|
|
38693
|
-
|
|
38694
|
-
|
|
38695
|
-
var
|
|
38696
|
-
|
|
38697
|
-
|
|
38698
|
-
|
|
38699
|
-
|
|
38700
|
-
|
|
38977
|
+
var EMPTY_OBJ = Object.freeze({}) ;
|
|
38978
|
+
var EMPTY_ARR = Object.freeze([]) ;
|
|
38979
|
+
var NOOP = function NOOP() {};
|
|
38980
|
+
var onRE = /^on[^a-z]/;
|
|
38981
|
+
var isOn = function isOn(key) {
|
|
38982
|
+
return onRE.test(key);
|
|
38983
|
+
};
|
|
38984
|
+
var isArray = Array.isArray;
|
|
38985
|
+
var isFunction$1 = function isFunction(val) {
|
|
38986
|
+
return typeof val === "function";
|
|
38987
|
+
};
|
|
38988
|
+
var isString = function isString(val) {
|
|
38989
|
+
return typeof val === "string";
|
|
38990
|
+
};
|
|
38991
|
+
var isObject$1 = function isObject(val) {
|
|
38992
|
+
return val !== null && typeof val === "object";
|
|
38993
|
+
};
|
|
38994
|
+
var isPromise = function isPromise(val) {
|
|
38995
|
+
return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val["catch"]);
|
|
38996
|
+
};
|
|
38997
|
+
var cacheStringFunction = function cacheStringFunction(fn) {
|
|
38998
|
+
var cache = /* @__PURE__ */Object.create(null);
|
|
38999
|
+
return function (str) {
|
|
39000
|
+
var hit = cache[str];
|
|
39001
|
+
return hit || (cache[str] = fn(str));
|
|
39002
|
+
};
|
|
39003
|
+
};
|
|
39004
|
+
var hyphenateRE = /\B([A-Z])/g;
|
|
39005
|
+
var hyphenate = cacheStringFunction(function (str) {
|
|
39006
|
+
return str.replace(hyphenateRE, "-$1").toLowerCase();
|
|
39007
|
+
});
|
|
39008
|
+
var _globalThis;
|
|
39009
|
+
var getGlobalThis = function getGlobalThis() {
|
|
39010
|
+
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global$1 !== "undefined" ? global$1 : {});
|
|
39011
|
+
};
|
|
39012
|
+
var PatchFlagNames = (_PatchFlagNames = {}, _PatchFlagNames[1] = "TEXT", _PatchFlagNames[2] = "CLASS", _PatchFlagNames[4] = "STYLE", _PatchFlagNames[8] = "PROPS", _PatchFlagNames[16] = "FULL_PROPS", _PatchFlagNames[32] = "HYDRATE_EVENTS", _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);
|
|
39013
|
+
var slotFlagsText = (_slotFlagsText = {}, _slotFlagsText[1] = "STABLE", _slotFlagsText[2] = "DYNAMIC", _slotFlagsText[3] = "FORWARDED", _slotFlagsText);
|
|
38701
39014
|
function normalizeStyle(value) {
|
|
38702
39015
|
if (isArray(value)) {
|
|
38703
39016
|
var res = {};
|
|
@@ -38719,10 +39032,10 @@
|
|
|
38719
39032
|
}
|
|
38720
39033
|
var listDelimiterRE = /;(?![^(]*\))/g;
|
|
38721
39034
|
var propertyDelimiterRE = /:([^]+)/;
|
|
38722
|
-
var styleCommentRE = /\/\*[
|
|
39035
|
+
var styleCommentRE = /\/\*[^]*?\*\//g;
|
|
38723
39036
|
function parseStringStyle(cssText) {
|
|
38724
39037
|
var ret = {};
|
|
38725
|
-
cssText.replace(styleCommentRE,
|
|
39038
|
+
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach(function (item) {
|
|
38726
39039
|
if (item) {
|
|
38727
39040
|
var tmp = item.split(propertyDelimiterRE);
|
|
38728
39041
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -38731,76 +39044,47 @@
|
|
|
38731
39044
|
return ret;
|
|
38732
39045
|
}
|
|
38733
39046
|
function stringifyStyle(styles) {
|
|
38734
|
-
var ret =
|
|
39047
|
+
var ret = "";
|
|
38735
39048
|
if (!styles || isString(styles)) {
|
|
38736
39049
|
return ret;
|
|
38737
39050
|
}
|
|
38738
39051
|
for (var key in styles) {
|
|
38739
39052
|
var value = styles[key];
|
|
38740
39053
|
var normalizedKey = key.startsWith("--") ? key : hyphenate(key);
|
|
38741
|
-
if (isString(value) || typeof value ===
|
|
38742
|
-
// only render valid values
|
|
39054
|
+
if (isString(value) || typeof value === "number") {
|
|
38743
39055
|
ret += normalizedKey + ":" + value + ";";
|
|
38744
39056
|
}
|
|
38745
39057
|
}
|
|
38746
39058
|
return ret;
|
|
38747
39059
|
}
|
|
38748
39060
|
function normalizeClass(value) {
|
|
38749
|
-
var res =
|
|
39061
|
+
var res = "";
|
|
38750
39062
|
if (isString(value)) {
|
|
38751
39063
|
res = value;
|
|
38752
39064
|
} else if (isArray(value)) {
|
|
38753
39065
|
for (var i = 0; i < value.length; i++) {
|
|
38754
39066
|
var normalized = normalizeClass(value[i]);
|
|
38755
39067
|
if (normalized) {
|
|
38756
|
-
res += normalized +
|
|
39068
|
+
res += normalized + " ";
|
|
38757
39069
|
}
|
|
38758
39070
|
}
|
|
38759
39071
|
} else if (isObject$1(value)) {
|
|
38760
39072
|
for (var name in value) {
|
|
38761
39073
|
if (value[name]) {
|
|
38762
|
-
res += name +
|
|
39074
|
+
res += name + " ";
|
|
38763
39075
|
}
|
|
38764
39076
|
}
|
|
38765
39077
|
}
|
|
38766
39078
|
return res.trim();
|
|
38767
39079
|
}
|
|
38768
|
-
|
|
38769
|
-
var
|
|
38770
|
-
var
|
|
38771
|
-
|
|
38772
|
-
* Compiler only.
|
|
38773
|
-
* Do NOT use in runtime code paths unless behind `("development" !== 'production')` flag.
|
|
38774
|
-
*/
|
|
38775
|
-
var isSVGTag = /*#__PURE__*/makeMap(SVG_TAGS);
|
|
38776
|
-
/**
|
|
38777
|
-
* Compiler only.
|
|
38778
|
-
* Do NOT use in runtime code paths unless behind `("development" !== 'production')` flag.
|
|
38779
|
-
*/
|
|
38780
|
-
var isVoidTag = /*#__PURE__*/makeMap(VOID_TAGS);
|
|
38781
|
-
|
|
38782
|
-
/**
|
|
38783
|
-
* On the client we only need to offer special cases for boolean attributes that
|
|
38784
|
-
* have different names from their corresponding dom properties:
|
|
38785
|
-
* - itemscope -> N/A
|
|
38786
|
-
* - allowfullscreen -> allowFullscreen
|
|
38787
|
-
* - formnovalidate -> formNoValidate
|
|
38788
|
-
* - ismap -> isMap
|
|
38789
|
-
* - nomodule -> noModule
|
|
38790
|
-
* - novalidate -> noValidate
|
|
38791
|
-
* - readonly -> readOnly
|
|
38792
|
-
*/
|
|
39080
|
+
var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
39081
|
+
var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
39082
|
+
var isSVGTag = /* @__PURE__ */makeMap(SVG_TAGS);
|
|
39083
|
+
var isVoidTag = /* @__PURE__ */makeMap(VOID_TAGS);
|
|
38793
39084
|
var specialBooleanAttrs = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";
|
|
38794
|
-
|
|
38795
|
-
* The full list is needed during SSR to produce the correct initial markup.
|
|
38796
|
-
*/
|
|
38797
|
-
var isBooleanAttr = /*#__PURE__*/makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden," + "loop,open,required,reversed,scoped,seamless," + "checked,muted,multiple,selected");
|
|
38798
|
-
/**
|
|
38799
|
-
* Boolean attributes should be included if the value is truthy or ''.
|
|
38800
|
-
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
38801
|
-
*/
|
|
39085
|
+
var isBooleanAttr = /* @__PURE__ */makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
38802
39086
|
function includeBooleanAttr(value) {
|
|
38803
|
-
return !!value || value ===
|
|
39087
|
+
return !!value || value === "";
|
|
38804
39088
|
}
|
|
38805
39089
|
var unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
|
|
38806
39090
|
var attrValidationCache = {};
|
|
@@ -38815,43 +39099,38 @@
|
|
|
38815
39099
|
return attrValidationCache[name] = !isUnsafe;
|
|
38816
39100
|
}
|
|
38817
39101
|
var propsToAttrMap = {
|
|
38818
|
-
acceptCharset:
|
|
38819
|
-
className:
|
|
38820
|
-
htmlFor:
|
|
38821
|
-
httpEquiv:
|
|
39102
|
+
acceptCharset: "accept-charset",
|
|
39103
|
+
className: "class",
|
|
39104
|
+
htmlFor: "for",
|
|
39105
|
+
httpEquiv: "http-equiv"
|
|
38822
39106
|
};
|
|
38823
39107
|
var escapeRE = /["'&<>]/;
|
|
38824
39108
|
function escapeHtml$1(string) {
|
|
38825
|
-
var str =
|
|
39109
|
+
var str = "" + string;
|
|
38826
39110
|
var match = escapeRE.exec(str);
|
|
38827
39111
|
if (!match) {
|
|
38828
39112
|
return str;
|
|
38829
39113
|
}
|
|
38830
|
-
var html =
|
|
39114
|
+
var html = "";
|
|
38831
39115
|
var escaped;
|
|
38832
39116
|
var index;
|
|
38833
39117
|
var lastIndex = 0;
|
|
38834
39118
|
for (index = match.index; index < str.length; index++) {
|
|
38835
39119
|
switch (str.charCodeAt(index)) {
|
|
38836
39120
|
case 34:
|
|
38837
|
-
|
|
38838
|
-
escaped = '"';
|
|
39121
|
+
escaped = """;
|
|
38839
39122
|
break;
|
|
38840
39123
|
case 38:
|
|
38841
|
-
|
|
38842
|
-
escaped = '&';
|
|
39124
|
+
escaped = "&";
|
|
38843
39125
|
break;
|
|
38844
39126
|
case 39:
|
|
38845
|
-
|
|
38846
|
-
escaped = ''';
|
|
39127
|
+
escaped = "'";
|
|
38847
39128
|
break;
|
|
38848
39129
|
case 60:
|
|
38849
|
-
|
|
38850
|
-
escaped = '<';
|
|
39130
|
+
escaped = "<";
|
|
38851
39131
|
break;
|
|
38852
39132
|
case 62:
|
|
38853
|
-
|
|
38854
|
-
escaped = '>';
|
|
39133
|
+
escaped = ">";
|
|
38855
39134
|
break;
|
|
38856
39135
|
default:
|
|
38857
39136
|
continue;
|
|
@@ -38864,60 +39143,23 @@
|
|
|
38864
39143
|
}
|
|
38865
39144
|
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
38866
39145
|
}
|
|
38867
|
-
// https://www.w3.org/TR/html52/syntax.html#comments
|
|
38868
39146
|
var commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
38869
39147
|
function escapeHtmlComment(src) {
|
|
38870
|
-
return src.replace(commentStripRE,
|
|
39148
|
+
return src.replace(commentStripRE, "");
|
|
38871
39149
|
}
|
|
38872
|
-
var EMPTY_OBJ = Object.freeze({}) ;
|
|
38873
|
-
var EMPTY_ARR = Object.freeze([]) ;
|
|
38874
|
-
var NOOP = function NOOP() {};
|
|
38875
|
-
var onRE = /^on[^a-z]/;
|
|
38876
|
-
var isOn = function isOn(key) {
|
|
38877
|
-
return onRE.test(key);
|
|
38878
|
-
};
|
|
38879
|
-
var isArray = Array.isArray;
|
|
38880
|
-
var isFunction$1 = function isFunction(val) {
|
|
38881
|
-
return typeof val === 'function';
|
|
38882
|
-
};
|
|
38883
|
-
var isString = function isString(val) {
|
|
38884
|
-
return typeof val === 'string';
|
|
38885
|
-
};
|
|
38886
|
-
var isObject$1 = function isObject(val) {
|
|
38887
|
-
return val !== null && typeof val === 'object';
|
|
38888
|
-
};
|
|
38889
|
-
var isPromise = function isPromise(val) {
|
|
38890
|
-
return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val["catch"]);
|
|
38891
|
-
};
|
|
38892
|
-
var cacheStringFunction = function cacheStringFunction(fn) {
|
|
38893
|
-
var cache = Object.create(null);
|
|
38894
|
-
return function (str) {
|
|
38895
|
-
var hit = cache[str];
|
|
38896
|
-
return hit || (cache[str] = fn(str));
|
|
38897
|
-
};
|
|
38898
|
-
};
|
|
38899
|
-
var hyphenateRE = /\B([A-Z])/g;
|
|
38900
|
-
/**
|
|
38901
|
-
* @private
|
|
38902
|
-
*/
|
|
38903
|
-
var hyphenate = cacheStringFunction(function (str) {
|
|
38904
|
-
return str.replace(hyphenateRE, '-$1').toLowerCase();
|
|
38905
|
-
});
|
|
38906
39150
|
|
|
38907
39151
|
var _ErrorTypeStrings;
|
|
38908
|
-
|
|
38909
|
-
// leading comma for empty string ""
|
|
38910
39152
|
var shouldIgnoreProp = makeMap(",key,ref,innerHTML,textContent,ref_key,ref_for");
|
|
38911
39153
|
function ssrRenderAttrs(props, tag) {
|
|
38912
|
-
var ret =
|
|
39154
|
+
var ret = "";
|
|
38913
39155
|
for (var key in props) {
|
|
38914
|
-
if (shouldIgnoreProp(key) || isOn(key) || tag ===
|
|
39156
|
+
if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") {
|
|
38915
39157
|
continue;
|
|
38916
39158
|
}
|
|
38917
39159
|
var value = props[key];
|
|
38918
|
-
if (key ===
|
|
39160
|
+
if (key === "class") {
|
|
38919
39161
|
ret += " class=\"" + ssrRenderClass(value) + "\"";
|
|
38920
|
-
} else if (key ===
|
|
39162
|
+
} else if (key === "style") {
|
|
38921
39163
|
ret += " style=\"" + ssrRenderStyle(value) + "\"";
|
|
38922
39164
|
} else {
|
|
38923
39165
|
ret += ssrRenderDynamicAttr(key, value, tag);
|
|
@@ -38925,17 +39167,15 @@
|
|
|
38925
39167
|
}
|
|
38926
39168
|
return ret;
|
|
38927
39169
|
}
|
|
38928
|
-
// render an attr with dynamic (unknown) key.
|
|
38929
39170
|
function ssrRenderDynamicAttr(key, value, tag) {
|
|
38930
39171
|
if (!isRenderableValue(value)) {
|
|
38931
39172
|
return "";
|
|
38932
39173
|
}
|
|
38933
|
-
var attrKey = tag && (tag.indexOf(
|
|
38934
|
-
: propsToAttrMap[key] || key.toLowerCase();
|
|
39174
|
+
var attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase();
|
|
38935
39175
|
if (isBooleanAttr(attrKey)) {
|
|
38936
39176
|
return includeBooleanAttr(value) ? " " + attrKey : "";
|
|
38937
39177
|
} else if (isSSRSafeAttrName(attrKey)) {
|
|
38938
|
-
return value ===
|
|
39178
|
+
return value === "" ? " " + attrKey : " " + attrKey + "=\"" + escapeHtml$1(value) + "\"";
|
|
38939
39179
|
} else {
|
|
38940
39180
|
console.warn("[@vue/server-renderer] Skipped rendering unsafe attribute name: " + attrKey);
|
|
38941
39181
|
return "";
|
|
@@ -38946,14 +39186,14 @@
|
|
|
38946
39186
|
return false;
|
|
38947
39187
|
}
|
|
38948
39188
|
var type = typeof value;
|
|
38949
|
-
return type ===
|
|
39189
|
+
return type === "string" || type === "number" || type === "boolean";
|
|
38950
39190
|
}
|
|
38951
39191
|
function ssrRenderClass(raw) {
|
|
38952
39192
|
return escapeHtml$1(normalizeClass(raw));
|
|
38953
39193
|
}
|
|
38954
39194
|
function ssrRenderStyle(raw) {
|
|
38955
39195
|
if (!raw) {
|
|
38956
|
-
return
|
|
39196
|
+
return "";
|
|
38957
39197
|
}
|
|
38958
39198
|
if (isString(raw)) {
|
|
38959
39199
|
return escapeHtml$1(raw);
|
|
@@ -38961,18 +39201,11 @@
|
|
|
38961
39201
|
var styles = normalizeStyle(raw);
|
|
38962
39202
|
return escapeHtml$1(stringifyStyle(styles));
|
|
38963
39203
|
}
|
|
38964
|
-
function ssrCompile(template, instance) {
|
|
38965
|
-
{
|
|
38966
|
-
throw new Error("On-the-fly template compilation is not supported in the ESM build of " + "@vue/server-renderer. All templates must be pre-compiled into " + "render functions.");
|
|
38967
|
-
}
|
|
38968
|
-
}
|
|
38969
39204
|
function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) {
|
|
38970
|
-
parentPush(
|
|
39205
|
+
parentPush("<!--teleport start-->");
|
|
38971
39206
|
var context = parentComponent.appContext.provides[vue.ssrContextKey];
|
|
38972
39207
|
var teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {});
|
|
38973
39208
|
var targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []);
|
|
38974
|
-
// record current index of the target buffer to handle nested teleports
|
|
38975
|
-
// since the parent needs to be rendered before the child
|
|
38976
39209
|
var bufferIndex = targetBuffer.length;
|
|
38977
39210
|
var teleportContent;
|
|
38978
39211
|
if (disabled) {
|
|
@@ -38987,25 +39220,34 @@
|
|
|
38987
39220
|
teleportContent = getBuffer();
|
|
38988
39221
|
}
|
|
38989
39222
|
targetBuffer.splice(bufferIndex, 0, teleportContent);
|
|
38990
|
-
parentPush(
|
|
39223
|
+
parentPush("<!--teleport end-->");
|
|
39224
|
+
}
|
|
39225
|
+
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp"] = "serverPrefetch hook", _ErrorTypeStrings["bc"] = "beforeCreate hook", _ErrorTypeStrings["c"] = "created hook", _ErrorTypeStrings["bm"] = "beforeMount hook", _ErrorTypeStrings["m"] = "mounted hook", _ErrorTypeStrings["bu"] = "beforeUpdate hook", _ErrorTypeStrings["u"] = "updated", _ErrorTypeStrings["bum"] = "beforeUnmount hook", _ErrorTypeStrings["um"] = "unmounted hook", _ErrorTypeStrings["a"] = "activated hook", _ErrorTypeStrings["da"] = "deactivated hook", _ErrorTypeStrings["ec"] = "errorCaptured hook", _ErrorTypeStrings["rtc"] = "renderTracked hook", _ErrorTypeStrings["rtg"] = "renderTriggered hook", _ErrorTypeStrings[0] = "setup function", _ErrorTypeStrings[1] = "render function", _ErrorTypeStrings[2] = "watcher getter", _ErrorTypeStrings[3] = "watcher callback", _ErrorTypeStrings[4] = "watcher cleanup function", _ErrorTypeStrings[5] = "native event handler", _ErrorTypeStrings[6] = "component event handler", _ErrorTypeStrings[7] = "vnode hook", _ErrorTypeStrings[8] = "directive hook", _ErrorTypeStrings[9] = "transition hook", _ErrorTypeStrings[10] = "app errorHandler", _ErrorTypeStrings[11] = "app warnHandler", _ErrorTypeStrings[12] = "ref function", _ErrorTypeStrings[13] = "async component loader", _ErrorTypeStrings[14] = "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core", _ErrorTypeStrings);
|
|
39226
|
+
var globalCurrentInstanceSetters;
|
|
39227
|
+
var settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
39228
|
+
{
|
|
39229
|
+
if (!(globalCurrentInstanceSetters = getGlobalThis()[settersKey])) {
|
|
39230
|
+
globalCurrentInstanceSetters = getGlobalThis()[settersKey] = [];
|
|
39231
|
+
}
|
|
39232
|
+
globalCurrentInstanceSetters.push(function (i) {
|
|
39233
|
+
return i;
|
|
39234
|
+
});
|
|
39235
|
+
}
|
|
39236
|
+
function ssrCompile(template, instance) {
|
|
39237
|
+
{
|
|
39238
|
+
throw new Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.");
|
|
39239
|
+
}
|
|
38991
39240
|
}
|
|
38992
39241
|
var createComponentInstance = vue.ssrUtils.createComponentInstance,
|
|
38993
39242
|
setCurrentRenderingInstance = vue.ssrUtils.setCurrentRenderingInstance,
|
|
38994
39243
|
setupComponent = vue.ssrUtils.setupComponent,
|
|
38995
39244
|
renderComponentRoot = vue.ssrUtils.renderComponentRoot,
|
|
38996
39245
|
normalizeVNode = vue.ssrUtils.normalizeVNode;
|
|
38997
|
-
// Each component has a buffer array.
|
|
38998
|
-
// A buffer array can contain one of the following:
|
|
38999
|
-
// - plain string
|
|
39000
|
-
// - A resolved buffer (recursive arrays of strings that can be unrolled
|
|
39001
|
-
// synchronously)
|
|
39002
|
-
// - An async buffer (a Promise that resolves to a resolved buffer)
|
|
39003
39246
|
function createBuffer() {
|
|
39004
39247
|
var appendable = false;
|
|
39005
39248
|
var buffer = [];
|
|
39006
39249
|
return {
|
|
39007
39250
|
getBuffer: function getBuffer() {
|
|
39008
|
-
// Return static buffer and await on items during unroll stage
|
|
39009
39251
|
return buffer;
|
|
39010
39252
|
},
|
|
39011
39253
|
push: function push(item) {
|
|
@@ -39017,8 +39259,6 @@
|
|
|
39017
39259
|
}
|
|
39018
39260
|
appendable = isStringItem;
|
|
39019
39261
|
if (isPromise(item) || isArray(item) && item.hasAsync) {
|
|
39020
|
-
// promise, or child buffer with async, mark as async.
|
|
39021
|
-
// this allows skipping unnecessary await ticks during unroll stage
|
|
39022
39262
|
buffer.hasAsync = true;
|
|
39023
39263
|
}
|
|
39024
39264
|
}
|
|
@@ -39029,9 +39269,11 @@
|
|
|
39029
39269
|
parentComponent = null;
|
|
39030
39270
|
}
|
|
39031
39271
|
var instance = createComponentInstance(vnode, parentComponent, null);
|
|
39032
|
-
var res = setupComponent(instance, true
|
|
39272
|
+
var res = setupComponent(instance, true
|
|
39273
|
+
/* isSSR */);
|
|
39274
|
+
|
|
39033
39275
|
var hasAsyncSetup = isPromise(res);
|
|
39034
|
-
var prefetches = instance.sp;
|
|
39276
|
+
var prefetches = instance.sp;
|
|
39035
39277
|
if (hasAsyncSetup || prefetches) {
|
|
39036
39278
|
var p = hasAsyncSetup ? res : Promise.resolve();
|
|
39037
39279
|
if (prefetches) {
|
|
@@ -39039,9 +39281,7 @@
|
|
|
39039
39281
|
return Promise.all(prefetches.map(function (prefetch) {
|
|
39040
39282
|
return prefetch.call(instance.proxy);
|
|
39041
39283
|
}));
|
|
39042
|
-
})
|
|
39043
|
-
// Note: error display is already done by the wrapped lifecycle hook function.
|
|
39044
|
-
["catch"](function () {});
|
|
39284
|
+
})["catch"](function () {});
|
|
39045
39285
|
}
|
|
39046
39286
|
return p.then(function () {
|
|
39047
39287
|
return renderComponentSubTree(instance, slotScopeId);
|
|
@@ -39057,8 +39297,6 @@
|
|
|
39057
39297
|
push = _createBuffer2.push;
|
|
39058
39298
|
if (isFunction$1(comp)) {
|
|
39059
39299
|
var root = renderComponentRoot(instance);
|
|
39060
|
-
// #5817 scope ID attrs not falling through if functional component doesn't
|
|
39061
|
-
// have props
|
|
39062
39300
|
if (!comp.props) {
|
|
39063
39301
|
for (var key in instance.attrs) {
|
|
39064
39302
|
if (key.startsWith("data-v-")) {
|
|
@@ -39071,17 +39309,13 @@
|
|
|
39071
39309
|
if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) {
|
|
39072
39310
|
comp.ssrRender = ssrCompile(comp.template);
|
|
39073
39311
|
}
|
|
39074
|
-
// perf: enable caching of computed getters during render
|
|
39075
|
-
// since there cannot be state mutations during render.
|
|
39076
39312
|
for (var _iterator = _createForOfIteratorHelperLoose(instance.scope.effects), _step; !(_step = _iterator()).done;) {
|
|
39077
39313
|
var e = _step.value;
|
|
39078
39314
|
if (e.computed) e.computed._cacheable = true;
|
|
39079
39315
|
}
|
|
39080
39316
|
var ssrRender = instance.ssrRender || comp.ssrRender;
|
|
39081
39317
|
if (ssrRender) {
|
|
39082
|
-
|
|
39083
|
-
// resolve fallthrough attrs
|
|
39084
|
-
var attrs = instance.inheritAttrs !== false ? instance.attrs : undefined;
|
|
39318
|
+
var attrs = instance.inheritAttrs !== false ? instance.attrs : void 0;
|
|
39085
39319
|
var hasCloned = false;
|
|
39086
39320
|
var cur = instance;
|
|
39087
39321
|
while (true) {
|
|
@@ -39091,12 +39325,10 @@
|
|
|
39091
39325
|
attrs = _extends({}, attrs);
|
|
39092
39326
|
hasCloned = true;
|
|
39093
39327
|
}
|
|
39094
|
-
attrs[scopeId] =
|
|
39328
|
+
attrs[scopeId] = "";
|
|
39095
39329
|
}
|
|
39096
39330
|
var parent = cur.parent;
|
|
39097
39331
|
if (parent && parent.subTree && parent.subTree === cur.vnode) {
|
|
39098
|
-
// parent is a non-SSR compiled component and is rendering this
|
|
39099
|
-
// component as root. inherit its scopeId if present.
|
|
39100
39332
|
cur = parent;
|
|
39101
39333
|
} else {
|
|
39102
39334
|
break;
|
|
@@ -39104,9 +39336,8 @@
|
|
|
39104
39336
|
}
|
|
39105
39337
|
if (slotScopeId) {
|
|
39106
39338
|
if (!hasCloned) attrs = _extends({}, attrs);
|
|
39107
|
-
attrs[slotScopeId.trim()] =
|
|
39339
|
+
attrs[slotScopeId.trim()] = "";
|
|
39108
39340
|
}
|
|
39109
|
-
// set current rendering instance for asset resolution
|
|
39110
39341
|
var prev = setCurrentRenderingInstance(instance);
|
|
39111
39342
|
try {
|
|
39112
39343
|
ssrRender(instance.proxy, push, instance, attrs,
|
|
@@ -39141,23 +39372,23 @@
|
|
|
39141
39372
|
break;
|
|
39142
39373
|
case vue.Fragment:
|
|
39143
39374
|
if (vnode.slotScopeIds) {
|
|
39144
|
-
slotScopeId = (slotScopeId ? slotScopeId +
|
|
39375
|
+
slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" ");
|
|
39145
39376
|
}
|
|
39146
|
-
push("<!--[-->");
|
|
39377
|
+
push("<!--[-->");
|
|
39147
39378
|
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
39148
|
-
push("<!--]-->");
|
|
39379
|
+
push("<!--]-->");
|
|
39149
39380
|
break;
|
|
39150
39381
|
default:
|
|
39151
|
-
if (shapeFlag & 1
|
|
39382
|
+
if (shapeFlag & 1) {
|
|
39152
39383
|
renderElementVNode(push, vnode, parentComponent, slotScopeId);
|
|
39153
|
-
} else if (shapeFlag & 6
|
|
39384
|
+
} else if (shapeFlag & 6) {
|
|
39154
39385
|
push(renderComponentVNode(vnode, parentComponent, slotScopeId));
|
|
39155
|
-
} else if (shapeFlag & 64
|
|
39386
|
+
} else if (shapeFlag & 64) {
|
|
39156
39387
|
renderTeleportVNode(push, vnode, parentComponent, slotScopeId);
|
|
39157
|
-
} else if (shapeFlag & 128
|
|
39388
|
+
} else if (shapeFlag & 128) {
|
|
39158
39389
|
renderVNode(push, vnode.ssContent, parentComponent, slotScopeId);
|
|
39159
39390
|
} else {
|
|
39160
|
-
vue.warn(
|
|
39391
|
+
vue.warn("[@vue/server-renderer] Invalid VNode type:", type, "(" + typeof type + ")");
|
|
39161
39392
|
}
|
|
39162
39393
|
}
|
|
39163
39394
|
}
|
|
@@ -39183,7 +39414,6 @@
|
|
|
39183
39414
|
if (scopeId) {
|
|
39184
39415
|
openTag += " " + scopeId;
|
|
39185
39416
|
}
|
|
39186
|
-
// inherit parent chain scope id if this is the root node
|
|
39187
39417
|
var curParent = parentComponent;
|
|
39188
39418
|
var curVnode = vnode;
|
|
39189
39419
|
while (curParent && curVnode === curParent.subTree) {
|
|
@@ -39206,15 +39436,15 @@
|
|
|
39206
39436
|
} else if (props.textContent) {
|
|
39207
39437
|
hasChildrenOverride = true;
|
|
39208
39438
|
push(escapeHtml$1(props.textContent));
|
|
39209
|
-
} else if (tag ===
|
|
39439
|
+
} else if (tag === "textarea" && props.value) {
|
|
39210
39440
|
hasChildrenOverride = true;
|
|
39211
39441
|
push(escapeHtml$1(props.value));
|
|
39212
39442
|
}
|
|
39213
39443
|
}
|
|
39214
39444
|
if (!hasChildrenOverride) {
|
|
39215
|
-
if (shapeFlag & 8
|
|
39445
|
+
if (shapeFlag & 8) {
|
|
39216
39446
|
push(escapeHtml$1(children));
|
|
39217
|
-
} else if (shapeFlag & 16
|
|
39447
|
+
} else if (shapeFlag & 16) {
|
|
39218
39448
|
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
39219
39449
|
}
|
|
39220
39450
|
}
|
|
@@ -39246,119 +39476,116 @@
|
|
|
39246
39476
|
vue.warn("[@vue/server-renderer] Teleport target must be a query selector string.");
|
|
39247
39477
|
return [];
|
|
39248
39478
|
}
|
|
39249
|
-
ssrRenderTeleport(push, function (
|
|
39250
|
-
renderVNodeChildren(
|
|
39251
|
-
}, target, disabled || disabled ===
|
|
39479
|
+
ssrRenderTeleport(push, function (push2) {
|
|
39480
|
+
renderVNodeChildren(push2, vnode.children, parentComponent, slotScopeId);
|
|
39481
|
+
}, target, disabled || disabled === "", parentComponent);
|
|
39252
39482
|
}
|
|
39253
|
-
var isVNode = vue.ssrUtils.isVNode;
|
|
39254
|
-
function unrollBuffer(
|
|
39255
|
-
return _unrollBuffer
|
|
39483
|
+
var isVNode$1 = vue.ssrUtils.isVNode;
|
|
39484
|
+
function unrollBuffer$1(_x3) {
|
|
39485
|
+
return _unrollBuffer$.apply(this, arguments);
|
|
39256
39486
|
}
|
|
39257
|
-
function _unrollBuffer() {
|
|
39258
|
-
_unrollBuffer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
39487
|
+
function _unrollBuffer$() {
|
|
39488
|
+
_unrollBuffer$ = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(buffer) {
|
|
39259
39489
|
var ret, i, item;
|
|
39260
|
-
return _regeneratorRuntime().wrap(function
|
|
39261
|
-
while (1) switch (
|
|
39490
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
39491
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
39262
39492
|
case 0:
|
|
39263
39493
|
if (!buffer.hasAsync) {
|
|
39264
|
-
|
|
39494
|
+
_context3.next = 23;
|
|
39265
39495
|
break;
|
|
39266
39496
|
}
|
|
39267
|
-
ret =
|
|
39497
|
+
ret = "";
|
|
39268
39498
|
i = 0;
|
|
39269
39499
|
case 3:
|
|
39270
39500
|
if (!(i < buffer.length)) {
|
|
39271
|
-
|
|
39501
|
+
_context3.next = 20;
|
|
39272
39502
|
break;
|
|
39273
39503
|
}
|
|
39274
39504
|
item = buffer[i];
|
|
39275
39505
|
if (!isPromise(item)) {
|
|
39276
|
-
|
|
39506
|
+
_context3.next = 9;
|
|
39277
39507
|
break;
|
|
39278
39508
|
}
|
|
39279
|
-
|
|
39509
|
+
_context3.next = 8;
|
|
39280
39510
|
return item;
|
|
39281
39511
|
case 8:
|
|
39282
|
-
item =
|
|
39512
|
+
item = _context3.sent;
|
|
39283
39513
|
case 9:
|
|
39284
39514
|
if (!isString(item)) {
|
|
39285
|
-
|
|
39515
|
+
_context3.next = 13;
|
|
39286
39516
|
break;
|
|
39287
39517
|
}
|
|
39288
39518
|
ret += item;
|
|
39289
|
-
|
|
39519
|
+
_context3.next = 17;
|
|
39290
39520
|
break;
|
|
39291
39521
|
case 13:
|
|
39292
|
-
|
|
39293
|
-
|
|
39294
|
-
return unrollBuffer(item);
|
|
39522
|
+
_context3.t0 = ret;
|
|
39523
|
+
_context3.next = 16;
|
|
39524
|
+
return unrollBuffer$1(item);
|
|
39295
39525
|
case 16:
|
|
39296
|
-
ret =
|
|
39526
|
+
ret = _context3.t0 += _context3.sent;
|
|
39297
39527
|
case 17:
|
|
39298
39528
|
i++;
|
|
39299
|
-
|
|
39529
|
+
_context3.next = 3;
|
|
39300
39530
|
break;
|
|
39301
39531
|
case 20:
|
|
39302
|
-
return
|
|
39532
|
+
return _context3.abrupt("return", ret);
|
|
39303
39533
|
case 23:
|
|
39304
|
-
return
|
|
39534
|
+
return _context3.abrupt("return", unrollBufferSync$1(buffer));
|
|
39305
39535
|
case 24:
|
|
39306
39536
|
case "end":
|
|
39307
|
-
return
|
|
39537
|
+
return _context3.stop();
|
|
39308
39538
|
}
|
|
39309
|
-
},
|
|
39539
|
+
}, _callee3);
|
|
39310
39540
|
}));
|
|
39311
|
-
return _unrollBuffer
|
|
39541
|
+
return _unrollBuffer$.apply(this, arguments);
|
|
39312
39542
|
}
|
|
39313
|
-
function unrollBufferSync(buffer) {
|
|
39314
|
-
var ret =
|
|
39543
|
+
function unrollBufferSync$1(buffer) {
|
|
39544
|
+
var ret = "";
|
|
39315
39545
|
for (var i = 0; i < buffer.length; i++) {
|
|
39316
39546
|
var item = buffer[i];
|
|
39317
39547
|
if (isString(item)) {
|
|
39318
39548
|
ret += item;
|
|
39319
39549
|
} else {
|
|
39320
|
-
|
|
39321
|
-
ret += unrollBufferSync(item);
|
|
39550
|
+
ret += unrollBufferSync$1(item);
|
|
39322
39551
|
}
|
|
39323
39552
|
}
|
|
39324
39553
|
return ret;
|
|
39325
39554
|
}
|
|
39326
|
-
function renderToString(
|
|
39555
|
+
function renderToString(_x4, _x5) {
|
|
39327
39556
|
return _renderToString.apply(this, arguments);
|
|
39328
39557
|
}
|
|
39329
39558
|
function _renderToString() {
|
|
39330
|
-
_renderToString = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
39559
|
+
_renderToString = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(input, context) {
|
|
39331
39560
|
var vnode, buffer, result, _iterator3, _step3, unwatch;
|
|
39332
|
-
return _regeneratorRuntime().wrap(function
|
|
39333
|
-
while (1) switch (
|
|
39561
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
39562
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
39334
39563
|
case 0:
|
|
39335
39564
|
if (context === void 0) {
|
|
39336
39565
|
context = {};
|
|
39337
39566
|
}
|
|
39338
|
-
if (!isVNode(input)) {
|
|
39339
|
-
|
|
39567
|
+
if (!isVNode$1(input)) {
|
|
39568
|
+
_context4.next = 3;
|
|
39340
39569
|
break;
|
|
39341
39570
|
}
|
|
39342
|
-
return
|
|
39571
|
+
return _context4.abrupt("return", renderToString(vue.createApp({
|
|
39343
39572
|
render: function render() {
|
|
39344
39573
|
return input;
|
|
39345
39574
|
}
|
|
39346
39575
|
}), context));
|
|
39347
39576
|
case 3:
|
|
39348
|
-
// rendering an app
|
|
39349
39577
|
vnode = vue.createVNode(input._component, input._props);
|
|
39350
39578
|
vnode.appContext = input._context;
|
|
39351
|
-
// provide the ssr context to the tree
|
|
39352
39579
|
input.provide(vue.ssrContextKey, context);
|
|
39353
|
-
|
|
39580
|
+
_context4.next = 8;
|
|
39354
39581
|
return renderComponentVNode(vnode);
|
|
39355
39582
|
case 8:
|
|
39356
|
-
buffer =
|
|
39357
|
-
|
|
39358
|
-
return unrollBuffer(buffer);
|
|
39583
|
+
buffer = _context4.sent;
|
|
39584
|
+
_context4.next = 11;
|
|
39585
|
+
return unrollBuffer$1(buffer);
|
|
39359
39586
|
case 11:
|
|
39360
|
-
result =
|
|
39361
|
-
|
|
39587
|
+
result = _context4.sent;
|
|
39588
|
+
_context4.next = 14;
|
|
39362
39589
|
return resolveTeleports(context);
|
|
39363
39590
|
case 14:
|
|
39364
39591
|
if (context.__watcherHandles) {
|
|
@@ -39367,57 +39594,56 @@
|
|
|
39367
39594
|
unwatch();
|
|
39368
39595
|
}
|
|
39369
39596
|
}
|
|
39370
|
-
return
|
|
39597
|
+
return _context4.abrupt("return", result);
|
|
39371
39598
|
case 16:
|
|
39372
39599
|
case "end":
|
|
39373
|
-
return
|
|
39600
|
+
return _context4.stop();
|
|
39374
39601
|
}
|
|
39375
|
-
},
|
|
39602
|
+
}, _callee4);
|
|
39376
39603
|
}));
|
|
39377
39604
|
return _renderToString.apply(this, arguments);
|
|
39378
39605
|
}
|
|
39379
|
-
function resolveTeleports(
|
|
39606
|
+
function resolveTeleports(_x6) {
|
|
39380
39607
|
return _resolveTeleports.apply(this, arguments);
|
|
39381
39608
|
}
|
|
39382
39609
|
function _resolveTeleports() {
|
|
39383
|
-
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
39610
|
+
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(context) {
|
|
39384
39611
|
var key;
|
|
39385
|
-
return _regeneratorRuntime().wrap(function
|
|
39386
|
-
while (1) switch (
|
|
39612
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
39613
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
39387
39614
|
case 0:
|
|
39388
39615
|
if (!context.__teleportBuffers) {
|
|
39389
|
-
|
|
39616
|
+
_context5.next = 14;
|
|
39390
39617
|
break;
|
|
39391
39618
|
}
|
|
39392
39619
|
context.teleports = context.teleports || {};
|
|
39393
|
-
|
|
39620
|
+
_context5.t0 = _regeneratorRuntime().keys(context.__teleportBuffers);
|
|
39394
39621
|
case 3:
|
|
39395
|
-
if ((
|
|
39396
|
-
|
|
39622
|
+
if ((_context5.t1 = _context5.t0()).done) {
|
|
39623
|
+
_context5.next = 14;
|
|
39397
39624
|
break;
|
|
39398
39625
|
}
|
|
39399
|
-
key =
|
|
39400
|
-
|
|
39401
|
-
|
|
39626
|
+
key = _context5.t1.value;
|
|
39627
|
+
_context5.t2 = unrollBuffer$1;
|
|
39628
|
+
_context5.next = 8;
|
|
39402
39629
|
return Promise.all([context.__teleportBuffers[key]]);
|
|
39403
39630
|
case 8:
|
|
39404
|
-
|
|
39405
|
-
|
|
39406
|
-
return (0,
|
|
39631
|
+
_context5.t3 = _context5.sent;
|
|
39632
|
+
_context5.next = 11;
|
|
39633
|
+
return (0, _context5.t2)(_context5.t3);
|
|
39407
39634
|
case 11:
|
|
39408
|
-
context.teleports[key] =
|
|
39409
|
-
|
|
39635
|
+
context.teleports[key] = _context5.sent;
|
|
39636
|
+
_context5.next = 3;
|
|
39410
39637
|
break;
|
|
39411
39638
|
case 14:
|
|
39412
39639
|
case "end":
|
|
39413
|
-
return
|
|
39640
|
+
return _context5.stop();
|
|
39414
39641
|
}
|
|
39415
|
-
},
|
|
39642
|
+
}, _callee5);
|
|
39416
39643
|
}));
|
|
39417
39644
|
return _resolveTeleports.apply(this, arguments);
|
|
39418
39645
|
}
|
|
39419
|
-
var isVNode
|
|
39420
|
-
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp" /* LifecycleHooks.SERVER_PREFETCH */] = 'serverPrefetch hook', _ErrorTypeStrings["bc" /* LifecycleHooks.BEFORE_CREATE */] = 'beforeCreate hook', _ErrorTypeStrings["c" /* LifecycleHooks.CREATED */] = 'created hook', _ErrorTypeStrings["bm" /* LifecycleHooks.BEFORE_MOUNT */] = 'beforeMount hook', _ErrorTypeStrings["m" /* LifecycleHooks.MOUNTED */] = 'mounted hook', _ErrorTypeStrings["bu" /* LifecycleHooks.BEFORE_UPDATE */] = 'beforeUpdate hook', _ErrorTypeStrings["u" /* LifecycleHooks.UPDATED */] = 'updated', _ErrorTypeStrings["bum" /* LifecycleHooks.BEFORE_UNMOUNT */] = 'beforeUnmount hook', _ErrorTypeStrings["um" /* LifecycleHooks.UNMOUNTED */] = 'unmounted hook', _ErrorTypeStrings["a" /* LifecycleHooks.ACTIVATED */] = 'activated hook', _ErrorTypeStrings["da" /* LifecycleHooks.DEACTIVATED */] = 'deactivated hook', _ErrorTypeStrings["ec" /* LifecycleHooks.ERROR_CAPTURED */] = 'errorCaptured hook', _ErrorTypeStrings["rtc" /* LifecycleHooks.RENDER_TRACKED */] = 'renderTracked hook', _ErrorTypeStrings["rtg" /* LifecycleHooks.RENDER_TRIGGERED */] = 'renderTriggered hook', _ErrorTypeStrings[0 /* ErrorCodes.SETUP_FUNCTION */] = 'setup function', _ErrorTypeStrings[1 /* ErrorCodes.RENDER_FUNCTION */] = 'render function', _ErrorTypeStrings[2 /* ErrorCodes.WATCH_GETTER */] = 'watcher getter', _ErrorTypeStrings[3 /* ErrorCodes.WATCH_CALLBACK */] = 'watcher callback', _ErrorTypeStrings[4 /* ErrorCodes.WATCH_CLEANUP */] = 'watcher cleanup function', _ErrorTypeStrings[5 /* ErrorCodes.NATIVE_EVENT_HANDLER */] = 'native event handler', _ErrorTypeStrings[6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */] = 'component event handler', _ErrorTypeStrings[7 /* ErrorCodes.VNODE_HOOK */] = 'vnode hook', _ErrorTypeStrings[8 /* ErrorCodes.DIRECTIVE_HOOK */] = 'directive hook', _ErrorTypeStrings[9 /* ErrorCodes.TRANSITION_HOOK */] = 'transition hook', _ErrorTypeStrings[10 /* ErrorCodes.APP_ERROR_HANDLER */] = 'app errorHandler', _ErrorTypeStrings[11 /* ErrorCodes.APP_WARN_HANDLER */] = 'app warnHandler', _ErrorTypeStrings[12 /* ErrorCodes.FUNCTION_REF */] = 'ref function', _ErrorTypeStrings[13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */] = 'async component loader', _ErrorTypeStrings[14 /* ErrorCodes.SCHEDULER */] = 'scheduler flush. This is likely a Vue internals bug. ' + 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core', _ErrorTypeStrings);
|
|
39646
|
+
var isVNode = vue.ssrUtils.isVNode;
|
|
39421
39647
|
vue.initDirectivesForSSR();
|
|
39422
39648
|
|
|
39423
39649
|
var server = createCommonjsModule(function (module, exports) {
|
|
@@ -39724,7 +39950,7 @@
|
|
|
39724
39950
|
}, queryString, renderFunction);
|
|
39725
39951
|
}
|
|
39726
39952
|
|
|
39727
|
-
var version = "3.0.0-rc.6.
|
|
39953
|
+
var version = "3.0.0-rc.6.3";
|
|
39728
39954
|
|
|
39729
39955
|
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];
|
|
39730
39956
|
function install$1 (Vue) {
|