@opengis/admin 0.1.85 → 0.1.87
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -29
- package/config.js +4 -4
- package/dist/{IconChevronDown-IrRpX-i0.js → IconChevronDown-7fRR2Xlu.js} +1 -1
- package/dist/{add-page-DRXx4iOi.js → add-page-HDC8_rFS.js} +1 -1
- package/dist/{admin-interface-BY-D9Jvu.js → admin-interface-BAhPvohd.js} +4 -4
- package/dist/{admin-view-BZ75rygK.js → admin-view-DbvhgbGK.js} +101 -95
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +34 -34
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-page-BAeSkHUO.js → card-page-CpvUoIWB.js} +144 -141
- package/dist/{card-view-p73B3Gbl.js → card-view-Bxl61faa.js} +1 -1
- package/dist/{edit-page-CZ8SDvjo.js → edit-page-BfCFDhcy.js} +1 -1
- package/dist/{import-file-f46xrNIz.js → import-file-_QpFvb1W.js} +851 -842
- package/dist/style.css +1 -1
- package/module/settings/card/admin.roles.table/access.hbs +27 -27
- package/module/settings/card/admin.roles.table/general_info.hbs +16 -16
- package/module/settings/card/admin.roles.table/index.yml +14 -14
- package/module/settings/card/admin.roles.table/users.hbs +27 -27
- package/module/settings/card/admin.routes.table/general_info.hbs +40 -40
- package/module/settings/card/admin.routes.table/index.yml +8 -8
- package/module/settings/card/admin.routes.table/users.hbs +33 -33
- package/module/settings/card/admin.users.table/general_info.hbs +25 -25
- package/module/settings/card/admin.users.table/index.yml +12 -12
- package/module/settings/card/admin.users.table/logs.hbs +30 -30
- package/module/settings/card/admin.users.table/user_roles.hbs +24 -24
- package/module/settings/cls/core.actions.json +17 -17
- package/module/settings/cls/core.scope.json +13 -13
- package/module/settings/cls/properties.site_status.json +13 -13
- package/module/settings/cls/properties.widget_status.json +13 -13
- package/module/settings/cls/users.user_type.json +13 -13
- package/module/settings/form/admin.access.form.json +36 -36
- package/module/settings/form/admin.custom_column.form.json +71 -71
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +19 -19
- package/module/settings/form/admin.routes.form.json +25 -25
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles.form.json +21 -21
- package/module/settings/form/admin.users.form.json +153 -153
- package/module/settings/form/user.user_roles.form.json +13 -13
- package/module/settings/interface/admin.properties.json +4 -4
- package/module/settings/interface/admin.roles.json +4 -4
- package/module/settings/interface/admin.routes.json +4 -4
- package/module/settings/interface/admin.users.json +4 -4
- package/module/settings/menu.json +50 -50
- package/module/settings/select/core.roles.json +2 -2
- package/module/settings/select/core.routes.sql +1 -1
- package/module/settings/select/core.user_mentioned.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.access.table.json +83 -83
- package/module/settings/table/admin.custom_column.table.json +99 -99
- package/module/settings/table/admin.properties.table.json +39 -39
- package/module/settings/table/admin.roles.table.json +64 -64
- package/module/settings/table/admin.routes.table.json +68 -68
- package/module/settings/table/admin.user_properties.table.json +34 -34
- package/module/settings/table/admin.user_roles.table.json +72 -72
- package/module/settings/table/admin.users.table.json +121 -121
- package/package.json +82 -82
- package/plugin.js +29 -29
- package/server/helpers/controllers/badge.js +11 -11
- package/server/helpers/controllers/hb.js +2 -2
- package/server/helpers/controllers/map.js +2 -2
- package/server/helpers/controllers/mls.js +2 -2
- package/server/helpers/controllers/token.js +16 -16
- package/server/helpers/controllers/vue.js +2 -2
- package/server/helpers/index.mjs +29 -29
- package/server/helpers/list/buttonHelper.js +10 -10
- package/server/helpers/list/descriptionList.js +34 -33
- package/server/helpers/list/tableList.js +65 -65
- package/server/helpers/list/utils/button.js +5 -5
- package/server/plugins/access/funcs/getAdminAccess.js +14 -14
- package/server/plugins/access/index.mjs +6 -6
- package/server/plugins/adminHook.js +81 -81
- package/server/plugins/cron.js +10 -10
- package/server/plugins/docs.js +28 -28
- package/server/plugins/hook.js +226 -223
- package/server/plugins/vite.js +71 -71
- package/server/routes/access/controllers/access.group.js +29 -29
- package/server/routes/access/controllers/access.group.post.js +43 -43
- package/server/routes/access/index.mjs +63 -63
- package/server/routes/calendar/controllers/calendar.data.js +87 -87
- package/server/routes/calendar/index.mjs +7 -7
- package/server/routes/calendar/schema.js +21 -21
- package/server/routes/data/controllers/cardData.js +81 -81
- package/server/routes/data/controllers/cardTabData.js +49 -49
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
- package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/server/routes/data/controllers/tableData.js +20 -20
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tableFilter.js +63 -63
- package/server/routes/data/controllers/tokenInfo.js +9 -9
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/getColumns.js +8 -8
- package/server/routes/data/index.mjs +17 -17
- package/server/routes/data/schema.js +54 -54
- package/server/routes/menu/controllers/getMenu.js +67 -67
- package/server/routes/menu/index.mjs +5 -5
- package/server/routes/notifications/controllers/readNotifications.js +27 -27
- package/server/routes/notifications/controllers/testEmail.js +35 -35
- package/server/routes/notifications/controllers/userNotifications.js +53 -53
- package/server/routes/notifications/funcs/addNotification.js +21 -21
- package/server/routes/notifications/funcs/sendNotification.js +105 -105
- package/server/routes/notifications/hook/onWidgetSet.js +57 -57
- package/server/routes/notifications/index.mjs +27 -27
- package/server/routes/notifications/schema.js +16 -16
- package/server/routes/properties/controllers/admin.properties.get.js +29 -29
- package/server/routes/properties/controllers/admin.properties.post.js +2 -2
- package/server/routes/properties/controllers/user.properties.get.js +30 -30
- package/server/routes/properties/controllers/user.properties.post.js +30 -30
- package/server/routes/properties/funcs/getSettings.js +56 -56
- package/server/routes/properties/funcs/setSettings.js +44 -44
- package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
- package/server/routes/properties/index.mjs +14 -14
- package/server/routes/properties/schema.js +10 -10
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +26 -26
- package/server/routes/templates/index.mjs +16 -16
- package/server/routes/templates/schema.js +8 -8
- package/server/routes/user/controllers/user.cls.id.js +14 -14
- package/server/routes/user/controllers/user.cls.js +71 -71
- package/server/routes/user/controllers/user.cls.post.js +52 -52
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/widget/controllers/utils/historyFormat.js +75 -75
- package/server/routes/widget/controllers/utils/obj2db.js +13 -13
- package/server/routes/widget/controllers/widget.del.js +41 -41
- package/server/routes/widget/controllers/widget.get.js +96 -96
- package/server/routes/widget/controllers/widget.set.js +76 -76
- package/server/routes/widget/index.mjs +11 -11
- package/server/routes/widget/schema.js +12 -12
- package/server/templates/cls/itree.recrzone_category.json +73 -73
- package/server/templates/cls/test.json +9 -9
- package/server/templates/form/admin.user_cls.data.form.json +49 -49
- package/server/templates/form/admin.user_group_rel.form.json +21 -21
- package/server/templates/form/cp_building.form.json +32 -32
- package/server/templates/form/form-user-pass.json +10 -10
- package/server/templates/form/form-user_group.json +39 -39
- package/server/templates/form/form-users.json +156 -156
- package/server/templates/form/user_group_access.form.json +22 -22
- package/server/templates/select/account_id.json +2 -2
- package/server/templates/table/gis.dataset.table.json +43 -43
- package/server/templates/table/management.user_group.table.json +112 -112
- package/server/templates/table/management.users.table.json +126 -126
- package/utils.js +29 -29
@@ -308,8 +308,8 @@ function qm(t, e, i) {
|
|
308
308
|
metaTokens: !0,
|
309
309
|
dots: !1,
|
310
310
|
indexes: !1
|
311
|
-
}, !1, function(
|
312
|
-
return !Ie.isUndefined(V[
|
311
|
+
}, !1, function(F, V) {
|
312
|
+
return !Ie.isUndefined(V[F]);
|
313
313
|
});
|
314
314
|
const n = i.metaTokens, r = i.visitor || S, l = i.dots, u = i.indexes, g = (i.Blob || typeof Blob < "u" && Blob) && Ie.isSpecCompliantForm(e);
|
315
315
|
if (!Ie.isFunction(r))
|
@@ -322,39 +322,39 @@ function qm(t, e, i) {
|
|
322
322
|
throw new Gt("Blob is not supported. Use a Buffer instead.");
|
323
323
|
return Ie.isArrayBuffer(I) || Ie.isTypedArray(I) ? g && typeof Blob == "function" ? new Blob([I]) : Buffer.from(I) : I;
|
324
324
|
}
|
325
|
-
function S(I,
|
325
|
+
function S(I, F, V) {
|
326
326
|
let W = I;
|
327
327
|
if (I && !V && typeof I == "object") {
|
328
|
-
if (Ie.endsWith(
|
329
|
-
|
330
|
-
else if (Ie.isArray(I) && PA(I) || (Ie.isFileList(I) || Ie.endsWith(
|
331
|
-
return
|
328
|
+
if (Ie.endsWith(F, "{}"))
|
329
|
+
F = n ? F : F.slice(0, -2), I = JSON.stringify(I);
|
330
|
+
else if (Ie.isArray(I) && PA(I) || (Ie.isFileList(I) || Ie.endsWith(F, "[]")) && (W = Ie.toArray(I)))
|
331
|
+
return F = RS(F), W.forEach(function(ce, Q) {
|
332
332
|
!(Ie.isUndefined(ce) || ce === null) && e.append(
|
333
333
|
// eslint-disable-next-line no-nested-ternary
|
334
|
-
u === !0 ? Eb([
|
334
|
+
u === !0 ? Eb([F], Q, l) : u === null ? F : F + "[]",
|
335
335
|
_(ce)
|
336
336
|
);
|
337
337
|
}), !1;
|
338
338
|
}
|
339
|
-
return z0(I) ? !0 : (e.append(Eb(V,
|
339
|
+
return z0(I) ? !0 : (e.append(Eb(V, F, l), _(I)), !1);
|
340
340
|
}
|
341
341
|
const k = [], M = Object.assign(IA, {
|
342
342
|
defaultVisitor: S,
|
343
343
|
convertValue: _,
|
344
344
|
isVisitable: z0
|
345
345
|
});
|
346
|
-
function P(I,
|
346
|
+
function P(I, F) {
|
347
347
|
if (!Ie.isUndefined(I)) {
|
348
348
|
if (k.indexOf(I) !== -1)
|
349
|
-
throw Error("Circular reference detected in " +
|
349
|
+
throw Error("Circular reference detected in " + F.join("."));
|
350
350
|
k.push(I), Ie.forEach(I, function(W, se) {
|
351
351
|
(!(Ie.isUndefined(W) || W === null) && r.call(
|
352
352
|
e,
|
353
353
|
W,
|
354
354
|
Ie.isString(se) ? se.trim() : se,
|
355
|
-
|
355
|
+
F,
|
356
356
|
M
|
357
|
-
)) === !0 && P(W,
|
357
|
+
)) === !0 && P(W, F ? F.concat(se) : [se]);
|
358
358
|
}), k.pop();
|
359
359
|
}
|
360
360
|
}
|
@@ -525,7 +525,7 @@ function HA(t, e, i) {
|
|
525
525
|
if (n.name !== "SyntaxError")
|
526
526
|
throw n;
|
527
527
|
}
|
528
|
-
return (
|
528
|
+
return (i || JSON.stringify)(t);
|
529
529
|
}
|
530
530
|
const dp = {
|
531
531
|
transitional: BS,
|
@@ -1032,7 +1032,7 @@ const US = (t) => {
|
|
1032
1032
|
let l = r.data;
|
1033
1033
|
const u = Yr.from(r.headers).normalize();
|
1034
1034
|
let { responseType: a, onUploadProgress: g, onDownloadProgress: _ } = r, S, k, M, P, I;
|
1035
|
-
function
|
1035
|
+
function F() {
|
1036
1036
|
P && P(), I && I(), r.cancelToken && r.cancelToken.unsubscribe(S), r.signal && r.signal.removeEventListener("abort", S);
|
1037
1037
|
}
|
1038
1038
|
let V = new XMLHttpRequest();
|
@@ -1051,9 +1051,9 @@ const US = (t) => {
|
|
1051
1051
|
request: V
|
1052
1052
|
};
|
1053
1053
|
VS(function(Pe) {
|
1054
|
-
i(Pe),
|
1054
|
+
i(Pe), F();
|
1055
1055
|
}, function(Pe) {
|
1056
|
-
n(Pe),
|
1056
|
+
n(Pe), F();
|
1057
1057
|
}, Oe), V = null;
|
1058
1058
|
}
|
1059
1059
|
"onloadend" in V ? V.onloadend = W : V.onreadystatechange = function() {
|
@@ -1108,7 +1108,7 @@ const US = (t) => {
|
|
1108
1108
|
}
|
1109
1109
|
}, aP = function* (t, e) {
|
1110
1110
|
let i = t.byteLength;
|
1111
|
-
if (i < e) {
|
1111
|
+
if (!e || i < e) {
|
1112
1112
|
yield t;
|
1113
1113
|
return;
|
1114
1114
|
}
|
@@ -1223,7 +1223,7 @@ const dP = async (t) => {
|
|
1223
1223
|
} = US(t);
|
1224
1224
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
1225
1225
|
let P = oP([r, l && l.toAbortSignal()], u), I;
|
1226
|
-
const
|
1226
|
+
const F = P && P.unsubscribe && (() => {
|
1227
1227
|
P.unsubscribe();
|
1228
1228
|
});
|
1229
1229
|
let V;
|
@@ -1255,7 +1255,7 @@ const dP = async (t) => {
|
|
1255
1255
|
});
|
1256
1256
|
let se = await fetch(I);
|
1257
1257
|
const ce = L0 && (_ === "stream" || _ === "response");
|
1258
|
-
if (L0 && (a || ce &&
|
1258
|
+
if (L0 && (a || ce && F)) {
|
1259
1259
|
const Oe = {};
|
1260
1260
|
["status", "statusText", "headers"].forEach((ze) => {
|
1261
1261
|
Oe[ze] = se[ze];
|
@@ -1266,14 +1266,14 @@ const dP = async (t) => {
|
|
1266
1266
|
) || [];
|
1267
1267
|
se = new Response(
|
1268
1268
|
Rb(se.body, Lb, Pe, () => {
|
1269
|
-
Xe && Xe(),
|
1269
|
+
Xe && Xe(), F && F();
|
1270
1270
|
}),
|
1271
1271
|
Oe
|
1272
1272
|
);
|
1273
1273
|
}
|
1274
1274
|
_ = _ || "text";
|
1275
1275
|
let Q = await cm[Ie.findKey(cm, _) || "text"](se, t);
|
1276
|
-
return !ce &&
|
1276
|
+
return !ce && F && F(), await new Promise((Oe, ke) => {
|
1277
1277
|
VS(Oe, ke, {
|
1278
1278
|
data: Q,
|
1279
1279
|
headers: Yr.from(se.headers),
|
@@ -1284,7 +1284,7 @@ const dP = async (t) => {
|
|
1284
1284
|
});
|
1285
1285
|
});
|
1286
1286
|
} catch (W) {
|
1287
|
-
throw
|
1287
|
+
throw F && F(), W && W.name === "TypeError" && /fetch/i.test(W.message) ? Object.assign(
|
1288
1288
|
new Gt("Network Error", Gt.ERR_NETWORK, t, I),
|
1289
1289
|
{
|
1290
1290
|
cause: W.cause || W
|
@@ -1461,12 +1461,12 @@ class cc {
|
|
1461
1461
|
), i.headers = Yr.concat(u, l);
|
1462
1462
|
const a = [];
|
1463
1463
|
let g = !0;
|
1464
|
-
this.interceptors.request.forEach(function(
|
1465
|
-
typeof
|
1464
|
+
this.interceptors.request.forEach(function(F) {
|
1465
|
+
typeof F.runWhen == "function" && F.runWhen(i) === !1 || (g = g && F.synchronous, a.unshift(F.fulfilled, F.rejected));
|
1466
1466
|
});
|
1467
1467
|
const _ = [];
|
1468
|
-
this.interceptors.response.forEach(function(
|
1469
|
-
_.push(
|
1468
|
+
this.interceptors.response.forEach(function(F) {
|
1469
|
+
_.push(F.fulfilled, F.rejected);
|
1470
1470
|
});
|
1471
1471
|
let S, k = 0, M;
|
1472
1472
|
if (!g) {
|
@@ -1478,11 +1478,11 @@ class cc {
|
|
1478
1478
|
M = a.length;
|
1479
1479
|
let P = i;
|
1480
1480
|
for (k = 0; k < M; ) {
|
1481
|
-
const I = a[k++],
|
1481
|
+
const I = a[k++], F = a[k++];
|
1482
1482
|
try {
|
1483
1483
|
P = I(P);
|
1484
1484
|
} catch (V) {
|
1485
|
-
|
1485
|
+
F.call(this, V);
|
1486
1486
|
break;
|
1487
1487
|
}
|
1488
1488
|
}
|
@@ -2012,14 +2012,14 @@ function nk(t, e) {
|
|
2012
2012
|
function tI(t, e, i, n) {
|
2013
2013
|
let r = [], l = [], u = null;
|
2014
2014
|
const a = ({ state: M }) => {
|
2015
|
-
const P = nk(t, location), I = i.value,
|
2015
|
+
const P = nk(t, location), I = i.value, F = e.value;
|
2016
2016
|
let V = 0;
|
2017
2017
|
if (M) {
|
2018
2018
|
if (i.value = P, e.value = M, u && u === I) {
|
2019
2019
|
u = null;
|
2020
2020
|
return;
|
2021
2021
|
}
|
2022
|
-
V =
|
2022
|
+
V = F ? M.position - F.position : 0;
|
2023
2023
|
} else
|
2024
2024
|
n(P);
|
2025
2025
|
r.forEach((W) => {
|
@@ -2226,10 +2226,10 @@ function cI(t, e) {
|
|
2226
2226
|
if (M.type === 0)
|
2227
2227
|
k || (r += "/"), r += M.value.replace(lI, "\\$&"), P += 40;
|
2228
2228
|
else if (M.type === 1) {
|
2229
|
-
const { value: I, repeatable:
|
2229
|
+
const { value: I, repeatable: F, optional: V, regexp: W } = M;
|
2230
2230
|
l.push({
|
2231
2231
|
name: I,
|
2232
|
-
repeatable:
|
2232
|
+
repeatable: F,
|
2233
2233
|
optional: V
|
2234
2234
|
});
|
2235
2235
|
const se = W || Wb;
|
@@ -2241,10 +2241,10 @@ function cI(t, e) {
|
|
2241
2241
|
throw new Error(`Invalid custom RegExp for param "${I}" (${se}): ` + Q.message);
|
2242
2242
|
}
|
2243
2243
|
}
|
2244
|
-
let ce =
|
2244
|
+
let ce = F ? `((?:${se})(?:/(?:${se}))*)` : `(${se})`;
|
2245
2245
|
k || (ce = // avoid an optional / if there are more segments e.g. /:p?-static
|
2246
2246
|
// or /:p?-:p2
|
2247
|
-
V && _.length < 2 ? `(?:/${ce})` : "/" + ce), V && (ce += "?"), r += ce, P += 20, V && (P += -8),
|
2247
|
+
V && _.length < 2 ? `(?:/${ce})` : "/" + ce), V && (ce += "?"), r += ce, P += 20, V && (P += -8), F && (P += -20), se === ".*" && (P += -50);
|
2248
2248
|
}
|
2249
2249
|
S.push(P);
|
2250
2250
|
}
|
@@ -2274,8 +2274,8 @@ function cI(t, e) {
|
|
2274
2274
|
if (P.type === 0)
|
2275
2275
|
S += P.value;
|
2276
2276
|
else if (P.type === 1) {
|
2277
|
-
const { value: I, repeatable:
|
2278
|
-
if (ys(W) && !
|
2277
|
+
const { value: I, repeatable: F, optional: V } = P, W = I in _ ? _[I] : "";
|
2278
|
+
if (ys(W) && !F)
|
2279
2279
|
throw new Error(`Provided param "${I}" is an array but it is not repeatable (* or + modifiers)`);
|
2280
2280
|
const se = ys(W) ? W.join("/") : W;
|
2281
2281
|
if (!se)
|
@@ -2414,21 +2414,21 @@ function mI(t, e) {
|
|
2414
2414
|
return n.get(k);
|
2415
2415
|
}
|
2416
2416
|
function l(k, M, P) {
|
2417
|
-
const I = !P,
|
2418
|
-
process.env.NODE_ENV !== "production" && xI(
|
2417
|
+
const I = !P, F = gI(k);
|
2418
|
+
process.env.NODE_ENV !== "production" && xI(F, M), F.aliasOf = P && P.record;
|
2419
2419
|
const V = Xb(e, k), W = [
|
2420
|
-
|
2420
|
+
F
|
2421
2421
|
];
|
2422
2422
|
if ("alias" in k) {
|
2423
2423
|
const Q = typeof k.alias == "string" ? [k.alias] : k.alias;
|
2424
2424
|
for (const Oe of Q)
|
2425
|
-
W.push(Ii({},
|
2425
|
+
W.push(Ii({}, F, {
|
2426
2426
|
// this allows us to hold a copy of the `components` option
|
2427
2427
|
// so that async components cache is hold on the original record
|
2428
|
-
components: P ? P.record.components :
|
2428
|
+
components: P ? P.record.components : F.components,
|
2429
2429
|
path: Oe,
|
2430
2430
|
// we might be the child of an alias
|
2431
|
-
aliasOf: P ? P.record :
|
2431
|
+
aliasOf: P ? P.record : F
|
2432
2432
|
// the aliases are always of the same kind as the original since they
|
2433
2433
|
// are defined on the same record
|
2434
2434
|
}));
|
@@ -2443,8 +2443,8 @@ function mI(t, e) {
|
|
2443
2443
|
if (process.env.NODE_ENV !== "production" && Q.path === "*")
|
2444
2444
|
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
2445
2445
|
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
2446
|
-
if (se = fI(Q, M, V), process.env.NODE_ENV !== "production" && M && Oe[0] === "/" && bI(se, M), P ? (P.alias.push(se), process.env.NODE_ENV !== "production" && vI(P, se)) : (ce = ce || se, ce !== se && ce.alias.push(se), I && k.name && !Yb(se) && u(k.name)), ok(se) && g(se),
|
2447
|
-
const ke =
|
2446
|
+
if (se = fI(Q, M, V), process.env.NODE_ENV !== "production" && M && Oe[0] === "/" && bI(se, M), P ? (P.alias.push(se), process.env.NODE_ENV !== "production" && vI(P, se)) : (ce = ce || se, ce !== se && ce.alias.push(se), I && k.name && !Yb(se) && u(k.name)), ok(se) && g(se), F.children) {
|
2447
|
+
const ke = F.children;
|
2448
2448
|
for (let Pe = 0; Pe < ke.length; Pe++)
|
2449
2449
|
l(ke[Pe], se, P && P.children[Pe]);
|
2450
2450
|
}
|
@@ -2471,7 +2471,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
|
|
2471
2471
|
i.splice(M, 0, k), k.record.name && !Yb(k) && n.set(k.record.name, k);
|
2472
2472
|
}
|
2473
2473
|
function _(k, M) {
|
2474
|
-
let P, I = {},
|
2474
|
+
let P, I = {}, F, V;
|
2475
2475
|
if ("name" in k && k.name) {
|
2476
2476
|
if (P = n.get(k.name), !P)
|
2477
2477
|
throw Gu(1, {
|
@@ -2492,16 +2492,16 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
|
|
2492
2492
|
// discard any existing params in the current location that do not exist here
|
2493
2493
|
// #1497 this ensures better active/exact matching
|
2494
2494
|
k.params && Zb(k.params, P.keys.map((ce) => ce.name))
|
2495
|
-
),
|
2495
|
+
), F = P.stringify(I);
|
2496
2496
|
} else if (k.path != null)
|
2497
|
-
|
2497
|
+
F = k.path, process.env.NODE_ENV !== "production" && !F.startsWith("/") && ni(`The Matcher cannot resolve relative paths but received "${F}". Unless you directly called \`matcher.resolve("${F}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), P = i.find((ce) => ce.re.test(F)), P && (I = P.parse(F), V = P.record.name);
|
2498
2498
|
else {
|
2499
2499
|
if (P = M.name ? n.get(M.name) : i.find((ce) => ce.re.test(M.path)), !P)
|
2500
2500
|
throw Gu(1, {
|
2501
2501
|
location: k,
|
2502
2502
|
currentLocation: M
|
2503
2503
|
});
|
2504
|
-
V = P.record.name, I = Ii({}, M.params, k.params),
|
2504
|
+
V = P.record.name, I = Ii({}, M.params, k.params), F = P.stringify(I);
|
2505
2505
|
}
|
2506
2506
|
const W = [];
|
2507
2507
|
let se = P;
|
@@ -2509,7 +2509,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
|
|
2509
2509
|
W.unshift(se.record), se = se.parent;
|
2510
2510
|
return {
|
2511
2511
|
name: V,
|
2512
|
-
path:
|
2512
|
+
path: F,
|
2513
2513
|
params: I,
|
2514
2514
|
matched: W,
|
2515
2515
|
meta: _I(W)
|
@@ -2758,14 +2758,14 @@ function Qb(t) {
|
|
2758
2758
|
const I = P.findIndex(yl.bind(null, M));
|
2759
2759
|
if (I > -1)
|
2760
2760
|
return I;
|
2761
|
-
const
|
2761
|
+
const F = e1(S[k - 2]);
|
2762
2762
|
return (
|
2763
2763
|
// we are dealing with nested routes
|
2764
2764
|
k > 1 && // if the parent and matched route have the same path, this link is
|
2765
2765
|
// referring to the empty child. Or we currently are on a different
|
2766
2766
|
// child of the same parent
|
2767
|
-
e1(M) ===
|
2768
|
-
P[P.length - 1].path !==
|
2767
|
+
e1(M) === F && // avoid comparing the child with its parent
|
2768
|
+
P[P.length - 1].path !== F ? P.findIndex(yl.bind(null, S[k - 2])) : I
|
2769
2769
|
);
|
2770
2770
|
}), a = Fs(() => u.value > -1 && II(i.params, l.value.params)), g = Fs(() => u.value > -1 && u.value === i.matched.length - 1 && ik(i.params, l.value.params));
|
2771
2771
|
function _(S = {}) {
|
@@ -2891,7 +2891,7 @@ const t1 = (t, e, i) => t ?? e ?? i, DI = /* @__PURE__ */ so({
|
|
2891
2891
|
return I_(() => [g.value, a.value, t.name], ([_, S, k], [M, P, I]) => {
|
2892
2892
|
S && (S.instances[k] = _, P && P !== S && _ && _ === M && (S.leaveGuards.size || (S.leaveGuards = P.leaveGuards), S.updateGuards.size || (S.updateGuards = P.updateGuards))), _ && S && // if there is no instance but to and from are the same this might be
|
2893
2893
|
// the first visit
|
2894
|
-
(!P || !yl(S, P) || !M) && (S.enterCallbacks[k] || []).forEach((
|
2894
|
+
(!P || !yl(S, P) || !M) && (S.enterCallbacks[k] || []).forEach((F) => F(_));
|
2895
2895
|
}, { flush: "post" }), () => {
|
2896
2896
|
const _ = r.value, S = t.name, k = a.value, M = k && k.components[S];
|
2897
2897
|
if (!M)
|
@@ -2997,11 +2997,11 @@ function LI(t, e, i) {
|
|
2997
2997
|
});
|
2998
2998
|
}
|
2999
2999
|
ys(k.__vrl_devtools) && (k.__devtoolsApi = r, k.__vrl_devtools.forEach((M) => {
|
3000
|
-
let P = M.route.path, I = uk,
|
3001
|
-
M.error ? (P = M.error, I = VI, V = jI) : M.isExactActive ? (I = ck,
|
3000
|
+
let P = M.route.path, I = uk, F = "", V = 0;
|
3001
|
+
M.error ? (P = M.error, I = VI, V = jI) : M.isExactActive ? (I = ck, F = "This is exactly active") : M.isActive && (I = lk, F = "This link is active"), S.tags.push({
|
3002
3002
|
label: P,
|
3003
3003
|
textColor: V,
|
3004
|
-
tooltip:
|
3004
|
+
tooltip: F,
|
3005
3005
|
backgroundColor: I
|
3006
3006
|
});
|
3007
3007
|
}));
|
@@ -3229,7 +3229,7 @@ function WI(t) {
|
|
3229
3229
|
const je = e.getRecordMatcher(Ee);
|
3230
3230
|
je ? e.removeRoute(je) : process.env.NODE_ENV !== "production" && ni(`Cannot remove non-existent route "${String(Ee)}"`);
|
3231
3231
|
}
|
3232
|
-
function
|
3232
|
+
function F() {
|
3233
3233
|
return e.getRoutes().map((Ee) => Ee.record);
|
3234
3234
|
}
|
3235
3235
|
function V(Ee) {
|
@@ -3529,7 +3529,7 @@ ${JSON.stringify(ct, null, 2)}
|
|
3529
3529
|
removeRoute: I,
|
3530
3530
|
clearRoutes: e.clearRoutes,
|
3531
3531
|
hasRoute: V,
|
3532
|
-
getRoutes:
|
3532
|
+
getRoutes: F,
|
3533
3533
|
resolve: W,
|
3534
3534
|
options: t,
|
3535
3535
|
push: Q,
|
@@ -3588,17 +3588,17 @@ function Fq(t) {
|
|
3588
3588
|
}
|
3589
3589
|
const ZI = [
|
3590
3590
|
// { name: 'profile', path: '/profile', component: () => import('../components/profile/vs-profile.vue') },
|
3591
|
-
{ name: "edit", path: "/edit", component: () => import("./edit-page-
|
3592
|
-
{ name: "add", path: "/add", component: () => import("./add-page-
|
3591
|
+
{ name: "edit", path: "/edit", component: () => import("./edit-page-BfCFDhcy.js") },
|
3592
|
+
{ name: "add", path: "/add", component: () => import("./add-page-HDC8_rFS.js") },
|
3593
3593
|
{
|
3594
3594
|
name: "card-view",
|
3595
3595
|
path: "/card",
|
3596
|
-
component: () => import("./card-view-
|
3596
|
+
component: () => import("./card-view-Bxl61faa.js"),
|
3597
3597
|
children: [{
|
3598
3598
|
name: "table",
|
3599
3599
|
path: ":table",
|
3600
|
-
component: () => import("./card-view-
|
3601
|
-
children: [{ name: "card", path: ":id", component: () => import("./card-page-
|
3600
|
+
component: () => import("./card-view-Bxl61faa.js"),
|
3601
|
+
children: [{ name: "card", path: ":id", component: () => import("./card-page-CpvUoIWB.js") }]
|
3602
3602
|
}]
|
3603
3603
|
}
|
3604
3604
|
], Pt = (t, e) => {
|
@@ -3651,14 +3651,14 @@ const QI = /* @__PURE__ */ Pt(YI, [["render", JI]]), eD = (t) => {
|
|
3651
3651
|
{
|
3652
3652
|
path: "/",
|
3653
3653
|
name: "home",
|
3654
|
-
component: () => import("./admin-view-
|
3654
|
+
component: () => import("./admin-view-DbvhgbGK.js"),
|
3655
3655
|
children: [
|
3656
3656
|
...e,
|
3657
3657
|
...t,
|
3658
3658
|
// { path: '/', redirect: '/home' },
|
3659
3659
|
{
|
3660
3660
|
path: "/:catchAll(.*)",
|
3661
|
-
component: () => import("./admin-interface-
|
3661
|
+
component: () => import("./admin-interface-BAhPvohd.js")
|
3662
3662
|
}
|
3663
3663
|
]
|
3664
3664
|
}
|
@@ -3788,12 +3788,12 @@ const aD = /* @__PURE__ */ Pt(rD, [["render", oD]]), lD = { class: "w-[170px]" }
|
|
3788
3788
|
class: Ns(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": r.value === (I == null ? void 0 : I.id) }])
|
3789
3789
|
}, [
|
3790
3790
|
qd(Z("input", {
|
3791
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
3791
|
+
"onUpdate:modelValue": S[1] || (S[1] = (F) => r.value = F),
|
3792
3792
|
value: I == null ? void 0 : I.id,
|
3793
3793
|
type: "checkbox",
|
3794
3794
|
class: "w-1 h-3 border-0 rounded-full appearance-none shrink-0 checked:bg-none",
|
3795
3795
|
style: pa({ backgroundColor: (I == null ? void 0 : I.color) || "#ffffff" }),
|
3796
|
-
onChange: (
|
3796
|
+
onChange: (F) => g(I == null ? void 0 : I.id)
|
3797
3797
|
}, null, 44, hD), [
|
3798
3798
|
[wS, r.value]
|
3799
3799
|
]),
|
@@ -6771,8 +6771,8 @@ const h2 = /* @__PURE__ */ Pt(UL, [["render", qL]]), WL = { class: "text-start"
|
|
6771
6771
|
};
|
6772
6772
|
function p2(t, e, i) {
|
6773
6773
|
if (t !== null)
|
6774
|
-
for (var n, r, l, u, a, g, _, S = 0, k = 0, M, P = t.type, I = P === "FeatureCollection",
|
6775
|
-
_ = I ? t.features[W].geometry :
|
6774
|
+
for (var n, r, l, u, a, g, _, S = 0, k = 0, M, P = t.type, I = P === "FeatureCollection", F = P === "Feature", V = I ? t.features.length : 1, W = 0; W < V; W++) {
|
6775
|
+
_ = I ? t.features[W].geometry : F ? t.geometry : t, M = _ ? _.type === "GeometryCollection" : !1, a = M ? _.geometries.length : 1;
|
6776
6776
|
for (var se = 0; se < a; se++) {
|
6777
6777
|
var ce = 0, Q = 0;
|
6778
6778
|
if (u = M ? _.geometries[se] : _, u !== null) {
|
@@ -7027,9 +7027,9 @@ var f2 = { exports: {} };
|
|
7027
7027
|
return this.sampleCurveY(this.solveCurveX(c, o));
|
7028
7028
|
} };
|
7029
7029
|
var I = g(M);
|
7030
|
-
let
|
7030
|
+
let F, V;
|
7031
7031
|
function W() {
|
7032
|
-
return
|
7032
|
+
return F == null && (F = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), F;
|
7033
7033
|
}
|
7034
7034
|
function se() {
|
7035
7035
|
if (V == null && (V = !1, W())) {
|
@@ -10505,7 +10505,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
10505
10505
|
}
|
10506
10506
|
}
|
10507
10507
|
R.prototype.bytesPerElement = 6, ot("StructArrayLayout3i6", R);
|
10508
|
-
class
|
10508
|
+
class B extends v {
|
10509
10509
|
_refreshViews() {
|
10510
10510
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
10511
10511
|
}
|
@@ -10518,8 +10518,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
10518
10518
|
return this.int16[w + 0] = h, this.int16[w + 1] = p, this.int16[w + 2] = y, this.int16[w + 3] = b, o;
|
10519
10519
|
}
|
10520
10520
|
}
|
10521
|
-
|
10522
|
-
class
|
10521
|
+
B.prototype.bytesPerElement = 8, ot("StructArrayLayout4i8", B);
|
10522
|
+
class N extends v {
|
10523
10523
|
_refreshViews() {
|
10524
10524
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
10525
10525
|
}
|
@@ -10532,7 +10532,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
10532
10532
|
return this.int16[E + 0] = h, this.int16[E + 1] = p, this.int16[E + 2] = y, this.int16[E + 3] = b, this.int16[E + 4] = w, this.int16[E + 5] = T, o;
|
10533
10533
|
}
|
10534
10534
|
}
|
10535
|
-
|
10535
|
+
N.prototype.bytesPerElement = 12, ot("StructArrayLayout2i4i12", N);
|
10536
10536
|
class q extends v {
|
10537
10537
|
_refreshViews() {
|
10538
10538
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
@@ -11060,7 +11060,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11060
11060
|
}
|
11061
11061
|
class Cs extends D {
|
11062
11062
|
}
|
11063
|
-
class $a extends
|
11063
|
+
class $a extends N {
|
11064
11064
|
}
|
11065
11065
|
class ru extends q {
|
11066
11066
|
}
|
@@ -14646,7 +14646,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
14646
14646
|
const c = performance.getEntriesByName(Iy)[0].duration, o = performance.getEntriesByName(Dy)[0].duration, h = yd.length, p = 1 / (yd.reduce((b, w) => b + w, 0) / h / 1e3), y = yd.filter((b) => b > Py).reduce((b, w) => b + (w - Py) / Py, 0);
|
14647
14647
|
return { loadTime: c, fullLoadTime: o, fps: p, percentDroppedFrames: y / (h + y) * 100, totalFrames: h };
|
14648
14648
|
} };
|
14649
|
-
u.$ = class extends
|
14649
|
+
u.$ = class extends B {
|
14650
14650
|
}, u.A = hu, u.B = $g, u.C = function(c) {
|
14651
14651
|
if (fi == null) {
|
14652
14652
|
const o = c.navigator ? c.navigator.userAgent : null;
|
@@ -15264,7 +15264,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
15264
15264
|
}
|
15265
15265
|
j + Y >= 0 != !!U && re.reverse();
|
15266
15266
|
}
|
15267
|
-
var
|
15267
|
+
var F = u.by(function re(U, j) {
|
15268
15268
|
var Y, te = U && U.type;
|
15269
15269
|
if (te === "FeatureCollection") for (Y = 0; Y < U.features.length; Y++) re(U.features[Y], j);
|
15270
15270
|
else if (te === "GeometryCollection") for (Y = 0; Y < U.geometries.length; Y++) re(U.geometries[Y], j);
|
@@ -15961,7 +15961,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
15961
15961
|
return u._(this, void 0, void 0, function* () {
|
15962
15962
|
let Y = yield this.loadGeoJSON(U, j);
|
15963
15963
|
if (delete this._pendingRequest, typeof Y != "object") throw new Error(`Input data given to '${U.source}' is not a valid GeoJSON object.`);
|
15964
|
-
if (
|
15964
|
+
if (F(Y, !0), U.filter) {
|
15965
15965
|
const te = u.bC(U.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
|
15966
15966
|
if (te.result === "error") throw new Error(te.value.map((fe) => `${fe.key}: ${fe.message}`).join(", "));
|
15967
15967
|
Y = { type: "FeatureCollection", features: Y.features.filter((fe) => te.value.evaluate({ zoom: 0 }, fe)) };
|
@@ -16178,25 +16178,25 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16178
16178
|
}
|
16179
16179
|
M.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, M.selectProp = M.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), M.transformProp = M.testProp(["transform", "WebkitTransform"]);
|
16180
16180
|
const P = { supported: !1, testSupport: function(x) {
|
16181
|
-
!V &&
|
16181
|
+
!V && F && (W ? se(x) : I = x);
|
16182
16182
|
} };
|
16183
|
-
let I,
|
16183
|
+
let I, F, V = !1, W = !1;
|
16184
16184
|
function se(x) {
|
16185
16185
|
const s = x.createTexture();
|
16186
16186
|
x.bindTexture(x.TEXTURE_2D, s);
|
16187
16187
|
try {
|
16188
|
-
if (x.texImage2D(x.TEXTURE_2D, 0, x.RGBA, x.RGBA, x.UNSIGNED_BYTE,
|
16188
|
+
if (x.texImage2D(x.TEXTURE_2D, 0, x.RGBA, x.RGBA, x.UNSIGNED_BYTE, F), x.isContextLost()) return;
|
16189
16189
|
P.supported = !0;
|
16190
16190
|
} catch {
|
16191
16191
|
}
|
16192
16192
|
x.deleteTexture(s), V = !0;
|
16193
16193
|
}
|
16194
16194
|
var ce;
|
16195
|
-
typeof document < "u" && (
|
16195
|
+
typeof document < "u" && (F = document.createElement("img"), F.onload = () => {
|
16196
16196
|
I && se(I), I = null, W = !0;
|
16197
|
-
},
|
16197
|
+
}, F.onerror = () => {
|
16198
16198
|
V = !0, I = null;
|
16199
|
-
},
|
16199
|
+
}, F.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), function(x) {
|
16200
16200
|
let s, d, f, m;
|
16201
16201
|
x.resetRequestQueue = () => {
|
16202
16202
|
s = [], d = 0, f = 0, m = {};
|
@@ -16205,23 +16205,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16205
16205
|
return m[R] = D, R;
|
16206
16206
|
}, x.removeThrottleControl = (D) => {
|
16207
16207
|
delete m[D], C();
|
16208
|
-
}, x.getImage = (D, R,
|
16209
|
-
P.supported && (D.headers || (D.headers = {}), D.headers.accept = "image/webp,*/*"), a.e(D, { type: "image" }), s.push({ abortController: R, requestParameters: D, supportImageRefresh:
|
16208
|
+
}, x.getImage = (D, R, B = !0) => new Promise((N, q) => {
|
16209
|
+
P.supported && (D.headers || (D.headers = {}), D.headers.accept = "image/webp,*/*"), a.e(D, { type: "image" }), s.push({ abortController: R, requestParameters: D, supportImageRefresh: B, state: "queued", onError: (K) => {
|
16210
16210
|
q(K);
|
16211
16211
|
}, onSuccess: (K) => {
|
16212
|
-
|
16212
|
+
N(K);
|
16213
16213
|
} }), C();
|
16214
16214
|
});
|
16215
16215
|
const v = (D) => a._(this, void 0, void 0, function* () {
|
16216
16216
|
D.state = "running";
|
16217
|
-
const { requestParameters: R, supportImageRefresh:
|
16217
|
+
const { requestParameters: R, supportImageRefresh: B, onError: N, onSuccess: q, abortController: K } = D, J = B === !1 && !a.i(self) && !a.g(R.url) && (!R.headers || Object.keys(R.headers).reduce((le, he) => le && he === "accept", !0));
|
16218
16218
|
d++;
|
16219
16219
|
const ne = J ? A(R, K) : a.m(R, K);
|
16220
16220
|
try {
|
16221
16221
|
const le = yield ne;
|
16222
16222
|
delete D.abortController, D.state = "completed", le.data instanceof HTMLImageElement || a.b(le.data) ? q(le) : le.data && q({ data: yield (ae = le.data, typeof createImageBitmap == "function" ? a.d(ae) : a.f(ae)), cacheControl: le.cacheControl, expires: le.expires });
|
16223
16223
|
} catch (le) {
|
16224
|
-
delete D.abortController,
|
16224
|
+
delete D.abortController, N(le);
|
16225
16225
|
} finally {
|
16226
16226
|
d--, C();
|
16227
16227
|
}
|
@@ -16232,17 +16232,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16232
16232
|
return !1;
|
16233
16233
|
})() ? a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : a.a.MAX_PARALLEL_IMAGE_REQUESTS;
|
16234
16234
|
for (let R = d; R < D && s.length > 0; R++) {
|
16235
|
-
const
|
16236
|
-
|
16235
|
+
const B = s.shift();
|
16236
|
+
B.abortController.signal.aborted ? R-- : v(B);
|
16237
16237
|
}
|
16238
|
-
}, A = (D, R) => new Promise((
|
16238
|
+
}, A = (D, R) => new Promise((B, N) => {
|
16239
16239
|
const q = new Image(), K = D.url, J = D.credentials;
|
16240
16240
|
J && J === "include" ? q.crossOrigin = "use-credentials" : (J && J === "same-origin" || !a.s(K)) && (q.crossOrigin = "anonymous"), R.signal.addEventListener("abort", () => {
|
16241
|
-
q.src = "",
|
16241
|
+
q.src = "", N(a.c());
|
16242
16242
|
}), q.fetchPriority = "high", q.onload = () => {
|
16243
|
-
q.onerror = q.onload = null,
|
16243
|
+
q.onerror = q.onload = null, B({ data: q });
|
16244
16244
|
}, q.onerror = () => {
|
16245
|
-
q.onerror = q.onload = null, R.signal.aborted ||
|
16245
|
+
q.onerror = q.onload = null, R.signal.aborted || N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
|
16246
16246
|
}, q.src = K;
|
16247
16247
|
});
|
16248
16248
|
}(ce || (ce = {})), ce.resetRequestQueue();
|
@@ -16297,8 +16297,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16297
16297
|
const { width: m, height: v } = s, C = !(this.size && this.size[0] === m && this.size[1] === v || f), { context: A } = this, { gl: D } = A;
|
16298
16298
|
if (this.useMipmap = !!(d && d.useMipmap), D.bindTexture(D.TEXTURE_2D, this.texture), A.pixelStoreUnpackFlipY.set(!1), A.pixelStoreUnpack.set(1), A.pixelStoreUnpackPremultiplyAlpha.set(this.format === D.RGBA && (!d || d.premultiply !== !1)), C) this.size = [m, v], s instanceof HTMLImageElement || s instanceof HTMLCanvasElement || s instanceof HTMLVideoElement || s instanceof ImageData || a.b(s) ? D.texImage2D(D.TEXTURE_2D, 0, this.format, this.format, D.UNSIGNED_BYTE, s) : D.texImage2D(D.TEXTURE_2D, 0, this.format, m, v, 0, this.format, D.UNSIGNED_BYTE, s.data);
|
16299
16299
|
else {
|
16300
|
-
const { x: R, y:
|
16301
|
-
s instanceof HTMLImageElement || s instanceof HTMLCanvasElement || s instanceof HTMLVideoElement || s instanceof ImageData || a.b(s) ? D.texSubImage2D(D.TEXTURE_2D, 0, R,
|
16300
|
+
const { x: R, y: B } = f || { x: 0, y: 0 };
|
16301
|
+
s instanceof HTMLImageElement || s instanceof HTMLCanvasElement || s instanceof HTMLVideoElement || s instanceof ImageData || a.b(s) ? D.texSubImage2D(D.TEXTURE_2D, 0, R, B, D.RGBA, D.UNSIGNED_BYTE, s) : D.texSubImage2D(D.TEXTURE_2D, 0, R, B, m, v, D.RGBA, D.UNSIGNED_BYTE, s.data);
|
16302
16302
|
}
|
16303
16303
|
this.useMipmap && this.isSizePowerOfTwo() && D.generateMipmap(D.TEXTURE_2D);
|
16304
16304
|
}
|
@@ -16415,8 +16415,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16415
16415
|
const { w: d, h: f } = a.p(s), m = this.atlasImage;
|
16416
16416
|
m.resize({ width: d || 1, height: f || 1 });
|
16417
16417
|
for (const v in this.patterns) {
|
16418
|
-
const { bin: C } = this.patterns[v], A = C.x + 1, D = C.y + 1, R = this.getImage(v).data,
|
16419
|
-
a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D }, { width:
|
16418
|
+
const { bin: C } = this.patterns[v], A = C.x + 1, D = C.y + 1, R = this.getImage(v).data, B = R.width, N = R.height;
|
16419
|
+
a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D }, { width: B, height: N }), a.R.copy(R, m, { x: 0, y: N - 1 }, { x: A, y: D - 1 }, { width: B, height: 1 }), a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D + N }, { width: B, height: 1 }), a.R.copy(R, m, { x: B - 1, y: 0 }, { x: A - 1, y: D }, { width: 1, height: N }), a.R.copy(R, m, { x: 0, y: 0 }, { x: A + B, y: D }, { width: 1, height: N });
|
16420
16420
|
}
|
16421
16421
|
this.dirty = !0;
|
16422
16422
|
}
|
@@ -16441,17 +16441,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16441
16441
|
v[0] = 0, C[0] = -Nt, C[1] = Nt, m[0] = x[s];
|
16442
16442
|
for (let A = 1, D = 0, R = 0; A < f; A++) {
|
16443
16443
|
m[A] = x[s + A * d];
|
16444
|
-
const
|
16444
|
+
const B = A * A;
|
16445
16445
|
do {
|
16446
|
-
const
|
16447
|
-
R = (m[A] - m[
|
16446
|
+
const N = v[D];
|
16447
|
+
R = (m[A] - m[N] + B - N * N) / (A - N) / 2;
|
16448
16448
|
} while (R <= C[D] && --D > -1);
|
16449
16449
|
D++, v[D] = A, C[D] = R, C[D + 1] = Nt;
|
16450
16450
|
}
|
16451
16451
|
for (let A = 0, D = 0; A < f; A++) {
|
16452
16452
|
for (; C[D + 1] < A; ) D++;
|
16453
|
-
const R = v[D],
|
16454
|
-
x[s + A * d] = m[R] +
|
16453
|
+
const R = v[D], B = A - R;
|
16454
|
+
x[s + A * d] = m[R] + B * B;
|
16455
16455
|
}
|
16456
16456
|
}
|
16457
16457
|
class Qt {
|
@@ -16524,12 +16524,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16524
16524
|
return s.width = s.height = x, s;
|
16525
16525
|
}
|
16526
16526
|
draw(x) {
|
16527
|
-
const { width: s, actualBoundingBoxAscent: d, actualBoundingBoxDescent: f, actualBoundingBoxLeft: m, actualBoundingBoxRight: v } = this.ctx.measureText(x), C = Math.ceil(d), A = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(v - m))), D = Math.min(this.size - this.buffer, C + Math.ceil(f)), R = A + 2 * this.buffer,
|
16527
|
+
const { width: s, actualBoundingBoxAscent: d, actualBoundingBoxDescent: f, actualBoundingBoxLeft: m, actualBoundingBoxRight: v } = this.ctx.measureText(x), C = Math.ceil(d), A = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(v - m))), D = Math.min(this.size - this.buffer, C + Math.ceil(f)), R = A + 2 * this.buffer, B = D + 2 * this.buffer, N = Math.max(R * B, 0), q = new Uint8ClampedArray(N), K = { data: q, width: R, height: B, glyphWidth: A, glyphHeight: D, glyphTop: C, glyphLeft: 0, glyphAdvance: s };
|
16528
16528
|
if (A === 0 || D === 0) return K;
|
16529
16529
|
const { ctx: J, buffer: ne, gridInner: ae, gridOuter: le } = this;
|
16530
16530
|
J.clearRect(ne, ne, A, D), J.fillText(x, ne, ne + C);
|
16531
16531
|
const he = J.getImageData(ne, ne, A, D);
|
16532
|
-
le.fill(Nt, 0,
|
16532
|
+
le.fill(Nt, 0, N), ae.fill(0, 0, N);
|
16533
16533
|
for (let ee = 0; ee < D; ee++) for (let me = 0; me < A; me++) {
|
16534
16534
|
const ge = he.data[4 * (ee * A + me) + 3] / 255;
|
16535
16535
|
if (ge === 0) continue;
|
@@ -16540,8 +16540,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16540
16540
|
le[be] = Re > 0 ? Re * Re : 0, ae[be] = Re < 0 ? Re * Re : 0;
|
16541
16541
|
}
|
16542
16542
|
}
|
16543
|
-
si(le, 0, 0, R,
|
16544
|
-
for (let ee = 0; ee <
|
16543
|
+
si(le, 0, 0, R, B, R, this.f, this.v, this.z), si(ae, ne, ne, A, D, R, this.f, this.v, this.z);
|
16544
|
+
for (let ee = 0; ee < N; ee++) {
|
16545
16545
|
const me = Math.sqrt(le[ee]) - Math.sqrt(ae[ee]);
|
16546
16546
|
q[ee] = Math.round(255 - 255 * (me / this.radius + this.cutoff));
|
16547
16547
|
}
|
@@ -16634,8 +16634,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16634
16634
|
let D = s[0];
|
16635
16635
|
for (let R = 1; R < s.length; R++) {
|
16636
16636
|
A = !A;
|
16637
|
-
const
|
16638
|
-
v = D * f, D +=
|
16637
|
+
const B = s[R];
|
16638
|
+
v = D * f, D += B, C = D * f, m.push({ left: v, right: C, isDash: A, zeroLength: B === 0 });
|
16639
16639
|
}
|
16640
16640
|
return m;
|
16641
16641
|
}
|
@@ -16646,7 +16646,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16646
16646
|
let A = 0, D = s[A];
|
16647
16647
|
for (let R = 0; R < this.width; R++) {
|
16648
16648
|
R / D.right > 1 && (D = s[++A]);
|
16649
|
-
const
|
16649
|
+
const B = Math.abs(R - D.left), N = Math.abs(R - D.right), q = Math.min(B, N);
|
16650
16650
|
let K;
|
16651
16651
|
const J = v / f * (m + 1);
|
16652
16652
|
if (D.isDash) {
|
@@ -16668,8 +16668,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16668
16668
|
let v = 0, C = s[v];
|
16669
16669
|
for (let A = 0; A < this.width; A++) {
|
16670
16670
|
A / C.right > 1 && (C = s[++v]);
|
16671
|
-
const D = Math.abs(A - C.left), R = Math.abs(A - C.right),
|
16672
|
-
this.data[m + A] = Math.max(0, Math.min(255, (C.isDash ?
|
16671
|
+
const D = Math.abs(A - C.left), R = Math.abs(A - C.right), B = Math.min(D, R);
|
16672
|
+
this.data[m + A] = Math.max(0, Math.min(255, (C.isDash ? B : -B) + 128));
|
16673
16673
|
}
|
16674
16674
|
}
|
16675
16675
|
addDash(s, d) {
|
@@ -16751,8 +16751,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16751
16751
|
return a.J(d, d, [1, 1, 0]), a.K(d, d, [0.5 * x.width, 0.5 * x.height, 1]), a.L(d, d, x.calculatePosMatrix(s.toUnwrapped()));
|
16752
16752
|
}
|
16753
16753
|
function Rt(x, s, d, f, m, v) {
|
16754
|
-
const C = function(
|
16755
|
-
if (
|
16754
|
+
const C = function(N, q, K) {
|
16755
|
+
if (N) for (const J of N) {
|
16756
16756
|
const ne = q[J];
|
16757
16757
|
if (ne && ne.source === K && ne.type === "fill-extrusion") return !0;
|
16758
16758
|
}
|
@@ -16764,10 +16764,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16764
16764
|
}(m && m.layers, s, x.id), A = v.maxPitchScaleFactor(), D = x.tilesIn(f, A, C);
|
16765
16765
|
D.sort(Dt);
|
16766
16766
|
const R = [];
|
16767
|
-
for (const
|
16768
|
-
const
|
16767
|
+
for (const N of D) R.push({ wrappedTileID: N.tileID.wrapped().key, queryResults: N.tile.queryRenderedFeatures(s, d, x._state, N.queryGeometry, N.cameraQueryGeometry, N.scale, m, v, A, ai(x.transform, N.tileID)) });
|
16768
|
+
const B = function(N) {
|
16769
16769
|
const q = {}, K = {};
|
16770
|
-
for (const J of
|
16770
|
+
for (const J of N) {
|
16771
16771
|
const ne = J.queryResults, ae = J.wrappedTileID, le = K[ae] = K[ae] || {};
|
16772
16772
|
for (const he in ne) {
|
16773
16773
|
const ee = ne[he], me = le[he] = le[he] || {}, ge = q[he] = q[he] || [];
|
@@ -16776,11 +16776,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16776
16776
|
}
|
16777
16777
|
return q;
|
16778
16778
|
}(R);
|
16779
|
-
for (const
|
16779
|
+
for (const N in B) B[N].forEach((q) => {
|
16780
16780
|
const K = q.feature, J = x.getFeatureState(K.layer["source-layer"], K.id);
|
16781
16781
|
K.source = K.layer.source, K.layer["source-layer"] && (K.sourceLayer = K.layer["source-layer"]), K.state = J;
|
16782
16782
|
});
|
16783
|
-
return
|
16783
|
+
return B;
|
16784
16784
|
}
|
16785
16785
|
function Dt(x, s) {
|
16786
16786
|
const d = x.tileID, f = s.tileID;
|
@@ -17216,8 +17216,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17216
17216
|
this.tileID = function(m) {
|
17217
17217
|
let v = 1 / 0, C = 1 / 0, A = -1 / 0, D = -1 / 0;
|
17218
17218
|
for (const q of m) v = Math.min(v, q.x), C = Math.min(C, q.y), A = Math.max(A, q.x), D = Math.max(D, q.y);
|
17219
|
-
const R = Math.max(A - v, D - C),
|
17220
|
-
return new a.a1(
|
17219
|
+
const R = Math.max(A - v, D - C), B = Math.max(0, Math.floor(-Math.log(R) / Math.LN2)), N = Math.pow(2, B);
|
17220
|
+
return new a.a1(B, Math.floor((v + A) / 2 * N), Math.floor((C + D) / 2 * N));
|
17221
17221
|
}(d), this.minzoom = this.maxzoom = this.tileID.z;
|
17222
17222
|
const f = d.map((m) => this.tileID.getTilePoint(m)._round());
|
17223
17223
|
return this._boundsArray = new a.$(), this._boundsArray.emplaceBack(f[0].x, f[0].y, 0, 0), this._boundsArray.emplaceBack(f[1].x, f[1].y, a.X, 0), this._boundsArray.emplaceBack(f[3].x, f[3].y, 0, a.X), this._boundsArray.emplaceBack(f[2].x, f[2].y, a.X, a.X), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new a.k("data", { dataType: "source", sourceDataType: "content" })), this;
|
@@ -17426,7 +17426,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17426
17426
|
for (const A of m) {
|
17427
17427
|
const D = A.layerIds.map((R) => v.getLayer(R)).filter(Boolean);
|
17428
17428
|
if (D.length !== 0) {
|
17429
|
-
A.layers = D, A.stateDependentLayerIds && (A.stateDependentLayers = A.stateDependentLayerIds.map((R) => D.filter((
|
17429
|
+
A.layers = D, A.stateDependentLayerIds && (A.stateDependentLayers = A.stateDependentLayerIds.map((R) => D.filter((B) => B.id === R)[0]));
|
17430
17430
|
for (const R of D) C[R.id] = A;
|
17431
17431
|
}
|
17432
17432
|
}
|
@@ -17472,23 +17472,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17472
17472
|
prepare(s) {
|
17473
17473
|
this.imageAtlas && this.imageAtlas.patchUpdatedImages(s, this.imageAtlasTexture);
|
17474
17474
|
}
|
17475
|
-
queryRenderedFeatures(s, d, f, m, v, C, A, D, R,
|
17476
|
-
return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: m, cameraQueryGeometry: v, scale: C, tileSize: this.tileSize, pixelPosMatrix:
|
17475
|
+
queryRenderedFeatures(s, d, f, m, v, C, A, D, R, B) {
|
17476
|
+
return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: m, cameraQueryGeometry: v, scale: C, tileSize: this.tileSize, pixelPosMatrix: B, transform: D, params: A, queryPadding: this.queryPadding * R }, s, d, f) : {};
|
17477
17477
|
}
|
17478
17478
|
querySourceFeatures(s, d) {
|
17479
17479
|
const f = this.latestFeatureIndex;
|
17480
17480
|
if (!f || !f.rawTileData) return;
|
17481
17481
|
const m = f.loadVTLayers(), v = d && d.sourceLayer ? d.sourceLayer : "", C = m._geojsonTileLayer || m[v];
|
17482
17482
|
if (!C) return;
|
17483
|
-
const A = a.a7(d && d.filter), { z: D, x: R, y:
|
17483
|
+
const A = a.a7(d && d.filter), { z: D, x: R, y: B } = this.tileID.canonical, N = { z: D, x: R, y: B };
|
17484
17484
|
for (let q = 0; q < C.length; q++) {
|
17485
17485
|
const K = C.feature(q);
|
17486
17486
|
if (A.needGeometry) {
|
17487
17487
|
const ae = a.a8(K, !0);
|
17488
17488
|
if (!A.filter(new a.z(this.tileID.overscaledZ), ae, this.tileID.canonical)) continue;
|
17489
17489
|
} else if (!A.filter(new a.z(this.tileID.overscaledZ), K)) continue;
|
17490
|
-
const J = f.getId(K, v), ne = new a.a9(K, D, R,
|
17491
|
-
ne.tile =
|
17490
|
+
const J = f.getId(K, v), ne = new a.a9(K, D, R, B, J);
|
17491
|
+
ne.tile = N, s.push(ne);
|
17492
17492
|
}
|
17493
17493
|
}
|
17494
17494
|
hasData() {
|
@@ -17842,56 +17842,56 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17842
17842
|
}
|
17843
17843
|
}
|
17844
17844
|
_updateCoveredAndRetainedTiles(s, d, f, m, v, C) {
|
17845
|
-
const A = {}, D = {}, R = Object.keys(s),
|
17846
|
-
for (const
|
17847
|
-
const q = s[
|
17848
|
-
if (!K || K.fadeEndTime !== 0 && K.fadeEndTime <=
|
17845
|
+
const A = {}, D = {}, R = Object.keys(s), B = k.now();
|
17846
|
+
for (const N of R) {
|
17847
|
+
const q = s[N], K = this._tiles[N];
|
17848
|
+
if (!K || K.fadeEndTime !== 0 && K.fadeEndTime <= B) continue;
|
17849
17849
|
const J = this.findLoadedParent(q, d), ne = this.findLoadedSibling(q), ae = J || ne || null;
|
17850
|
-
ae && (this._addTile(ae.tileID), A[ae.tileID.key] = ae.tileID), D[
|
17850
|
+
ae && (this._addTile(ae.tileID), A[ae.tileID.key] = ae.tileID), D[N] = q;
|
17851
17851
|
}
|
17852
17852
|
this._retainLoadedChildren(D, m, f, s);
|
17853
|
-
for (const
|
17853
|
+
for (const N in A) s[N] || (this._coveredTiles[N] = !0, s[N] = A[N]);
|
17854
17854
|
if (C) {
|
17855
|
-
const
|
17856
|
-
for (const K of v) this._tiles[K.key].hasData() ?
|
17855
|
+
const N = {}, q = {};
|
17856
|
+
for (const K of v) this._tiles[K.key].hasData() ? N[K.key] = K : q[K.key] = K;
|
17857
17857
|
for (const K in q) {
|
17858
17858
|
const J = q[K].children(this._source.maxzoom);
|
17859
|
-
this._tiles[J[0].key] && this._tiles[J[1].key] && this._tiles[J[2].key] && this._tiles[J[3].key] && (
|
17859
|
+
this._tiles[J[0].key] && this._tiles[J[1].key] && this._tiles[J[2].key] && this._tiles[J[3].key] && (N[J[0].key] = s[J[0].key] = J[0], N[J[1].key] = s[J[1].key] = J[1], N[J[2].key] = s[J[2].key] = J[2], N[J[3].key] = s[J[3].key] = J[3], delete q[K]);
|
17860
17860
|
}
|
17861
17861
|
for (const K in q) {
|
17862
17862
|
const J = q[K], ne = this.findLoadedParent(J, this._source.minzoom), ae = this.findLoadedSibling(J), le = ne || ae || null;
|
17863
17863
|
if (le) {
|
17864
|
-
|
17865
|
-
for (const he in
|
17864
|
+
N[le.tileID.key] = s[le.tileID.key] = le.tileID;
|
17865
|
+
for (const he in N) N[he].isChildOf(le.tileID) && delete N[he];
|
17866
17866
|
}
|
17867
17867
|
}
|
17868
|
-
for (const K in this._tiles)
|
17868
|
+
for (const K in this._tiles) N[K] || (this._coveredTiles[K] = !0);
|
17869
17869
|
}
|
17870
17870
|
}
|
17871
17871
|
update(s, d) {
|
17872
17872
|
if (!this._sourceLoaded || this._paused) return;
|
17873
17873
|
let f;
|
17874
|
-
this.transform = s, this.terrain = d, this.updateCacheSize(s), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? f = s.getVisibleUnwrappedCoordinates(this._source.tileID).map((
|
17874
|
+
this.transform = s, this.terrain = d, this.updateCacheSize(s), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? f = s.getVisibleUnwrappedCoordinates(this._source.tileID).map((B) => new a.S(B.canonical.z, B.wrap, B.canonical.z, B.canonical.x, B.canonical.y)) : (f = s.coveringTiles({ tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: !this.usedForTerrain && this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled, terrain: d }), this._source.hasTile && (f = f.filter((B) => this._source.hasTile(B)))) : f = [];
|
17875
17875
|
const m = s.coveringZoomLevel(this._source), v = Math.max(m - Fe.maxOverzooming, this._source.minzoom), C = Math.max(m + Fe.maxUnderzooming, this._source.minzoom);
|
17876
17876
|
if (this.usedForTerrain) {
|
17877
|
-
const
|
17878
|
-
for (const
|
17879
|
-
const q =
|
17880
|
-
|
17881
|
-
const K =
|
17882
|
-
|
17877
|
+
const B = {};
|
17878
|
+
for (const N of f) if (N.canonical.z > this._source.minzoom) {
|
17879
|
+
const q = N.scaledTo(N.canonical.z - 1);
|
17880
|
+
B[q.key] = q;
|
17881
|
+
const K = N.scaledTo(Math.max(this._source.minzoom, Math.min(N.canonical.z, 5)));
|
17882
|
+
B[K.key] = K;
|
17883
17883
|
}
|
17884
|
-
f = f.concat(Object.values(
|
17884
|
+
f = f.concat(Object.values(B));
|
17885
17885
|
}
|
17886
17886
|
const A = f.length === 0 && !this._updated && this._didEmitContent;
|
17887
17887
|
this._updated = !0, A && this.fire(new a.k("data", { sourceDataType: "idle", dataType: "source", sourceId: this.id }));
|
17888
17888
|
const D = this._updateRetainedTiles(f, m);
|
17889
17889
|
qt(this._source.type) && this._updateCoveredAndRetainedTiles(D, v, C, m, f, d);
|
17890
|
-
for (const
|
17890
|
+
for (const B in D) this._tiles[B].clearFadeHold();
|
17891
17891
|
const R = a.ab(this._tiles, D);
|
17892
|
-
for (const
|
17893
|
-
const
|
17894
|
-
|
17892
|
+
for (const B of R) {
|
17893
|
+
const N = this._tiles[B];
|
17894
|
+
N.hasSymbolBuckets && !N.holdingForFade() ? N.setHoldDuration(this.map._fadeDuration) : N.hasSymbolBuckets && !N.symbolFadeFinished() || this._removeTile(B);
|
17895
17895
|
}
|
17896
17896
|
this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache();
|
17897
17897
|
}
|
@@ -17902,13 +17902,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17902
17902
|
var f;
|
17903
17903
|
const m = {}, v = {}, C = Math.max(d - Fe.maxOverzooming, this._source.minzoom), A = Math.max(d + Fe.maxUnderzooming, this._source.minzoom), D = {};
|
17904
17904
|
for (const R of s) {
|
17905
|
-
const
|
17906
|
-
m[R.key] = R,
|
17905
|
+
const B = this._addTile(R);
|
17906
|
+
m[R.key] = R, B.hasData() || d < this._source.maxzoom && (D[R.key] = R);
|
17907
17907
|
}
|
17908
17908
|
this._retainLoadedChildren(D, d, A, m);
|
17909
17909
|
for (const R of s) {
|
17910
|
-
let
|
17911
|
-
if (
|
17910
|
+
let B = this._tiles[R.key];
|
17911
|
+
if (B.hasData()) continue;
|
17912
17912
|
if (d + 1 > this._source.maxzoom) {
|
17913
17913
|
const q = R.children(this._source.maxzoom)[0], K = this.getTile(q);
|
17914
17914
|
if (K && K.hasData()) {
|
@@ -17919,13 +17919,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17919
17919
|
const q = R.children(this._source.maxzoom);
|
17920
17920
|
if (m[q[0].key] && m[q[1].key] && m[q[2].key] && m[q[3].key]) continue;
|
17921
17921
|
}
|
17922
|
-
let
|
17922
|
+
let N = B.wasRequested();
|
17923
17923
|
for (let q = R.overscaledZ - 1; q >= C; --q) {
|
17924
17924
|
const K = R.scaledTo(q);
|
17925
17925
|
if (v[K.key]) break;
|
17926
|
-
if (v[K.key] = !0,
|
17927
|
-
const J =
|
17928
|
-
if ((J || !(!((f = this.map) === null || f === void 0) && f.cancelPendingTileRequestsWhileZooming) ||
|
17926
|
+
if (v[K.key] = !0, B = this.getTile(K), !B && N && (B = this._addTile(K)), B) {
|
17927
|
+
const J = B.hasData();
|
17928
|
+
if ((J || !(!((f = this.map) === null || f === void 0) && f.cancelPendingTileRequestsWhileZooming) || N) && (m[K.key] = K), N = B.wasRequested(), J) break;
|
17929
17929
|
}
|
17930
17930
|
}
|
17931
17931
|
}
|
@@ -17987,12 +17987,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
17987
17987
|
const m = [], v = this.transform;
|
17988
17988
|
if (!v) return m;
|
17989
17989
|
const C = f ? v.getCameraQueryGeometry(s) : s, A = s.map((J) => v.pointCoordinate(J, this.terrain)), D = C.map((J) => v.pointCoordinate(J, this.terrain)), R = this.getIds();
|
17990
|
-
let
|
17991
|
-
for (const J of D)
|
17990
|
+
let B = 1 / 0, N = 1 / 0, q = -1 / 0, K = -1 / 0;
|
17991
|
+
for (const J of D) B = Math.min(B, J.x), N = Math.min(N, J.y), q = Math.max(q, J.x), K = Math.max(K, J.y);
|
17992
17992
|
for (let J = 0; J < R.length; J++) {
|
17993
17993
|
const ne = this._tiles[R[J]];
|
17994
17994
|
if (ne.holdingForFade()) continue;
|
17995
|
-
const ae = ne.tileID, le = Math.pow(2, v.zoom - ne.tileID.overscaledZ), he = d * ne.queryPadding * a.X / ne.tileSize / le, ee = [ae.getTilePoint(new a.Z(
|
17995
|
+
const ae = ne.tileID, le = Math.pow(2, v.zoom - ne.tileID.overscaledZ), he = d * ne.queryPadding * a.X / ne.tileSize / le, ee = [ae.getTilePoint(new a.Z(B, N)), ae.getTilePoint(new a.Z(q, K))];
|
17996
17996
|
if (ee[0].x - he < a.X && ee[0].y - he < a.X && ee[1].x + he >= 0 && ee[1].y + he >= 0) {
|
17997
17997
|
const me = A.map((be) => ae.getTilePoint(be)), ge = D.map((be) => ae.getTilePoint(be));
|
17998
17998
|
m.push({ tile: ne, tileID: ae, queryGeometry: me, cameraQueryGeometry: ge, scale: le });
|
@@ -18091,8 +18091,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18091
18091
|
if (v) return [{ key: null, x1: s, y1: d, x2: f, y2: m }];
|
18092
18092
|
for (let R = 0; R < this.boxKeys.length; R++) D.push({ key: this.boxKeys[R], x1: this.bboxes[4 * R], y1: this.bboxes[4 * R + 1], x2: this.bboxes[4 * R + 2], y2: this.bboxes[4 * R + 3] });
|
18093
18093
|
for (let R = 0; R < this.circleKeys.length; R++) {
|
18094
|
-
const
|
18095
|
-
D.push({ key: this.circleKeys[R], x1:
|
18094
|
+
const B = this.circles[3 * R], N = this.circles[3 * R + 1], q = this.circles[3 * R + 2];
|
18095
|
+
D.push({ key: this.circleKeys[R], x1: B - q, y1: N - q, x2: B + q, y2: N + q });
|
18096
18096
|
}
|
18097
18097
|
} else this._forEachCell(s, d, f, m, this._queryCell, D, { hitTest: v, overlapMode: C, seenUids: { box: {}, circle: {} } }, A);
|
18098
18098
|
return D;
|
@@ -18106,17 +18106,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18106
18106
|
hitTestCircle(s, d, f, m, v) {
|
18107
18107
|
const C = s - f, A = s + f, D = d - f, R = d + f;
|
18108
18108
|
if (A < 0 || C > this.width || R < 0 || D > this.height) return !1;
|
18109
|
-
const
|
18110
|
-
return this._forEachCell(C, D, A, R, this._queryCellCircle,
|
18109
|
+
const B = [];
|
18110
|
+
return this._forEachCell(C, D, A, R, this._queryCellCircle, B, { hitTest: !0, overlapMode: m, circle: { x: s, y: d, radius: f }, seenUids: { box: {}, circle: {} } }, v), B.length > 0;
|
18111
18111
|
}
|
18112
18112
|
_queryCell(s, d, f, m, v, C, A, D) {
|
18113
|
-
const { seenUids: R, hitTest:
|
18113
|
+
const { seenUids: R, hitTest: B, overlapMode: N } = A, q = this.boxCells[v];
|
18114
18114
|
if (q !== null) {
|
18115
18115
|
const J = this.bboxes;
|
18116
18116
|
for (const ne of q) if (!R.box[ne]) {
|
18117
18117
|
R.box[ne] = !0;
|
18118
18118
|
const ae = 4 * ne, le = this.boxKeys[ne];
|
18119
|
-
if (s <= J[ae + 2] && d <= J[ae + 3] && f >= J[ae + 0] && m >= J[ae + 1] && (!D || D(le)) && (!
|
18119
|
+
if (s <= J[ae + 2] && d <= J[ae + 3] && f >= J[ae + 0] && m >= J[ae + 1] && (!D || D(le)) && (!B || !Ni(N, le.overlapMode)) && (C.push({ key: le, x1: J[ae], y1: J[ae + 1], x2: J[ae + 2], y2: J[ae + 3] }), B)) return !0;
|
18120
18120
|
}
|
18121
18121
|
}
|
18122
18122
|
const K = this.circleCells[v];
|
@@ -18125,37 +18125,37 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18125
18125
|
for (const ne of K) if (!R.circle[ne]) {
|
18126
18126
|
R.circle[ne] = !0;
|
18127
18127
|
const ae = 3 * ne, le = this.circleKeys[ne];
|
18128
|
-
if (this._circleAndRectCollide(J[ae], J[ae + 1], J[ae + 2], s, d, f, m) && (!D || D(le)) && (!
|
18128
|
+
if (this._circleAndRectCollide(J[ae], J[ae + 1], J[ae + 2], s, d, f, m) && (!D || D(le)) && (!B || !Ni(N, le.overlapMode))) {
|
18129
18129
|
const he = J[ae], ee = J[ae + 1], me = J[ae + 2];
|
18130
|
-
if (C.push({ key: le, x1: he - me, y1: ee - me, x2: he + me, y2: ee + me }),
|
18130
|
+
if (C.push({ key: le, x1: he - me, y1: ee - me, x2: he + me, y2: ee + me }), B) return !0;
|
18131
18131
|
}
|
18132
18132
|
}
|
18133
18133
|
}
|
18134
18134
|
return !1;
|
18135
18135
|
}
|
18136
18136
|
_queryCellCircle(s, d, f, m, v, C, A, D) {
|
18137
|
-
const { circle: R, seenUids:
|
18137
|
+
const { circle: R, seenUids: B, overlapMode: N } = A, q = this.boxCells[v];
|
18138
18138
|
if (q !== null) {
|
18139
18139
|
const J = this.bboxes;
|
18140
|
-
for (const ne of q) if (!
|
18141
|
-
|
18140
|
+
for (const ne of q) if (!B.box[ne]) {
|
18141
|
+
B.box[ne] = !0;
|
18142
18142
|
const ae = 4 * ne, le = this.boxKeys[ne];
|
18143
|
-
if (this._circleAndRectCollide(R.x, R.y, R.radius, J[ae + 0], J[ae + 1], J[ae + 2], J[ae + 3]) && (!D || D(le)) && !Ni(
|
18143
|
+
if (this._circleAndRectCollide(R.x, R.y, R.radius, J[ae + 0], J[ae + 1], J[ae + 2], J[ae + 3]) && (!D || D(le)) && !Ni(N, le.overlapMode)) return C.push(!0), !0;
|
18144
18144
|
}
|
18145
18145
|
}
|
18146
18146
|
const K = this.circleCells[v];
|
18147
18147
|
if (K !== null) {
|
18148
18148
|
const J = this.circles;
|
18149
|
-
for (const ne of K) if (!
|
18150
|
-
|
18149
|
+
for (const ne of K) if (!B.circle[ne]) {
|
18150
|
+
B.circle[ne] = !0;
|
18151
18151
|
const ae = 3 * ne, le = this.circleKeys[ne];
|
18152
|
-
if (this._circlesCollide(J[ae], J[ae + 1], J[ae + 2], R.x, R.y, R.radius) && (!D || D(le)) && !Ni(
|
18152
|
+
if (this._circlesCollide(J[ae], J[ae + 1], J[ae + 2], R.x, R.y, R.radius) && (!D || D(le)) && !Ni(N, le.overlapMode)) return C.push(!0), !0;
|
18153
18153
|
}
|
18154
18154
|
}
|
18155
18155
|
}
|
18156
18156
|
_forEachCell(s, d, f, m, v, C, A, D) {
|
18157
|
-
const R = this._convertToXCellCoord(s),
|
18158
|
-
for (let K = R; K <=
|
18157
|
+
const R = this._convertToXCellCoord(s), B = this._convertToYCellCoord(d), N = this._convertToXCellCoord(f), q = this._convertToYCellCoord(m);
|
18158
|
+
for (let K = R; K <= N; K++) for (let J = B; J <= q; J++) if (v.call(this, s, d, f, m, this.xCellCount * J + K, C, A, D)) return;
|
18159
18159
|
}
|
18160
18160
|
_convertToXCellCoord(s) {
|
18161
18161
|
return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(s * this.xScale)));
|
@@ -18170,10 +18170,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18170
18170
|
_circleAndRectCollide(s, d, f, m, v, C, A) {
|
18171
18171
|
const D = (C - m) / 2, R = Math.abs(s - (m + D));
|
18172
18172
|
if (R > D + f) return !1;
|
18173
|
-
const
|
18174
|
-
if (
|
18175
|
-
if (R <= D ||
|
18176
|
-
const q = R - D, K =
|
18173
|
+
const B = (A - v) / 2, N = Math.abs(d - (v + B));
|
18174
|
+
if (N > B + f) return !1;
|
18175
|
+
if (R <= D || N <= B) return !0;
|
18176
|
+
const q = R - D, K = N - B;
|
18177
18177
|
return q * q + K * K <= f * f;
|
18178
18178
|
}
|
18179
18179
|
}
|
@@ -18200,7 +18200,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18200
18200
|
function j(x, s) {
|
18201
18201
|
return x.x >= -s[0] && x.x <= s[0] && x.y >= -s[1] && x.y <= s[1];
|
18202
18202
|
}
|
18203
|
-
function Y(x, s, d, f, m, v, C, A, D, R,
|
18203
|
+
function Y(x, s, d, f, m, v, C, A, D, R, B, N, q, K, J) {
|
18204
18204
|
const ne = f ? x.textSizeData : x.iconSizeData, ae = a.ag(ne, d.transform.zoom), le = [256 / d.width * 2 + 1, 256 / d.height * 2 + 1], he = f ? x.text.dynamicLayoutVertexArray : x.icon.dynamicLayoutVertexArray;
|
18205
18205
|
he.clear();
|
18206
18206
|
const ee = x.lineVertexArray, me = f ? x.text.placedSymbolArray : x.icon.placedSymbolArray, ge = d.transform.width / d.transform.height;
|
@@ -18217,25 +18217,25 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18217
18217
|
kt($e.numGlyphs, he);
|
18218
18218
|
continue;
|
18219
18219
|
}
|
18220
|
-
const rt = U(d.transform.cameraToCenterDistance, Je.signedDistanceFromCamera), Ge = a.ai(ne, ae, $e), He = C ? Ge / rt : Ge * rt, pt = { getElevation: J, labelPlaneMatrix: m, lineVertexArray: ee, pitchWithMap: C, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: R, tileAnchorPoint: new a.P($e.anchorX, $e.anchorY), unwrappedTileID:
|
18220
|
+
const rt = U(d.transform.cameraToCenterDistance, Je.signedDistanceFromCamera), Ge = a.ai(ne, ae, $e), He = C ? Ge / rt : Ge * rt, pt = { getElevation: J, labelPlaneMatrix: m, lineVertexArray: ee, pitchWithMap: C, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: R, tileAnchorPoint: new a.P($e.anchorX, $e.anchorY), unwrappedTileID: B, width: N, height: q, translation: K }, Lt = fe(pt, $e, He, !1, A, s, v, x.glyphOffsetArray, he, ge, D);
|
18221
18221
|
be = Lt.useVertical, (Lt.notEnoughRoom || be || Lt.needsFlipping && fe(pt, $e, He, !0, A, s, v, x.glyphOffsetArray, he, ge, D).notEnoughRoom) && kt($e.numGlyphs, he);
|
18222
18222
|
}
|
18223
18223
|
f ? x.text.dynamicLayoutVertexBuffer.updateData(he) : x.icon.dynamicLayoutVertexBuffer.updateData(he);
|
18224
18224
|
}
|
18225
18225
|
function te(x, s, d, f, m, v, C, A) {
|
18226
|
-
const D = v.glyphStartIndex + v.numGlyphs, R = v.lineStartIndex,
|
18226
|
+
const D = v.glyphStartIndex + v.numGlyphs, R = v.lineStartIndex, B = v.lineStartIndex + v.lineLength, N = s.getoffsetX(v.glyphStartIndex), q = s.getoffsetX(D - 1), K = Ue(x * N, d, f, m, v.segment, R, B, A, C);
|
18227
18227
|
if (!K) return null;
|
18228
|
-
const J = Ue(x * q, d, f, m, v.segment, R,
|
18228
|
+
const J = Ue(x * q, d, f, m, v.segment, R, B, A, C);
|
18229
18229
|
return J ? A.projectionCache.anyProjectionOccluded ? null : { first: K, last: J } : null;
|
18230
18230
|
}
|
18231
18231
|
function de(x, s, d, f) {
|
18232
18232
|
return x === a.ah.horizontal && Math.abs(d.y - s.y) > Math.abs(d.x - s.x) * f ? { useVertical: !0 } : (x === a.ah.vertical ? s.y < d.y : s.x > d.x) ? { needsFlipping: !0 } : null;
|
18233
18233
|
}
|
18234
|
-
function fe(x, s, d, f, m, v, C, A, D, R,
|
18235
|
-
const
|
18234
|
+
function fe(x, s, d, f, m, v, C, A, D, R, B) {
|
18235
|
+
const N = d / 24, q = s.lineOffsetX * N, K = s.lineOffsetY * N;
|
18236
18236
|
let J;
|
18237
18237
|
if (s.numGlyphs > 1) {
|
18238
|
-
const ne = s.glyphStartIndex + s.numGlyphs, ae = s.lineStartIndex, le = s.lineStartIndex + s.lineLength, he = te(
|
18238
|
+
const ne = s.glyphStartIndex + s.numGlyphs, ae = s.lineStartIndex, le = s.lineStartIndex + s.lineLength, he = te(N, A, q, K, f, s, B, x);
|
18239
18239
|
if (!he) return { notEnoughRoom: !0 };
|
18240
18240
|
const ee = re(he.first.point.x, he.first.point.y, C, x.getElevation).point, me = re(he.last.point.x, he.last.point.y, C, x.getElevation).point;
|
18241
18241
|
if (m && !f) {
|
@@ -18243,7 +18243,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18243
18243
|
if (ge) return ge;
|
18244
18244
|
}
|
18245
18245
|
J = [he.first];
|
18246
|
-
for (let ge = s.glyphStartIndex + 1; ge < ne - 1; ge++) J.push(Ue(
|
18246
|
+
for (let ge = s.glyphStartIndex + 1; ge < ne - 1; ge++) J.push(Ue(N * A.getoffsetX(ge), q, K, f, s.segment, ae, le, x, B));
|
18247
18247
|
J.push(he.last);
|
18248
18248
|
} else {
|
18249
18249
|
if (m && !f) {
|
@@ -18252,7 +18252,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18252
18252
|
}(x.tileAnchorPoint, he, ae, 0, v, x), ge = de(s.writingMode, ae, me, R);
|
18253
18253
|
if (ge) return ge;
|
18254
18254
|
}
|
18255
|
-
const ne = Ue(
|
18255
|
+
const ne = Ue(N * A.getoffsetX(s.glyphStartIndex), q, K, f, s.segment, s.lineStartIndex, s.lineStartIndex + s.lineLength, x, B);
|
18256
18256
|
if (!ne || x.projectionCache.anyProjectionOccluded) return { notEnoughRoom: !0 };
|
18257
18257
|
J = [ne];
|
18258
18258
|
}
|
@@ -18269,8 +18269,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18269
18269
|
const m = new a.P(s.lineVertexArray.getx(x), s.lineVertexArray.gety(x)), v = Ae(m.x, m.y, s);
|
18270
18270
|
if (v.signedDistanceFromCamera > 0) return f.projections[x] = v.point, f.anyProjectionOccluded = f.anyProjectionOccluded || v.isOccluded, v.point;
|
18271
18271
|
const C = x - d.direction;
|
18272
|
-
return function(A, D, R,
|
18273
|
-
return _e(A, D, R,
|
18272
|
+
return function(A, D, R, B, N) {
|
18273
|
+
return _e(A, D, R, B, void 0, N);
|
18274
18274
|
}(d.distanceFromAnchor === 0 ? s.tileAnchorPoint : new a.P(s.lineVertexArray.getx(C), s.lineVertexArray.gety(C)), m, d.previousVertex, d.absOffsetX - d.distanceFromAnchor + 1, s);
|
18275
18275
|
}
|
18276
18276
|
function Ae(x, s, d) {
|
@@ -18285,31 +18285,31 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18285
18285
|
if (A.projectionCache.offsets[x]) return A.projectionCache.offsets[x];
|
18286
18286
|
const R = d.add(s);
|
18287
18287
|
if (x + D.direction < f || x + D.direction >= m) return A.projectionCache.offsets[x] = R, R;
|
18288
|
-
const
|
18288
|
+
const B = ue(x + D.direction, A, D), N = Le(B.sub(d), C, D.direction), q = d.add(N), K = B.add(N);
|
18289
18289
|
return A.projectionCache.offsets[x] = a.ak(v, R, q, K) || R, A.projectionCache.offsets[x];
|
18290
18290
|
}
|
18291
18291
|
function Ue(x, s, d, f, m, v, C, A, D) {
|
18292
18292
|
const R = f ? x - s : x + s;
|
18293
|
-
let
|
18294
|
-
f && (
|
18295
|
-
let q, K =
|
18293
|
+
let B = R > 0 ? 1 : -1, N = 0;
|
18294
|
+
f && (B *= -1, N = Math.PI), B < 0 && (N += Math.PI);
|
18295
|
+
let q, K = B > 0 ? v + m : v + m + 1;
|
18296
18296
|
A.projectionCache.cachedAnchorPoint ? q = A.projectionCache.cachedAnchorPoint : (q = Ae(A.tileAnchorPoint.x, A.tileAnchorPoint.y, A).point, A.projectionCache.cachedAnchorPoint = q);
|
18297
18297
|
let J, ne, ae = q, le = q, he = 0, ee = 0;
|
18298
18298
|
const me = Math.abs(R), ge = [];
|
18299
18299
|
let be;
|
18300
18300
|
for (; he + ee <= me; ) {
|
18301
|
-
if (K +=
|
18301
|
+
if (K += B, K < v || K >= C) return null;
|
18302
18302
|
he += ee, le = ae, ne = J;
|
18303
|
-
const Je = { absOffsetX: me, direction:
|
18303
|
+
const Je = { absOffsetX: me, direction: B, distanceFromAnchor: he, previousVertex: le };
|
18304
18304
|
if (ae = ue(K, A, Je), d === 0) ge.push(le), be = ae.sub(le);
|
18305
18305
|
else {
|
18306
18306
|
let rt;
|
18307
18307
|
const Ge = ae.sub(le);
|
18308
|
-
rt = Ge.mag() === 0 ? Le(ue(K +
|
18308
|
+
rt = Ge.mag() === 0 ? Le(ue(K + B, A, Je).sub(ae), d, B) : Le(Ge, d, B), ne || (ne = le.add(rt)), J = Te(K, rt, ae, v, C, ne, d, A, Je), ge.push(ne), be = J.sub(ne);
|
18309
18309
|
}
|
18310
18310
|
ee = be.mag();
|
18311
18311
|
}
|
18312
|
-
const Re = be._mult((me - he) / ee)._add(ne || le), $e =
|
18312
|
+
const Re = be._mult((me - he) / ee)._add(ne || le), $e = N + Math.atan2(ae.y - le.y, ae.x - le.x);
|
18313
18313
|
return ge.push(Re), { point: Re, angle: D ? $e : 0, path: ge };
|
18314
18314
|
}
|
18315
18315
|
const xt = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
|
@@ -18328,19 +18328,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18328
18328
|
constructor(s, d, f = new rn(s.width + 200, s.height + 200, 25), m = new rn(s.width + 200, s.height + 200, 25)) {
|
18329
18329
|
this.transform = s, this.mapProjection = d, this.grid = f, this.ignoredGrid = m, this.pitchFactor = Math.cos(s._pitch) * s.cameraToCenterDistance, this.screenRightBoundary = s.width + Bt, this.screenBottomBoundary = s.height + Bt, this.gridRightBoundary = s.width + 200, this.gridBottomBoundary = s.height + 200, this.perspectiveRatioCutoff = 0.6;
|
18330
18330
|
}
|
18331
|
-
placeCollisionBox(s, d, f, m, v, C, A, D, R,
|
18332
|
-
const q = s.anchorPointX + D[0], K = s.anchorPointY + D[1], J = this.projectAndGetPerspectiveRatio(m, q, K, v,
|
18331
|
+
placeCollisionBox(s, d, f, m, v, C, A, D, R, B, N) {
|
18332
|
+
const q = s.anchorPointX + D[0], K = s.anchorPointY + D[1], J = this.projectAndGetPerspectiveRatio(m, q, K, v, B), ne = f * J.perspectiveRatio;
|
18333
18333
|
let ae;
|
18334
|
-
if (C || A) ae = this._projectCollisionBox(s, ne, m, v, C, A, D, J,
|
18334
|
+
if (C || A) ae = this._projectCollisionBox(s, ne, m, v, C, A, D, J, B, N);
|
18335
18335
|
else {
|
18336
|
-
const ge = J.point.x + (
|
18336
|
+
const ge = J.point.x + (N ? N.x * ne : 0), be = J.point.y + (N ? N.y * ne : 0);
|
18337
18337
|
ae = { allPointsOccluded: !1, box: [ge + s.x1 * ne, be + s.y1 * ne, ge + s.x2 * ne, be + s.y2 * ne] };
|
18338
18338
|
}
|
18339
18339
|
const [le, he, ee, me] = ae.box;
|
18340
18340
|
return this.mapProjection.useSpecialProjectionForSymbols && (C ? ae.allPointsOccluded : this.mapProjection.isOccluded(q, K, v)) || J.perspectiveRatio < this.perspectiveRatioCutoff || !this.isInsideGrid(le, he, ee, me) || d !== "always" && this.grid.hitTest(le, he, ee, me, d, R) ? { box: [le, he, ee, me], placeable: !1, offscreen: !1 } : { box: [le, he, ee, me], placeable: !0, offscreen: this.isOffscreen(le, he, ee, me) };
|
18341
18341
|
}
|
18342
|
-
placeCollisionCircles(s, d, f, m, v, C, A, D, R,
|
18343
|
-
const le = [], he = new a.P(d.anchorX, d.anchorY), ee = this.getPerspectiveRatio(C, he.x, he.y, A, ae), me = (
|
18342
|
+
placeCollisionCircles(s, d, f, m, v, C, A, D, R, B, N, q, K, J, ne, ae) {
|
18343
|
+
const le = [], he = new a.P(d.anchorX, d.anchorY), ee = this.getPerspectiveRatio(C, he.x, he.y, A, ae), me = (N ? v / ee : v * ee) / a.ap, ge = { getElevation: ae, labelPlaneMatrix: D, lineVertexArray: f, pitchWithMap: N, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: he, unwrappedTileID: A, width: this.transform.width, height: this.transform.height, translation: ne }, be = te(me, m, d.lineOffsetX * me, d.lineOffsetY * me, !1, d, !1, ge);
|
18344
18344
|
let Re = !1, $e = !1, Je = !0;
|
18345
18345
|
if (be) {
|
18346
18346
|
const rt = 0.5 * K * ee + J, Ge = new a.P(-100, -100), He = new a.P(this.screenRightBoundary, this.screenBottomBoundary), pt = new et(), Lt = be.first, Ze = be.last;
|
@@ -18366,11 +18366,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18366
18366
|
const Rn = ji / Math.max(Yt - 1, 1), ss = pt.lerp(Rn), Ui = ss.x + Bt, lr = ss.y + Bt;
|
18367
18367
|
le.push(Ui, lr, rt, 0);
|
18368
18368
|
const Xn = Ui - rt, Ln = lr - rt, Kn = Ui + rt, Cs = lr + rt;
|
18369
|
-
if (Je = Je && this.isOffscreen(Xn, Ln, Kn, Cs), $e = $e || this.isInsideGrid(Xn, Ln, Kn, Cs), s !== "always" && this.grid.hitTestCircle(Ui, lr, rt, s, q) && (Re = !0, !
|
18369
|
+
if (Je = Je && this.isOffscreen(Xn, Ln, Kn, Cs), $e = $e || this.isInsideGrid(Xn, Ln, Kn, Cs), s !== "always" && this.grid.hitTestCircle(Ui, lr, rt, s, q) && (Re = !0, !B)) return { circles: [], offscreen: !1, collisionDetected: Re };
|
18370
18370
|
}
|
18371
18371
|
}
|
18372
18372
|
}
|
18373
|
-
return { circles: !
|
18373
|
+
return { circles: !B && Re || !$e || ee < this.perspectiveRatioCutoff ? [] : le, offscreen: Je, collisionDetected: Re };
|
18374
18374
|
}
|
18375
18375
|
projectPathToScreenSpace(s, d, f) {
|
18376
18376
|
return s.map((m) => re(m.x, m.y, f, d.getElevation));
|
@@ -18379,16 +18379,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18379
18379
|
if (s.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {};
|
18380
18380
|
const d = [];
|
18381
18381
|
let f = 1 / 0, m = 1 / 0, v = -1 / 0, C = -1 / 0;
|
18382
|
-
for (const
|
18383
|
-
const
|
18384
|
-
f = Math.min(f,
|
18382
|
+
for (const B of s) {
|
18383
|
+
const N = new a.P(B.x + Bt, B.y + Bt);
|
18384
|
+
f = Math.min(f, N.x), m = Math.min(m, N.y), v = Math.max(v, N.x), C = Math.max(C, N.y), d.push(N);
|
18385
18385
|
}
|
18386
18386
|
const A = this.grid.query(f, m, v, C).concat(this.ignoredGrid.query(f, m, v, C)), D = {}, R = {};
|
18387
|
-
for (const
|
18388
|
-
const
|
18389
|
-
if (D[
|
18390
|
-
const q = [new a.P(
|
18391
|
-
a.am(d, q) && (D[
|
18387
|
+
for (const B of A) {
|
18388
|
+
const N = B.key;
|
18389
|
+
if (D[N.bucketInstanceId] === void 0 && (D[N.bucketInstanceId] = {}), D[N.bucketInstanceId][N.featureIndex]) continue;
|
18390
|
+
const q = [new a.P(B.x1, B.y1), new a.P(B.x2, B.y1), new a.P(B.x2, B.y2), new a.P(B.x1, B.y2)];
|
18391
|
+
a.am(d, q) && (D[N.bucketInstanceId][N.featureIndex] = !0, R[N.bucketInstanceId] === void 0 && (R[N.bucketInstanceId] = []), R[N.bucketInstanceId].push(N.featureIndex));
|
18392
18392
|
}
|
18393
18393
|
return R;
|
18394
18394
|
}
|
@@ -18419,26 +18419,26 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18419
18419
|
const s = a.an([]);
|
18420
18420
|
return a.J(s, s, [-100, -100, 0]), s;
|
18421
18421
|
}
|
18422
|
-
_projectCollisionBox(s, d, f, m, v, C, A, D, R,
|
18423
|
-
let
|
18422
|
+
_projectCollisionBox(s, d, f, m, v, C, A, D, R, B) {
|
18423
|
+
let N = new a.P(1, 0), q = new a.P(0, 1);
|
18424
18424
|
const K = new a.P(s.anchorPointX + A[0], s.anchorPointY + A[1]);
|
18425
18425
|
if (C && !v) {
|
18426
18426
|
const Je = this.projectAndGetPerspectiveRatio(f, K.x + 1, K.y, m, R).point.sub(D.point).unit(), rt = Math.atan(Je.y / Je.x) + (Je.x < 0 ? Math.PI : 0), Ge = Math.sin(rt), He = Math.cos(rt);
|
18427
|
-
|
18427
|
+
N = new a.P(He, Ge), q = new a.P(-Ge, He);
|
18428
18428
|
} else if (!C && v) {
|
18429
18429
|
const Je = -this.transform.angle, rt = Math.sin(Je), Ge = Math.cos(Je);
|
18430
|
-
|
18430
|
+
N = new a.P(Ge, rt), q = new a.P(-rt, Ge);
|
18431
18431
|
}
|
18432
18432
|
let J = D.point, ne = d;
|
18433
18433
|
if (v) {
|
18434
18434
|
J = K;
|
18435
18435
|
const Je = this.transform.zoom - Math.floor(this.transform.zoom);
|
18436
|
-
ne = Math.pow(2, -Je), ne *= this.mapProjection.getPitchedTextCorrection(this.transform, K, m),
|
18436
|
+
ne = Math.pow(2, -Je), ne *= this.mapProjection.getPitchedTextCorrection(this.transform, K, m), B || (ne *= a.ac(0.5 + D.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4));
|
18437
18437
|
}
|
18438
|
-
|
18438
|
+
B && (J = J.add(N.mult(B.x * ne)).add(q.mult(B.y * ne)));
|
18439
18439
|
const ae = s.x1 * ne, le = s.x2 * ne, he = (ae + le) / 2, ee = s.y1 * ne, me = s.y2 * ne, ge = (ee + me) / 2, be = [{ offsetX: ae, offsetY: ee }, { offsetX: he, offsetY: ee }, { offsetX: le, offsetY: ee }, { offsetX: le, offsetY: ge }, { offsetX: le, offsetY: me }, { offsetX: he, offsetY: me }, { offsetX: ae, offsetY: me }, { offsetX: ae, offsetY: ge }];
|
18440
18440
|
let Re = [];
|
18441
|
-
for (const { offsetX: Je, offsetY: rt } of be) Re.push(new a.P(J.x +
|
18441
|
+
for (const { offsetX: Je, offsetY: rt } of be) Re.push(new a.P(J.x + N.x * Je + q.x * rt, J.y + N.y * Je + q.y * rt));
|
18442
18442
|
let $e = !1;
|
18443
18443
|
if (v) {
|
18444
18444
|
const Je = Re.map((rt) => this.projectAndGetPerspectiveRatio(f, rt.x, rt.y, m, R));
|
@@ -18509,30 +18509,30 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18509
18509
|
getBucketParts(s, d, f, m) {
|
18510
18510
|
const v = f.getBucket(d), C = f.latestFeatureIndex;
|
18511
18511
|
if (!v || !C || d.id !== v.layerIds[0]) return;
|
18512
|
-
const A = f.collisionBoxArray, D = v.layers[0].layout, R = v.layers[0].paint,
|
18512
|
+
const A = f.collisionBoxArray, D = v.layers[0].layout, R = v.layers[0].paint, B = Math.pow(2, this.transform.zoom - f.tileID.overscaledZ), N = f.tileSize / a.X, q = f.tileID.toUnwrapped(), K = this.transform.calculatePosMatrix(q), J = D.get("text-pitch-alignment") === "map", ne = D.get("text-rotation-alignment") === "map", ae = Zt(f, 1, this.transform.zoom), le = this.collisionIndex.mapProjection.translatePosition(this.transform, f, R.get("text-translate"), R.get("text-translate-anchor")), he = this.collisionIndex.mapProjection.translatePosition(this.transform, f, R.get("icon-translate"), R.get("icon-translate-anchor")), ee = Zn(K, J, ne, this.transform, ae);
|
18513
18513
|
let me = null;
|
18514
18514
|
if (J) {
|
18515
18515
|
const be = xr(K, J, ne, this.transform, ae);
|
18516
18516
|
me = a.L([], this.transform.labelPlaneMatrix, be);
|
18517
18517
|
}
|
18518
18518
|
this.retainedQueryData[v.bucketInstanceId] = new Gi(v.bucketInstanceId, C, v.sourceLayerIndex, v.index, f.tileID);
|
18519
|
-
const ge = { bucket: v, layout: D, translationText: le, translationIcon: he, posMatrix: K, unwrappedTileID: q, textLabelPlaneMatrix: ee, labelToScreenMatrix: me, scale:
|
18519
|
+
const ge = { bucket: v, layout: D, translationText: le, translationIcon: he, posMatrix: K, unwrappedTileID: q, textLabelPlaneMatrix: ee, labelToScreenMatrix: me, scale: B, textPixelRatio: N, holdingForFade: f.holdingForFade(), collisionBoxArray: A, partiallyEvaluatedTextSize: a.ag(v.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(v.sourceID) };
|
18520
18520
|
if (m) for (const be of v.sortKeyRanges) {
|
18521
18521
|
const { sortKey: Re, symbolInstanceStart: $e, symbolInstanceEnd: Je } = be;
|
18522
18522
|
s.push({ sortKey: Re, symbolInstanceStart: $e, symbolInstanceEnd: Je, parameters: ge });
|
18523
18523
|
}
|
18524
18524
|
else s.push({ symbolInstanceStart: 0, symbolInstanceEnd: v.symbolInstances.length, parameters: ge });
|
18525
18525
|
}
|
18526
|
-
attemptAnchorPlacement(s, d, f, m, v, C, A, D, R,
|
18527
|
-
const me = a.aq[s.textAnchor], ge = [s.textOffset0, s.textOffset1], be = Pn(me, f, m, ge, v), Re = this.collisionIndex.placeCollisionBox(d, q, D, R,
|
18528
|
-
if ((!he || this.collisionIndex.placeCollisionBox(he, q, D, R,
|
18526
|
+
attemptAnchorPlacement(s, d, f, m, v, C, A, D, R, B, N, q, K, J, ne, ae, le, he, ee) {
|
18527
|
+
const me = a.aq[s.textAnchor], ge = [s.textOffset0, s.textOffset1], be = Pn(me, f, m, ge, v), Re = this.collisionIndex.placeCollisionBox(d, q, D, R, B, A, C, ae, N.predicate, ee, be);
|
18528
|
+
if ((!he || this.collisionIndex.placeCollisionBox(he, q, D, R, B, A, C, le, N.predicate, ee, be).placeable) && Re.placeable) {
|
18529
18529
|
let $e;
|
18530
18530
|
if (this.prevPlacement && this.prevPlacement.variableOffsets[K.crossTileID] && this.prevPlacement.placements[K.crossTileID] && this.prevPlacement.placements[K.crossTileID].text && ($e = this.prevPlacement.variableOffsets[K.crossTileID].anchor), K.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
18531
18531
|
return this.variableOffsets[K.crossTileID] = { textOffset: ge, width: f, height: m, anchor: me, textBoxScale: v, prevAnchor: $e }, this.markUsedJustification(J, me, K, ne), J.allowVerticalPlacement && (this.markUsedOrientation(J, ne, K), this.placedOrientations[K.crossTileID] = ne), { shift: be, placedGlyphBoxes: Re };
|
18532
18532
|
}
|
18533
18533
|
}
|
18534
18534
|
placeLayerBucketPart(s, d, f) {
|
18535
|
-
const { bucket: m, layout: v, translationText: C, translationIcon: A, posMatrix: D, unwrappedTileID: R, textLabelPlaneMatrix:
|
18535
|
+
const { bucket: m, layout: v, translationText: C, translationIcon: A, posMatrix: D, unwrappedTileID: R, textLabelPlaneMatrix: B, labelToScreenMatrix: N, textPixelRatio: q, holdingForFade: K, collisionBoxArray: J, partiallyEvaluatedTextSize: ne, collisionGroup: ae } = s.parameters, le = v.get("text-optional"), he = v.get("icon-optional"), ee = a.ar(v, "text-overlap", "text-allow-overlap"), me = ee === "always", ge = a.ar(v, "icon-overlap", "icon-allow-overlap"), be = ge === "always", Re = v.get("text-rotation-alignment") === "map", $e = v.get("text-pitch-alignment") === "map", Je = v.get("icon-text-fit") !== "none", rt = v.get("symbol-z-order") === "viewport-y", Ge = me && (be || !m.hasIconData() || he), He = be && (me || !m.hasTextData() || le);
|
18536
18536
|
!m.collisionArrays && J && m.deserializeCollisionBoxes(J);
|
18537
18537
|
const pt = this._getTerrainElevationFunc(this.retainedQueryData[m.bucketInstanceId].tileID), Lt = (Ze, it, Ot) => {
|
18538
18538
|
var Vi, Vt;
|
@@ -18593,7 +18593,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18593
18593
|
}
|
18594
18594
|
if (Xn = Ui, Yt = Xn && Xn.placeable, Rn = Xn && Xn.offscreen, Ze.useRuntimeCollisionCircles) {
|
18595
18595
|
const $r = m.text.placedSymbolArray.get(Ze.centerJustifiedTextSymbolIndex), Vr = a.ai(m.textSizeData, ne, $r), ho = v.get("text-padding");
|
18596
|
-
Ln = this.collisionIndex.placeCollisionCircles(ee, $r, m.lineVertexArray, m.glyphOffsetArray, Vr, D, R,
|
18596
|
+
Ln = this.collisionIndex.placeCollisionCircles(ee, $r, m.lineVertexArray, m.glyphOffsetArray, Vr, D, R, B, N, f, $e, ae.predicate, Ze.collisionCircleDiameter, ho, C, pt), Ln.circles.length && Ln.collisionDetected && !f && a.w("Collisions detected, but collision boxes are not shown"), Yt = me || Ln.circles.length > 0 && !Ln.collisionDetected, Rn = Rn && Ln.offscreen;
|
18597
18597
|
}
|
18598
18598
|
if (it.iconFeatureIndex && (ru = it.iconFeatureIndex), it.iconBox) {
|
18599
18599
|
const $r = (Vr) => this.collisionIndex.placeCollisionBox(Vr, ge, q, D, R, $e, Re, A, ae.predicate, pt, Je && ss ? ss : void 0);
|
@@ -18649,14 +18649,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18649
18649
|
this.prevZoomAdjustment = d ? d.zoomAdjustment(this.transform.zoom) : 0;
|
18650
18650
|
const m = d ? d.symbolFadeChange(s) : 1, v = d ? d.opacities : {}, C = d ? d.variableOffsets : {}, A = d ? d.placedOrientations : {};
|
18651
18651
|
for (const D in this.placements) {
|
18652
|
-
const R = this.placements[D],
|
18653
|
-
|
18652
|
+
const R = this.placements[D], B = v[D];
|
18653
|
+
B ? (this.opacities[D] = new Ki(B, m, R.text, R.icon), f = f || R.text !== B.text.placed || R.icon !== B.icon.placed) : (this.opacities[D] = new Ki(null, m, R.text, R.icon, R.skipFade), f = f || R.text || R.icon);
|
18654
18654
|
}
|
18655
18655
|
for (const D in v) {
|
18656
18656
|
const R = v[D];
|
18657
18657
|
if (!this.opacities[D]) {
|
18658
|
-
const
|
18659
|
-
|
18658
|
+
const B = new Ki(R, m, !1, !1);
|
18659
|
+
B.isHidden() || (this.opacities[D] = B, f = f || R.text.placed || R.icon.placed);
|
18660
18660
|
}
|
18661
18661
|
}
|
18662
18662
|
for (const D in C) this.variableOffsets[D] || !this.opacities[D] || this.opacities[D].isHidden() || (this.variableOffsets[D] = C[D]);
|
@@ -18673,7 +18673,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18673
18673
|
}
|
18674
18674
|
updateBucketOpacities(s, d, f, m) {
|
18675
18675
|
s.hasTextData() && (s.text.opacityVertexArray.clear(), s.text.hasVisibleVertices = !1), s.hasIconData() && (s.icon.opacityVertexArray.clear(), s.icon.hasVisibleVertices = !1), s.hasIconCollisionBoxData() && s.iconCollisionBox.collisionVertexArray.clear(), s.hasTextCollisionBoxData() && s.textCollisionBox.collisionVertexArray.clear();
|
18676
|
-
const v = s.layers[0], C = v.layout, A = new Ki(null, 0, !1, !1, !0), D = C.get("text-allow-overlap"), R = C.get("icon-allow-overlap"),
|
18676
|
+
const v = s.layers[0], C = v.layout, A = new Ki(null, 0, !1, !1, !0), D = C.get("text-allow-overlap"), R = C.get("icon-allow-overlap"), B = v._unevaluatedLayout.hasValue("text-variable-anchor") || v._unevaluatedLayout.hasValue("text-variable-anchor-offset"), N = C.get("text-rotation-alignment") === "map", q = C.get("text-pitch-alignment") === "map", K = C.get("icon-text-fit") !== "none", J = new Ki(null, 0, D && (R || !s.hasIconData() || C.get("icon-optional")), R && (D || !s.hasTextData() || C.get("text-optional")), !0);
|
18677
18677
|
!s.collisionArrays && m && (s.hasIconCollisionBoxData() || s.hasTextCollisionBoxData()) && s.deserializeCollisionBoxes(m);
|
18678
18678
|
const ne = (le, he, ee) => {
|
18679
18679
|
for (let me = 0; me < he / 4; me++) le.opacityVertexArray.emplaceBack(ee);
|
@@ -18707,9 +18707,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18707
18707
|
let pt = new a.P(0, 0);
|
18708
18708
|
if (He.textBox || He.verticalTextBox) {
|
18709
18709
|
let Lt = !0;
|
18710
|
-
if (
|
18710
|
+
if (B) {
|
18711
18711
|
const Ze = this.variableOffsets[ge];
|
18712
|
-
Ze ? (pt = Pn(Ze.anchor, Ze.width, Ze.height, Ze.textOffset, Ze.textBoxScale),
|
18712
|
+
Ze ? (pt = Pn(Ze.anchor, Ze.width, Ze.height, Ze.textOffset, Ze.textBoxScale), N && pt._rotate(q ? this.transform.angle : -this.transform.angle)) : Lt = !1;
|
18713
18713
|
}
|
18714
18714
|
if (He.textBox || He.verticalTextBox) {
|
18715
18715
|
let Ze;
|
@@ -18770,8 +18770,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18770
18770
|
if (!C[0] && !C[1]) return [0, 0];
|
18771
18771
|
const R = D ? A === "map" ? m.angle : 0 : A === "viewport" ? -m.angle : 0;
|
18772
18772
|
if (R) {
|
18773
|
-
const
|
18774
|
-
C = [C[0] *
|
18773
|
+
const B = Math.sin(R), N = Math.cos(R);
|
18774
|
+
C = [C[0] * N - C[1] * B, C[0] * B + C[1] * N];
|
18775
18775
|
}
|
18776
18776
|
return [D ? C[0] : Zt(v, C[0], m.zoom), D ? C[1] : Zt(v, C[1], m.zoom)];
|
18777
18777
|
}(x, s, d, f), getCircleRadiusCorrection: (x) => 1 };
|
@@ -18823,15 +18823,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18823
18823
|
const A = { positions: C.map((D) => ({ x: Math.floor(D.anchorX * es), y: Math.floor(D.anchorY * es) })), crossTileIDs: C.map((D) => D.crossTileID) };
|
18824
18824
|
if (A.positions.length > 128) {
|
18825
18825
|
const D = new a.av(A.positions.length, 16, Uint16Array);
|
18826
|
-
for (const { x: R, y:
|
18826
|
+
for (const { x: R, y: B } of A.positions) D.add(R, B);
|
18827
18827
|
D.finish(), delete A.positions, A.index = D;
|
18828
18828
|
}
|
18829
18829
|
this._symbolsByKey[v] = A;
|
18830
18830
|
}
|
18831
18831
|
}
|
18832
18832
|
getScaledCoordinates(s, d) {
|
18833
|
-
const { x: f, y: m, z: v } = this.tileID.canonical, { x: C, y: A, z: D } = d.canonical, R = es / Math.pow(2, D - v),
|
18834
|
-
return { x: Math.floor((C * a.X + s.anchorX) * R - f * a.X * es), y: Math.floor(
|
18833
|
+
const { x: f, y: m, z: v } = this.tileID.canonical, { x: C, y: A, z: D } = d.canonical, R = es / Math.pow(2, D - v), B = (A * a.X + s.anchorY) * R, N = m * a.X * es;
|
18834
|
+
return { x: Math.floor((C * a.X + s.anchorX) * R - f * a.X * es), y: Math.floor(B - N) };
|
18835
18835
|
}
|
18836
18836
|
findMatches(s, d, f) {
|
18837
18837
|
const m = this.tileID.canonical.z < d.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - d.canonical.z);
|
@@ -18843,17 +18843,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
18843
18843
|
const D = this.getScaledCoordinates(C, d);
|
18844
18844
|
if (A.index) {
|
18845
18845
|
const R = A.index.range(D.x - m, D.y - m, D.x + m, D.y + m).sort();
|
18846
|
-
for (const
|
18847
|
-
const
|
18848
|
-
if (!f[
|
18849
|
-
f[
|
18846
|
+
for (const B of R) {
|
18847
|
+
const N = A.crossTileIDs[B];
|
18848
|
+
if (!f[N]) {
|
18849
|
+
f[N] = !0, C.crossTileID = N;
|
18850
18850
|
break;
|
18851
18851
|
}
|
18852
18852
|
}
|
18853
18853
|
} else if (A.positions) for (let R = 0; R < A.positions.length; R++) {
|
18854
|
-
const
|
18855
|
-
if (Math.abs(
|
18856
|
-
f[
|
18854
|
+
const B = A.positions[R], N = A.crossTileIDs[R];
|
18855
|
+
if (Math.abs(B.x - D.x) <= m && Math.abs(B.y - D.y) <= m && !f[N]) {
|
18856
|
+
f[N] = !0, C.crossTileID = N;
|
18857
18857
|
break;
|
18858
18858
|
}
|
18859
18859
|
}
|
@@ -19008,14 +19008,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19008
19008
|
let m;
|
19009
19009
|
this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController(), function(v, C, A, D) {
|
19010
19010
|
return a._(this, void 0, void 0, function* () {
|
19011
|
-
const R = ze(v),
|
19011
|
+
const R = ze(v), B = A > 1 ? "@2x" : "", N = {}, q = {};
|
19012
19012
|
for (const { id: K, url: J } of R) {
|
19013
|
-
const ne = C.transformRequest(Qe(J,
|
19014
|
-
|
19015
|
-
const ae = C.transformRequest(Qe(J,
|
19013
|
+
const ne = C.transformRequest(Qe(J, B, ".json"), "SpriteJSON");
|
19014
|
+
N[K] = a.h(ne, D);
|
19015
|
+
const ae = C.transformRequest(Qe(J, B, ".png"), "SpriteImage");
|
19016
19016
|
q[K] = ce.getImage(ae, D);
|
19017
19017
|
}
|
19018
|
-
return yield Promise.all([...Object.values(
|
19018
|
+
return yield Promise.all([...Object.values(N), ...Object.values(q)]), function(K, J) {
|
19019
19019
|
return a._(this, void 0, void 0, function* () {
|
19020
19020
|
const ne = {};
|
19021
19021
|
for (const ae in K) {
|
@@ -19028,7 +19028,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19028
19028
|
}
|
19029
19029
|
return ne;
|
19030
19030
|
});
|
19031
|
-
}(
|
19031
|
+
}(N, q);
|
19032
19032
|
});
|
19033
19033
|
}(s, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((v) => {
|
19034
19034
|
if (this._spriteRequest = null, v) for (const C in v) {
|
@@ -19378,7 +19378,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19378
19378
|
f[A] = C;
|
19379
19379
|
for (const D of s) {
|
19380
19380
|
const R = D[A];
|
19381
|
-
if (R) for (const
|
19381
|
+
if (R) for (const B of R) m.push(B);
|
19382
19382
|
}
|
19383
19383
|
}
|
19384
19384
|
}
|
@@ -19393,7 +19393,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19393
19393
|
}
|
19394
19394
|
else for (const D of s) {
|
19395
19395
|
const R = D[A];
|
19396
|
-
if (R) for (const
|
19396
|
+
if (R) for (const B of R) v.push(B.feature);
|
19397
19397
|
}
|
19398
19398
|
}
|
19399
19399
|
return v;
|
@@ -19413,12 +19413,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19413
19413
|
d.availableImages = this._availableImages;
|
19414
19414
|
const C = this._serializedAllLayers();
|
19415
19415
|
for (const A in this.sourceCaches) d.layers && !m[A] || v.push(Rt(this.sourceCaches[A], this._layers, C, s, d, f));
|
19416
|
-
return this.placement && v.push(function(A, D, R,
|
19417
|
-
const J = {}, ne = q.queryRenderedSymbols(
|
19416
|
+
return this.placement && v.push(function(A, D, R, B, N, q, K) {
|
19417
|
+
const J = {}, ne = q.queryRenderedSymbols(B), ae = [];
|
19418
19418
|
for (const le of Object.keys(ne).map(Number)) ae.push(K[le]);
|
19419
19419
|
ae.sort(Dt);
|
19420
19420
|
for (const le of ae) {
|
19421
|
-
const he = le.featureIndex.lookupSymbolFeatures(ne[le.bucketInstanceId], D, le.bucketIndex, le.sourceLayerIndex,
|
19421
|
+
const he = le.featureIndex.lookupSymbolFeatures(ne[le.bucketInstanceId], D, le.bucketIndex, le.sourceLayerIndex, N.filter, N.layers, N.availableImages, A);
|
19422
19422
|
for (const ee in he) {
|
19423
19423
|
const me = J[ee] = J[ee] || [], ge = he[ee];
|
19424
19424
|
ge.sort((be, Re) => {
|
@@ -19445,8 +19445,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19445
19445
|
return f ? function(m, v) {
|
19446
19446
|
const C = m.getRenderableIds().map((R) => m.getTileByID(R)), A = [], D = {};
|
19447
19447
|
for (let R = 0; R < C.length; R++) {
|
19448
|
-
const
|
19449
|
-
D[
|
19448
|
+
const B = C[R], N = B.tileID.canonical.key;
|
19449
|
+
D[N] || (D[N] = !0, B.querySourceFeatures(A, v));
|
19450
19450
|
}
|
19451
19451
|
return A;
|
19452
19452
|
}(f, d) : [];
|
@@ -19512,18 +19512,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
19512
19512
|
let C = !1, A = !1;
|
19513
19513
|
const D = {};
|
19514
19514
|
for (const R of this._order) {
|
19515
|
-
const
|
19516
|
-
if (
|
19517
|
-
if (!D[
|
19518
|
-
const q = this.sourceCaches[
|
19519
|
-
D[
|
19515
|
+
const B = this._layers[R];
|
19516
|
+
if (B.type !== "symbol") continue;
|
19517
|
+
if (!D[B.source]) {
|
19518
|
+
const q = this.sourceCaches[B.source];
|
19519
|
+
D[B.source] = q.getRenderableIds(!0).map((K) => q.getTileByID(K)).sort((K, J) => J.tileID.overscaledZ - K.tileID.overscaledZ || (K.tileID.isLessThan(J.tileID) ? -1 : 1));
|
19520
19520
|
}
|
19521
|
-
const
|
19522
|
-
C = C ||
|
19521
|
+
const N = this.crossTileSymbolIndex.addLayer(B, D[B.source], s.center.lng);
|
19522
|
+
C = C || N;
|
19523
19523
|
}
|
19524
19524
|
if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((v = v || this._layerOrderChanged || f === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(k.now(), s.zoom)) && (this.pauseablePlacement = new kl(s, this.map.terrain, this._order, v, d, f, m, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, D), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(k.now()), A = !0), C && this.pauseablePlacement.placement.setStale()), A || C) for (const R of this._order) {
|
19525
|
-
const
|
19526
|
-
|
19525
|
+
const B = this._layers[R];
|
19526
|
+
B.type === "symbol" && this.placement.updateLayerOpacities(B, D[B.source]);
|
19527
19527
|
}
|
19528
19528
|
return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(k.now());
|
19529
19529
|
}
|
@@ -20098,56 +20098,56 @@ camera_to_anchor_distance/u_camera_to_center_distance :
|
|
20098
20098
|
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`), terrain: gi("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"), terrainDepth: gi("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"), terrainCoords: gi("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"), sky: gi("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}", "attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}") };
|
20099
20099
|
function gi(x, s) {
|
20100
20100
|
const d = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, f = s.match(/attribute ([\w]+) ([\w]+)/g), m = x.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), v = s.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), C = v ? v.concat(m) : m, A = {};
|
20101
|
-
return { fragmentSource: x = x.replace(d, (D, R,
|
20101
|
+
return { fragmentSource: x = x.replace(d, (D, R, B, N, q) => (A[q] = !0, R === "define" ? `
|
20102
20102
|
#ifndef HAS_UNIFORM_u_${q}
|
20103
|
-
varying ${
|
20103
|
+
varying ${B} ${N} ${q};
|
20104
20104
|
#else
|
20105
|
-
uniform ${
|
20105
|
+
uniform ${B} ${N} u_${q};
|
20106
20106
|
#endif
|
20107
20107
|
` : `
|
20108
20108
|
#ifdef HAS_UNIFORM_u_${q}
|
20109
|
-
${
|
20109
|
+
${B} ${N} ${q} = u_${q};
|
20110
20110
|
#endif
|
20111
|
-
`)), vertexSource: s = s.replace(d, (D, R,
|
20112
|
-
const K =
|
20111
|
+
`)), vertexSource: s = s.replace(d, (D, R, B, N, q) => {
|
20112
|
+
const K = N === "float" ? "vec2" : "vec4", J = q.match(/color/) ? "color" : K;
|
20113
20113
|
return A[q] ? R === "define" ? `
|
20114
20114
|
#ifndef HAS_UNIFORM_u_${q}
|
20115
20115
|
uniform lowp float u_${q}_t;
|
20116
|
-
attribute ${
|
20117
|
-
varying ${
|
20116
|
+
attribute ${B} ${K} a_${q};
|
20117
|
+
varying ${B} ${N} ${q};
|
20118
20118
|
#else
|
20119
|
-
uniform ${
|
20119
|
+
uniform ${B} ${N} u_${q};
|
20120
20120
|
#endif
|
20121
20121
|
` : J === "vec4" ? `
|
20122
20122
|
#ifndef HAS_UNIFORM_u_${q}
|
20123
20123
|
${q} = a_${q};
|
20124
20124
|
#else
|
20125
|
-
${
|
20125
|
+
${B} ${N} ${q} = u_${q};
|
20126
20126
|
#endif
|
20127
20127
|
` : `
|
20128
20128
|
#ifndef HAS_UNIFORM_u_${q}
|
20129
20129
|
${q} = unpack_mix_${J}(a_${q}, u_${q}_t);
|
20130
20130
|
#else
|
20131
|
-
${
|
20131
|
+
${B} ${N} ${q} = u_${q};
|
20132
20132
|
#endif
|
20133
20133
|
` : R === "define" ? `
|
20134
20134
|
#ifndef HAS_UNIFORM_u_${q}
|
20135
20135
|
uniform lowp float u_${q}_t;
|
20136
|
-
attribute ${
|
20136
|
+
attribute ${B} ${K} a_${q};
|
20137
20137
|
#else
|
20138
|
-
uniform ${
|
20138
|
+
uniform ${B} ${N} u_${q};
|
20139
20139
|
#endif
|
20140
20140
|
` : J === "vec4" ? `
|
20141
20141
|
#ifndef HAS_UNIFORM_u_${q}
|
20142
|
-
${
|
20142
|
+
${B} ${N} ${q} = a_${q};
|
20143
20143
|
#else
|
20144
|
-
${
|
20144
|
+
${B} ${N} ${q} = u_${q};
|
20145
20145
|
#endif
|
20146
20146
|
` : `
|
20147
20147
|
#ifndef HAS_UNIFORM_u_${q}
|
20148
|
-
${
|
20148
|
+
${B} ${N} ${q} = unpack_mix_${J}(a_${q}, u_${q}_t);
|
20149
20149
|
#else
|
20150
|
-
${
|
20150
|
+
${B} ${N} ${q} = u_${q};
|
20151
20151
|
#endif
|
20152
20152
|
`;
|
20153
20153
|
}), staticAttributes: f, staticUniforms: C };
|
@@ -20158,17 +20158,17 @@ uniform ${F} ${B} u_${q};
|
|
20158
20158
|
}
|
20159
20159
|
bind(s, d, f, m, v, C, A, D, R) {
|
20160
20160
|
this.context = s;
|
20161
|
-
let
|
20162
|
-
for (let
|
20163
|
-
!this.vao || this.boundProgram !== d || this.boundLayoutVertexBuffer !== f ||
|
20161
|
+
let B = this.boundPaintVertexBuffers.length !== m.length;
|
20162
|
+
for (let N = 0; !B && N < m.length; N++) this.boundPaintVertexBuffers[N] !== m[N] && (B = !0);
|
20163
|
+
!this.vao || this.boundProgram !== d || this.boundLayoutVertexBuffer !== f || B || this.boundIndexBuffer !== v || this.boundVertexOffset !== C || this.boundDynamicVertexBuffer !== A || this.boundDynamicVertexBuffer2 !== D || this.boundDynamicVertexBuffer3 !== R ? this.freshBind(d, f, m, v, C, A, D, R) : (s.bindVertexArray.set(this.vao), A && A.bind(), v && v.dynamicDraw && v.bind(), D && D.bind(), R && R.bind());
|
20164
20164
|
}
|
20165
20165
|
freshBind(s, d, f, m, v, C, A, D) {
|
20166
|
-
const R = s.numAttributes,
|
20167
|
-
this.vao && this.destroy(), this.vao =
|
20168
|
-
for (const q of f) q.enableAttributes(
|
20169
|
-
C && C.enableAttributes(
|
20170
|
-
for (const q of f) q.bind(), q.setVertexAttribPointers(
|
20171
|
-
C && (C.bind(), C.setVertexAttribPointers(
|
20166
|
+
const R = s.numAttributes, B = this.context, N = B.gl;
|
20167
|
+
this.vao && this.destroy(), this.vao = B.createVertexArray(), B.bindVertexArray.set(this.vao), this.boundProgram = s, this.boundLayoutVertexBuffer = d, this.boundPaintVertexBuffers = f, this.boundIndexBuffer = m, this.boundVertexOffset = v, this.boundDynamicVertexBuffer = C, this.boundDynamicVertexBuffer2 = A, this.boundDynamicVertexBuffer3 = D, d.enableAttributes(N, s);
|
20168
|
+
for (const q of f) q.enableAttributes(N, s);
|
20169
|
+
C && C.enableAttributes(N, s), A && A.enableAttributes(N, s), D && D.enableAttributes(N, s), d.bind(), d.setVertexAttribPointers(N, s, v);
|
20170
|
+
for (const q of f) q.bind(), q.setVertexAttribPointers(N, s, v);
|
20171
|
+
C && (C.bind(), C.setVertexAttribPointers(N, s, v)), m && m.bind(), A && (A.bind(), A.setVertexAttribPointers(N, s, v)), D && (D.bind(), D.setVertexAttribPointers(N, s, v)), B.currentNumAttributes = R;
|
20172
20172
|
}
|
20173
20173
|
destroy() {
|
20174
20174
|
this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null);
|
@@ -20188,7 +20188,7 @@ uniform ${F} ${B} u_${q};
|
|
20188
20188
|
constructor(s, d, f, m, v, C) {
|
20189
20189
|
const A = s.gl;
|
20190
20190
|
this.program = A.createProgram();
|
20191
|
-
const D = xa(d.staticAttributes), R = f ? f.getBinderAttributes() : [],
|
20191
|
+
const D = xa(d.staticAttributes), R = f ? f.getBinderAttributes() : [], B = D.concat(R), N = co.prelude.staticUniforms ? xa(co.prelude.staticUniforms) : [], q = d.staticUniforms ? xa(d.staticUniforms) : [], K = f ? f.getBinderUniforms() : [], J = N.concat(q).concat(K), ne = [];
|
20192
20192
|
for (const be of J) ne.indexOf(be) < 0 && ne.push(be);
|
20193
20193
|
const ae = f ? f.defines() : [];
|
20194
20194
|
v && ae.push("#define OVERDRAW_INSPECTOR;"), C && ae.push("#define TERRAIN3D;");
|
@@ -20203,8 +20203,8 @@ uniform ${F} ${B} u_${q};
|
|
20203
20203
|
if (A.shaderSource(me, he), A.compileShader(me), !A.getShaderParameter(me, A.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${A.getShaderInfoLog(me)}`);
|
20204
20204
|
A.attachShader(this.program, me), this.attributes = {};
|
20205
20205
|
const ge = {};
|
20206
|
-
this.numAttributes =
|
20207
|
-
for (let be = 0; be < this.numAttributes; be++)
|
20206
|
+
this.numAttributes = B.length;
|
20207
|
+
for (let be = 0; be < this.numAttributes; be++) B[be] && (A.bindAttribLocation(this.program, be, B[be]), this.attributes[B[be]] = be);
|
20208
20208
|
if (A.linkProgram(this.program), !A.getProgramParameter(this.program, A.LINK_STATUS)) throw new Error(`Program failed to link: ${A.getProgramInfoLog(this.program)}`);
|
20209
20209
|
A.deleteShader(me), A.deleteShader(ee);
|
20210
20210
|
for (let be = 0; be < ne.length; be++) {
|
@@ -20216,7 +20216,7 @@ uniform ${F} ${B} u_${q};
|
|
20216
20216
|
}
|
20217
20217
|
this.fixedUniforms = m(s, ge), this.terrainUniforms = ((be, Re) => ({ u_depth: new a.aH(be, Re.u_depth), u_terrain: new a.aH(be, Re.u_terrain), u_terrain_dim: new a.aI(be, Re.u_terrain_dim), u_terrain_matrix: new a.aJ(be, Re.u_terrain_matrix), u_terrain_unpack: new a.aK(be, Re.u_terrain_unpack), u_terrain_exaggeration: new a.aI(be, Re.u_terrain_exaggeration) }))(s, ge), this.binderUniforms = f ? f.getUniforms(s, ge) : [];
|
20218
20218
|
}
|
20219
|
-
draw(s, d, f, m, v, C, A, D, R,
|
20219
|
+
draw(s, d, f, m, v, C, A, D, R, B, N, q, K, J, ne, ae, le, he) {
|
20220
20220
|
const ee = s.gl;
|
20221
20221
|
if (this.failedToCreate) return;
|
20222
20222
|
if (s.program.set(this.program), s.setDepthMode(f), s.setStencilMode(m), s.setColorMode(v), s.setCullFace(C), D) {
|
@@ -20238,7 +20238,7 @@ uniform ${F} ${B} u_${q};
|
|
20238
20238
|
}
|
20239
20239
|
for (const ge of q.get()) {
|
20240
20240
|
const be = ge.vaos || (ge.vaos = {});
|
20241
|
-
(be[R] || (be[R] = new fh())).bind(s, this,
|
20241
|
+
(be[R] || (be[R] = new fh())).bind(s, this, B, ne ? ne.getPaintVertexBuffers() : [], N, ge.vertexOffset, ae, le, he), ee.drawElements(d, ge.primitiveLength * me, ee.UNSIGNED_SHORT, ge.primitiveOffset * me * 2);
|
20242
20242
|
}
|
20243
20243
|
}
|
20244
20244
|
}
|
@@ -20251,12 +20251,12 @@ uniform ${F} ${B} u_${q};
|
|
20251
20251
|
var R = new a.A(9);
|
20252
20252
|
return a.A != Float32Array && (R[1] = 0, R[2] = 0, R[3] = 0, R[5] = 0, R[6] = 0, R[7] = 0), R[0] = 1, R[4] = 1, R[8] = 1, R;
|
20253
20253
|
}();
|
20254
|
-
m.properties.get("anchor") === "viewport" && function(R,
|
20255
|
-
var
|
20256
|
-
R[0] = q, R[1] =
|
20257
|
-
}(A, -s.transform.angle), function(R,
|
20258
|
-
var q =
|
20259
|
-
R[0] = q *
|
20254
|
+
m.properties.get("anchor") === "viewport" && function(R, B) {
|
20255
|
+
var N = Math.sin(B), q = Math.cos(B);
|
20256
|
+
R[0] = q, R[1] = N, R[2] = 0, R[3] = -N, R[4] = q, R[5] = 0, R[6] = 0, R[7] = 0, R[8] = 1;
|
20257
|
+
}(A, -s.transform.angle), function(R, B, N) {
|
20258
|
+
var q = B[0], K = B[1], J = B[2];
|
20259
|
+
R[0] = q * N[0] + K * N[3] + J * N[6], R[1] = q * N[1] + K * N[4] + J * N[7], R[2] = q * N[2] + K * N[5] + J * N[8];
|
20260
20260
|
}(C, C, A);
|
20261
20261
|
const D = m.properties.get("color");
|
20262
20262
|
return { u_matrix: x, u_lightpos: C, u_lightintensity: m.properties.get("intensity"), u_lightcolor: [D.r, D.g, D.b], u_vertical_gradient: +d, u_opacity: f };
|
@@ -20285,8 +20285,8 @@ uniform ${F} ${B} u_${q};
|
|
20285
20285
|
const v = x.transform, C = Tp(s, v);
|
20286
20286
|
return { u_matrix: Mp(x, s, d, m), u_texsize: s.imageAtlasTexture.size, u_ratio: 1 / Zt(s, 1, v.zoom), u_device_pixel_ratio: x.pixelRatio, u_image: 0, u_scale: [C, f.fromScale, f.toScale], u_fade: f.t, u_units_to_pixels: [1 / v.pixelsToGLUnits[0], 1 / v.pixelsToGLUnits[1]] };
|
20287
20287
|
}, kg = (x, s, d, f, m, v) => {
|
20288
|
-
const C = x.lineAtlas, A = Tp(s, x.transform), D = d.layout.get("line-cap") === "round", R = C.getDash(f.from, D),
|
20289
|
-
return a.e(Oc(x, s, d, v), { u_patternscale_a: [A /
|
20288
|
+
const C = x.lineAtlas, A = Tp(s, x.transform), D = d.layout.get("line-cap") === "round", R = C.getDash(f.from, D), B = C.getDash(f.to, D), N = R.width * m.fromScale, q = B.width * m.toScale;
|
20289
|
+
return a.e(Oc(x, s, d, v), { u_patternscale_a: [A / N, -R.height / 2], u_patternscale_b: [A / q, -B.height / 2], u_sdfgamma: C.width / (256 * Math.min(N, q) * x.pixelRatio) / 2, u_image: 0, u_tex_y_a: R.y, u_tex_y_b: B.y, u_mix: m.t });
|
20290
20290
|
};
|
20291
20291
|
function Tp(x, s) {
|
20292
20292
|
return 1 / Zt(x, 1, s.tileZoom);
|
@@ -20303,15 +20303,15 @@ uniform ${F} ${B} u_${q};
|
|
20303
20303
|
const s = Math.sin(x), d = Math.cos(x);
|
20304
20304
|
return [(2 * d + 1) / 3, (-Math.sqrt(3) * s - d + 1) / 3, (Math.sqrt(3) * s - d + 1) / 3];
|
20305
20305
|
}
|
20306
|
-
const Cp = (x, s, d, f, m, v, C, A, D, R,
|
20306
|
+
const Cp = (x, s, d, f, m, v, C, A, D, R, B, N, q, K) => {
|
20307
20307
|
const J = C.transform;
|
20308
|
-
return { u_is_size_zoom_constant: +(x === "constant" || x === "source"), u_is_size_feature_constant: +(x === "constant" || x === "camera"), u_size_t: s ? s.uSizeT : 0, u_size: s ? s.uSize : 0, u_camera_to_center_distance: J.cameraToCenterDistance, u_pitch: J.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +d, u_aspect_ratio: J.width / J.height, u_fade_change: C.options.fadeDuration ? C.symbolFadeChange : 1, u_matrix: A, u_label_plane_matrix: D, u_coord_matrix: R, u_is_text: +
|
20309
|
-
}, Cl = (x, s, d, f, m, v, C, A, D, R,
|
20308
|
+
return { u_is_size_zoom_constant: +(x === "constant" || x === "source"), u_is_size_feature_constant: +(x === "constant" || x === "camera"), u_size_t: s ? s.uSizeT : 0, u_size: s ? s.uSize : 0, u_camera_to_center_distance: J.cameraToCenterDistance, u_pitch: J.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +d, u_aspect_ratio: J.width / J.height, u_fade_change: C.options.fadeDuration ? C.symbolFadeChange : 1, u_matrix: A, u_label_plane_matrix: D, u_coord_matrix: R, u_is_text: +N, u_pitch_with_map: +f, u_is_along_line: m, u_is_variable_anchor: v, u_texsize: q, u_texture: 0, u_translation: B, u_pitched_scale: K };
|
20309
|
+
}, Cl = (x, s, d, f, m, v, C, A, D, R, B, N, q, K, J) => {
|
20310
20310
|
const ne = C.transform;
|
20311
|
-
return a.e(Cp(x, s, d, f, m, v, C, A, D, R,
|
20312
|
-
}, yh = (x, s, d, f, m, v, C, A, D, R,
|
20313
|
-
const
|
20314
|
-
return { u_image: 0, u_pattern_tl_a:
|
20311
|
+
return a.e(Cp(x, s, d, f, m, v, C, A, D, R, B, N, q, J), { u_gamma_scale: f ? Math.cos(ne._pitch) * ne.cameraToCenterDistance : 1, u_device_pixel_ratio: C.pixelRatio, u_is_halo: +K });
|
20312
|
+
}, yh = (x, s, d, f, m, v, C, A, D, R, B, N, q, K) => a.e(Cl(x, s, d, f, m, v, C, A, D, R, B, !0, N, !0, K), { u_texsize_icon: q, u_texture_icon: 1 }), zc = (x, s, d) => ({ u_matrix: x, u_opacity: s, u_color: d }), _h = (x, s, d, f, m, v) => a.e(function(C, A, D, R) {
|
20313
|
+
const B = D.imageManager.getPattern(C.from.toString()), N = D.imageManager.getPattern(C.to.toString()), { width: q, height: K } = D.imageManager.getPixelSize(), J = Math.pow(2, R.tileID.overscaledZ), ne = R.tileSize * Math.pow(2, D.transform.tileZoom) / J, ae = ne * (R.tileID.canonical.x + R.tileID.wrap * J), le = ne * R.tileID.canonical.y;
|
20314
|
+
return { u_image: 0, u_pattern_tl_a: B.tl, u_pattern_br_a: B.br, u_pattern_tl_b: N.tl, u_pattern_br_b: N.br, u_texsize: [q, K], u_mix: A.t, u_pattern_size_a: B.displaySize, u_pattern_size_b: N.displaySize, u_scale_a: A.fromScale, u_scale_b: A.toScale, u_tile_units_to_pixels: 1 / Zt(R, 1, D.transform.tileZoom), u_pixel_coord_upper: [ae >> 16, le >> 16], u_pixel_coord_lower: [65535 & ae, 65535 & le] };
|
20315
20315
|
}(f, v, d, m), { u_matrix: x, u_opacity: s }), vh = { fillExtrusion: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_lightpos: new a.aN(x, s.u_lightpos), u_lightintensity: new a.aI(x, s.u_lightintensity), u_lightcolor: new a.aN(x, s.u_lightcolor), u_vertical_gradient: new a.aI(x, s.u_vertical_gradient), u_opacity: new a.aI(x, s.u_opacity) }), fillExtrusionPattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_lightpos: new a.aN(x, s.u_lightpos), u_lightintensity: new a.aI(x, s.u_lightintensity), u_lightcolor: new a.aN(x, s.u_lightcolor), u_vertical_gradient: new a.aI(x, s.u_vertical_gradient), u_height_factor: new a.aI(x, s.u_height_factor), u_image: new a.aH(x, s.u_image), u_texsize: new a.aO(x, s.u_texsize), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade), u_opacity: new a.aI(x, s.u_opacity) }), fill: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix) }), fillPattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_image: new a.aH(x, s.u_image), u_texsize: new a.aO(x, s.u_texsize), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade) }), fillOutline: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_world: new a.aO(x, s.u_world) }), fillOutlinePattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_world: new a.aO(x, s.u_world), u_image: new a.aH(x, s.u_image), u_texsize: new a.aO(x, s.u_texsize), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade) }), circle: (x, s) => ({ u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_scale_with_map: new a.aH(x, s.u_scale_with_map), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_extrude_scale: new a.aO(x, s.u_extrude_scale), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_matrix: new a.aJ(x, s.u_matrix) }), collisionBox: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_pixel_extrude_scale: new a.aO(x, s.u_pixel_extrude_scale) }), collisionCircle: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_inv_matrix: new a.aJ(x, s.u_inv_matrix), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_viewport_size: new a.aO(x, s.u_viewport_size) }), debug: (x, s) => ({ u_color: new a.aL(x, s.u_color), u_matrix: new a.aJ(x, s.u_matrix), u_overlay: new a.aH(x, s.u_overlay), u_overlay_scale: new a.aI(x, s.u_overlay_scale) }), clippingMask: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix) }), heatmap: (x, s) => ({ u_extrude_scale: new a.aI(x, s.u_extrude_scale), u_intensity: new a.aI(x, s.u_intensity), u_matrix: new a.aJ(x, s.u_matrix) }), heatmapTexture: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_world: new a.aO(x, s.u_world), u_image: new a.aH(x, s.u_image), u_color_ramp: new a.aH(x, s.u_color_ramp), u_opacity: new a.aI(x, s.u_opacity) }), hillshade: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_image: new a.aH(x, s.u_image), u_latrange: new a.aO(x, s.u_latrange), u_light: new a.aO(x, s.u_light), u_shadow: new a.aL(x, s.u_shadow), u_highlight: new a.aL(x, s.u_highlight), u_accent: new a.aL(x, s.u_accent) }), hillshadePrepare: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_image: new a.aH(x, s.u_image), u_dimension: new a.aO(x, s.u_dimension), u_zoom: new a.aI(x, s.u_zoom), u_unpack: new a.aK(x, s.u_unpack) }), line: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels) }), lineGradient: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels), u_image: new a.aH(x, s.u_image), u_image_height: new a.aI(x, s.u_image_height) }), linePattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_texsize: new a.aO(x, s.u_texsize), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_image: new a.aH(x, s.u_image), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade) }), lineSDF: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels), u_patternscale_a: new a.aO(x, s.u_patternscale_a), u_patternscale_b: new a.aO(x, s.u_patternscale_b), u_sdfgamma: new a.aI(x, s.u_sdfgamma), u_image: new a.aH(x, s.u_image), u_tex_y_a: new a.aI(x, s.u_tex_y_a), u_tex_y_b: new a.aI(x, s.u_tex_y_b), u_mix: new a.aI(x, s.u_mix) }), raster: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_tl_parent: new a.aO(x, s.u_tl_parent), u_scale_parent: new a.aI(x, s.u_scale_parent), u_buffer_scale: new a.aI(x, s.u_buffer_scale), u_fade_t: new a.aI(x, s.u_fade_t), u_opacity: new a.aI(x, s.u_opacity), u_image0: new a.aH(x, s.u_image0), u_image1: new a.aH(x, s.u_image1), u_brightness_low: new a.aI(x, s.u_brightness_low), u_brightness_high: new a.aI(x, s.u_brightness_high), u_saturation_factor: new a.aI(x, s.u_saturation_factor), u_contrast_factor: new a.aI(x, s.u_contrast_factor), u_spin_weights: new a.aN(x, s.u_spin_weights) }), symbolIcon: (x, s) => ({ u_is_size_zoom_constant: new a.aH(x, s.u_is_size_zoom_constant), u_is_size_feature_constant: new a.aH(x, s.u_is_size_feature_constant), u_size_t: new a.aI(x, s.u_size_t), u_size: new a.aI(x, s.u_size), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_pitch: new a.aI(x, s.u_pitch), u_rotate_symbol: new a.aH(x, s.u_rotate_symbol), u_aspect_ratio: new a.aI(x, s.u_aspect_ratio), u_fade_change: new a.aI(x, s.u_fade_change), u_matrix: new a.aJ(x, s.u_matrix), u_label_plane_matrix: new a.aJ(x, s.u_label_plane_matrix), u_coord_matrix: new a.aJ(x, s.u_coord_matrix), u_is_text: new a.aH(x, s.u_is_text), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_is_along_line: new a.aH(x, s.u_is_along_line), u_is_variable_anchor: new a.aH(x, s.u_is_variable_anchor), u_texsize: new a.aO(x, s.u_texsize), u_texture: new a.aH(x, s.u_texture), u_translation: new a.aO(x, s.u_translation), u_pitched_scale: new a.aI(x, s.u_pitched_scale) }), symbolSDF: (x, s) => ({ u_is_size_zoom_constant: new a.aH(x, s.u_is_size_zoom_constant), u_is_size_feature_constant: new a.aH(x, s.u_is_size_feature_constant), u_size_t: new a.aI(x, s.u_size_t), u_size: new a.aI(x, s.u_size), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_pitch: new a.aI(x, s.u_pitch), u_rotate_symbol: new a.aH(x, s.u_rotate_symbol), u_aspect_ratio: new a.aI(x, s.u_aspect_ratio), u_fade_change: new a.aI(x, s.u_fade_change), u_matrix: new a.aJ(x, s.u_matrix), u_label_plane_matrix: new a.aJ(x, s.u_label_plane_matrix), u_coord_matrix: new a.aJ(x, s.u_coord_matrix), u_is_text: new a.aH(x, s.u_is_text), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_is_along_line: new a.aH(x, s.u_is_along_line), u_is_variable_anchor: new a.aH(x, s.u_is_variable_anchor), u_texsize: new a.aO(x, s.u_texsize), u_texture: new a.aH(x, s.u_texture), u_gamma_scale: new a.aI(x, s.u_gamma_scale), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_is_halo: new a.aH(x, s.u_is_halo), u_translation: new a.aO(x, s.u_translation), u_pitched_scale: new a.aI(x, s.u_pitched_scale) }), symbolTextAndIcon: (x, s) => ({ u_is_size_zoom_constant: new a.aH(x, s.u_is_size_zoom_constant), u_is_size_feature_constant: new a.aH(x, s.u_is_size_feature_constant), u_size_t: new a.aI(x, s.u_size_t), u_size: new a.aI(x, s.u_size), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_pitch: new a.aI(x, s.u_pitch), u_rotate_symbol: new a.aH(x, s.u_rotate_symbol), u_aspect_ratio: new a.aI(x, s.u_aspect_ratio), u_fade_change: new a.aI(x, s.u_fade_change), u_matrix: new a.aJ(x, s.u_matrix), u_label_plane_matrix: new a.aJ(x, s.u_label_plane_matrix), u_coord_matrix: new a.aJ(x, s.u_coord_matrix), u_is_text: new a.aH(x, s.u_is_text), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_is_along_line: new a.aH(x, s.u_is_along_line), u_is_variable_anchor: new a.aH(x, s.u_is_variable_anchor), u_texsize: new a.aO(x, s.u_texsize), u_texsize_icon: new a.aO(x, s.u_texsize_icon), u_texture: new a.aH(x, s.u_texture), u_texture_icon: new a.aH(x, s.u_texture_icon), u_gamma_scale: new a.aI(x, s.u_gamma_scale), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_is_halo: new a.aH(x, s.u_is_halo), u_translation: new a.aO(x, s.u_translation), u_pitched_scale: new a.aI(x, s.u_pitched_scale) }), background: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_opacity: new a.aI(x, s.u_opacity), u_color: new a.aL(x, s.u_color) }), backgroundPattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_opacity: new a.aI(x, s.u_opacity), u_image: new a.aH(x, s.u_image), u_pattern_tl_a: new a.aO(x, s.u_pattern_tl_a), u_pattern_br_a: new a.aO(x, s.u_pattern_br_a), u_pattern_tl_b: new a.aO(x, s.u_pattern_tl_b), u_pattern_br_b: new a.aO(x, s.u_pattern_br_b), u_texsize: new a.aO(x, s.u_texsize), u_mix: new a.aI(x, s.u_mix), u_pattern_size_a: new a.aO(x, s.u_pattern_size_a), u_pattern_size_b: new a.aO(x, s.u_pattern_size_b), u_scale_a: new a.aI(x, s.u_scale_a), u_scale_b: new a.aI(x, s.u_scale_b), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_tile_units_to_pixels: new a.aI(x, s.u_tile_units_to_pixels) }), terrain: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_texture: new a.aH(x, s.u_texture), u_ele_delta: new a.aI(x, s.u_ele_delta), u_fog_matrix: new a.aJ(x, s.u_fog_matrix), u_fog_color: new a.aL(x, s.u_fog_color), u_fog_ground_blend: new a.aI(x, s.u_fog_ground_blend), u_fog_ground_blend_opacity: new a.aI(x, s.u_fog_ground_blend_opacity), u_horizon_color: new a.aL(x, s.u_horizon_color), u_horizon_fog_blend: new a.aI(x, s.u_horizon_fog_blend) }), terrainDepth: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ele_delta: new a.aI(x, s.u_ele_delta) }), terrainCoords: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_texture: new a.aH(x, s.u_texture), u_terrain_coords_id: new a.aI(x, s.u_terrain_coords_id), u_ele_delta: new a.aI(x, s.u_ele_delta) }), sky: (x, s) => ({ u_sky_color: new a.aL(x, s.u_sky_color), u_horizon_color: new a.aL(x, s.u_horizon_color), u_horizon: new a.aI(x, s.u_horizon), u_sky_horizon_blend: new a.aI(x, s.u_sky_horizon_blend) }) };
|
20316
20316
|
class ks {
|
20317
20317
|
constructor(s, d, f) {
|
@@ -20812,18 +20812,18 @@ uniform ${F} ${B} u_${q};
|
|
20812
20812
|
let $o;
|
20813
20813
|
function Al(x, s, d, f, m) {
|
20814
20814
|
const v = x.context, C = v.gl, A = x.useProgram("collisionBox"), D = [];
|
20815
|
-
let R = 0,
|
20815
|
+
let R = 0, B = 0;
|
20816
20816
|
for (let le = 0; le < f.length; le++) {
|
20817
20817
|
const he = f[le], ee = s.getTile(he).getBucket(d);
|
20818
20818
|
if (!ee) continue;
|
20819
20819
|
const me = m ? ee.textCollisionBox : ee.iconCollisionBox, ge = ee.collisionCircleArray;
|
20820
20820
|
if (ge.length > 0) {
|
20821
20821
|
const be = a.H();
|
20822
|
-
a.aQ(be, ee.placementInvProjMatrix, x.transform.glCoordMatrix), a.aQ(be, be, ee.placementViewportMatrix), D.push({ circleArray: ge, circleOffset:
|
20822
|
+
a.aQ(be, ee.placementInvProjMatrix, x.transform.glCoordMatrix), a.aQ(be, be, ee.placementViewportMatrix), D.push({ circleArray: ge, circleOffset: B, transform: he.posMatrix, invTransform: be, coord: he }), R += ge.length / 4, B = R;
|
20823
20823
|
}
|
20824
|
-
me && A.draw(v, C.LINES, Wt.disabled, Li.disabled, x.colorModeForRenderPass(), Ei.disabled, { u_matrix: he.posMatrix, u_pixel_extrude_scale: [1 / (
|
20824
|
+
me && A.draw(v, C.LINES, Wt.disabled, Li.disabled, x.colorModeForRenderPass(), Ei.disabled, { u_matrix: he.posMatrix, u_pixel_extrude_scale: [1 / (N = x.transform).width, 1 / N.height] }, x.style.map.terrain && x.style.map.terrain.getTerrainData(he), d.id, me.layoutVertexBuffer, me.indexBuffer, me.segments, null, x.transform.zoom, null, null, me.collisionVertexBuffer);
|
20825
20825
|
}
|
20826
|
-
var
|
20826
|
+
var N;
|
20827
20827
|
if (!m || !D.length) return;
|
20828
20828
|
const q = x.useProgram("collisionCircle"), K = new a.aR();
|
20829
20829
|
K.resize(4 * R), K._trim();
|
@@ -20868,16 +20868,16 @@ uniform ${F} ${B} u_${q};
|
|
20868
20868
|
}
|
20869
20869
|
return x.add(f);
|
20870
20870
|
}
|
20871
|
-
function ka(x, s, d, f, m, v, C, A, D, R,
|
20871
|
+
function ka(x, s, d, f, m, v, C, A, D, R, B, N, q, K) {
|
20872
20872
|
const J = x.text.placedSymbolArray, ne = x.text.dynamicLayoutVertexArray, ae = x.icon.dynamicLayoutVertexArray, le = {};
|
20873
20873
|
ne.clear();
|
20874
20874
|
for (let he = 0; he < J.length; he++) {
|
20875
20875
|
const ee = J.get(he), me = ee.hidden || !ee.crossTileID || x.allowVerticalPlacement && !ee.placedOrientation ? null : f[ee.crossTileID];
|
20876
20876
|
if (me) {
|
20877
|
-
const ge = new a.P(ee.anchorX, ee.anchorY), be = { getElevation: K, width: m.width, height: m.height, labelPlaneMatrix: v, lineVertexArray: null, pitchWithMap: d, projection:
|
20877
|
+
const ge = new a.P(ee.anchorX, ee.anchorY), be = { getElevation: K, width: m.width, height: m.height, labelPlaneMatrix: v, lineVertexArray: null, pitchWithMap: d, projection: B, projectionCache: null, tileAnchorPoint: ge, translation: N, unwrappedTileID: q }, Re = d ? re(ge.x, ge.y, C, K) : Ae(ge.x, ge.y, be), $e = U(m.cameraToCenterDistance, Re.signedDistanceFromCamera);
|
20878
20878
|
let Je = a.ai(x.textSizeData, D, ee) * $e / a.ap;
|
20879
20879
|
d && (Je *= x.tilePixelRatio / A);
|
20880
|
-
const { width: rt, height: Ge, anchor: He, textOffset: pt, textBoxScale: Lt } = me, Ze = Eh(He, rt, Ge, pt, Lt, Je), it =
|
20880
|
+
const { width: rt, height: Ge, anchor: He, textOffset: pt, textBoxScale: Lt } = me, Ze = Eh(He, rt, Ge, pt, Lt, Je), it = B.getPitchedTextCorrection(m, ge.add(new a.P(N[0], N[1])), q), Ot = Vo(Re.point, be, s, Ze, m.angle, it), Vi = x.allowVerticalPlacement && ee.placedOrientation === a.ah.vertical ? Math.PI / 2 : 0;
|
20881
20881
|
for (let Vt = 0; Vt < ee.numGlyphs; Vt++) a.aj(ne, Ot, Vi);
|
20882
20882
|
R && ee.associatedIconIndex >= 0 && (le[ee.associatedIconIndex] = { shiftedAnchor: Ot, angle: Vi });
|
20883
20883
|
} else kt(ee.numGlyphs, ne);
|
@@ -20901,7 +20901,7 @@ uniform ${F} ${B} u_${q};
|
|
20901
20901
|
function Lr(x, s, d) {
|
20902
20902
|
return d.iconsInText && s ? "symbolTextAndIcon" : x ? "symbolSDF" : "symbolIcon";
|
20903
20903
|
}
|
20904
|
-
function Ah(x, s, d, f, m, v, C, A, D, R,
|
20904
|
+
function Ah(x, s, d, f, m, v, C, A, D, R, B, N) {
|
20905
20905
|
const q = x.context, K = q.gl, J = x.transform, ne = zo(), ae = A === "map", le = D === "map", he = A !== "viewport" && d.layout.get("symbol-placement") !== "point", ee = ae && !le && !he, me = !le && he, ge = !d.layout.get("symbol-sort-key").isConstant();
|
20906
20906
|
let be = !1;
|
20907
20907
|
const Re = x.depthModeForSublayer(0, Wt.ReadOnly), $e = d._unevaluatedLayout.hasValue("text-variable-anchor") || d._unevaluatedLayout.hasValue("text-variable-anchor-offset"), Je = [], rt = ne.getCircleRadiusCorrection(J);
|
@@ -20937,23 +20937,23 @@ uniform ${F} ${B} u_${q};
|
|
20937
20937
|
const He = Ge.state;
|
20938
20938
|
if (q.activeTexture.set(K.TEXTURE0), He.atlasTexture.bind(He.atlasInterpolation, K.CLAMP_TO_EDGE), He.atlasTextureIcon && (q.activeTexture.set(K.TEXTURE1), He.atlasTextureIcon && He.atlasTextureIcon.bind(He.atlasInterpolationIcon, K.CLAMP_TO_EDGE)), He.isSDF) {
|
20939
20939
|
const pt = He.uniformValues;
|
20940
|
-
He.hasHalo && (pt.u_is_halo = 1, Ph(He.buffers, Ge.segments, d, x, He.program, Re,
|
20940
|
+
He.hasHalo && (pt.u_is_halo = 1, Ph(He.buffers, Ge.segments, d, x, He.program, Re, B, N, pt, Ge.terrainData)), pt.u_is_halo = 0;
|
20941
20941
|
}
|
20942
|
-
Ph(He.buffers, Ge.segments, d, x, He.program, Re,
|
20942
|
+
Ph(He.buffers, Ge.segments, d, x, He.program, Re, B, N, He.uniformValues, Ge.terrainData);
|
20943
20943
|
}
|
20944
20944
|
}
|
20945
20945
|
function Ph(x, s, d, f, m, v, C, A, D, R) {
|
20946
|
-
const
|
20947
|
-
m.draw(
|
20946
|
+
const B = f.context;
|
20947
|
+
m.draw(B, B.gl.TRIANGLES, v, C, A, Ei.disabled, D, R, d.id, x.layoutVertexBuffer, x.indexBuffer, s, d.paint, f.transform.zoom, x.programConfigurations.get(d.id), x.dynamicLayoutVertexBuffer, x.opacityVertexBuffer);
|
20948
20948
|
}
|
20949
20949
|
function Ih(x, s, d, f) {
|
20950
20950
|
const m = x.context, v = m.gl, C = Li.disabled, A = new sn([v.ONE, v.ONE], a.aM.transparent, [!0, !0, !0, !0]), D = s.getBucket(d);
|
20951
20951
|
if (!D) return;
|
20952
20952
|
const R = f.key;
|
20953
|
-
let
|
20954
|
-
|
20955
|
-
const
|
20956
|
-
q.draw(m, v.TRIANGLES, Wt.disabled, C, A, Ei.disabled, ar(f.posMatrix, s, x.transform.zoom, d.paint.get("heatmap-intensity")), K, d.id, D.layoutVertexBuffer, D.indexBuffer, D.segments, d.paint, x.transform.zoom,
|
20953
|
+
let B = d.heatmapFbos.get(R);
|
20954
|
+
B || (B = Il(m, s.tileSize, s.tileSize), d.heatmapFbos.set(R, B)), m.bindFramebuffer.set(B.framebuffer), m.viewport.set([0, 0, s.tileSize, s.tileSize]), m.clear({ color: a.aM.transparent });
|
20955
|
+
const N = D.programConfigurations.get(d.id), q = x.useProgram("heatmap", N), K = x.style.map.terrain.getTerrainData(f);
|
20956
|
+
q.draw(m, v.TRIANGLES, Wt.disabled, C, A, Ei.disabled, ar(f.posMatrix, s, x.transform.zoom, d.paint.get("heatmap-intensity")), K, d.id, D.layoutVertexBuffer, D.indexBuffer, D.segments, d.paint, x.transform.zoom, N);
|
20957
20957
|
}
|
20958
20958
|
function jo(x, s, d) {
|
20959
20959
|
const f = x.context, m = f.gl;
|
@@ -20984,57 +20984,57 @@ uniform ${F} ${B} u_${q};
|
|
20984
20984
|
C && A && x.setConstantPatternPositions(C, A);
|
20985
20985
|
}
|
20986
20986
|
function Ol(x, s, d, f, m, v, C) {
|
20987
|
-
const A = x.context.gl, D = "fill-pattern", R = d.paint.get(D),
|
20987
|
+
const A = x.context.gl, D = "fill-pattern", R = d.paint.get(D), B = R && R.constantOr(1), N = d.getCrossfadeParameters();
|
20988
20988
|
let q, K, J, ne, ae;
|
20989
|
-
C ? (K =
|
20989
|
+
C ? (K = B && !d.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", q = A.LINES) : (K = B ? "fillPattern" : "fill", q = A.TRIANGLES);
|
20990
20990
|
const le = R.constantOr(null);
|
20991
20991
|
for (const he of f) {
|
20992
20992
|
const ee = s.getTile(he);
|
20993
|
-
if (
|
20993
|
+
if (B && !ee.patternsLoaded()) continue;
|
20994
20994
|
const me = ee.getBucket(d);
|
20995
20995
|
if (!me) continue;
|
20996
20996
|
const ge = me.programConfigurations.get(d.id), be = x.useProgram(K, ge), Re = x.style.map.terrain && x.style.map.terrain.getTerrainData(he);
|
20997
|
-
|
20997
|
+
B && (x.context.activeTexture.set(A.TEXTURE0), ee.imageAtlasTexture.bind(A.LINEAR, A.CLAMP_TO_EDGE), ge.updatePaintBuffers(N)), Ta(ge, D, le, ee, d);
|
20998
20998
|
const $e = Re ? he : null, Je = x.translatePosMatrix($e ? $e.posMatrix : he.posMatrix, ee, d.paint.get("fill-translate"), d.paint.get("fill-translate-anchor"));
|
20999
20999
|
if (C) {
|
21000
21000
|
ne = me.indexBuffer2, ae = me.segments2;
|
21001
21001
|
const rt = [A.drawingBufferWidth, A.drawingBufferHeight];
|
21002
|
-
J = K === "fillOutlinePattern" &&
|
21003
|
-
} else ne = me.indexBuffer, ae = me.segments, J =
|
21002
|
+
J = K === "fillOutlinePattern" && B ? Sp(Je, x, N, ee, rt) : wg(Je, rt);
|
21003
|
+
} else ne = me.indexBuffer, ae = me.segments, J = B ? wp(Je, x, N, ee) : ba(Je);
|
21004
21004
|
be.draw(x.context, q, m, x.stencilModeForClipping(he), v, Ei.disabled, J, Re, d.id, me.layoutVertexBuffer, ne, ae, d.paint, x.transform.zoom, ge);
|
21005
21005
|
}
|
21006
21006
|
}
|
21007
21007
|
function $c(x, s, d, f, m, v, C) {
|
21008
|
-
const A = x.context, D = A.gl, R = "fill-extrusion-pattern",
|
21008
|
+
const A = x.context, D = A.gl, R = "fill-extrusion-pattern", B = d.paint.get(R), N = B.constantOr(1), q = d.getCrossfadeParameters(), K = d.paint.get("fill-extrusion-opacity"), J = B.constantOr(null);
|
21009
21009
|
for (const ne of f) {
|
21010
21010
|
const ae = s.getTile(ne), le = ae.getBucket(d);
|
21011
21011
|
if (!le) continue;
|
21012
|
-
const he = x.style.map.terrain && x.style.map.terrain.getTerrainData(ne), ee = le.programConfigurations.get(d.id), me = x.useProgram(
|
21013
|
-
|
21014
|
-
const ge = x.translatePosMatrix(ne.posMatrix, ae, d.paint.get("fill-extrusion-translate"), d.paint.get("fill-extrusion-translate-anchor")), be = d.paint.get("fill-extrusion-vertical-gradient"), Re =
|
21012
|
+
const he = x.style.map.terrain && x.style.map.terrain.getTerrainData(ne), ee = le.programConfigurations.get(d.id), me = x.useProgram(N ? "fillExtrusionPattern" : "fillExtrusion", ee);
|
21013
|
+
N && (x.context.activeTexture.set(D.TEXTURE0), ae.imageAtlasTexture.bind(D.LINEAR, D.CLAMP_TO_EDGE), ee.updatePaintBuffers(q)), Ta(ee, R, J, ae, d);
|
21014
|
+
const ge = x.translatePosMatrix(ne.posMatrix, ae, d.paint.get("fill-extrusion-translate"), d.paint.get("fill-extrusion-translate-anchor")), be = d.paint.get("fill-extrusion-vertical-gradient"), Re = N ? Pc(ge, x, be, K, ne, q, ae) : Tl(ge, x, be, K);
|
21015
21015
|
me.draw(A, A.gl.TRIANGLES, m, v, C, Ei.backCCW, Re, he, d.id, le.layoutVertexBuffer, le.indexBuffer, le.segments, d.paint, x.transform.zoom, ee, x.style.map.terrain && le.centroidVertexBuffer);
|
21016
21016
|
}
|
21017
21017
|
}
|
21018
21018
|
function Ma(x, s, d, f, m, v, C) {
|
21019
21019
|
const A = x.context, D = A.gl, R = d.fbo;
|
21020
21020
|
if (!R) return;
|
21021
|
-
const
|
21022
|
-
A.activeTexture.set(D.TEXTURE0), D.bindTexture(D.TEXTURE_2D, R.colorAttachment.get()),
|
21021
|
+
const B = x.useProgram("hillshade"), N = x.style.map.terrain && x.style.map.terrain.getTerrainData(s);
|
21022
|
+
A.activeTexture.set(D.TEXTURE0), D.bindTexture(D.TEXTURE_2D, R.colorAttachment.get()), B.draw(A, D.TRIANGLES, m, v, C, Ei.disabled, ((q, K, J, ne) => {
|
21023
21023
|
const ae = J.paint.get("hillshade-shadow-color"), le = J.paint.get("hillshade-highlight-color"), he = J.paint.get("hillshade-accent-color");
|
21024
21024
|
let ee = J.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
|
21025
21025
|
J.paint.get("hillshade-illumination-anchor") === "viewport" && (ee -= q.transform.angle);
|
21026
21026
|
const me = !q.options.moving;
|
21027
21027
|
return { u_matrix: ne ? ne.posMatrix : q.transform.calculatePosMatrix(K.tileID.toUnwrapped(), me), u_image: 0, u_latrange: Dc(0, K.tileID), u_light: [J.paint.get("hillshade-exaggeration"), ee], u_shadow: ae, u_highlight: le, u_accent: he };
|
21028
|
-
})(x, d, f,
|
21028
|
+
})(x, d, f, N ? s : null), N, f.id, x.rasterBoundsBuffer, x.quadTriangleIndexBuffer, x.rasterBoundsSegments);
|
21029
21029
|
}
|
21030
21030
|
function Ca(x, s, d, f, m, v) {
|
21031
21031
|
const C = x.context, A = C.gl, D = s.dem;
|
21032
21032
|
if (D && D.data) {
|
21033
|
-
const R = D.dim,
|
21034
|
-
if (C.activeTexture.set(A.TEXTURE1), C.pixelStoreUnpackPremultiplyAlpha.set(!1), s.demTexture = s.demTexture || x.getTileTexture(
|
21033
|
+
const R = D.dim, B = D.stride, N = D.getPixels();
|
21034
|
+
if (C.activeTexture.set(A.TEXTURE1), C.pixelStoreUnpackPremultiplyAlpha.set(!1), s.demTexture = s.demTexture || x.getTileTexture(B), s.demTexture) {
|
21035
21035
|
const K = s.demTexture;
|
21036
|
-
K.update(
|
21037
|
-
} else s.demTexture = new lt(C,
|
21036
|
+
K.update(N, { premultiply: !1 }), K.bind(A.NEAREST, A.CLAMP_TO_EDGE);
|
21037
|
+
} else s.demTexture = new lt(C, N, A.RGBA, { premultiply: !1 }), s.demTexture.bind(A.NEAREST, A.CLAMP_TO_EDGE);
|
21038
21038
|
C.activeTexture.set(A.TEXTURE0);
|
21039
21039
|
let q = s.fbo;
|
21040
21040
|
if (!q) {
|
@@ -21050,7 +21050,7 @@ uniform ${F} ${B} u_${q};
|
|
21050
21050
|
function $p(x, s, d, f, m, v) {
|
21051
21051
|
const C = f.paint.get("raster-fade-duration");
|
21052
21052
|
if (!v && C > 0) {
|
21053
|
-
const A = k.now(), D = (A - x.timeAdded) / C, R = s ? (A - s.timeAdded) / C : -1,
|
21053
|
+
const A = k.now(), D = (A - x.timeAdded) / C, R = s ? (A - s.timeAdded) / C : -1, B = d.getSource(), N = m.coveringZoomLevel({ tileSize: B.tileSize, roundZoom: B.roundZoom }), q = !s || Math.abs(s.tileID.overscaledZ - N) > Math.abs(x.tileID.overscaledZ - N), K = q && x.refreshedUponExpiration ? 1 : a.ac(q ? D : 1 - R, 0, 1);
|
21054
21054
|
return x.refreshedUponExpiration && D >= 1 && (x.refreshedUponExpiration = !1), s ? { opacity: 1, mix: 1 - K } : { opacity: K, mix: 0 };
|
21055
21055
|
}
|
21056
21056
|
return { opacity: 1, mix: 0 };
|
@@ -21067,7 +21067,7 @@ uniform ${F} ${B} u_${q};
|
|
21067
21067
|
A.enable(A.SCISSOR_TEST), A.scissor(s * x.pixelRatio, d * x.pixelRatio, f * x.pixelRatio, m * x.pixelRatio), C.clear({ color: v }), A.disable(A.SCISSOR_TEST);
|
21068
21068
|
}
|
21069
21069
|
function Up(x, s, d) {
|
21070
|
-
const f = x.context, m = f.gl, v = d.posMatrix, C = x.useProgram("debug"), A = Wt.disabled, D = Li.disabled, R = x.colorModeForRenderPass(),
|
21070
|
+
const f = x.context, m = f.gl, v = d.posMatrix, C = x.useProgram("debug"), A = Wt.disabled, D = Li.disabled, R = x.colorModeForRenderPass(), B = "$debug", N = x.style.map.terrain && x.style.map.terrain.getTerrainData(d);
|
21071
21071
|
f.activeTexture.set(m.TEXTURE0);
|
21072
21072
|
const q = s.getTileByID(d.key).latestRawTileData, K = Math.floor((q && q.byteLength || 0) / 1024), J = s.getTile(d).tileSize, ne = 512 / Math.min(J, 512) * (d.overscaledZ / x.transform.zoom) * 0.5;
|
21073
21073
|
let ae = d.canonical.toString();
|
@@ -21075,16 +21075,16 @@ uniform ${F} ${B} u_${q};
|
|
21075
21075
|
le.initDebugOverlayCanvas();
|
21076
21076
|
const ee = le.debugOverlayCanvas, me = le.context.gl, ge = le.debugOverlayCanvas.getContext("2d");
|
21077
21077
|
ge.clearRect(0, 0, ee.width, ee.height), ge.shadowColor = "white", ge.shadowBlur = 2, ge.lineWidth = 1.5, ge.strokeStyle = "white", ge.textBaseline = "top", ge.font = "bold 36px Open Sans, sans-serif", ge.fillText(he, 5, 5), ge.strokeText(he, 5, 5), le.debugOverlayTexture.update(ee), le.debugOverlayTexture.bind(me.LINEAR, me.CLAMP_TO_EDGE);
|
21078
|
-
}(x, `${ae} ${K}kB`), C.draw(f, m.TRIANGLES, A, D, sn.alphaBlended, Ei.disabled, Ml(v, a.aM.transparent, ne), null,
|
21078
|
+
}(x, `${ae} ${K}kB`), C.draw(f, m.TRIANGLES, A, D, sn.alphaBlended, Ei.disabled, Ml(v, a.aM.transparent, ne), null, B, x.debugBuffer, x.quadTriangleIndexBuffer, x.debugSegments), C.draw(f, m.LINE_STRIP, A, D, R, Ei.disabled, Ml(v, a.aM.red), N, B, x.debugBuffer, x.tileBorderIndexBuffer, x.debugSegments);
|
21079
21079
|
}
|
21080
21080
|
function Hp(x, s, d) {
|
21081
21081
|
const f = x.context, m = f.gl, v = x.colorModeForRenderPass(), C = new Wt(m.LEQUAL, Wt.ReadWrite, x.depthRangeFor3D), A = x.useProgram("terrain"), D = s.getTerrainMesh();
|
21082
21082
|
f.bindFramebuffer.set(null), f.viewport.set([0, 0, x.width, x.height]);
|
21083
21083
|
for (const R of d) {
|
21084
|
-
const
|
21085
|
-
f.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D,
|
21084
|
+
const B = x.renderToTexture.getTexture(R), N = s.getTerrainData(R.tileID);
|
21085
|
+
f.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, B.texture);
|
21086
21086
|
const q = x.transform.calculatePosMatrix(R.tileID.toUnwrapped()), K = s.getMeshFrameDelta(x.transform.zoom), J = x.transform.calculateFogMatrix(R.tileID.toUnwrapped()), ne = mh(q, K, J, x.style.sky, x.transform.pitch);
|
21087
|
-
A.draw(f, m.TRIANGLES, C, Li.disabled, v, Ei.backCCW, ne,
|
21087
|
+
A.draw(f, m.TRIANGLES, C, Li.disabled, v, Ei.backCCW, ne, N, "terrain", D.vertexBuffer, D.indexBuffer, D.segments);
|
21088
21088
|
}
|
21089
21089
|
}
|
21090
21090
|
class Uc {
|
@@ -21183,47 +21183,47 @@ uniform ${F} ${B} u_${q};
|
|
21183
21183
|
for (const D of f) {
|
21184
21184
|
const R = this.style._layers[D];
|
21185
21185
|
if (!R.hasOffscreenPass() || R.isHidden(this.transform.zoom)) continue;
|
21186
|
-
const
|
21187
|
-
(R.type === "custom" ||
|
21186
|
+
const B = C[R.source];
|
21187
|
+
(R.type === "custom" || B.length) && this.renderLayer(this, m[R.source], R, B);
|
21188
21188
|
}
|
21189
21189
|
if (this.context.bindFramebuffer.set(null), this.context.clear({ color: d.showOverdrawInspector ? a.aM.black : a.aM.transparent, depth: 1 }), this.clearStencil(), this.style.sky && function(D, R) {
|
21190
|
-
const
|
21190
|
+
const B = D.context, N = B.gl, q = ((le, he, ee) => ({ u_sky_color: le.properties.get("sky-color"), u_horizon_color: le.properties.get("horizon-color"), u_horizon: (he.height / 2 + he.getHorizon()) * ee, u_sky_horizon_blend: le.properties.get("sky-horizon-blend") * he.height / 2 * ee }))(R, D.style.map.transform, D.pixelRatio), K = new Wt(N.LEQUAL, Wt.ReadWrite, [0, 1]), J = Li.disabled, ne = D.colorModeForRenderPass(), ae = D.useProgram("sky");
|
21191
21191
|
if (!R.mesh) {
|
21192
21192
|
const le = new a.aX();
|
21193
21193
|
le.emplaceBack(-1, -1), le.emplaceBack(1, -1), le.emplaceBack(1, 1), le.emplaceBack(-1, 1);
|
21194
21194
|
const he = new a.aY();
|
21195
|
-
he.emplaceBack(0, 1, 2), he.emplaceBack(0, 2, 3), R.mesh = new Uc(
|
21195
|
+
he.emplaceBack(0, 1, 2), he.emplaceBack(0, 2, 3), R.mesh = new Uc(B.createVertexBuffer(le, Ro.members), B.createIndexBuffer(he), a.a0.simpleSegment(0, 0, le.length, he.length));
|
21196
21196
|
}
|
21197
|
-
ae.draw(
|
21197
|
+
ae.draw(B, N.TRIANGLES, K, J, ne, Ei.disabled, q, void 0, "sky", R.mesh.vertexBuffer, R.mesh.indexBuffer, R.mesh.segments);
|
21198
21198
|
}(this, this.style.sky), this._showOverdrawInspector = d.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (s._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = "opaque", this.currentLayer = f.length - 1; this.currentLayer >= 0; this.currentLayer--) {
|
21199
|
-
const D = this.style._layers[f[this.currentLayer]], R = m[D.source],
|
21200
|
-
this._renderTileClippingMasks(D,
|
21199
|
+
const D = this.style._layers[f[this.currentLayer]], R = m[D.source], B = v[D.source];
|
21200
|
+
this._renderTileClippingMasks(D, B), this.renderLayer(this, R, D, B);
|
21201
21201
|
}
|
21202
21202
|
for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < f.length; this.currentLayer++) {
|
21203
21203
|
const D = this.style._layers[f[this.currentLayer]], R = m[D.source];
|
21204
21204
|
if (this.renderToTexture && this.renderToTexture.renderLayer(D)) continue;
|
21205
|
-
const
|
21206
|
-
this._renderTileClippingMasks(D, v[D.source]), this.renderLayer(this, R, D,
|
21205
|
+
const B = (D.type === "symbol" ? A : C)[D.source];
|
21206
|
+
this._renderTileClippingMasks(D, v[D.source]), this.renderLayer(this, R, D, B);
|
21207
21207
|
}
|
21208
21208
|
if (this.options.showTileBoundaries) {
|
21209
|
-
const D = function(R,
|
21210
|
-
let
|
21211
|
-
const q = Object.values(R._layers).flatMap((ae) => ae.source && !ae.isHidden(
|
21212
|
-
(!
|
21209
|
+
const D = function(R, B) {
|
21210
|
+
let N = null;
|
21211
|
+
const q = Object.values(R._layers).flatMap((ae) => ae.source && !ae.isHidden(B) ? [R.sourceCaches[ae.source]] : []), K = q.filter((ae) => ae.getSource().type === "vector"), J = q.filter((ae) => ae.getSource().type !== "vector"), ne = (ae) => {
|
21212
|
+
(!N || N.getSource().maxzoom < ae.getSource().maxzoom) && (N = ae);
|
21213
21213
|
};
|
21214
|
-
return K.forEach((ae) => ne(ae)),
|
21214
|
+
return K.forEach((ae) => ne(ae)), N || J.forEach((ae) => ne(ae)), N;
|
21215
21215
|
}(this.style, this.transform.zoom);
|
21216
|
-
D && function(R,
|
21217
|
-
for (let q = 0; q <
|
21216
|
+
D && function(R, B, N) {
|
21217
|
+
for (let q = 0; q < N.length; q++) Up(R, B, N[q]);
|
21218
21218
|
}(this, D, D.getVisibleCoordinates());
|
21219
21219
|
}
|
21220
21220
|
this.options.showPadding && function(D) {
|
21221
21221
|
const R = D.transform.padding;
|
21222
21222
|
Ea(D, D.transform.height - (R.top || 0), 3, Dh), Ea(D, R.bottom || 0, 3, hi), jp(D, R.left || 0, 3, Vc), jp(D, D.transform.width - (R.right || 0), 3, Fg);
|
21223
|
-
const
|
21224
|
-
(function(
|
21225
|
-
jc(
|
21226
|
-
})(D,
|
21223
|
+
const B = D.transform.centerPoint;
|
21224
|
+
(function(N, q, K, J) {
|
21225
|
+
jc(N, q - 1, K - 10, 2, 20, J), jc(N, q - 10, K - 1, 20, 2, J);
|
21226
|
+
})(D, B.x, D.transform.height - B.y, Vp);
|
21227
21227
|
}(this), this.context.setDefault();
|
21228
21228
|
}
|
21229
21229
|
maybeDrawDepthAndCoords(s) {
|
@@ -21231,21 +21231,21 @@ uniform ${F} ${B} u_${q};
|
|
21231
21231
|
const d = this.terrainFacilitator.matrix, f = this.transform.modelViewProjectionMatrix;
|
21232
21232
|
let m = this.terrainFacilitator.dirty;
|
21233
21233
|
m || (m = s ? !a.a_(d, f) : !a.a$(d, f)), m || (m = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length > 0), m && (a.b0(d, f), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, function(v, C) {
|
21234
|
-
const A = v.context, D = A.gl, R = sn.unblended,
|
21234
|
+
const A = v.context, D = A.gl, R = sn.unblended, B = new Wt(D.LEQUAL, Wt.ReadWrite, [0, 1]), N = C.getTerrainMesh(), q = C.sourceCache.getRenderableTiles(), K = v.useProgram("terrainDepth");
|
21235
21235
|
A.bindFramebuffer.set(C.getFramebuffer("depth").framebuffer), A.viewport.set([0, 0, v.width / devicePixelRatio, v.height / devicePixelRatio]), A.clear({ color: a.aM.transparent, depth: 1 });
|
21236
21236
|
for (const J of q) {
|
21237
21237
|
const ne = C.getTerrainData(J.tileID), ae = { u_matrix: v.transform.calculatePosMatrix(J.tileID.toUnwrapped()), u_ele_delta: C.getMeshFrameDelta(v.transform.zoom) };
|
21238
|
-
K.draw(A, D.TRIANGLES,
|
21238
|
+
K.draw(A, D.TRIANGLES, B, Li.disabled, R, Ei.backCCW, ae, ne, "terrain", N.vertexBuffer, N.indexBuffer, N.segments);
|
21239
21239
|
}
|
21240
21240
|
A.bindFramebuffer.set(null), A.viewport.set([0, 0, v.width, v.height]);
|
21241
21241
|
}(this, this.style.map.terrain), function(v, C) {
|
21242
|
-
const A = v.context, D = A.gl, R = sn.unblended,
|
21242
|
+
const A = v.context, D = A.gl, R = sn.unblended, B = new Wt(D.LEQUAL, Wt.ReadWrite, [0, 1]), N = C.getTerrainMesh(), q = C.getCoordsTexture(), K = C.sourceCache.getRenderableTiles(), J = v.useProgram("terrainCoords");
|
21243
21243
|
A.bindFramebuffer.set(C.getFramebuffer("coords").framebuffer), A.viewport.set([0, 0, v.width / devicePixelRatio, v.height / devicePixelRatio]), A.clear({ color: a.aM.transparent, depth: 1 }), C.coordsIndex = [];
|
21244
21244
|
for (const ne of K) {
|
21245
21245
|
const ae = C.getTerrainData(ne.tileID);
|
21246
21246
|
A.activeTexture.set(D.TEXTURE0), D.bindTexture(D.TEXTURE_2D, q.texture);
|
21247
21247
|
const le = { u_matrix: v.transform.calculatePosMatrix(ne.tileID.toUnwrapped()), u_terrain_coords_id: (255 - C.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: C.getMeshFrameDelta(v.transform.zoom) };
|
21248
|
-
J.draw(A, D.TRIANGLES,
|
21248
|
+
J.draw(A, D.TRIANGLES, B, Li.disabled, R, Ei.backCCW, le, ae, "terrain", N.vertexBuffer, N.indexBuffer, N.segments), C.coordsIndex.push(ne.tileID.key);
|
21249
21249
|
}
|
21250
21250
|
A.bindFramebuffer.set(null), A.viewport.set([0, 0, v.width, v.height]);
|
21251
21251
|
}(this, this.style.map.terrain));
|
@@ -21255,7 +21255,7 @@ uniform ${F} ${B} u_${q};
|
|
21255
21255
|
case "symbol":
|
21256
21256
|
(function(v, C, A, D, R) {
|
21257
21257
|
if (v.renderPass !== "translucent") return;
|
21258
|
-
const
|
21258
|
+
const B = Li.disabled, N = v.colorModeForRenderPass();
|
21259
21259
|
(A._unevaluatedLayout.hasValue("text-variable-anchor") || A._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(q, K, J, ne, ae, le, he, ee, me) {
|
21260
21260
|
const ge = K.transform, be = zo(), Re = ae === "map", $e = le === "map";
|
21261
21261
|
for (const Je of q) {
|
@@ -21267,14 +21267,14 @@ uniform ${F} ${B} u_${q};
|
|
21267
21267
|
ka(Ge, Re, $e, me, ge, Lt, Je.posMatrix, it, He, Ze, be, Vi, Je.toUnwrapped(), Ot);
|
21268
21268
|
}
|
21269
21269
|
}
|
21270
|
-
}(D, v, A, C, A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), R), A.paint.get("icon-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !1, A.paint.get("icon-translate"), A.paint.get("icon-translate-anchor"), A.layout.get("icon-rotation-alignment"), A.layout.get("icon-pitch-alignment"), A.layout.get("icon-keep-upright"),
|
21270
|
+
}(D, v, A, C, A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), R), A.paint.get("icon-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !1, A.paint.get("icon-translate"), A.paint.get("icon-translate-anchor"), A.layout.get("icon-rotation-alignment"), A.layout.get("icon-pitch-alignment"), A.layout.get("icon-keep-upright"), B, N), A.paint.get("text-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !0, A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.layout.get("text-keep-upright"), B, N), C.map.showCollisionBoxes && (Al(v, C, A, D, !0), Al(v, C, A, D, !1));
|
21271
21271
|
})(s, d, f, m, this.style.placement.variableOffsets);
|
21272
21272
|
break;
|
21273
21273
|
case "circle":
|
21274
21274
|
(function(v, C, A, D) {
|
21275
21275
|
if (v.renderPass !== "translucent") return;
|
21276
|
-
const R = A.paint.get("circle-opacity"),
|
21277
|
-
if (R.constantOr(1) === 0 && (
|
21276
|
+
const R = A.paint.get("circle-opacity"), B = A.paint.get("circle-stroke-width"), N = A.paint.get("circle-stroke-opacity"), q = !A.layout.get("circle-sort-key").isConstant();
|
21277
|
+
if (R.constantOr(1) === 0 && (B.constantOr(1) === 0 || N.constantOr(1) === 0)) return;
|
21278
21278
|
const K = v.context, J = K.gl, ne = v.depthModeForSublayer(0, Wt.ReadOnly), ae = Li.disabled, le = v.colorModeForRenderPass(), he = [];
|
21279
21279
|
for (let ee = 0; ee < D.length; ee++) {
|
21280
21280
|
const me = D[ee], ge = C.getTile(me), be = ge.getBucket(A);
|
@@ -21297,42 +21297,42 @@ uniform ${F} ${B} u_${q};
|
|
21297
21297
|
if (A.paint.get("heatmap-opacity") === 0) return;
|
21298
21298
|
const R = v.context;
|
21299
21299
|
if (v.style.map.terrain) {
|
21300
|
-
for (const
|
21301
|
-
const
|
21302
|
-
C.hasRenderableParent(
|
21300
|
+
for (const B of D) {
|
21301
|
+
const N = C.getTile(B);
|
21302
|
+
C.hasRenderableParent(B) || (v.renderPass === "offscreen" ? Ih(v, N, A, B) : v.renderPass === "translucent" && jo(v, A, B));
|
21303
21303
|
}
|
21304
21304
|
R.viewport.set([0, 0, v.width, v.height]);
|
21305
|
-
} else v.renderPass === "offscreen" ? function(
|
21306
|
-
const J =
|
21305
|
+
} else v.renderPass === "offscreen" ? function(B, N, q, K) {
|
21306
|
+
const J = B.context, ne = J.gl, ae = Li.disabled, le = new sn([ne.ONE, ne.ONE], a.aM.transparent, [!0, !0, !0, !0]);
|
21307
21307
|
(function(he, ee, me) {
|
21308
21308
|
const ge = he.gl;
|
21309
21309
|
he.activeTexture.set(ge.TEXTURE1), he.viewport.set([0, 0, ee.width / 4, ee.height / 4]);
|
21310
21310
|
let be = me.heatmapFbos.get(a.aU);
|
21311
21311
|
be ? (ge.bindTexture(ge.TEXTURE_2D, be.colorAttachment.get()), he.bindFramebuffer.set(be.framebuffer)) : (be = Il(he, ee.width / 4, ee.height / 4), me.heatmapFbos.set(a.aU, be));
|
21312
|
-
})(J,
|
21312
|
+
})(J, B, q), J.clear({ color: a.aM.transparent });
|
21313
21313
|
for (let he = 0; he < K.length; he++) {
|
21314
21314
|
const ee = K[he];
|
21315
|
-
if (
|
21316
|
-
const me =
|
21315
|
+
if (N.hasRenderableParent(ee)) continue;
|
21316
|
+
const me = N.getTile(ee), ge = me.getBucket(q);
|
21317
21317
|
if (!ge) continue;
|
21318
|
-
const be = ge.programConfigurations.get(q.id), Re =
|
21319
|
-
Re.draw(J, ne.TRIANGLES, Wt.disabled, ae, le, Ei.disabled, ar(ee.posMatrix, me, $e, q.paint.get("heatmap-intensity")), null, q.id, ge.layoutVertexBuffer, ge.indexBuffer, ge.segments, q.paint,
|
21318
|
+
const be = ge.programConfigurations.get(q.id), Re = B.useProgram("heatmap", be), { zoom: $e } = B.transform;
|
21319
|
+
Re.draw(J, ne.TRIANGLES, Wt.disabled, ae, le, Ei.disabled, ar(ee.posMatrix, me, $e, q.paint.get("heatmap-intensity")), null, q.id, ge.layoutVertexBuffer, ge.indexBuffer, ge.segments, q.paint, B.transform.zoom, be);
|
21320
21320
|
}
|
21321
|
-
J.viewport.set([0, 0,
|
21322
|
-
}(v, C, A, D) : v.renderPass === "translucent" && function(
|
21323
|
-
const q =
|
21324
|
-
q.setColorMode(
|
21325
|
-
const J =
|
21326
|
-
J && (q.activeTexture.set(K.TEXTURE0), K.bindTexture(K.TEXTURE_2D, J.colorAttachment.get()), q.activeTexture.set(K.TEXTURE1), Dl(q,
|
21321
|
+
J.viewport.set([0, 0, B.width, B.height]);
|
21322
|
+
}(v, C, A, D) : v.renderPass === "translucent" && function(B, N) {
|
21323
|
+
const q = B.context, K = q.gl;
|
21324
|
+
q.setColorMode(B.colorModeForRenderPass());
|
21325
|
+
const J = N.heatmapFbos.get(a.aU);
|
21326
|
+
J && (q.activeTexture.set(K.TEXTURE0), K.bindTexture(K.TEXTURE_2D, J.colorAttachment.get()), q.activeTexture.set(K.TEXTURE1), Dl(q, N).bind(K.LINEAR, K.CLAMP_TO_EDGE), B.useProgram("heatmapTexture").draw(q, K.TRIANGLES, Wt.disabled, Li.disabled, B.colorModeForRenderPass(), Ei.disabled, Ic(B, N, 0, 1), null, N.id, B.viewportBuffer, B.quadTriangleIndexBuffer, B.viewportSegments, N.paint, B.transform.zoom));
|
21327
21327
|
}(v, A);
|
21328
21328
|
})(s, d, f, m);
|
21329
21329
|
break;
|
21330
21330
|
case "line":
|
21331
21331
|
(function(v, C, A, D) {
|
21332
21332
|
if (v.renderPass !== "translucent") return;
|
21333
|
-
const R = A.paint.get("line-opacity"),
|
21334
|
-
if (R.constantOr(1) === 0 ||
|
21335
|
-
const
|
21333
|
+
const R = A.paint.get("line-opacity"), B = A.paint.get("line-width");
|
21334
|
+
if (R.constantOr(1) === 0 || B.constantOr(1) === 0) return;
|
21335
|
+
const N = v.depthModeForSublayer(0, Wt.ReadOnly), q = v.colorModeForRenderPass(), K = A.paint.get("line-dasharray"), J = A.paint.get("line-pattern"), ne = J.constantOr(1), ae = A.paint.get("line-gradient"), le = A.getCrossfadeParameters(), he = ne ? "linePattern" : K ? "lineSDF" : ae ? "lineGradient" : "line", ee = v.context, me = ee.gl;
|
21336
21336
|
let ge = !0;
|
21337
21337
|
for (const be of D) {
|
21338
21338
|
const Re = C.getTile(be);
|
@@ -21360,22 +21360,22 @@ uniform ${F} ${B} u_${q};
|
|
21360
21360
|
}
|
21361
21361
|
ee.activeTexture.set(me.TEXTURE0), Vi.bind(A.stepInterpolant ? me.NEAREST : me.LINEAR, me.CLAMP_TO_EDGE);
|
21362
21362
|
}
|
21363
|
-
Ge.draw(ee, me.TRIANGLES,
|
21363
|
+
Ge.draw(ee, me.TRIANGLES, N, v.stencilModeForClipping(be), q, Ei.disabled, it, pt, A.id, $e.layoutVertexBuffer, $e.indexBuffer, $e.segments, A.paint, v.transform.zoom, Je, $e.layoutVertexBuffer2), ge = !1;
|
21364
21364
|
}
|
21365
21365
|
})(s, d, f, m);
|
21366
21366
|
break;
|
21367
21367
|
case "fill":
|
21368
21368
|
(function(v, C, A, D) {
|
21369
|
-
const R = A.paint.get("fill-color"),
|
21370
|
-
if (
|
21371
|
-
const
|
21369
|
+
const R = A.paint.get("fill-color"), B = A.paint.get("fill-opacity");
|
21370
|
+
if (B.constantOr(1) === 0) return;
|
21371
|
+
const N = v.colorModeForRenderPass(), q = A.paint.get("fill-pattern"), K = v.opaquePassEnabledForLayer() && !q.constantOr(1) && R.constantOr(a.aM.transparent).a === 1 && B.constantOr(0) === 1 ? "opaque" : "translucent";
|
21372
21372
|
if (v.renderPass === K) {
|
21373
21373
|
const J = v.depthModeForSublayer(1, v.renderPass === "opaque" ? Wt.ReadWrite : Wt.ReadOnly);
|
21374
|
-
Ol(v, C, A, D, J,
|
21374
|
+
Ol(v, C, A, D, J, N, !1);
|
21375
21375
|
}
|
21376
21376
|
if (v.renderPass === "translucent" && A.paint.get("fill-antialias")) {
|
21377
21377
|
const J = v.depthModeForSublayer(A.getPaintProperty("fill-outline-color") ? 2 : 0, Wt.ReadOnly);
|
21378
|
-
Ol(v, C, A, D, J,
|
21378
|
+
Ol(v, C, A, D, J, N, !0);
|
21379
21379
|
}
|
21380
21380
|
})(s, d, f, m);
|
21381
21381
|
break;
|
@@ -21383,11 +21383,11 @@ uniform ${F} ${B} u_${q};
|
|
21383
21383
|
(function(v, C, A, D) {
|
21384
21384
|
const R = A.paint.get("fill-extrusion-opacity");
|
21385
21385
|
if (R !== 0 && v.renderPass === "translucent") {
|
21386
|
-
const
|
21387
|
-
if (R !== 1 || A.paint.get("fill-extrusion-pattern").constantOr(1)) $c(v, C, A, D,
|
21386
|
+
const B = new Wt(v.context.gl.LEQUAL, Wt.ReadWrite, v.depthRangeFor3D);
|
21387
|
+
if (R !== 1 || A.paint.get("fill-extrusion-pattern").constantOr(1)) $c(v, C, A, D, B, Li.disabled, sn.disabled), $c(v, C, A, D, B, v.stencilModeFor3D(), v.colorModeForRenderPass());
|
21388
21388
|
else {
|
21389
|
-
const
|
21390
|
-
$c(v, C, A, D,
|
21389
|
+
const N = v.colorModeForRenderPass();
|
21390
|
+
$c(v, C, A, D, B, Li.disabled, N);
|
21391
21391
|
}
|
21392
21392
|
}
|
21393
21393
|
})(s, d, f, m);
|
@@ -21395,10 +21395,10 @@ uniform ${F} ${B} u_${q};
|
|
21395
21395
|
case "hillshade":
|
21396
21396
|
(function(v, C, A, D) {
|
21397
21397
|
if (v.renderPass !== "offscreen" && v.renderPass !== "translucent") return;
|
21398
|
-
const R = v.context,
|
21398
|
+
const R = v.context, B = v.depthModeForSublayer(0, Wt.ReadOnly), N = v.colorModeForRenderPass(), [q, K] = v.renderPass === "translucent" ? v.stencilConfigForOverlap(D) : [{}, D];
|
21399
21399
|
for (const J of K) {
|
21400
21400
|
const ne = C.getTile(J);
|
21401
|
-
ne.needsHillshadePrepare !== void 0 && ne.needsHillshadePrepare && v.renderPass === "offscreen" ? Ca(v, ne, A,
|
21401
|
+
ne.needsHillshadePrepare !== void 0 && ne.needsHillshadePrepare && v.renderPass === "offscreen" ? Ca(v, ne, A, B, Li.disabled, N) : v.renderPass === "translucent" && Ma(v, J, ne, A, B, q[J.overscaledZ], N);
|
21402
21402
|
}
|
21403
21403
|
R.viewport.set([0, 0, v.width, v.height]);
|
21404
21404
|
})(s, d, f, m);
|
@@ -21406,33 +21406,33 @@ uniform ${F} ${B} u_${q};
|
|
21406
21406
|
case "raster":
|
21407
21407
|
(function(v, C, A, D) {
|
21408
21408
|
if (v.renderPass !== "translucent" || A.paint.get("raster-opacity") === 0 || !D.length) return;
|
21409
|
-
const R = v.context,
|
21409
|
+
const R = v.context, B = R.gl, N = C.getSource(), q = v.useProgram("raster"), K = v.colorModeForRenderPass(), [J, ne] = N instanceof Cn ? [{}, D] : v.stencilConfigForOverlap(D), ae = ne[ne.length - 1].overscaledZ, le = !v.options.moving;
|
21410
21410
|
for (const he of ne) {
|
21411
|
-
const ee = v.depthModeForSublayer(he.overscaledZ - ae, A.paint.get("raster-opacity") === 1 ? Wt.ReadWrite : Wt.ReadOnly,
|
21411
|
+
const ee = v.depthModeForSublayer(he.overscaledZ - ae, A.paint.get("raster-opacity") === 1 ? Wt.ReadWrite : Wt.ReadOnly, B.LESS), me = C.getTile(he);
|
21412
21412
|
me.registerFadeDuration(A.paint.get("raster-fade-duration"));
|
21413
21413
|
const ge = C.findLoadedParent(he, 0), be = C.findLoadedSibling(he), Re = $p(me, ge || be || null, C, A, v.transform, v.style.map.terrain);
|
21414
21414
|
let $e, Je;
|
21415
|
-
const rt = A.paint.get("raster-resampling") === "nearest" ?
|
21416
|
-
R.activeTexture.set(
|
21415
|
+
const rt = A.paint.get("raster-resampling") === "nearest" ? B.NEAREST : B.LINEAR;
|
21416
|
+
R.activeTexture.set(B.TEXTURE0), me.texture.bind(rt, B.CLAMP_TO_EDGE, B.LINEAR_MIPMAP_NEAREST), R.activeTexture.set(B.TEXTURE1), ge ? (ge.texture.bind(rt, B.CLAMP_TO_EDGE, B.LINEAR_MIPMAP_NEAREST), $e = Math.pow(2, ge.tileID.overscaledZ - me.tileID.overscaledZ), Je = [me.tileID.canonical.x * $e % 1, me.tileID.canonical.y * $e % 1]) : me.texture.bind(rt, B.CLAMP_TO_EDGE, B.LINEAR_MIPMAP_NEAREST), me.texture.useMipmap && R.extTextureFilterAnisotropic && v.transform.pitch > 20 && B.texParameterf(B.TEXTURE_2D, R.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, R.extTextureFilterAnisotropicMax);
|
21417
21417
|
const Ge = v.style.map.terrain && v.style.map.terrain.getTerrainData(he), He = Ge ? he : null, pt = He ? He.posMatrix : v.transform.calculatePosMatrix(he.toUnwrapped(), le), Lt = Tg(pt, Je || [0, 0], $e || 1, Re, A);
|
21418
|
-
|
21418
|
+
N instanceof Cn ? q.draw(R, B.TRIANGLES, ee, Li.disabled, K, Ei.disabled, Lt, Ge, A.id, N.boundsBuffer, v.quadTriangleIndexBuffer, N.boundsSegments) : q.draw(R, B.TRIANGLES, ee, J[he.overscaledZ], K, Ei.disabled, Lt, Ge, A.id, v.rasterBoundsBuffer, v.quadTriangleIndexBuffer, v.rasterBoundsSegments);
|
21419
21419
|
}
|
21420
21420
|
})(s, d, f, m);
|
21421
21421
|
break;
|
21422
21422
|
case "background":
|
21423
21423
|
(function(v, C, A, D) {
|
21424
|
-
const R = A.paint.get("background-color"),
|
21425
|
-
if (
|
21426
|
-
const
|
21424
|
+
const R = A.paint.get("background-color"), B = A.paint.get("background-opacity");
|
21425
|
+
if (B === 0) return;
|
21426
|
+
const N = v.context, q = N.gl, K = v.transform, J = K.tileSize, ne = A.paint.get("background-pattern");
|
21427
21427
|
if (v.isPatternMissing(ne)) return;
|
21428
|
-
const ae = !ne && R.a === 1 &&
|
21428
|
+
const ae = !ne && R.a === 1 && B === 1 && v.opaquePassEnabledForLayer() ? "opaque" : "translucent";
|
21429
21429
|
if (v.renderPass !== ae) return;
|
21430
21430
|
const le = Li.disabled, he = v.depthModeForSublayer(0, ae === "opaque" ? Wt.ReadWrite : Wt.ReadOnly), ee = v.colorModeForRenderPass(), me = v.useProgram(ne ? "backgroundPattern" : "background"), ge = D || K.coveringTiles({ tileSize: J, terrain: v.style.map.terrain });
|
21431
|
-
ne && (
|
21431
|
+
ne && (N.activeTexture.set(q.TEXTURE0), v.imageManager.bind(v.context));
|
21432
21432
|
const be = A.getCrossfadeParameters();
|
21433
21433
|
for (const Re of ge) {
|
21434
|
-
const $e = D ? Re.posMatrix : v.transform.calculatePosMatrix(Re.toUnwrapped()), Je = ne ? _h($e,
|
21435
|
-
me.draw(
|
21434
|
+
const $e = D ? Re.posMatrix : v.transform.calculatePosMatrix(Re.toUnwrapped()), Je = ne ? _h($e, B, v, ne, { tileID: Re, tileSize: J }, be) : zc($e, B, R), rt = v.style.map.terrain && v.style.map.terrain.getTerrainData(Re);
|
21435
|
+
me.draw(N, q.TRIANGLES, he, le, ee, Ei.disabled, Je, rt, A.id, v.tileExtentBuffer, v.quadTriangleIndexBuffer, v.tileExtentSegments);
|
21436
21436
|
}
|
21437
21437
|
})(s, 0, f, m);
|
21438
21438
|
break;
|
@@ -21440,12 +21440,12 @@ uniform ${F} ${B} u_${q};
|
|
21440
21440
|
(function(v, C, A) {
|
21441
21441
|
const D = v.context, R = A.implementation;
|
21442
21442
|
if (v.renderPass === "offscreen") {
|
21443
|
-
const
|
21444
|
-
|
21443
|
+
const B = R.prerender;
|
21444
|
+
B && (v.setCustomLayerDefaults(), D.setColorMode(v.colorModeForRenderPass()), B.call(R, D.gl, v.transform.customLayerMatrix()), D.setDirty(), v.setBaseState());
|
21445
21445
|
} else if (v.renderPass === "translucent") {
|
21446
21446
|
v.setCustomLayerDefaults(), D.setColorMode(v.colorModeForRenderPass()), D.setStencilMode(Li.disabled);
|
21447
|
-
const
|
21448
|
-
D.setDepthMode(
|
21447
|
+
const B = R.renderingMode === "3d" ? new Wt(v.context.gl.LEQUAL, Wt.ReadWrite, v.depthRangeFor3D) : v.depthModeForSublayer(0, Wt.ReadOnly);
|
21448
|
+
D.setDepthMode(B), R.render(D.gl, v.transform.customLayerMatrix(), { farZ: v.transform.farZ, nearZ: v.transform.nearZ, fov: v.transform._fov, modelViewProjectionMatrix: v.transform.modelViewProjectionMatrix, projectionMatrix: v.transform.projectionMatrix }), D.setDirty(), v.setBaseState(), D.bindFramebuffer.set(null);
|
21449
21449
|
}
|
21450
21450
|
})(s, 0, f);
|
21451
21451
|
}
|
@@ -21454,8 +21454,8 @@ uniform ${F} ${B} u_${q};
|
|
21454
21454
|
if (!f[0] && !f[1]) return s;
|
21455
21455
|
const C = v ? m === "map" ? this.transform.angle : 0 : m === "viewport" ? -this.transform.angle : 0;
|
21456
21456
|
if (C) {
|
21457
|
-
const R = Math.sin(C),
|
21458
|
-
f = [f[0] *
|
21457
|
+
const R = Math.sin(C), B = Math.cos(C);
|
21458
|
+
f = [f[0] * B - f[1] * R, f[0] * R + f[1] * B];
|
21459
21459
|
}
|
21460
21460
|
const A = [v ? f[0] : Zt(d, f[0], this.transform.zoom), v ? f[1] : Zt(d, f[1], this.transform.zoom), 0], D = new Float32Array(16);
|
21461
21461
|
return a.J(D, s, A), D;
|
@@ -21512,8 +21512,8 @@ uniform ${F} ${B} u_${q};
|
|
21512
21512
|
}([], function(q, K, J) {
|
21513
21513
|
var ne = K[0], ae = K[1], le = K[2], he = J[0], ee = J[1], me = J[2];
|
21514
21514
|
return q[0] = ae * me - le * ee, q[1] = le * he - ne * me, q[2] = ne * ee - ae * he, q;
|
21515
|
-
}([], Pe([], v[A[0]], v[A[1]]), Pe([], v[A[2]], v[A[1]]))), R = -((
|
21516
|
-
var
|
21515
|
+
}([], Pe([], v[A[0]], v[A[1]]), Pe([], v[A[2]], v[A[1]]))), R = -((B = D)[0] * (N = v[A[1]])[0] + B[1] * N[1] + B[2] * N[2]);
|
21516
|
+
var B, N;
|
21517
21517
|
return D.concat(R);
|
21518
21518
|
});
|
21519
21519
|
return new Aa(v, C);
|
@@ -21642,8 +21642,8 @@ uniform ${F} ${B} u_${q};
|
|
21642
21642
|
var f = new a.A(4);
|
21643
21643
|
return a.A != Float32Array && (f[1] = 0, f[2] = 0), f[0] = 1, f[3] = 1, f;
|
21644
21644
|
}(), function(f, m, v) {
|
21645
|
-
var C = m[0], A = m[1], D = m[2], R = m[3],
|
21646
|
-
f[0] = C *
|
21645
|
+
var C = m[0], A = m[1], D = m[2], R = m[3], B = Math.sin(v), N = Math.cos(v);
|
21646
|
+
f[0] = C * N + D * B, f[1] = A * N + R * B, f[2] = C * -B + D * N, f[3] = A * -B + R * N;
|
21647
21647
|
}(this.rotationMatrix, this.rotationMatrix, this.angle));
|
21648
21648
|
}
|
21649
21649
|
get pitch() {
|
@@ -21701,7 +21701,7 @@ uniform ${F} ${B} u_${q};
|
|
21701
21701
|
const d = [new a.b4(0, s)];
|
21702
21702
|
if (this._renderWorldCopies) {
|
21703
21703
|
const f = this.pointCoordinate(new a.P(0, 0)), m = this.pointCoordinate(new a.P(this.width, 0)), v = this.pointCoordinate(new a.P(this.width, this.height)), C = this.pointCoordinate(new a.P(0, this.height)), A = Math.floor(Math.min(f.x, m.x, v.x, C.x)), D = Math.floor(Math.max(f.x, m.x, v.x, C.x)), R = 1;
|
21704
|
-
for (let
|
21704
|
+
for (let B = A - R; B <= D + R; B++) B !== 0 && d.push(new a.b4(B, s));
|
21705
21705
|
}
|
21706
21706
|
return d;
|
21707
21707
|
}
|
@@ -21711,7 +21711,7 @@ uniform ${F} ${B} u_${q};
|
|
21711
21711
|
const v = m;
|
21712
21712
|
if (s.minzoom !== void 0 && m < s.minzoom) return [];
|
21713
21713
|
s.maxzoom !== void 0 && m > s.maxzoom && (m = s.maxzoom);
|
21714
|
-
const C = this.pointCoordinate(this.getCameraPoint()), A = a.Z.fromLngLat(this.center), D = Math.pow(2, m), R = [D * C.x, D * C.y, 0],
|
21714
|
+
const C = this.pointCoordinate(this.getCameraPoint()), A = a.Z.fromLngLat(this.center), D = Math.pow(2, m), R = [D * C.x, D * C.y, 0], B = [D * A.x, D * A.y, 0], N = Aa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix, this.worldSize, m);
|
21715
21715
|
let q = s.minzoom || 0;
|
21716
21716
|
!s.terrain && this.pitch <= 60 && this._edgeInsets.top < 0.1 && (q = m);
|
21717
21717
|
const K = s.terrain ? 2 / Math.min(this.tileSize, s.tileSize) * this.tileSize : 3, J = (ee) => ({ aabb: new Pa([ee * D, 0, 0], [(ee + 1) * D, D, 0]), zoom: 0, x: 0, y: 0, wrap: ee, fullyVisible: !1 }), ne = [], ae = [], le = m, he = s.reparseOverscaled ? v : m;
|
@@ -21720,14 +21720,14 @@ uniform ${F} ${B} u_${q};
|
|
21720
21720
|
const ee = ne.pop(), me = ee.x, ge = ee.y;
|
21721
21721
|
let be = ee.fullyVisible;
|
21722
21722
|
if (!be) {
|
21723
|
-
const Ge = ee.aabb.intersects(
|
21723
|
+
const Ge = ee.aabb.intersects(N);
|
21724
21724
|
if (Ge === 0) continue;
|
21725
21725
|
be = Ge === 2;
|
21726
21726
|
}
|
21727
|
-
const Re = s.terrain ? R :
|
21727
|
+
const Re = s.terrain ? R : B, $e = ee.aabb.distanceX(Re), Je = ee.aabb.distanceY(Re), rt = Math.max(Math.abs($e), Math.abs(Je));
|
21728
21728
|
if (ee.zoom === le || rt > K + (1 << le - ee.zoom) - 2 && ee.zoom >= q) {
|
21729
21729
|
const Ge = le - ee.zoom, He = R[0] - 0.5 - (me << Ge), pt = R[1] - 0.5 - (ge << Ge);
|
21730
|
-
ae.push({ tileID: new a.S(ee.zoom === le ? he : ee.zoom, ee.wrap, ee.zoom, me, ge), distanceSq: Xe([
|
21730
|
+
ae.push({ tileID: new a.S(ee.zoom === le ? he : ee.zoom, ee.wrap, ee.zoom, me, ge), distanceSq: Xe([B[0] - 0.5 - me, B[1] - 0.5 - ge]), tileDistanceToCamera: Math.sqrt(He * He + pt * pt) });
|
21731
21731
|
} else for (let Ge = 0; Ge < 4; Ge++) {
|
21732
21732
|
const He = (me << 1) + Ge % 2, pt = (ge << 1) + (Ge >> 1), Lt = ee.zoom + 1;
|
21733
21733
|
let Ze = ee.aabb.quadrant(Ge);
|
@@ -21794,8 +21794,8 @@ uniform ${F} ${B} u_${q};
|
|
21794
21794
|
}
|
21795
21795
|
const f = [s.x, s.y, 0, 1], m = [s.x, s.y, 1, 1];
|
21796
21796
|
a.af(f, f, this.pixelMatrixInverse), a.af(m, m, this.pixelMatrixInverse);
|
21797
|
-
const v = f[3], C = m[3], A = f[1] / v, D = m[1] / C, R = f[2] / v,
|
21798
|
-
return new a.Z(a.y.number(f[0] / v, m[0] / C,
|
21797
|
+
const v = f[3], C = m[3], A = f[1] / v, D = m[1] / C, R = f[2] / v, B = m[2] / C, N = R === B ? 0 : (0 - R) / (B - R);
|
21798
|
+
return new a.Z(a.y.number(f[0] / v, m[0] / C, N) / this.worldSize, a.y.number(A, D, N) / this.worldSize);
|
21799
21799
|
}
|
21800
21800
|
coordinatePoint(s, d = 0, f = this.pixelMatrix) {
|
21801
21801
|
const m = [s.x * this.worldSize, s.y * this.worldSize, d, 1];
|
@@ -21842,18 +21842,18 @@ uniform ${F} ${B} u_${q};
|
|
21842
21842
|
m = [-ee, ee];
|
21843
21843
|
}
|
21844
21844
|
const v = this.tileSize * this.zoomScale(f.zoom);
|
21845
|
-
let C = 0, A = v, D = 0, R = v,
|
21845
|
+
let C = 0, A = v, D = 0, R = v, B = 0, N = 0;
|
21846
21846
|
const { x: q, y: K } = this.size;
|
21847
21847
|
if (this.latRange) {
|
21848
21848
|
const ee = this.latRange;
|
21849
|
-
C = a.Q(ee[1]) * v, A = a.Q(ee[0]) * v, A - C < K && (
|
21849
|
+
C = a.Q(ee[1]) * v, A = a.Q(ee[0]) * v, A - C < K && (B = K / (A - C));
|
21850
21850
|
}
|
21851
|
-
m && (D = a.b3(a.O(m[0]) * v, 0, v), R = a.b3(a.O(m[1]) * v, 0, v), R < D && (R += v), R - D < q && (
|
21851
|
+
m && (D = a.b3(a.O(m[0]) * v, 0, v), R = a.b3(a.O(m[1]) * v, 0, v), R < D && (R += v), R - D < q && (N = q / (R - D)));
|
21852
21852
|
const { x: J, y: ne } = this.project.call({ worldSize: v }, s);
|
21853
21853
|
let ae, le;
|
21854
|
-
const he = Math.max(
|
21854
|
+
const he = Math.max(N || 0, B || 0);
|
21855
21855
|
if (he) {
|
21856
|
-
const ee = new a.P(
|
21856
|
+
const ee = new a.P(N ? (R + D) / 2 : J, B ? (A + C) / 2 : ne);
|
21857
21857
|
return f.center = this.unproject.call({ worldSize: v }, ee).wrap(), f.zoom += this.scaleZoom(he), f;
|
21858
21858
|
}
|
21859
21859
|
if (this.latRange) {
|
@@ -21885,7 +21885,7 @@ uniform ${F} ${B} u_${q};
|
|
21885
21885
|
this.cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height, this._pixelPerMeter = a.b5(1, this.center.lat) * this.worldSize;
|
21886
21886
|
let m = a.an(new Float64Array(16));
|
21887
21887
|
a.K(m, m, [this.width / 2, -this.height / 2, 1]), a.J(m, m, [1, -1, 0]), this.labelPlaneMatrix = m, m = a.an(new Float64Array(16)), a.K(m, m, [1, -1, 1]), a.J(m, m, [-1, -1, 0]), a.K(m, m, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = m;
|
21888
|
-
const v = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), C = Math.min(this.elevation, this.minElevationForCurrentTile), A = v - C * this._pixelPerMeter / Math.cos(this._pitch), D = C < 0 ? A : v, R = Math.PI / 2 + this._pitch,
|
21888
|
+
const v = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), C = Math.min(this.elevation, this.minElevationForCurrentTile), A = v - C * this._pixelPerMeter / Math.cos(this._pitch), D = C < 0 ? A : v, R = Math.PI / 2 + this._pitch, B = this._fov * (0.5 + s.y / this.height), N = Math.sin(B) * D / Math.sin(a.ac(Math.PI - R - B, 0.01, Math.PI - 0.01)), q = this.getHorizon(), K = 2 * Math.atan(q / this.cameraToCenterDistance) * (0.5 + s.y / (2 * q)), J = Math.sin(K) * D / Math.sin(a.ac(Math.PI - R - K, 0.01, Math.PI - 0.01)), ne = Math.min(N, J);
|
21889
21889
|
this.farZ = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * ne + D), this.nearZ = this.height / 50, m = new Float64Array(16), a.b6(m, this._fov, this.width / this.height, this.nearZ, this.farZ), m[8] = 2 * -s.x / this.width, m[9] = 2 * s.y / this.height, this.projectionMatrix = a.ae(m), a.K(m, m, [1, -1, 1]), a.J(m, m, [0, 0, -this.cameraToCenterDistance]), a.b7(m, m, this._pitch), a.ad(m, m, this.angle), a.J(m, m, [-d, -f, 0]), this.mercatorMatrix = a.K([], m, [this.worldSize, this.worldSize, this.worldSize]), a.K(m, m, [1, 1, this._pixelPerMeter]), this.pixelMatrix = a.L(new Float64Array(16), this.labelPlaneMatrix, m), a.J(m, m, [0, 0, -this.elevation]), this.modelViewProjectionMatrix = m, this.invModelViewProjectionMatrix = a.as([], m), this.fogMatrix = new Float64Array(16), a.b6(this.fogMatrix, this._fov, this.width / this.height, v, this.farZ), this.fogMatrix[8] = 2 * -s.x / this.width, this.fogMatrix[9] = 2 * s.y / this.height, a.K(this.fogMatrix, this.fogMatrix, [1, -1, 1]), a.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.cameraToCenterDistance]), a.b7(this.fogMatrix, this.fogMatrix, this._pitch), a.ad(this.fogMatrix, this.fogMatrix, this.angle), a.J(this.fogMatrix, this.fogMatrix, [-d, -f, 0]), a.K(this.fogMatrix, this.fogMatrix, [1, 1, this._pixelPerMeter]), a.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.elevation]), this.pixelMatrix3D = a.L(new Float64Array(16), this.labelPlaneMatrix, m);
|
21890
21890
|
const ae = this.width % 2 / 2, le = this.height % 2 / 2, he = Math.cos(this.angle), ee = Math.sin(this.angle), me = d - Math.round(d) + he * ae + ee * le, ge = f - Math.round(f) + he * le + ee * ae, be = new Float64Array(m);
|
21891
21891
|
if (a.J(be, be, [me > 0.5 ? me - 1 : me, ge > 0.5 ? ge - 1 : ge, 0]), this.alignedModelViewProjectionMatrix = be, m = a.as(new Float64Array(16), this.pixelMatrix), !m) throw new Error("failed to invert matrix");
|
@@ -21962,17 +21962,17 @@ uniform ${F} ${B} u_${q};
|
|
21962
21962
|
}
|
21963
21963
|
getHashString(s) {
|
21964
21964
|
const d = this._map.getCenter(), f = Math.round(100 * this._map.getZoom()) / 100, m = Math.ceil((f * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), v = Math.pow(10, m), C = Math.round(d.lng * v) / v, A = Math.round(d.lat * v) / v, D = this._map.getBearing(), R = this._map.getPitch();
|
21965
|
-
let
|
21966
|
-
if (
|
21967
|
-
const
|
21965
|
+
let B = "";
|
21966
|
+
if (B += s ? `/${C}/${A}/${f}` : `${f}/${A}/${C}`, (D || R) && (B += "/" + Math.round(10 * D) / 10), R && (B += `/${Math.round(R)}`), this._hashName) {
|
21967
|
+
const N = this._hashName;
|
21968
21968
|
let q = !1;
|
21969
21969
|
const K = window.location.hash.slice(1).split("&").map((J) => {
|
21970
21970
|
const ne = J.split("=")[0];
|
21971
|
-
return ne ===
|
21971
|
+
return ne === N ? (q = !0, `${ne}=${B}`) : J;
|
21972
21972
|
}).filter((J) => J);
|
21973
|
-
return q || K.push(`${
|
21973
|
+
return q || K.push(`${N}=${B}`), `#${K.join("&")}`;
|
21974
21974
|
}
|
21975
|
-
return `#${
|
21975
|
+
return `#${B}`;
|
21976
21976
|
}
|
21977
21977
|
}
|
21978
21978
|
const Wc = { linearity: 0.3, easing: a.b8(0, 0, 0.3, 1) }, zh = a.e({ deceleration: 2500, maxSpeed: 1400 }, Wc), Bg = a.e({ deceleration: 20, maxSpeed: 1400 }, Wc), qp = a.e({ deceleration: 1e3, maxSpeed: 360 }, Wc), Gc = a.e({ deceleration: 1e3, maxSpeed: 90 }, Wc);
|
@@ -22045,7 +22045,7 @@ uniform ${F} ${B} u_${q};
|
|
22045
22045
|
return this._defaultPrevented;
|
22046
22046
|
}
|
22047
22047
|
constructor(s, d, f) {
|
22048
|
-
const m = s === "touchend" ? f.changedTouches : f.touches, v = M.touchPos(d.getCanvasContainer(), m), C = v.map((D) => d.unproject(D)), A = v.reduce((D, R,
|
22048
|
+
const m = s === "touchend" ? f.changedTouches : f.touches, v = M.touchPos(d.getCanvasContainer(), m), C = v.map((D) => d.unproject(D)), A = v.reduce((D, R, B, N) => D.add(R.div(N.length)), new a.P(0, 0));
|
22049
22049
|
super(s, { points: v, point: A, lngLats: C, lngLat: d.unproject(A), originalEvent: f }), this._defaultPrevented = !1;
|
22050
22050
|
}
|
22051
22051
|
}
|
@@ -22433,8 +22433,8 @@ uniform ${F} ${B} u_${q};
|
|
22433
22433
|
const m = Fl(f, d), v = new a.P(0, 0), C = new a.P(0, 0);
|
22434
22434
|
let A = 0;
|
22435
22435
|
for (const R in m) {
|
22436
|
-
const
|
22437
|
-
|
22436
|
+
const B = m[R], N = this._touches[R];
|
22437
|
+
N && (v._add(B), C._add(B.sub(N)), A++, m[R] = B);
|
22438
22438
|
}
|
22439
22439
|
if (this._touches = m, this._shouldBePrevented(A) || !C.mag()) return;
|
22440
22440
|
const D = C.div(A);
|
@@ -22678,8 +22678,8 @@ uniform ${F} ${B} u_${q};
|
|
22678
22678
|
const D = this._type === "wheel" && Math.abs(this._delta) > qh ? this._wheelZoomRate : this._defaultZoomRate;
|
22679
22679
|
let R = 2 / (1 + Math.exp(-Math.abs(this._delta * D)));
|
22680
22680
|
this._delta < 0 && R !== 0 && (R = 1 / R);
|
22681
|
-
const
|
22682
|
-
this._targetZoom = Math.min(s.maxZoom, Math.max(s.minZoom, s.scaleZoom(
|
22681
|
+
const B = typeof this._targetZoom == "number" ? s.zoomScale(this._targetZoom) : s.scale;
|
22682
|
+
this._targetZoom = Math.min(s.maxZoom, Math.max(s.minZoom, s.scaleZoom(B * R))), this._type === "wheel" && (this._startZoom = s.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
|
22683
22683
|
}
|
22684
22684
|
const d = typeof this._targetZoom == "number" ? this._targetZoom : s.zoom, f = this._startZoom, m = this._easing;
|
22685
22685
|
let v, C = !1;
|
@@ -22902,11 +22902,11 @@ uniform ${F} ${B} u_${q};
|
|
22902
22902
|
}, this.handleEvent = (m, v) => {
|
22903
22903
|
if (m.type === "blur") return void this.stop(!0);
|
22904
22904
|
this._updatingCamera = !0;
|
22905
|
-
const C = m.type === "renderFrame" ? void 0 : m, A = { needsRenderFrame: !1 }, D = {}, R = {},
|
22905
|
+
const C = m.type === "renderFrame" ? void 0 : m, A = { needsRenderFrame: !1 }, D = {}, R = {}, B = m.touches, N = B ? this._getMapTouches(B) : void 0, q = N ? M.touchPos(this._map.getCanvas(), N) : M.mousePos(this._map.getCanvas(), m);
|
22906
22906
|
for (const { handlerName: ne, handler: ae, allowed: le } of this._handlers) {
|
22907
22907
|
if (!ae.isEnabled()) continue;
|
22908
22908
|
let he;
|
22909
|
-
this._blockedByActive(R, le, ne) ? ae.reset() : ae[v || m.type] && (he = ae[v || m.type](m, q,
|
22909
|
+
this._blockedByActive(R, le, ne) ? ae.reset() : ae[v || m.type] && (he = ae[v || m.type](m, q, N), this.mergeHandlerResult(A, D, he, ne, C), he && he.needsRenderFrame && this._triggerRenderFrame()), (he || ae.isActive()) && (R[ne] = ae);
|
22910
22910
|
}
|
22911
22911
|
const K = {};
|
22912
22912
|
for (const ne in this._previousActiveHandlers) R[ne] || (K[ne] = C);
|
@@ -22934,8 +22934,8 @@ uniform ${F} ${B} u_${q};
|
|
22934
22934
|
this._add("tapDragZoom", D);
|
22935
22935
|
const R = d.touchPitch = new za(d);
|
22936
22936
|
this._add("touchPitch", R), s.interactive && s.touchPitch && d.touchPitch.enable(s.touchPitch);
|
22937
|
-
const
|
22938
|
-
d.dragRotate = new Xp(s,
|
22937
|
+
const B = Nh(s), N = $h(s);
|
22938
|
+
d.dragRotate = new Xp(s, B, N), this._add("mouseRotate", B, ["mousePitch"]), this._add("mousePitch", N, ["mouseRotate"]), s.interactive && s.dragRotate && d.dragRotate.enable();
|
22939
22939
|
const q = (({ enable: he, clickTolerance: ee }) => {
|
22940
22940
|
const me = new Yc({ checkCorrectEvent: (ge) => M.mouseButton(ge) === 0 && !ge.ctrlKey });
|
22941
22941
|
return new Zs({ clickTolerance: ee, move: (ge, be) => ({ around: be, panDelta: be.sub(ge) }), activateOnStart: !0, moveStateManager: me, enable: he, assignEvents: Xc });
|
@@ -22993,41 +22993,41 @@ uniform ${F} ${B} u_${q};
|
|
22993
22993
|
_updateMapTransform(s, d, f) {
|
22994
22994
|
const m = this._map, v = m._getTransformForUpdate(), C = m.terrain;
|
22995
22995
|
if (!(Qc(s) || C && this._terrainMovement)) return this._fireEvents(d, f, !0);
|
22996
|
-
let { panDelta: A, zoomDelta: D, bearingDelta: R, pitchDelta:
|
22997
|
-
q !== void 0 && (
|
22998
|
-
const K = v.pointLocation(A ?
|
22999
|
-
R && (v.bearing += R),
|
22996
|
+
let { panDelta: A, zoomDelta: D, bearingDelta: R, pitchDelta: B, around: N, pinchAround: q } = s;
|
22997
|
+
q !== void 0 && (N = q), m._stop(!0), N = N || m.transform.centerPoint;
|
22998
|
+
const K = v.pointLocation(A ? N.sub(A) : N);
|
22999
|
+
R && (v.bearing += R), B && (v.pitch += B), D && (v.zoom += D), C ? this._terrainMovement || !d.drag && !d.zoom ? d.drag && this._terrainMovement ? v.center = v.pointLocation(v.centerPoint.sub(A)) : v.setLocationAtPoint(K, N) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, v.setLocationAtPoint(K, N)) : v.setLocationAtPoint(K, N), m._applyUpdatedTransform(v), this._map._update(), s.noInertia || this._inertia.record(s), this._fireEvents(d, f, !0);
|
23000
23000
|
}
|
23001
23001
|
_fireEvents(s, d, f) {
|
23002
23002
|
const m = Br(this._eventsInProgress), v = Br(s), C = {};
|
23003
|
-
for (const
|
23004
|
-
const { originalEvent: q } = s[
|
23005
|
-
this._eventsInProgress[
|
23003
|
+
for (const N in s) {
|
23004
|
+
const { originalEvent: q } = s[N];
|
23005
|
+
this._eventsInProgress[N] || (C[`${N}start`] = q), this._eventsInProgress[N] = s[N];
|
23006
23006
|
}
|
23007
23007
|
!m && v && this._fireEvent("movestart", v.originalEvent);
|
23008
|
-
for (const
|
23008
|
+
for (const N in C) this._fireEvent(N, C[N]);
|
23009
23009
|
v && this._fireEvent("move", v.originalEvent);
|
23010
|
-
for (const
|
23011
|
-
const { originalEvent: q } = s[
|
23012
|
-
this._fireEvent(
|
23010
|
+
for (const N in s) {
|
23011
|
+
const { originalEvent: q } = s[N];
|
23012
|
+
this._fireEvent(N, q);
|
23013
23013
|
}
|
23014
23014
|
const A = {};
|
23015
23015
|
let D;
|
23016
|
-
for (const
|
23017
|
-
const { handlerName: q, originalEvent: K } = this._eventsInProgress[
|
23018
|
-
this._handlersById[q].isActive() || (delete this._eventsInProgress[
|
23016
|
+
for (const N in this._eventsInProgress) {
|
23017
|
+
const { handlerName: q, originalEvent: K } = this._eventsInProgress[N];
|
23018
|
+
this._handlersById[q].isActive() || (delete this._eventsInProgress[N], D = d[q] || K, A[`${N}end`] = D);
|
23019
23019
|
}
|
23020
|
-
for (const
|
23021
|
-
const R = Br(this._eventsInProgress),
|
23022
|
-
if (
|
23020
|
+
for (const N in A) this._fireEvent(N, A[N]);
|
23021
|
+
const R = Br(this._eventsInProgress), B = (m || v) && !R;
|
23022
|
+
if (B && this._terrainMovement) {
|
23023
23023
|
this._map._elevationFreeze = !1, this._terrainMovement = !1;
|
23024
|
-
const
|
23025
|
-
|
23024
|
+
const N = this._map._getTransformForUpdate();
|
23025
|
+
N.recalculateZoom(this._map.terrain), this._map._applyUpdatedTransform(N);
|
23026
23026
|
}
|
23027
|
-
if (f &&
|
23027
|
+
if (f && B) {
|
23028
23028
|
this._updatingCamera = !0;
|
23029
|
-
const
|
23030
|
-
!
|
23029
|
+
const N = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), q = (K) => K !== 0 && -this._bearingSnap < K && K < this._bearingSnap;
|
23030
|
+
!N || !N.essential && k.prefersReducedMotion ? (this._map.fire(new a.k("moveend", { originalEvent: D })), q(this._map.getBearing()) && this._map.resetNorth()) : (q(N.bearing || this._map.getBearing()) && (N.bearing = 0), N.freezeElevation = !0, this._map.easeTo(N, { originalEvent: D })), this._updatingCamera = !1;
|
23031
23031
|
}
|
23032
23032
|
}
|
23033
23033
|
_fireEvent(s, d) {
|
@@ -23120,10 +23120,10 @@ uniform ${F} ${B} u_${q};
|
|
23120
23120
|
m.padding = { top: Ge, bottom: Ge, right: Ge, left: Ge };
|
23121
23121
|
}
|
23122
23122
|
m.padding = a.e(v, m.padding);
|
23123
|
-
const C = this.transform, A = C.padding, D = new Se(s, d), R = C.project(D.getNorthWest()),
|
23123
|
+
const C = this.transform, A = C.padding, D = new Se(s, d), R = C.project(D.getNorthWest()), B = C.project(D.getNorthEast()), N = C.project(D.getSouthEast()), q = C.project(D.getSouthWest()), K = a.ba(-f), J = R.rotate(K), ne = B.rotate(K), ae = N.rotate(K), le = q.rotate(K), he = new a.P(Math.max(J.x, ne.x, le.x, ae.x), Math.max(J.y, ne.y, le.y, ae.y)), ee = new a.P(Math.min(J.x, ne.x, le.x, ae.x), Math.min(J.y, ne.y, le.y, ae.y)), me = he.sub(ee), ge = (C.width - (A.left + A.right + m.padding.left + m.padding.right)) / me.x, be = (C.height - (A.top + A.bottom + m.padding.top + m.padding.bottom)) / me.y;
|
23124
23124
|
if (be < 0 || ge < 0) return void a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
|
23125
23125
|
const Re = Math.min(C.scaleZoom(C.scale * Math.min(ge, be)), m.maxZoom), $e = a.P.convert(m.offset), Je = new a.P((m.padding.left - m.padding.right) / 2, (m.padding.top - m.padding.bottom) / 2).rotate(a.ba(f)), rt = $e.add(Je).mult(C.scale / C.zoomScale(Re));
|
23126
|
-
return { center: C.unproject(R.add(
|
23126
|
+
return { center: C.unproject(R.add(N).div(2).sub(rt)), zoom: Re, bearing: f };
|
23127
23127
|
}
|
23128
23128
|
fitBounds(s, d, f) {
|
23129
23129
|
return this._fitInternal(this.cameraForBounds(s, d), d, f);
|
@@ -23141,16 +23141,16 @@ uniform ${F} ${B} u_${q};
|
|
23141
23141
|
return "zoom" in s && f.zoom !== +s.zoom && (m = !0, f.zoom = +s.zoom), s.center !== void 0 && (f.center = a.N.convert(s.center)), "bearing" in s && f.bearing !== +s.bearing && (v = !0, f.bearing = +s.bearing), "pitch" in s && f.pitch !== +s.pitch && (C = !0, f.pitch = +s.pitch), s.padding == null || f.isPaddingEqual(s.padding) || (f.padding = s.padding), this._applyUpdatedTransform(f), this.fire(new a.k("movestart", d)).fire(new a.k("move", d)), m && this.fire(new a.k("zoomstart", d)).fire(new a.k("zoom", d)).fire(new a.k("zoomend", d)), v && this.fire(new a.k("rotatestart", d)).fire(new a.k("rotate", d)).fire(new a.k("rotateend", d)), C && this.fire(new a.k("pitchstart", d)).fire(new a.k("pitch", d)).fire(new a.k("pitchend", d)), this.fire(new a.k("moveend", d));
|
23142
23142
|
}
|
23143
23143
|
calculateCameraOptionsFromTo(s, d, f, m = 0) {
|
23144
|
-
const v = a.Z.fromLngLat(s, d), C = a.Z.fromLngLat(f, m), A = C.x - v.x, D = C.y - v.y, R = C.z - v.z,
|
23145
|
-
if (
|
23146
|
-
const
|
23147
|
-
let J = 180 * Math.acos(
|
23144
|
+
const v = a.Z.fromLngLat(s, d), C = a.Z.fromLngLat(f, m), A = C.x - v.x, D = C.y - v.y, R = C.z - v.z, B = Math.hypot(A, D, R);
|
23145
|
+
if (B === 0) throw new Error("Can't calculate camera options with same From and To");
|
23146
|
+
const N = Math.hypot(A, D), q = this.transform.scaleZoom(this.transform.cameraToCenterDistance / B / this.transform.tileSize), K = 180 * Math.atan2(A, -D) / Math.PI;
|
23147
|
+
let J = 180 * Math.acos(N / B) / Math.PI;
|
23148
23148
|
return J = R < 0 ? 90 - J : 90 + J, { center: C.toLngLat(), zoom: q, pitch: J, bearing: K };
|
23149
23149
|
}
|
23150
23150
|
easeTo(s, d) {
|
23151
23151
|
var f;
|
23152
23152
|
this._stop(!1, s.easeId), ((s = a.e({ offset: [0, 0], duration: 500, easing: a.b9 }, s)).animate === !1 || !s.essential && k.prefersReducedMotion) && (s.duration = 0);
|
23153
|
-
const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C,
|
23153
|
+
const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C, B = "pitch" in s ? +s.pitch : A, N = "padding" in s ? s.padding : m.padding, q = a.P.convert(s.offset);
|
23154
23154
|
let K = m.centerPoint.add(q);
|
23155
23155
|
const J = m.pointLocation(K), { center: ne, zoom: ae } = m.getConstrained(a.N.convert(s.center || J), (f = s.zoom) !== null && f !== void 0 ? f : v);
|
23156
23156
|
this._normalizeCenter(ne, m);
|
@@ -23158,8 +23158,8 @@ uniform ${F} ${B} u_${q};
|
|
23158
23158
|
let me, ge;
|
23159
23159
|
s.around && (me = a.N.convert(s.around), ge = m.locationPoint(me));
|
23160
23160
|
const be = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
|
23161
|
-
return this._zooming = this._zooming || ae !== v, this._rotating = this._rotating || C !== R, this._pitching = this._pitching ||
|
23162
|
-
if (this._zooming && (m.zoom = a.y.number(v, ae, Re)), this._rotating && (m.bearing = a.y.number(C, R, Re)), this._pitching && (m.pitch = a.y.number(A,
|
23161
|
+
return this._zooming = this._zooming || ae !== v, this._rotating = this._rotating || C !== R, this._pitching = this._pitching || B !== A, this._padding = !m.isPaddingEqual(N), this._easeId = s.easeId, this._prepareEase(d, s.noMoveStart, be), this.terrain && this._prepareElevation(ne), this._ease((Re) => {
|
23162
|
+
if (this._zooming && (m.zoom = a.y.number(v, ae, Re)), this._rotating && (m.bearing = a.y.number(C, R, Re)), this._pitching && (m.pitch = a.y.number(A, B, Re)), this._padding && (m.interpolatePadding(D, N, Re), K = m.centerPoint.add(q)), this.terrain && !s.freezeElevation && this._updateElevation(Re), me) m.setLocationAtPoint(me, ge);
|
23163
23163
|
else {
|
23164
23164
|
const $e = m.zoomScale(m.zoom - v), Je = ae > v ? Math.min(2, ee) : Math.max(0.5, ee), rt = Math.pow(Je, 1 - Re), Ge = m.unproject(le.add(he.mult(Re * rt)).mult($e));
|
23165
23165
|
m.setLocationAtPoint(m.renderWorldCopies ? Ge.wrap() : Ge, K);
|
@@ -23203,8 +23203,8 @@ uniform ${F} ${B} u_${q};
|
|
23203
23203
|
if (this.terrain && d.push((m) => this._elevateCameraIfInsideTerrain(m)), this.transformCameraUpdate && d.push((m) => this.transformCameraUpdate(m)), !d.length) return;
|
23204
23204
|
const f = s.clone();
|
23205
23205
|
for (const m of d) {
|
23206
|
-
const v = f.clone(), { center: C, zoom: A, pitch: D, bearing: R, elevation:
|
23207
|
-
C && (v.center = C), A !== void 0 && (v.zoom = A), D !== void 0 && (v.pitch = D), R !== void 0 && (v.bearing = R),
|
23206
|
+
const v = f.clone(), { center: C, zoom: A, pitch: D, bearing: R, elevation: B } = m(v);
|
23207
|
+
C && (v.center = C), A !== void 0 && (v.zoom = A), D !== void 0 && (v.pitch = D), R !== void 0 && (v.bearing = R), B !== void 0 && (v.elevation = B), f.apply(v);
|
23208
23208
|
}
|
23209
23209
|
this.transform.apply(f);
|
23210
23210
|
}
|
@@ -23224,7 +23224,7 @@ uniform ${F} ${B} u_${q};
|
|
23224
23224
|
return this.jumpTo(it, d);
|
23225
23225
|
}
|
23226
23226
|
this.stop(), s = a.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: a.b9 }, s);
|
23227
|
-
const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C,
|
23227
|
+
const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C, B = "pitch" in s ? +s.pitch : A, N = "padding" in s ? s.padding : m.padding, q = a.P.convert(s.offset);
|
23228
23228
|
let K = m.centerPoint.add(q);
|
23229
23229
|
const J = m.pointLocation(K), { center: ne, zoom: ae } = m.getConstrained(a.N.convert(s.center || J), (f = s.zoom) !== null && f !== void 0 ? f : v);
|
23230
23230
|
this._normalizeCenter(ne, m);
|
@@ -23258,9 +23258,9 @@ uniform ${F} ${B} u_${q};
|
|
23258
23258
|
const it = be < ge ? -1 : 1;
|
23259
23259
|
Ze = Math.abs(Math.log(be / ge)) / me, Lt = () => 0, pt = (Ot) => Math.exp(it * me * Ot);
|
23260
23260
|
}
|
23261
|
-
return s.duration = "duration" in s ? +s.duration : 1e3 * Ze / ("screenSpeed" in s ? +s.screenSpeed / me : +s.speed), s.maxDuration && s.duration > s.maxDuration && (s.duration = 0), this._zooming = !0, this._rotating = C !== R, this._pitching =
|
23261
|
+
return s.duration = "duration" in s ? +s.duration : 1e3 * Ze / ("screenSpeed" in s ? +s.screenSpeed / me : +s.speed), s.maxDuration && s.duration > s.maxDuration && (s.duration = 0), this._zooming = !0, this._rotating = C !== R, this._pitching = B !== A, this._padding = !m.isPaddingEqual(N), this._prepareEase(d, !1), this.terrain && this._prepareElevation(ne), this._ease((it) => {
|
23262
23262
|
const Ot = it * Ze, Vi = 1 / pt(Ot);
|
23263
|
-
m.zoom = it === 1 ? ae : v + m.scaleZoom(Vi), this._rotating && (m.bearing = a.y.number(C, R, it)), this._pitching && (m.pitch = a.y.number(A,
|
23263
|
+
m.zoom = it === 1 ? ae : v + m.scaleZoom(Vi), this._rotating && (m.bearing = a.y.number(C, R, it)), this._pitching && (m.pitch = a.y.number(A, B, it)), this._padding && (m.interpolatePadding(D, N, it), K = m.centerPoint.add(q)), this.terrain && !s.freezeElevation && this._updateElevation(it);
|
23264
23264
|
const Vt = it === 1 ? ne : m.unproject(he.add(ee.mult(Lt(Ot))).mult(Vi));
|
23265
23265
|
m.setLocationAtPoint(m.renderWorldCopies ? Vt.wrap() : Vt, K), this._applyUpdatedTransform(m), this._fireMoveEvents(d);
|
23266
23266
|
}, () => {
|
@@ -23464,8 +23464,8 @@ uniform ${F} ${B} u_${q};
|
|
23464
23464
|
const D = function(J, ne, ae) {
|
23465
23465
|
var le = ne[0], he = ne[1];
|
23466
23466
|
return J[0] = ae[0] * le + ae[4] * he + ae[12], J[1] = ae[1] * le + ae[5] * he + ae[13], J;
|
23467
|
-
}([], [d / m * a.X, f / m * a.X], C.u_terrain_matrix), R = [D[0] * A.dim, D[1] * A.dim],
|
23468
|
-
return A.get(
|
23467
|
+
}([], [d / m * a.X, f / m * a.X], C.u_terrain_matrix), R = [D[0] * A.dim, D[1] * A.dim], B = Math.floor(R[0]), N = Math.floor(R[1]), q = R[0] - B, K = R[1] - N;
|
23468
|
+
return A.get(B, N) * (1 - q) * (1 - K) + A.get(B + 1, N) * q * (1 - K) + A.get(B, N + 1) * (1 - q) * K + A.get(B + 1, N + 1) * q * K;
|
23469
23469
|
}
|
23470
23470
|
getElevationForLngLatZoom(s, d) {
|
23471
23471
|
if (!a.bb(d, s.wrap())) return 0;
|
@@ -23511,10 +23511,10 @@ uniform ${F} ${B} u_${q};
|
|
23511
23511
|
this.painter.maybeDrawDepthAndCoords(!0);
|
23512
23512
|
const d = new Uint8Array(4), f = this.painter.context, m = f.gl, v = Math.round(s.x * this.painter.pixelRatio / devicePixelRatio), C = Math.round(s.y * this.painter.pixelRatio / devicePixelRatio), A = Math.round(this.painter.height / devicePixelRatio);
|
23513
23513
|
f.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), m.readPixels(v, A - C - 1, 1, 1, m.RGBA, m.UNSIGNED_BYTE, d), f.bindFramebuffer.set(null);
|
23514
|
-
const D = d[0] + (d[2] >> 4 << 8), R = d[1] + ((15 & d[2]) << 8),
|
23515
|
-
if (!
|
23516
|
-
const q = this._coordsTextureSize, K = (1 <<
|
23517
|
-
return new a.Z((
|
23514
|
+
const D = d[0] + (d[2] >> 4 << 8), R = d[1] + ((15 & d[2]) << 8), B = this.coordsIndex[255 - d[3]], N = B && this.sourceCache.getTileByID(B);
|
23515
|
+
if (!N) return null;
|
23516
|
+
const q = this._coordsTextureSize, K = (1 << N.tileID.canonical.z) * q;
|
23517
|
+
return new a.Z((N.tileID.canonical.x * q + D) / K + N.tileID.wrap, (N.tileID.canonical.y * q + R) / K, this.getElevation(N.tileID, D, R, q));
|
23518
23518
|
}
|
23519
23519
|
depthAtPoint(s) {
|
23520
23520
|
const d = new Uint8Array(4), f = this.painter.context, m = f.gl;
|
@@ -23523,14 +23523,14 @@ uniform ${F} ${B} u_${q};
|
|
23523
23523
|
getTerrainMesh() {
|
23524
23524
|
if (this._mesh) return this._mesh;
|
23525
23525
|
const s = this.painter.context, d = new a.bd(), f = new a.aY(), m = this.meshSize, v = a.X / m, C = m * m;
|
23526
|
-
for (let
|
23527
|
-
for (let
|
23526
|
+
for (let N = 0; N <= m; N++) for (let q = 0; q <= m; q++) d.emplaceBack(q * v, N * v, 0);
|
23527
|
+
for (let N = 0; N < C; N += m + 1) for (let q = 0; q < m; q++) f.emplaceBack(q + N, m + q + N + 1, m + q + N + 2), f.emplaceBack(q + N, m + q + N + 2, q + N + 1);
|
23528
23528
|
const A = d.length, D = A + 2 * (m + 1);
|
23529
|
-
for (const
|
23530
|
-
for (let
|
23531
|
-
const R = d.length,
|
23532
|
-
for (const
|
23533
|
-
for (let
|
23529
|
+
for (const N of [0, 1]) for (let q = 0; q <= m; q++) for (const K of [0, 1]) d.emplaceBack(q * v, N * a.X, K);
|
23530
|
+
for (let N = 0; N < 2 * m; N += 2) f.emplaceBack(D + N, D + N + 1, D + N + 3), f.emplaceBack(D + N, D + N + 3, D + N + 2), f.emplaceBack(A + N, A + N + 3, A + N + 1), f.emplaceBack(A + N, A + N + 2, A + N + 3);
|
23531
|
+
const R = d.length, B = R + 2 * (m + 1);
|
23532
|
+
for (const N of [0, 1]) for (let q = 0; q <= m; q++) for (const K of [0, 1]) d.emplaceBack(N * a.X, q * v, K);
|
23533
|
+
for (let N = 0; N < 2 * m; N += 2) f.emplaceBack(R + N, R + N + 1, R + N + 3), f.emplaceBack(R + N, R + N + 3, R + N + 2), f.emplaceBack(B + N, B + N + 3, B + N + 1), f.emplaceBack(B + N, B + N + 2, B + N + 3);
|
23534
23534
|
return this._mesh = new Uc(s.createVertexBuffer(d, Yh.members), s.createIndexBuffer(f), a.a0.simpleSegment(0, 0, d.length, f.length)), this._mesh;
|
23535
23535
|
}
|
23536
23536
|
getMeshFrameDelta(s) {
|
@@ -23638,8 +23638,8 @@ uniform ${F} ${B} u_${q};
|
|
23638
23638
|
const D = this.pool.getOrCreateFreeObject();
|
23639
23639
|
this.pool.useObject(D), this.pool.stampObject(D), A.rtt[v] = { id: D.id, stamp: D.stamp }, f.context.bindFramebuffer.set(D.fbo.framebuffer), f.context.clear({ color: a.aM.transparent, stencil: 0 }), f.currentStencilSource = void 0;
|
23640
23640
|
for (let R = 0; R < C.length; R++) {
|
23641
|
-
const
|
23642
|
-
f.context.viewport.set([0, 0, D.fbo.width, D.fbo.height]), f._renderTileClippingMasks(
|
23641
|
+
const B = f.style._layers[C[R]], N = B.source ? this._coordsDescendingInv[B.source][A.tileID.key] : [A.tileID];
|
23642
|
+
f.context.viewport.set([0, 0, D.fbo.width, D.fbo.height]), f._renderTileClippingMasks(B, N), f.renderLayer(f, f.style.sourceCaches[B.source], B, N), B.source && (A.rttCoords[B.source] = this._coordsDescendingInvStr[B.source][A.tileID.key]);
|
23643
23643
|
}
|
23644
23644
|
}
|
23645
23645
|
return Hp(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects(), Ba[d];
|
@@ -23670,10 +23670,10 @@ uniform ${F} ${B} u_${q};
|
|
23670
23670
|
const m = s.dragRotate._mouseRotate.getClickTolerance(), v = s.dragRotate._mousePitch.getClickTolerance();
|
23671
23671
|
this.element = d, this.mouseRotate = Nh({ clickTolerance: m, enable: !0 }), this.touchRotate = (({ enable: C, clickTolerance: A, bearingDegreesPerPixelMoved: D = 0.8 }) => {
|
23672
23672
|
const R = new Bh();
|
23673
|
-
return new Zs({ clickTolerance: A, move: (
|
23673
|
+
return new Zs({ clickTolerance: A, move: (B, N) => ({ bearingDelta: (N.x - B.x) * D }), moveStateManager: R, enable: C, assignEvents: Jh });
|
23674
23674
|
})({ clickTolerance: m, enable: !0 }), this.map = s, f && (this.mousePitch = $h({ clickTolerance: v, enable: !0 }), this.touchPitch = (({ enable: C, clickTolerance: A, pitchDegreesPerPixelMoved: D = -0.5 }) => {
|
23675
23675
|
const R = new Bh();
|
23676
|
-
return new Zs({ clickTolerance: A, move: (
|
23676
|
+
return new Zs({ clickTolerance: A, move: (B, N) => ({ pitchDelta: (N.y - B.y) * D }), moveStateManager: R, enable: C, assignEvents: Jh });
|
23677
23677
|
})({ clickTolerance: v, enable: !0 })), M.addEventListener(d, "mousedown", this.mousedown), M.addEventListener(d, "touchstart", this.touchstart, { passive: !1 }), M.addEventListener(d, "touchcancel", this.reset);
|
23678
23678
|
}
|
23679
23679
|
startMouse(s, d) {
|
@@ -23772,12 +23772,12 @@ uniform ${F} ${B} u_${q};
|
|
23772
23772
|
}
|
23773
23773
|
const R = M.createNS("http://www.w3.org/2000/svg", "g");
|
23774
23774
|
R.setAttributeNS(null, "fill", this._color);
|
23775
|
-
const
|
23776
|
-
|
23777
|
-
const
|
23778
|
-
|
23775
|
+
const B = M.createNS("http://www.w3.org/2000/svg", "path");
|
23776
|
+
B.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), R.appendChild(B);
|
23777
|
+
const N = M.createNS("http://www.w3.org/2000/svg", "g");
|
23778
|
+
N.setAttributeNS(null, "opacity", "0.25"), N.setAttributeNS(null, "fill", "#000000");
|
23779
23779
|
const q = M.createNS("http://www.w3.org/2000/svg", "path");
|
23780
|
-
q.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),
|
23780
|
+
q.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), N.appendChild(q);
|
23781
23781
|
const K = M.createNS("http://www.w3.org/2000/svg", "g");
|
23782
23782
|
K.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), K.setAttributeNS(null, "fill", "#FFFFFF");
|
23783
23783
|
const J = M.createNS("http://www.w3.org/2000/svg", "g");
|
@@ -23785,7 +23785,7 @@ uniform ${F} ${B} u_${q};
|
|
23785
23785
|
const ne = M.createNS("http://www.w3.org/2000/svg", "circle");
|
23786
23786
|
ne.setAttributeNS(null, "fill", "#000000"), ne.setAttributeNS(null, "opacity", "0.25"), ne.setAttributeNS(null, "cx", "5.5"), ne.setAttributeNS(null, "cy", "5.5"), ne.setAttributeNS(null, "r", "5.4999962");
|
23787
23787
|
const ae = M.createNS("http://www.w3.org/2000/svg", "circle");
|
23788
|
-
ae.setAttributeNS(null, "fill", "#FFFFFF"), ae.setAttributeNS(null, "cx", "5.5"), ae.setAttributeNS(null, "cy", "5.5"), ae.setAttributeNS(null, "r", "5.4999962"), J.appendChild(ne), J.appendChild(ae), C.appendChild(A), C.appendChild(R), C.appendChild(
|
23788
|
+
ae.setAttributeNS(null, "fill", "#FFFFFF"), ae.setAttributeNS(null, "cx", "5.5"), ae.setAttributeNS(null, "cy", "5.5"), ae.setAttributeNS(null, "r", "5.4999962"), J.appendChild(ne), J.appendChild(ae), C.appendChild(A), C.appendChild(R), C.appendChild(N), C.appendChild(K), C.appendChild(J), d.appendChild(C), d.setAttributeNS(null, "height", f * this._scale + "px"), d.setAttributeNS(null, "width", m * this._scale + "px"), this._element.appendChild(d), this._offset = a.P.convert(s && s.offset || [0, -14]);
|
23789
23789
|
}
|
23790
23790
|
if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (d) => {
|
23791
23791
|
d.preventDefault();
|
@@ -23841,8 +23841,8 @@ uniform ${F} ${B} u_${q};
|
|
23841
23841
|
}
|
23842
23842
|
const m = this._map, v = m.terrain.depthAtPoint(this._pos), C = m.terrain.getElevationForLngLatZoom(this._lngLat, m.transform.tileZoom);
|
23843
23843
|
if (m.transform.lngLatToCameraDepth(this._lngLat, C) - v < 6e-3) return void (this._element.style.opacity = this._opacity);
|
23844
|
-
const A = -this._offset.y / m.transform._pixelPerMeter, D = Math.sin(m.getPitch() * Math.PI / 180) * A, R = m.terrain.depthAtPoint(new a.P(this._pos.x, this._pos.y - this._offset.y)),
|
23845
|
-
!((f = this._popup) === null || f === void 0) && f.isOpen() &&
|
23844
|
+
const A = -this._offset.y / m.transform._pixelPerMeter, D = Math.sin(m.getPitch() * Math.PI / 180) * A, R = m.terrain.depthAtPoint(new a.P(this._pos.x, this._pos.y - this._offset.y)), B = m.transform.lngLatToCameraDepth(this._lngLat, C + D) - R > 6e-3;
|
23845
|
+
!((f = this._popup) === null || f === void 0) && f.isOpen() && B && this._popup.remove(), this._element.style.opacity = B ? this._opacityWhenCovered : this._opacity;
|
23846
23846
|
}
|
23847
23847
|
getOffset() {
|
23848
23848
|
return this._offset;
|
@@ -24436,13 +24436,13 @@ uniform ${F} ${B} u_${q};
|
|
24436
24436
|
if (this._lazyInitEmptyStyle(), !(s instanceof HTMLImageElement || a.b(s))) {
|
24437
24437
|
if (s.width === void 0 || s.height === void 0) return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
|
24438
24438
|
{
|
24439
|
-
const { width:
|
24440
|
-
return this.style.addImage(x, { data: new a.R({ width:
|
24439
|
+
const { width: B, height: N, data: q } = s, K = s;
|
24440
|
+
return this.style.addImage(x, { data: new a.R({ width: B, height: N }, new Uint8Array(q)), pixelRatio: f, stretchX: v, stretchY: C, content: A, textFitWidth: D, textFitHeight: R, sdf: m, version: 0, userImage: K }), K.onAdd && K.onAdd(this, x), this;
|
24441
24441
|
}
|
24442
24442
|
}
|
24443
24443
|
{
|
24444
|
-
const { width:
|
24445
|
-
this.style.addImage(x, { data: new a.R({ width:
|
24444
|
+
const { width: B, height: N, data: q } = k.getImageData(s);
|
24445
|
+
this.style.addImage(x, { data: new a.R({ width: B, height: N }, q), pixelRatio: f, stretchX: v, stretchY: C, content: A, textFitWidth: D, textFitHeight: R, sdf: m, version: 0 });
|
24446
24446
|
}
|
24447
24447
|
}
|
24448
24448
|
updateImage(x, s) {
|
@@ -24928,7 +24928,7 @@ function eF(t) {
|
|
24928
24928
|
return `${((1 << 24) + (parseInt(e[0], 10) << 16) + (parseInt(e[1], 10) << 8) + parseInt(e[2], 10)).toString(16).slice(1)}`;
|
24929
24929
|
}
|
24930
24930
|
Hr.point = async (t = {}, e = {}, i = null) => {
|
24931
|
-
var k, M, P, I,
|
24931
|
+
var k, M, P, I, F, V, W, se, ce, Q, Oe, ke;
|
24932
24932
|
e || (e = {}), ((k = e == null ? void 0 : e.width) == null ? void 0 : k[0]) === "[" && (e.width = { stops: JSON.parse(e.width) }), typeof (e == null ? void 0 : e.width) == "string" && (e.width -= 0), typeof (e == null ? void 0 : e.opacity) == "string" && (e.opacity = (e.opacity - 0) * 100);
|
24933
24933
|
const n = ((M = t.style) == null ? void 0 : M.colorAttr) || ((P = t.style) == null ? void 0 : P.iconCls);
|
24934
24934
|
let r = {
|
@@ -24938,7 +24938,7 @@ Hr.point = async (t = {}, e = {}, i = null) => {
|
|
24938
24938
|
pin: "pin-xl-{{marker}}+sdf.png"
|
24939
24939
|
}[e.iconType] || (e == null ? void 0 : e.icon);
|
24940
24940
|
const [l, u] = (r == null ? void 0 : r.split("-")) || [], a = ((I = t.style) == null ? void 0 : I.color) || "blue";
|
24941
|
-
!((
|
24941
|
+
!((F = t.style) != null && F.iconAttr) && (r != null && r.includes("{{marker}}")) && (r = r.replace("{{marker}}", "fa-star"));
|
24942
24942
|
const g = "gray", _ = (Pe, Xe) => `${Pe == null ? void 0 : Pe.split("+")[0]}+${Xe.replace("#", "")}.png`;
|
24943
24943
|
if (t.legendAuto = { icon: [], color: [] }, (V = t.style) != null && V.iconAttr && r) {
|
24944
24944
|
const Pe = (se = (W = t.meta) == null ? void 0 : W.columns) == null ? void 0 : se.find((ze) => {
|
@@ -25270,11 +25270,11 @@ Hr.line = (t = {}, e = {}) => [{
|
|
25270
25270
|
Hr.linestring = Hr.line;
|
25271
25271
|
Hr.circle = Hr.point;
|
25272
25272
|
async function tF(t, e, i) {
|
25273
|
-
var a, g, _, S, k, M, P, I,
|
25273
|
+
var a, g, _, S, k, M, P, I, F, V, W, se;
|
25274
25274
|
typeof e.style == "string" && (e.style = e.style[0] === "{" ? JSON.parse(e.style) : (a = window.YAML.parse(e.style)) == null ? void 0 : a.style), (_ = (g = e.style) == null ? void 0 : g.filter) == null || _.call(g, (ce) => ce.source).forEach((ce) => {
|
25275
25275
|
ce.lsource = `${e.id}-${ce.source}`;
|
25276
25276
|
});
|
25277
|
-
const n = ((S = e == null ? void 0 : e.style) == null ? void 0 : S.type) || ((W = ((P = (M = (k = e == null ? void 0 : e.meta) == null ? void 0 : k.geom) == null ? void 0 : M.geometry) == null ? void 0 : P.length) > 2 ? ["point"] : [((V = (
|
25277
|
+
const n = ((S = e == null ? void 0 : e.style) == null ? void 0 : S.type) || ((W = ((P = (M = (k = e == null ? void 0 : e.meta) == null ? void 0 : k.geom) == null ? void 0 : M.geometry) == null ? void 0 : P.length) > 2 ? ["point"] : [((V = (F = (I = e == null ? void 0 : e.meta) == null ? void 0 : I.geom) == null ? void 0 : F.geometry) == null ? void 0 : V[0].toLowerCase()) || "point"]) == null ? void 0 : W.map((ce) => {
|
25278
25278
|
var Q;
|
25279
25279
|
return (Q = ce == null ? void 0 : ce.replace) == null ? void 0 : Q.call(ce, "multi", "");
|
25280
25280
|
})), r = Array.isArray(n) ? n : [n], l = (await Promise.all(Array.isArray(e == null ? void 0 : e.style) ? e.style.map(async (ce) => {
|
@@ -25644,7 +25644,7 @@ function uF(t, e, i, n, r, l) {
|
|
25644
25644
|
]))
|
25645
25645
|
], 4);
|
25646
25646
|
}
|
25647
|
-
const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-
|
25647
|
+
const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-3f5a9aff"]]), u1 = {
|
25648
25648
|
width: 200,
|
25649
25649
|
show: !0,
|
25650
25650
|
position: "horizontal"
|
@@ -25690,7 +25690,7 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
|
|
25690
25690
|
(I) => !I.match("__text") && !["id"].includes(I)
|
25691
25691
|
), { currentLayer: i } = this;
|
25692
25692
|
if ((g = i == null ? void 0 : i.setting) != null && g.popup && (this.popupSettings = (i == null ? void 0 : i.setting.popup) || u1), !(i != null && i.meta)) {
|
25693
|
-
const I = e.map((
|
25693
|
+
const I = e.map((F) => ({ title: F, value: t.properties[F] }));
|
25694
25694
|
this.objectData = [
|
25695
25695
|
...I,
|
25696
25696
|
{
|
@@ -25703,7 +25703,7 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
|
|
25703
25703
|
}
|
25704
25704
|
const n = i.meta.columns, r = e.map((I) => {
|
25705
25705
|
var ce, Q, Oe, ke;
|
25706
|
-
const
|
25706
|
+
const F = {}, W = Object.assign(
|
25707
25707
|
{
|
25708
25708
|
values: []
|
25709
25709
|
},
|
@@ -25716,10 +25716,10 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
|
|
25716
25716
|
// eslint-disable-next-line eqeqeq
|
25717
25717
|
(Pe) => (Pe == null ? void 0 : Pe.id) == t.properties[I]
|
25718
25718
|
)) || null;
|
25719
|
-
return
|
25719
|
+
return F.value = (W == null ? void 0 : W.format) === "select" ? this.formatBadge({
|
25720
25720
|
text: (se == null ? void 0 : se.text) || ((Q = t.properties) == null ? void 0 : Q[`${I}__text`]) || ((Oe = t.properties) == null ? void 0 : Oe[I]) || "-",
|
25721
25721
|
color: (se == null ? void 0 : se.color) || "#1989FA"
|
25722
|
-
}) : (se == null ? void 0 : se.text) || ((ke = t.properties) == null ? void 0 : ke[`${I}__text`]) || t.properties[I],
|
25722
|
+
}) : (se == null ? void 0 : se.text) || ((ke = t.properties) == null ? void 0 : ke[`${I}__text`]) || t.properties[I], F.column = I, F.title = (W == null ? void 0 : W[window == null ? void 0 : window.lang]) || (W == null ? void 0 : W.ua) || (W == null ? void 0 : W.title) || I, F;
|
25723
25723
|
});
|
25724
25724
|
this.objectData = [
|
25725
25725
|
...r,
|
@@ -25759,7 +25759,7 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
|
|
25759
25759
|
class: "text-center"
|
25760
25760
|
};
|
25761
25761
|
function vF(t, e, i, n, r, l) {
|
25762
|
-
var a, g, _, S, k, M, P, I,
|
25762
|
+
var a, g, _, S, k, M, P, I, F, V, W;
|
25763
25763
|
const u = At("VsPopupBody");
|
25764
25764
|
return xe(), Me("div", {
|
25765
25765
|
class: Ns((((a = r.popupSettings) == null ? void 0 : a.position) || "horizontal") + "-position")
|
@@ -25782,13 +25782,13 @@ function vF(t, e, i, n, r, l) {
|
|
25782
25782
|
Z("b", yF, St(l.noInfoObject().title), 1),
|
25783
25783
|
Z("div", null, [
|
25784
25784
|
Z("b", null, St(((k = (S = l.noInfoObject()) == null ? void 0 : S.column) == null ? void 0 : k.ua) || ((P = (M = l.noInfoObject()) == null ? void 0 : M.column) == null ? void 0 : P.title)) + ":", 1),
|
25785
|
-
Rs(" " + St(((W = (I = i.object) == null ? void 0 : I.properties) == null ? void 0 : W[(V = (
|
25785
|
+
Rs(" " + St(((W = (I = i.object) == null ? void 0 : I.properties) == null ? void 0 : W[(V = (F = l.noInfoObject()) == null ? void 0 : F.column) == null ? void 0 : V.name]) || "-"), 1)
|
25786
25786
|
])
|
25787
25787
|
], 64)) : (xe(), Me("div", _F, St(l.noInfoObject().title), 1))
|
25788
25788
|
]))
|
25789
25789
|
], 2);
|
25790
25790
|
}
|
25791
|
-
const xF = /* @__PURE__ */ Pt(dF, [["render", vF], ["__scopeId", "data-v-
|
25791
|
+
const xF = /* @__PURE__ */ Pt(dF, [["render", vF], ["__scopeId", "data-v-deb51e0a"]]), { Map: bF, NavigationControl: wF, Popup: SF } = QL, kF = {
|
25792
25792
|
mixins: [iF],
|
25793
25793
|
components: { VsMapPopup: xF },
|
25794
25794
|
props: {
|
@@ -25868,10 +25868,10 @@ const xF = /* @__PURE__ */ Pt(dF, [["render", vF], ["__scopeId", "data-v-180f436
|
|
25868
25868
|
}).setDOMContent((n = (i = this == null ? void 0 : this.$refs) == null ? void 0 : i.popup) == null ? void 0 : n.$el), t && (t.on("mousemove", (g) => {
|
25869
25869
|
var S, k;
|
25870
25870
|
const _ = t.queryRenderedFeatures(g.point).filter((M) => {
|
25871
|
-
var
|
25871
|
+
var F, V, W;
|
25872
25872
|
const P = this.layerList.find(
|
25873
25873
|
(se) => se.id === M.source
|
25874
|
-
), I = ((V = (
|
25874
|
+
), I = ((V = (F = P == null ? void 0 : P.setting) == null ? void 0 : F.popup) == null ? void 0 : V.show) === void 0 ? !0 : P.setting.popup.show;
|
25875
25875
|
if ((this.interactiveSources.includes(M.source) && !((W = M.properties) != null && W.cluster) && I || !P && Object.keys(M.properties).length) && !e.includes(M.source))
|
25876
25876
|
return M;
|
25877
25877
|
}).filter((M) => {
|
@@ -26396,7 +26396,7 @@ class _l extends uv {
|
|
26396
26396
|
const { content: i, contentRect: n } = this, { fitWidth: r, fitHeight: l, fullWidth: u, fullHeight: a } = n;
|
26397
26397
|
let g = u, _ = a;
|
26398
26398
|
if (this.option("zoom") || this.angle !== 0) {
|
26399
|
-
const S = !(i instanceof HTMLImageElement) && (window.getComputedStyle(i).maxWidth === "none" || window.getComputedStyle(i).maxHeight === "none"), k = S ? u : r, M = S ? a : l, P = this.getMatrix(e), I = new DOMPoint(0, 0).matrixTransform(P),
|
26399
|
+
const S = !(i instanceof HTMLImageElement) && (window.getComputedStyle(i).maxWidth === "none" || window.getComputedStyle(i).maxHeight === "none"), k = S ? u : r, M = S ? a : l, P = this.getMatrix(e), I = new DOMPoint(0, 0).matrixTransform(P), F = new DOMPoint(0 + k, 0).matrixTransform(P), V = new DOMPoint(0 + k, 0 + M).matrixTransform(P), W = new DOMPoint(0, 0 + M).matrixTransform(P), se = Math.abs(V.x - I.x), ce = Math.abs(V.y - I.y), Q = Math.abs(W.x - F.x), Oe = Math.abs(W.y - F.y);
|
26400
26400
|
g = Math.max(se, Q), _ = Math.max(ce, Oe);
|
26401
26401
|
}
|
26402
26402
|
return { contentWidth: g, contentHeight: _ };
|
@@ -26426,13 +26426,13 @@ class _l extends uv {
|
|
26426
26426
|
if (a) {
|
26427
26427
|
const P = a.panzoomChange, I = a.panzoomAction;
|
26428
26428
|
if ((P || I) && e.preventDefault(), P) {
|
26429
|
-
let
|
26429
|
+
let F = {};
|
26430
26430
|
try {
|
26431
|
-
|
26431
|
+
F = JSON.parse(P);
|
26432
26432
|
} catch {
|
26433
26433
|
console && console.warn("The given data was not valid JSON");
|
26434
26434
|
}
|
26435
|
-
return void this.applyChange(
|
26435
|
+
return void this.applyChange(F);
|
26436
26436
|
}
|
26437
26437
|
if (I) return void (this[I] && this[I]());
|
26438
26438
|
}
|
@@ -26488,8 +26488,8 @@ class _l extends uv {
|
|
26488
26488
|
} else this.lockedAxis = I;
|
26489
26489
|
if (vm(e.target, this.content) && (I = "x", this.dragOffset.y = 0), I && I !== "xy" && this.lockedAxis !== I && at(this.targetScale) === at(this.minScale)) return;
|
26490
26490
|
e.cancelable && e.preventDefault(), this.container.classList.add(this.cn("isDragging"));
|
26491
|
-
const
|
26492
|
-
this.option("rubberband") ? (this.isInfinite !== "x" && (
|
26491
|
+
const F = this.checkBounds(M, P);
|
26492
|
+
this.option("rubberband") ? (this.isInfinite !== "x" && (F.xDiff > 0 && M < 0 || F.xDiff < 0 && M > 0) && (M *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * F.xDiff))), this.isInfinite !== "y" && (F.yDiff > 0 && P < 0 || F.yDiff < 0 && P > 0) && (P *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * F.yDiff)))) : (F.xDiff && (M = 0), F.yDiff && (P = 0));
|
26493
26493
|
const V = this.targetScale, W = this.minScale, se = this.maxScale;
|
26494
26494
|
V < 0.5 * W && (k = Math.max(k, W)), V > 1.5 * se && (k = Math.min(k, se)), this.lockedAxis === "y" && at(V) === at(W) && (M = 0), this.lockedAxis === "x" && at(V) === at(W) && (P = 0), this.applyChange({ originX: a, originY: g, panX: M, panY: P, scale: k, friction: this.option("dragFriction"), ignoreBounds: !0 });
|
26495
26495
|
}
|
@@ -26509,15 +26509,15 @@ class _l extends uv {
|
|
26509
26509
|
const _ = ((e = window.visualViewport) === null || e === void 0 ? void 0 : e.scale) || 1;
|
26510
26510
|
_ !== 1 && (u *= _, a *= _);
|
26511
26511
|
let S = 0, k = 0, M = 0, P = 0, I = this.option("decelFriction");
|
26512
|
-
const
|
26512
|
+
const F = this.targetScale;
|
26513
26513
|
if (g > 0) {
|
26514
26514
|
M = Math.abs(u) > 3 ? u / (g / 30) : 0, P = Math.abs(a) > 3 ? a / (g / 30) : 0;
|
26515
26515
|
const ce = this.option("maxVelocity");
|
26516
26516
|
ce && (M = Math.max(Math.min(M, ce), -1 * ce), P = Math.max(Math.min(P, ce), -1 * ce));
|
26517
26517
|
}
|
26518
|
-
M && (S = M / (1 / (1 - I) - 1)), P && (k = P / (1 / (1 - I) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && at(
|
26518
|
+
M && (S = M / (1 / (1 - I) - 1)), P && (k = P / (1 / (1 - I) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && at(F) === this.minScale) && (S = M = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && at(F) === this.minScale) && (k = P = 0);
|
26519
26519
|
const V = this.dragOffset.x, W = this.dragOffset.y, se = this.option("dragMinThreshold") || 0;
|
26520
|
-
Math.abs(V) < se && Math.abs(W) < se && (S = k = 0, M = P = 0), (this.option("zoom") && (
|
26520
|
+
Math.abs(V) < se && Math.abs(W) < se && (S = k = 0, M = P = 0), (this.option("zoom") && (F < this.minScale - 1e-5 || F > this.maxScale + 1e-5) || i && !S && !k) && (I = 0.35), this.applyChange({ panX: S, panY: k, friction: I }), this.emit("decel", M, P, V, W);
|
26521
26521
|
}
|
26522
26522
|
onWheel(e) {
|
26523
26523
|
var i = [-e.deltaX || 0, -e.deltaY || 0, -e.detail || 0].reduce(function(l, u) {
|
@@ -26547,8 +26547,8 @@ class _l extends uv {
|
|
26547
26547
|
let { a: u, b: a, c: g, d: _, e: S, f: k } = l, M = `matrix(${u}, ${a}, ${g}, ${_}, ${S}, ${k})`, P = n.parentElement instanceof HTMLPictureElement ? n.parentElement : n;
|
26548
26548
|
if (this.option("transformParent") && (P = P.parentElement || P), P.style.transform === M) return;
|
26549
26549
|
P.style.transform = M;
|
26550
|
-
const { contentWidth: I, contentHeight:
|
26551
|
-
r.width = I, r.height =
|
26550
|
+
const { contentWidth: I, contentHeight: F } = this.calculateContentDim();
|
26551
|
+
r.width = I, r.height = F, this.emit("afterTransform");
|
26552
26552
|
}
|
26553
26553
|
updateMetrics(e = !1) {
|
26554
26554
|
var i;
|
@@ -26560,13 +26560,13 @@ class _l extends uv {
|
|
26560
26560
|
const I = parseFloat(l.dataset.width || "") || ((yt) => {
|
26561
26561
|
let Nt = 0;
|
26562
26562
|
return Nt = yt instanceof HTMLImageElement ? yt.naturalWidth : yt instanceof SVGElement ? yt.width.baseVal.value : Math.max(yt.offsetWidth, yt.scrollWidth), Nt || 0;
|
26563
|
-
})(l),
|
26563
|
+
})(l), F = parseFloat(l.dataset.height || "") || ((yt) => {
|
26564
26564
|
let Nt = 0;
|
26565
26565
|
return Nt = yt instanceof HTMLImageElement ? yt.naturalHeight : yt instanceof SVGElement ? yt.height.baseVal.value : Math.max(yt.offsetHeight, yt.scrollHeight), Nt || 0;
|
26566
26566
|
})(l);
|
26567
|
-
let V = this.option("width", I) || Is, W = this.option("height",
|
26567
|
+
let V = this.option("width", I) || Is, W = this.option("height", F) || Is;
|
26568
26568
|
const se = V === Is, ce = W === Is;
|
26569
|
-
typeof V != "number" && (V = I), typeof W != "number" && (W =
|
26569
|
+
typeof V != "number" && (V = I), typeof W != "number" && (W = F), se && (V = I * (W / F)), ce && (W = F / (I / V));
|
26570
26570
|
let Q = l.parentElement instanceof HTMLPictureElement ? l.parentElement : l;
|
26571
26571
|
this.option("transformParent") && (Q = Q.parentElement || Q);
|
26572
26572
|
const Oe = Q.getAttribute("style") || "";
|
@@ -26586,8 +26586,8 @@ class _l extends uv {
|
|
26586
26586
|
const k = this.option("infinite");
|
26587
26587
|
if (k === !0 || r && k === r) a = -1 / 0, _ = 1 / 0, g = -1 / 0, S = 1 / 0;
|
26588
26588
|
else {
|
26589
|
-
let { containerRect: M, contentRect: P } = this, I = at(l * n, Pf),
|
26590
|
-
if (M.width === I && (V = M.width), M.width ===
|
26589
|
+
let { containerRect: M, contentRect: P } = this, I = at(l * n, Pf), F = at(u * n, Pf), { innerWidth: V, innerHeight: W } = M;
|
26590
|
+
if (M.width === I && (V = M.width), M.width === F && (W = M.height), e > V) {
|
26591
26591
|
_ = 0.5 * (e - V), a = -1 * _;
|
26592
26592
|
let se = 0.5 * (P.right - P.left);
|
26593
26593
|
a += se, _ += se;
|
@@ -26613,9 +26613,9 @@ class _l extends uv {
|
|
26613
26613
|
if (k && (at(l) < at(u) && !this.panOnlyZoomed && (M = !0), (at(r.width, 1) > at(r.fitWidth, 1) || at(r.height, 1) > at(r.fitHeight, 1)) && (M = !0)), at(r.width * l, 1) < at(r.fitWidth, 1) && (M = !1), n === Ps && (M = !1), ko(i, this.cn("isDraggable"), M), !this.option("zoom")) return;
|
26614
26614
|
let P = _ && at(a) > at(l), I = !P && !M && S && at(a) < at(l);
|
26615
26615
|
ko(i, this.cn("canZoomIn"), P), ko(i, this.cn("canZoomOut"), I);
|
26616
|
-
for (const
|
26616
|
+
for (const F of i.querySelectorAll("[data-panzoom-action]")) {
|
26617
26617
|
let V = !1, W = !1;
|
26618
|
-
switch (
|
26618
|
+
switch (F.dataset.panzoomAction) {
|
26619
26619
|
case "zoomIn":
|
26620
26620
|
_ ? V = !0 : W = !0;
|
26621
26621
|
break;
|
@@ -26625,10 +26625,10 @@ class _l extends uv {
|
|
26625
26625
|
case "toggleZoom":
|
26626
26626
|
case "iterateZoom":
|
26627
26627
|
_ || S ? V = !0 : W = !0;
|
26628
|
-
const se =
|
26628
|
+
const se = F.querySelector("g");
|
26629
26629
|
se && (se.style.display = _ ? "" : "none");
|
26630
26630
|
}
|
26631
|
-
V ? (
|
26631
|
+
V ? (F.removeAttribute("disabled"), F.removeAttribute("tabindex")) : W && (F.setAttribute("disabled", ""), F.setAttribute("tabindex", "-1"));
|
26632
26632
|
}
|
26633
26633
|
}
|
26634
26634
|
panTo({ x: e = this.target.e, y: i = this.target.f, scale: n = this.targetScale, friction: r = this.option("friction"), angle: l = 0, originX: u = 0, originY: a = 0, flipX: g = !1, flipY: _ = !1, ignoreBounds: S = !1 }) {
|
@@ -26638,8 +26638,8 @@ class _l extends uv {
|
|
26638
26638
|
const M = this.state;
|
26639
26639
|
if (M === zi.Destroy) return;
|
26640
26640
|
this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = a || 0, this.ignoreBounds = S;
|
26641
|
-
const { current: P } = this, I = P.e,
|
26642
|
-
let W = new DOMMatrix().translate(I,
|
26641
|
+
const { current: P } = this, I = P.e, F = P.f, V = this.getMatrix(this.target);
|
26642
|
+
let W = new DOMMatrix().translate(I, F).translate(l, u).translate(e, i);
|
26643
26643
|
if (this.option("zoom")) {
|
26644
26644
|
if (!S) {
|
26645
26645
|
const se = this.targetScale, ce = this.minScale, Q = this.maxScale;
|
@@ -26647,7 +26647,7 @@ class _l extends uv {
|
|
26647
26647
|
}
|
26648
26648
|
W = W.scale(n);
|
26649
26649
|
}
|
26650
|
-
W = W.translate(-l, -u).translate(-I, -
|
26650
|
+
W = W.translate(-l, -u).translate(-I, -F).multiply(V), r && (W = W.rotate(r)), g && (W = W.scale(-1, 1)), _ && (W = W.scale(1, -1));
|
26651
26651
|
for (const se of Qo) se !== "e" && se !== "f" && (W[se] > this.minScale + 1e-5 || W[se] < this.minScale - 1e-5) ? this.target[se] = W[se] : this.target[se] = at(W[se], Pf);
|
26652
26652
|
(this.targetScale < this.scale || Math.abs(n - 1) > 0.1 || this.panMode === Ps || k === !1) && !S && this.clampTargetBounds(), M === zi.Init ? this.animate() : this.isResting || (this.state = zi.Panning, this.requestTick());
|
26653
26653
|
}
|
@@ -26670,8 +26670,8 @@ class _l extends uv {
|
|
26670
26670
|
P > 1 && (k !== u && (k *= P), M !== a && (M *= P));
|
26671
26671
|
let I = 0.5 * (k - u) - _ / u * 100 / 100 * (k - u);
|
26672
26672
|
I += 0.5 * (l.right - l.left);
|
26673
|
-
let
|
26674
|
-
|
26673
|
+
let F = 0.5 * (M - a) - S / a * 100 / 100 * (M - a);
|
26674
|
+
F += 0.5 * (l.bottom - l.top), this.applyChange({ panX: I - this.target.e, panY: F - this.target.f, friction: i });
|
26675
26675
|
}
|
26676
26676
|
zoomWithWheel(e) {
|
26677
26677
|
if (this.state === zi.Destroy || this.state === zi.Init) return;
|
@@ -27107,16 +27107,16 @@ class pl extends uv {
|
|
27107
27107
|
return { x: n ? l : { min: 0, max: 0 }, y: n ? { min: 0, max: 0 } : l };
|
27108
27108
|
}
|
27109
27109
|
repositionSlides() {
|
27110
|
-
let e, { isHorizontal: i, isRTL: n, isInfinite: r, viewport: l, viewportDim: u, contentDim: a, page: g, pages: _, slides: S, panzoom: k } = this, M = 0, P = 0, I = 0,
|
27111
|
-
k ?
|
27110
|
+
let e, { isHorizontal: i, isRTL: n, isInfinite: r, viewport: l, viewportDim: u, contentDim: a, page: g, pages: _, slides: S, panzoom: k } = this, M = 0, P = 0, I = 0, F = 0;
|
27111
|
+
k ? F = -1 * k.current[this.axis] : _[g] && (F = _[g].pos || 0), e = i ? n ? "right" : "left" : "top", n && i && (F *= -1);
|
27112
27112
|
for (const ce of S) {
|
27113
27113
|
const Q = ce.el;
|
27114
27114
|
Q ? (e === "top" ? (Q.style.right = "", Q.style.left = "") : Q.style.top = "", ce.index !== M ? Q.style[e] = P === 0 ? "" : `${at(P, 1e3)}px` : Q.style[e] = "", I += ce.dim + ce.gap, M++) : P += ce.dim + ce.gap;
|
27115
27115
|
}
|
27116
27116
|
if (r && I && l) {
|
27117
27117
|
let ce = getComputedStyle(l), Q = "padding", Oe = i ? "Right" : "Bottom", ke = parseFloat(ce[Q + (i ? "Left" : "Top")]);
|
27118
|
-
|
27119
|
-
for (const Pe of S) Pe.el && (at(Pe.pos) < at(u) && at(Pe.pos + Pe.dim + Pe.gap) < at(
|
27118
|
+
F -= ke, u += ke, u += parseFloat(ce[Q + Oe]);
|
27119
|
+
for (const Pe of S) Pe.el && (at(Pe.pos) < at(u) && at(Pe.pos + Pe.dim + Pe.gap) < at(F) && at(F) > at(a - u) && (Pe.el.style[e] = `${at(P + I, 1e3)}px`), at(Pe.pos + Pe.gap) >= at(a - u) && at(Pe.pos) > at(F + u) && at(F) < at(u) && (Pe.el.style[e] = `-${at(I, 1e3)}px`));
|
27120
27120
|
}
|
27121
27121
|
let V, W, se = [...this.inTransition];
|
27122
27122
|
if (se.length > 1 && (V = _[se[0]], W = _[se[1]]), V && W) {
|
@@ -27164,12 +27164,12 @@ class pl extends uv {
|
|
27164
27164
|
this.clearTransitions();
|
27165
27165
|
const P = _.isResting;
|
27166
27166
|
Et(this.container, this.cn("inTransition"));
|
27167
|
-
const I = ((l = g[a]) === null || l === void 0 ? void 0 : l.slides[0]) || null,
|
27168
|
-
this.inTransition.add(
|
27169
|
-
let V = I.el, W =
|
27167
|
+
const I = ((l = g[a]) === null || l === void 0 ? void 0 : l.slides[0]) || null, F = ((u = g[S]) === null || u === void 0 ? void 0 : u.slides[0]) || null;
|
27168
|
+
this.inTransition.add(F.index), this.createSlideEl(F);
|
27169
|
+
let V = I.el, W = F.el;
|
27170
27170
|
P || i === zf || (i = "fadeFast", V = null);
|
27171
27171
|
const se = this.isRTL ? "next" : "prev", ce = this.isRTL ? "prev" : "next";
|
27172
|
-
return V && (this.inTransition.add(I.index), I.transition = i, V.addEventListener(Of, this.onAnimationEnd), V.classList.add(`f-${i}Out`, `to-${k > 0 ? ce : se}`)), W && (
|
27172
|
+
return V && (this.inTransition.add(I.index), I.transition = i, V.addEventListener(Of, this.onAnimationEnd), V.classList.add(`f-${i}Out`, `to-${k > 0 ? ce : se}`)), W && (F.transition = i, W.addEventListener(Of, this.onAnimationEnd), W.classList.add(`f-${i}In`, `from-${k > 0 ? se : ce}`)), _.current[this.axis] = M, _.target[this.axis] = M, _.requestTick(), this.onChange(S), !0;
|
27173
27173
|
}
|
27174
27174
|
manageSlideVisiblity() {
|
27175
27175
|
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), n = this.getVisibleSlides(parseFloat(this.option("preload", 0) + "") || 0);
|
@@ -27234,8 +27234,8 @@ class pl extends uv {
|
|
27234
27234
|
let M = 0;
|
27235
27235
|
if (M = k > 45 && k < 135 ? a ? 0 : n : a ? i : 0, !S) return;
|
27236
27236
|
let P = this.page, I = u && a ? 1 : -1;
|
27237
|
-
const
|
27238
|
-
let { pageIndex: V } = this.getPageFromPosition(
|
27237
|
+
const F = e.current[g] * I;
|
27238
|
+
let { pageIndex: V } = this.getPageFromPosition(F);
|
27239
27239
|
Math.abs(M) > 5 ? (_[P].dim < document.documentElement["client" + (this.isHorizontal ? "Width" : "Height")] - 1 && (P = V), P = u && a ? M < 0 ? P - 1 : P + 1 : M < 0 ? P + 1 : P - 1) : P = r === 0 && l === 0 ? P : V, this.slideTo(P, { transition: !1, friction: e.option("decelFriction") });
|
27240
27240
|
}
|
27241
27241
|
onClick(e) {
|
@@ -27284,8 +27284,8 @@ class pl extends uv {
|
|
27284
27284
|
let M = g[r].pos;
|
27285
27285
|
if (this.isInfinite) {
|
27286
27286
|
const P = this.contentDim, I = _.target[l] * k;
|
27287
|
-
S === 2 ? M += P * Math.floor(parseFloat(e + "") / 2) : M = [M, M - P, M + P].reduce(function(
|
27288
|
-
return Math.abs(V - I) < Math.abs(
|
27287
|
+
S === 2 ? M += P * Math.floor(parseFloat(e + "") / 2) : M = [M, M - P, M + P].reduce(function(F, V) {
|
27288
|
+
return Math.abs(V - I) < Math.abs(F - I) ? V : F;
|
27289
27289
|
});
|
27290
27290
|
}
|
27291
27291
|
M *= k, Math.abs(_.target[l] - M) < 1 || (_.panTo({ x: u ? M : 0, y: u ? 0 : M, friction: i }), this.onChange(r));
|
@@ -27325,8 +27325,8 @@ class pl extends uv {
|
|
27325
27325
|
for (let P = 0; P < this.slides.length; P++) this.slides[P].index = P;
|
27326
27326
|
for (const P of M) this.emit("beforeInitSlide", P, P.index);
|
27327
27327
|
if (this.page >= e && (this.page += M.length), this.updateMetrics(), a) {
|
27328
|
-
const P = ((l = this.pages[this.page]) === null || l === void 0 ? void 0 : l.pos) || 0, I = ((u = this.pages[this.page]) === null || u === void 0 ? void 0 : u.dim) || 0,
|
27329
|
-
S &&
|
27328
|
+
const P = ((l = this.pages[this.page]) === null || l === void 0 ? void 0 : l.pos) || 0, I = ((u = this.pages[this.page]) === null || u === void 0 ? void 0 : u.dim) || 0, F = this.pages.length || 1, V = this.isRTL ? _ - I : I - _, W = this.isRTL ? g - P : P - g;
|
27329
|
+
S && F === 1 ? (e <= this.page && (a.current[this.axis] -= V, a.target[this.axis] -= V), a.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * P })) : W && e <= this.page && (a.target[this.axis] -= W, a.current[this.axis] -= W, a.requestTick());
|
27330
27330
|
}
|
27331
27331
|
for (const P of M) this.emit("initSlide", P, P.index);
|
27332
27332
|
}
|
@@ -27394,19 +27394,19 @@ class pl extends uv {
|
|
27394
27394
|
_ = r && r.state !== zi.Init && r.state !== zi.Destroy ? -1 * r.current[this.axis] : a[g] && a[g].pos || 0, this.isInfinite && (_ -= Math.floor(_ / l) * l), this.isRTL && this.isHorizontal && (_ *= -1);
|
27395
27395
|
const S = _ - u * e, k = _ + u * (e + 1), M = this.isInfinite ? [-1, 0, 1] : [0];
|
27396
27396
|
for (const P of this.slides) for (const I of M) {
|
27397
|
-
const
|
27398
|
-
|
27397
|
+
const F = P.pos + I * l, V = F + P.dim + P.gap;
|
27398
|
+
F < k && V > S && n.add(P);
|
27399
27399
|
}
|
27400
27400
|
}
|
27401
27401
|
return n;
|
27402
27402
|
}
|
27403
27403
|
getPageFromPosition(e) {
|
27404
27404
|
const { viewportDim: i, contentDim: n, slides: r, pages: l, panzoom: u } = this, a = l.length, g = r.length, _ = r[0], S = r[g - 1], k = this.option("center");
|
27405
|
-
let M = 0, P = 0, I = 0,
|
27406
|
-
k && (
|
27405
|
+
let M = 0, P = 0, I = 0, F = e === void 0 ? -1 * ((u == null ? void 0 : u.target[this.axis]) || 0) : e;
|
27406
|
+
k && (F += 0.5 * i), this.isInfinite ? (F < _.pos - 0.5 * S.gap && (F -= n, I = -1), F > S.pos + S.dim + 0.5 * S.gap && (F -= n, I = 1)) : F = Math.max(_.pos || 0, Math.min(F, S.pos));
|
27407
27407
|
let V = S, W = r.find((se) => {
|
27408
27408
|
const ce = se.pos - 0.5 * V.gap, Q = se.pos + se.dim + 0.5 * se.gap;
|
27409
|
-
return V = se,
|
27409
|
+
return V = se, F >= ce && F < Q;
|
27410
27410
|
});
|
27411
27411
|
return W || (W = S), P = this.getPageForSlide(W.index), M = P + I * a, { page: M, pageIndex: P };
|
27412
27412
|
}
|
@@ -27542,12 +27542,12 @@ class M2 extends lo {
|
|
27542
27542
|
(((e = window.visualViewport) === null || e === void 0 ? void 0 : e.scale) || 1) === 1 && Object.assign(n.style, { position: "absolute", top: `${n.offsetTop + window.scrollY}px`, left: `${n.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${S.width}px`, height: `${S.height}px`, overflow: "hidden" });
|
27543
27543
|
const { x: k, y: M, scale: P, opacity: I } = _;
|
27544
27544
|
if (I) {
|
27545
|
-
const
|
27545
|
+
const F = ((V, W, se, ce) => {
|
27546
27546
|
const Q = W - V, Oe = ce - se;
|
27547
27547
|
return (ke) => se + ((ke - V) / Q * Oe || 0);
|
27548
27548
|
})(a.scale, P, 1, 0);
|
27549
27549
|
a.on("afterTransform", () => {
|
27550
|
-
u.style.opacity =
|
27550
|
+
u.style.opacity = F(a.scale) + "";
|
27551
27551
|
});
|
27552
27552
|
}
|
27553
27553
|
a.on("endAnimation", () => {
|
@@ -27577,9 +27577,9 @@ class M2 extends lo {
|
|
27577
27577
|
P && (P.remove(), P = null);
|
27578
27578
|
}, 200));
|
27579
27579
|
};
|
27580
|
-
(S = a, new Promise((
|
27580
|
+
(S = a, new Promise((F, V) => {
|
27581
27581
|
const W = new Image();
|
27582
|
-
W.onload =
|
27582
|
+
W.onload = F, W.onerror = V, W.src = S;
|
27583
27583
|
})).then(() => {
|
27584
27584
|
n.hideLoading(e), e.state = mr.Opening, this.instance.emit("reveal", e), this.zoomIn(e).then(() => {
|
27585
27585
|
I(), this.instance.done(e);
|
@@ -27592,8 +27592,8 @@ class M2 extends lo {
|
|
27592
27592
|
});
|
27593
27593
|
} else {
|
27594
27594
|
const k = this.optionFor(e, "initialSize"), M = this.optionFor(e, "zoom"), P = { event: n.prevMouseMoveEvent || n.options.event, friction: M ? 0.12 : 0 };
|
27595
|
-
let I = n.optionFor(e, "showClass") || void 0,
|
27596
|
-
n.isOpeningSlide(e) && (k === "full" ? r.zoomToFull(P) : k === "cover" ? r.zoomToCover(P) : k === "max" ? r.zoomToMax(P) :
|
27595
|
+
let I = n.optionFor(e, "showClass") || void 0, F = !0;
|
27596
|
+
n.isOpeningSlide(e) && (k === "full" ? r.zoomToFull(P) : k === "cover" ? r.zoomToCover(P) : k === "max" ? r.zoomToMax(P) : F = !1, r.stop("current")), F && I && (I = r.isDragging ? "f-fadeIn" : ""), n.hideLoading(e), n.revealContent(e, I);
|
27597
27597
|
}
|
27598
27598
|
var S;
|
27599
27599
|
}, () => {
|
@@ -27642,10 +27642,10 @@ class M2 extends lo {
|
|
27642
27642
|
if (!(_ && g && a && u && l)) return void n();
|
27643
27643
|
const { x: S, y: k, scale: M, opacity: P } = _, I = () => {
|
27644
27644
|
e.state !== mr.Closing && (P && (a.style.opacity = Math.max(Math.min(1, 1 - (1 - u.scale) / (1 - M)), 0) + ""), u.scale >= 1 && u.scale > u.targetScale - 0.1 && i(u));
|
27645
|
-
},
|
27646
|
-
(se.scale < 0.99 || se.scale > 1.01) && !se.isDragging || (Di(l, Lf), a.style.opacity = "", se.off("endAnimation",
|
27645
|
+
}, F = (se) => {
|
27646
|
+
(se.scale < 0.99 || se.scale > 1.01) && !se.isDragging || (Di(l, Lf), a.style.opacity = "", se.off("endAnimation", F), se.off("touchStart", F), se.off("afterTransform", I), i(se));
|
27647
27647
|
};
|
27648
|
-
u.on("endAnimation",
|
27648
|
+
u.on("endAnimation", F), u.on("touchStart", F), u.on("afterTransform", I), u.on(["error", "destroy"], () => {
|
27649
27649
|
n();
|
27650
27650
|
}), u.panTo({ x: S, y: k, scale: M, friction: 0, ignoreBounds: !0 }), u.stop("current");
|
27651
27651
|
const V = { event: u.panMode === "mousemove" ? r.prevMouseMoveEvent || r.options.event : void 0 }, W = this.optionFor(e, "initialSize");
|
@@ -27657,13 +27657,13 @@ class M2 extends lo {
|
|
27657
27657
|
if (!i || !n || !r || !l || x2(r) < 3 || !this.optionFor(e, "zoom") || !a || u.state === jn.Destroy || getComputedStyle(a).getPropertyValue("--f-images-zoom") === "0") return !1;
|
27658
27658
|
const g = window.visualViewport || null;
|
27659
27659
|
if ((g ? g.scale : 1) !== 1) return !1;
|
27660
|
-
let { top: _, left: S, width: k, height: M } = r.getBoundingClientRect(), { top: P, left: I, fitWidth:
|
27661
|
-
if (!(k && M &&
|
27660
|
+
let { top: _, left: S, width: k, height: M } = r.getBoundingClientRect(), { top: P, left: I, fitWidth: F, fitHeight: V } = l.contentRect;
|
27661
|
+
if (!(k && M && F && V)) return !1;
|
27662
27662
|
const W = l.container.getBoundingClientRect();
|
27663
27663
|
I += W.left, P += W.top;
|
27664
|
-
const se = -1 * (I + 0.5 *
|
27664
|
+
const se = -1 * (I + 0.5 * F - (S + 0.5 * k)), ce = -1 * (P + 0.5 * V - (_ + 0.5 * M)), Q = k / F;
|
27665
27665
|
let Oe = this.option("zoomOpacity") || !1;
|
27666
|
-
return Oe === "auto" && (Oe = Math.abs(k / M -
|
27666
|
+
return Oe === "auto" && (Oe = Math.abs(k / M - F / V) > 0.1), { x: se, y: ce, scale: Q, opacity: Oe };
|
27667
27667
|
}
|
27668
27668
|
attach() {
|
27669
27669
|
const e = this, i = e.instance;
|
@@ -27802,8 +27802,8 @@ class C2 extends lo {
|
|
27802
27802
|
if (e.preload !== !1 && l !== !1 && g) try {
|
27803
27803
|
const _ = window.getComputedStyle(r), S = parseFloat(_.paddingLeft) + parseFloat(_.paddingRight), k = parseFloat(_.paddingTop) + parseFloat(_.paddingBottom), M = n.contentWindow;
|
27804
27804
|
if (M) {
|
27805
|
-
const P = M.document, I = P.getElementsByTagName(Qy)[0],
|
27806
|
-
g.width = "",
|
27805
|
+
const P = M.document, I = P.getElementsByTagName(Qy)[0], F = P.body;
|
27806
|
+
g.width = "", F.style.overflow = "hidden", u = u || I.scrollWidth + S, g.width = `${u}px`, F.style.overflow = "", g.flex = "0 0 auto", g.height = `${F.scrollHeight}px`, a = I.scrollHeight + k;
|
27807
27807
|
}
|
27808
27808
|
} catch {
|
27809
27809
|
}
|
@@ -27849,8 +27849,8 @@ class C2 extends lo {
|
|
27849
27849
|
var P = {};
|
27850
27850
|
for (var I in k) Object.prototype.hasOwnProperty.call(k, I) && M.indexOf(I) < 0 && (P[I] = k[I]);
|
27851
27851
|
if (k != null && typeof Object.getOwnPropertySymbols == "function") {
|
27852
|
-
var
|
27853
|
-
for (I = Object.getOwnPropertySymbols(k);
|
27852
|
+
var F = 0;
|
27853
|
+
for (I = Object.getOwnPropertySymbols(k); F < I.length; F++) M.indexOf(I[F]) < 0 && Object.prototype.propertyIsEnumerable.call(k, I[F]) && (P[I[F]] = k[I[F]]);
|
27854
27854
|
}
|
27855
27855
|
return P;
|
27856
27856
|
}(l, ["nocookie"]), g = `www.youtube${u ? "-nocookie" : ""}.com`, _ = k1(i, a), S = encodeURIComponent(r[2]);
|
@@ -28164,14 +28164,14 @@ let I2 = class extends lo {
|
|
28164
28164
|
}
|
28165
28165
|
onClick(t) {
|
28166
28166
|
t.preventDefault(), t.stopPropagation();
|
28167
|
-
const e = this.instance, { pages: i, page: n } = e, r = (
|
28168
|
-
if (
|
28169
|
-
const V =
|
28167
|
+
const e = this.instance, { pages: i, page: n } = e, r = (F) => {
|
28168
|
+
if (F) {
|
28169
|
+
const V = F.closest("[data-carousel-index]");
|
28170
28170
|
if (V) return [parseInt(V.dataset.carouselIndex || "", 10) || 0, V];
|
28171
28171
|
}
|
28172
28172
|
return [-1, void 0];
|
28173
|
-
}, l = (
|
28174
|
-
const W = document.elementFromPoint(
|
28173
|
+
}, l = (F, V) => {
|
28174
|
+
const W = document.elementFromPoint(F, V);
|
28175
28175
|
return W ? r(W) : [-1, void 0];
|
28176
28176
|
};
|
28177
28177
|
let [u, a] = r(t.target);
|
@@ -28187,9 +28187,9 @@ let I2 = class extends lo {
|
|
28187
28187
|
const l = i[Nf], u = i[vo], a = i.thumbGap, g = i.thumbExtraGap;
|
28188
28188
|
if (!(!((e = r.slides[t]) === null || e === void 0) && e.el)) return 0;
|
28189
28189
|
const _ = 0.5 * (l - u), S = n.pages.length - 1;
|
28190
|
-
let k = n.getProgress(0), M = n.getProgress(S), P = n.getProgress(t, !1, !0), I = 0,
|
28190
|
+
let k = n.getProgress(0), M = n.getProgress(S), P = n.getProgress(t, !1, !0), I = 0, F = _ + g + a;
|
28191
28191
|
const V = k < 0 && k > -1, W = M > 0 && M < 1;
|
28192
|
-
return t === 0 ? (I =
|
28192
|
+
return t === 0 ? (I = F * Math.abs(k), W && k === 1 && (I -= F * Math.abs(M))) : t === S ? (I = F * Math.abs(M) * -1, V && M === -1 && (I += F * Math.abs(k))) : V || W ? (I = -1 * F, I += F * Math.abs(k), I += F * (1 - Math.abs(M))) : I = F * P, I;
|
28193
28193
|
}
|
28194
28194
|
setProps(t) {
|
28195
28195
|
var e;
|
@@ -28730,8 +28730,8 @@ class _i extends uv {
|
|
28730
28730
|
const _ = Array.from(l.querySelectorAll(Jy));
|
28731
28731
|
let S = [], k = null;
|
28732
28732
|
for (let P of _) {
|
28733
|
-
const I = !P.offsetParent || !!P.closest('[aria-hidden="true"]'),
|
28734
|
-
if (P === l || (
|
28733
|
+
const I = !P.offsetParent || !!P.closest('[aria-hidden="true"]'), F = g && g.contains(P), V = !u.contains(P);
|
28734
|
+
if (P === l || (F || V) && !I) {
|
28735
28735
|
S.push(P);
|
28736
28736
|
const W = P.dataset.origTabindex;
|
28737
28737
|
W !== void 0 && W && (P.tabIndex = parseFloat(W)), P.removeAttribute("data-orig-tabindex"), !P.hasAttribute("autoFocus") && k || (k = P);
|
@@ -28937,12 +28937,12 @@ class _i extends uv {
|
|
28937
28937
|
let i = e.composedPath()[0];
|
28938
28938
|
const n = i.closest("[data-fancybox-trigger]");
|
28939
28939
|
if (n) {
|
28940
|
-
const I = n.dataset.fancyboxTrigger || "",
|
28941
|
-
i =
|
28940
|
+
const I = n.dataset.fancyboxTrigger || "", F = document.querySelectorAll(`[data-fancybox="${I}"]`), V = parseInt(n.dataset.fancyboxIndex || "", 10) || 0;
|
28941
|
+
i = F[V] || i;
|
28942
28942
|
}
|
28943
28943
|
if (!(i && i instanceof Element)) return;
|
28944
28944
|
let r, l, u, a;
|
28945
|
-
if ([..._i.openers].reverse().find(([I,
|
28945
|
+
if ([..._i.openers].reverse().find(([I, F]) => !(!I.contains(i) || ![...F].reverse().find(([V, W]) => {
|
28946
28946
|
let se = i.closest(V);
|
28947
28947
|
return !!se && (r = I, l = V, u = se, a = W, !0);
|
28948
28948
|
}))), !r || !l || !u) return;
|
@@ -29438,8 +29438,8 @@ function HB(t, e, i, n, r, l) {
|
|
29438
29438
|
key: I,
|
29439
29439
|
id: i.id,
|
29440
29440
|
item: P,
|
29441
|
-
onUpdate: e[2] || (e[2] = (
|
29442
|
-
onOpenModal: e[3] || (e[3] = (
|
29441
|
+
onUpdate: e[2] || (e[2] = (F) => t.$emit("update", "file-list")),
|
29442
|
+
onOpenModal: e[3] || (e[3] = (F) => l.handleOpenModal(F))
|
29443
29443
|
}, null, 8, ["id", "item"]))), 128)),
|
29444
29444
|
l.filteredFiles.length ? Gr("", !0) : (xe(), Me("div", $B, e[8] || (e[8] = [
|
29445
29445
|
Z("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
@@ -29499,16 +29499,16 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
|
|
29499
29499
|
return;
|
29500
29500
|
}
|
29501
29501
|
try {
|
29502
|
-
const { data:
|
29503
|
-
n.value =
|
29504
|
-
} catch (
|
29505
|
-
console.error(
|
29502
|
+
const { data: F } = await Ct.get(`/api/widget/gallery/${i == null ? void 0 : i.id}`);
|
29503
|
+
n.value = F == null ? void 0 : F.rows, e.bind("[data-fancybox='gallery']");
|
29504
|
+
} catch (F) {
|
29505
|
+
console.error(F);
|
29506
29506
|
}
|
29507
29507
|
}, g = async (I) => {
|
29508
29508
|
var V;
|
29509
|
-
const
|
29509
|
+
const F = Array.from((V = I.target) == null ? void 0 : V.files);
|
29510
29510
|
await Promise.all(
|
29511
|
-
|
29511
|
+
F.map(async (W) => {
|
29512
29512
|
const se = new FormData();
|
29513
29513
|
se.append("file", W);
|
29514
29514
|
try {
|
@@ -29519,8 +29519,8 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
|
|
29519
29519
|
})
|
29520
29520
|
), await a();
|
29521
29521
|
}, _ = (I) => {
|
29522
|
-
const
|
29523
|
-
|
29522
|
+
const F = document.createElement("a");
|
29523
|
+
F.setAttribute("download", I == null ? void 0 : I.uploaded_name), F.href = I == null ? void 0 : I.file_path, F.click();
|
29524
29524
|
}, S = (I) => {
|
29525
29525
|
l.value = I, u.value = {
|
29526
29526
|
title: "Ви впевнені?",
|
@@ -29535,33 +29535,33 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
|
|
29535
29535
|
}
|
29536
29536
|
}, r.value = !0;
|
29537
29537
|
}, k = async () => {
|
29538
|
-
var I,
|
29538
|
+
var I, F;
|
29539
29539
|
try {
|
29540
29540
|
await Ct.delete(
|
29541
|
-
`/api/widget/gallery/${(I = l.value) == null ? void 0 : I.entity_id}/${(
|
29541
|
+
`/api/widget/gallery/${(I = l.value) == null ? void 0 : I.entity_id}/${(F = l.value) == null ? void 0 : F.file_id}`
|
29542
29542
|
);
|
29543
29543
|
} catch (V) {
|
29544
29544
|
console.error(V);
|
29545
29545
|
}
|
29546
|
-
}, M = (I,
|
29546
|
+
}, M = (I, F = 2) => {
|
29547
29547
|
if (I === 0) return "0 Bytes";
|
29548
|
-
const V = 1024, W =
|
29548
|
+
const V = 1024, W = F < 0 ? 0 : F, se = ["Bytes", "KB", "MB", "GB", "TB"], ce = Math.floor(Math.log(I) / Math.log(V));
|
29549
29549
|
return `${parseFloat((I / V ** ce).toFixed(W))} ${se[ce]}`;
|
29550
29550
|
}, P = (I) => {
|
29551
|
-
const
|
29551
|
+
const F = {
|
29552
29552
|
day: "numeric",
|
29553
29553
|
month: "long",
|
29554
29554
|
year: "numeric",
|
29555
29555
|
hour: "numeric",
|
29556
29556
|
minute: "numeric"
|
29557
29557
|
};
|
29558
|
-
return new Date(I).toLocaleDateString("ru-RU",
|
29558
|
+
return new Date(I).toLocaleDateString("ru-RU", F);
|
29559
29559
|
};
|
29560
|
-
return I_(() => i.id, a), Vm(a), (I,
|
29560
|
+
return I_(() => i.id, a), Vm(a), (I, F) => {
|
29561
29561
|
const V = At("VsDialog");
|
29562
29562
|
return xe(), Me("div", WB, [
|
29563
29563
|
Z("div", GB, [
|
29564
|
-
|
29564
|
+
F[3] || (F[3] = Z("h2", { class: "inline-block font-semibold text-gray-800 dark:text-neutral-200" }, null, -1)),
|
29565
29565
|
Z("div", ZB, [
|
29566
29566
|
Z("div", null, [
|
29567
29567
|
Z("label", null, [
|
@@ -29633,7 +29633,7 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
|
|
29633
29633
|
title: u.value.title,
|
29634
29634
|
size: "small",
|
29635
29635
|
visible: r.value,
|
29636
|
-
"onUpdate:visible":
|
29636
|
+
"onUpdate:visible": F[2] || (F[2] = (W) => r.value = W)
|
29637
29637
|
}, {
|
29638
29638
|
default: cn(() => [
|
29639
29639
|
Z("div", oN, [
|
@@ -29642,12 +29642,12 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
|
|
29642
29642
|
Z("button", {
|
29643
29643
|
type: "button",
|
29644
29644
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
29645
|
-
onClick:
|
29645
|
+
onClick: F[0] || (F[0] = (...W) => u.value.cancel && u.value.cancel(...W))
|
29646
29646
|
}, St(u.value.cancelButtonText), 1),
|
29647
29647
|
Z("button", {
|
29648
29648
|
type: "button",
|
29649
29649
|
class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600",
|
29650
|
-
onClick:
|
29650
|
+
onClick: F[1] || (F[1] = (...W) => u.value.confirm && u.value.confirm(...W))
|
29651
29651
|
}, St(u.value.confirmButtonText), 1)
|
29652
29652
|
])
|
29653
29653
|
])
|
@@ -31283,7 +31283,7 @@ function vN(t, e) {
|
|
31283
31283
|
let r = [];
|
31284
31284
|
for (let l in i) {
|
31285
31285
|
let u = i[l];
|
31286
|
-
u.
|
31286
|
+
u.groups.indexOf(e) > -1 && r.push(u);
|
31287
31287
|
}
|
31288
31288
|
return r.length == 0 && t.err("No node type or group '" + e + "' found"), r;
|
31289
31289
|
}
|
@@ -31479,13 +31479,6 @@ let U1 = class Q2 {
|
|
31479
31479
|
return this.isLeaf || !!this.spec.atom;
|
31480
31480
|
}
|
31481
31481
|
/**
|
31482
|
-
Return true when this node type is part of the given
|
31483
|
-
[group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).
|
31484
|
-
*/
|
31485
|
-
isInGroup(e) {
|
31486
|
-
return this.groups.indexOf(e) > -1;
|
31487
|
-
}
|
31488
|
-
/**
|
31489
31482
|
The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.
|
31490
31483
|
*/
|
31491
31484
|
get whitespace() {
|
@@ -32102,7 +32095,7 @@ class W1 {
|
|
32102
32095
|
this.findInside(e), i.getContent(e, this.parser.schema).forEach((g) => this.insertNode(g, n));
|
32103
32096
|
else {
|
32104
32097
|
let g = e;
|
32105
|
-
typeof i.contentElement == "string" ? g = e.querySelector(i.contentElement) : typeof i.contentElement == "function" ? g = i.contentElement(e) : i.contentElement && (g = i.contentElement), this.findAround(e, g, !0), this.addAll(g, n)
|
32098
|
+
typeof i.contentElement == "string" ? g = e.querySelector(i.contentElement) : typeof i.contentElement == "function" ? g = i.contentElement(e) : i.contentElement && (g = i.contentElement), this.findAround(e, g, !0), this.addAll(g, n);
|
32106
32099
|
}
|
32107
32100
|
l && this.sync(a) && this.open--;
|
32108
32101
|
}
|
@@ -32232,7 +32225,7 @@ class W1 {
|
|
32232
32225
|
return !1;
|
32233
32226
|
} else {
|
32234
32227
|
let S = g > 0 || g == 0 && r ? this.nodes[g].type : n && g >= l ? n.node(g - l).type : null;
|
32235
|
-
if (!S || S.name != _ &&
|
32228
|
+
if (!S || S.name != _ && S.groups.indexOf(_) == -1)
|
32236
32229
|
return !1;
|
32237
32230
|
g--;
|
32238
32231
|
}
|
@@ -32552,8 +32545,8 @@ class ps {
|
|
32552
32545
|
let M = _ ? e == g ? -1 : e == k ? 1 : i : i, P = g + r + (M < 0 ? 0 : S);
|
32553
32546
|
if (n)
|
32554
32547
|
return P;
|
32555
|
-
let I = e == (i < 0 ? g : k) ? null : ON(a / 3, e - g),
|
32556
|
-
return (i < 0 ? e != g : e != k) && (
|
32548
|
+
let I = e == (i < 0 ? g : k) ? null : ON(a / 3, e - g), F = e == g ? oT : e == k ? sT : rm;
|
32549
|
+
return (i < 0 ? e != g : e != k) && (F |= aT), new a_(P, F, I);
|
32557
32550
|
}
|
32558
32551
|
r += S - _;
|
32559
32552
|
}
|
@@ -33089,8 +33082,8 @@ function RN(t, e, i, n) {
|
|
33089
33082
|
let k = g.marks;
|
33090
33083
|
if (!n.isInSet(k) && S.type.allowsMarkType(n.type)) {
|
33091
33084
|
let M = Math.max(_, e), P = Math.min(_ + g.nodeSize, i), I = n.addToSet(k);
|
33092
|
-
for (let
|
33093
|
-
k[
|
33085
|
+
for (let F = 0; F < k.length; F++)
|
33086
|
+
k[F].isInSet(I) || (u && u.to == M && u.mark.eq(k[F]) ? u.to = P : r.push(u = new To(M, P, k[F])));
|
33094
33087
|
a && a.to == M ? a.to = P : l.push(a = new cl(M, P, n));
|
33095
33088
|
}
|
33096
33089
|
}), r.forEach((g) => t.step(g)), l.forEach((g) => t.step(g));
|
@@ -33161,11 +33154,11 @@ function ch(t) {
|
|
33161
33154
|
}
|
33162
33155
|
function BN(t, e, i) {
|
33163
33156
|
let { $from: n, $to: r, depth: l } = e, u = n.before(l + 1), a = r.after(l + 1), g = u, _ = a, S = Ve.empty, k = 0;
|
33164
|
-
for (let I = l,
|
33165
|
-
|
33157
|
+
for (let I = l, F = !1; I > i; I--)
|
33158
|
+
F || n.index(I) > 0 ? (F = !0, S = Ve.from(n.node(I).copy(S)), k++) : g--;
|
33166
33159
|
let M = Ve.empty, P = 0;
|
33167
|
-
for (let I = l,
|
33168
|
-
|
33160
|
+
for (let I = l, F = !1; I > i; I--)
|
33161
|
+
F || r.after(I + 1) < r.end(I) ? (F = !0, M = Ve.from(r.node(I).copy(M)), P++) : _++;
|
33169
33162
|
t.step(new Hn(g, _, u, a, new ft(S.append(M), k, P), S.size - k, !0));
|
33170
33163
|
}
|
33171
33164
|
function pv(t, e, i = null, n = t) {
|
@@ -33268,8 +33261,8 @@ function Uu(t, e, i = 1, n) {
|
|
33268
33261
|
return !1;
|
33269
33262
|
let P = k.content.cutByIndex(M, k.childCount), I = n && n[S + 1];
|
33270
33263
|
I && (P = P.replaceChild(0, I.type.create(I.attrs)));
|
33271
|
-
let
|
33272
|
-
if (!k.canReplace(M + 1, k.childCount) || !
|
33264
|
+
let F = n && n[S] || k;
|
33265
|
+
if (!k.canReplace(M + 1, k.childCount) || !F.type.validContent(P))
|
33273
33266
|
return !1;
|
33274
33267
|
}
|
33275
33268
|
let a = r.indexAfter(l), g = n && n[0];
|
@@ -33436,24 +33429,24 @@ class XN {
|
|
33436
33429
|
for (; this.depth > i; )
|
33437
33430
|
this.closeFrontierNode();
|
33438
33431
|
if (l)
|
33439
|
-
for (let
|
33440
|
-
this.openFrontierNode(l[
|
33432
|
+
for (let F = 0; F < l.length; F++)
|
33433
|
+
this.openFrontierNode(l[F]);
|
33441
33434
|
let u = this.unplaced, a = n ? n.content : u.content, g = u.openStart - e, _ = 0, S = [], { match: k, type: M } = this.frontier[i];
|
33442
33435
|
if (r) {
|
33443
|
-
for (let
|
33444
|
-
S.push(r.child(
|
33436
|
+
for (let F = 0; F < r.childCount; F++)
|
33437
|
+
S.push(r.child(F));
|
33445
33438
|
k = k.matchFragment(r);
|
33446
33439
|
}
|
33447
33440
|
let P = a.size + e - (u.content.size - u.openEnd);
|
33448
33441
|
for (; _ < a.childCount; ) {
|
33449
|
-
let
|
33442
|
+
let F = a.child(_), V = k.matchType(F.type);
|
33450
33443
|
if (!V)
|
33451
33444
|
break;
|
33452
|
-
_++, (_ > 1 || g == 0 ||
|
33445
|
+
_++, (_ > 1 || g == 0 || F.content.size) && (k = V, S.push(dT(F.mark(M.allowedMarks(F.marks)), _ == 1 ? g : 0, _ == a.childCount ? P : -1)));
|
33453
33446
|
}
|
33454
33447
|
let I = _ == a.childCount;
|
33455
33448
|
I || (P = -1), this.placed = Pd(this.placed, i, Ve.from(S)), this.frontier[i].match = k, I && P < 0 && n && n.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
33456
|
-
for (let
|
33449
|
+
for (let F = 0, V = a; F < P; F++) {
|
33457
33450
|
let W = V.lastChild;
|
33458
33451
|
this.frontier.push({ type: W.type, match: W.contentMatchAt(W.childCount) }), V = W.content;
|
33459
33452
|
}
|
@@ -33571,8 +33564,8 @@ function QN(t, e, i, n) {
|
|
33571
33564
|
for (let M = n.openStart; M >= 0; M--) {
|
33572
33565
|
let P = (M + S + 1) % (n.openStart + 1), I = _[P];
|
33573
33566
|
if (I)
|
33574
|
-
for (let
|
33575
|
-
let V = u[(
|
33567
|
+
for (let F = 0; F < u.length; F++) {
|
33568
|
+
let V = u[(F + g) % u.length], W = !0;
|
33576
33569
|
V < 0 && (W = !1, V = -V);
|
33577
33570
|
let se = r.node(V - 1), ce = r.index(V - 1);
|
33578
33571
|
if (se.canReplaceWith(ce, ce, I.type, I.marks))
|
@@ -34886,8 +34879,8 @@ function aw(t, e, i) {
|
|
34886
34879
|
else {
|
34887
34880
|
let M = a.scrollLeft, P = a.scrollTop;
|
34888
34881
|
k && (a.scrollTop += k), S && (a.scrollLeft += S);
|
34889
|
-
let I = a.scrollLeft - M,
|
34890
|
-
e = { left: e.left - I, top: e.top -
|
34882
|
+
let I = a.scrollLeft - M, F = a.scrollTop - P;
|
34883
|
+
e = { left: e.left - I, top: e.top - F, right: e.right - I, bottom: e.bottom - F };
|
34891
34884
|
}
|
34892
34885
|
if (g || /^(fixed|sticky)$/.test(getComputedStyle(u).position))
|
34893
34886
|
break;
|
@@ -34950,12 +34943,12 @@ function bT(t, e) {
|
|
34950
34943
|
let I = M[P];
|
34951
34944
|
if (I.top <= u && I.bottom >= a) {
|
34952
34945
|
u = Math.max(I.bottom, u), a = Math.min(I.top, a);
|
34953
|
-
let
|
34954
|
-
if (
|
34955
|
-
i = S, n =
|
34946
|
+
let F = I.left > e.left ? I.left - e.left : I.right < e.left ? e.left - I.right : 0;
|
34947
|
+
if (F < n) {
|
34948
|
+
i = S, n = F, r = F && i.nodeType == 3 ? {
|
34956
34949
|
left: I.right < e.left ? I.right : I.left,
|
34957
34950
|
top: e.top
|
34958
|
-
} : e, S.nodeType == 1 &&
|
34951
|
+
} : e, S.nodeType == 1 && F && (l = k + (e.left >= (I.left + I.right) / 2 ? 1 : 0));
|
34959
34952
|
continue;
|
34960
34953
|
}
|
34961
34954
|
} else I.top > e.top && !g && I.left <= e.left && I.right >= e.left && (g = S, _ = { left: Math.max(I.left, Math.min(I.right, e.left)), top: I.top });
|
@@ -35167,7 +35160,7 @@ function A3(t, e, i) {
|
|
35167
35160
|
return a ? !E3.test(n.parent.textContent) || !a.modify ? i == "left" || i == "backward" ? l : u : kT(t, e, () => {
|
35168
35161
|
let { focusNode: g, focusOffset: _, anchorNode: S, anchorOffset: k } = t.domSelectionRange(), M = a.caretBidiLevel;
|
35169
35162
|
a.modify("move", i, "character");
|
35170
|
-
let P = n.depth ? t.docView.domAfterPos(n.before()) : t.dom, { focusNode: I, focusOffset:
|
35163
|
+
let P = n.depth ? t.docView.domAfterPos(n.before()) : t.dom, { focusNode: I, focusOffset: F } = t.domSelectionRange(), V = I && !P.contains(I.nodeType == 1 ? I : I.parentNode) || g == I && _ == F;
|
35171
35164
|
try {
|
35172
35165
|
a.collapse(S, k), g && (g != S || _ != k) && a.extend && a.extend(g, _);
|
35173
35166
|
} catch {
|
@@ -35427,10 +35420,10 @@ class vp {
|
|
35427
35420
|
setSelection(e, i, n, r = !1) {
|
35428
35421
|
let l = Math.min(e, i), u = Math.max(e, i);
|
35429
35422
|
for (let M = 0, P = 0; M < this.children.length; M++) {
|
35430
|
-
let I = this.children[M],
|
35431
|
-
if (l > P && u <
|
35423
|
+
let I = this.children[M], F = P + I.size;
|
35424
|
+
if (l > P && u < F)
|
35432
35425
|
return I.setSelection(e - P - I.border, i - P - I.border, n, r);
|
35433
|
-
P =
|
35426
|
+
P = F;
|
35434
35427
|
}
|
35435
35428
|
let a = this.domFromPos(e, e ? -1 : 1), g = i == e ? a : this.domFromPos(i, i ? -1 : 1), _ = n.getSelection(), S = !1;
|
35436
35429
|
if ((ro || Ar) && e == i) {
|
@@ -35438,9 +35431,9 @@ class vp {
|
|
35438
35431
|
if (M.nodeType == 3) {
|
35439
35432
|
if (S = !!(P && M.nodeValue[P - 1] == `
|
35440
35433
|
`), S && P == M.nodeValue.length)
|
35441
|
-
for (let I = M,
|
35442
|
-
if (
|
35443
|
-
|
35434
|
+
for (let I = M, F; I; I = I.parentNode) {
|
35435
|
+
if (F = I.nextSibling) {
|
35436
|
+
F.nodeName == "BR" && (a = g = { node: F.parentNode, offset: tr(F) + 1 });
|
35444
35437
|
break;
|
35445
35438
|
}
|
35446
35439
|
let V = I.pmViewDesc;
|
@@ -36139,8 +36132,8 @@ function F3(t, e, i, n) {
|
|
36139
36132
|
} else
|
36140
36133
|
for (; u < r.length && r[u].to < I; )
|
36141
36134
|
u++;
|
36142
|
-
let
|
36143
|
-
n(M,
|
36135
|
+
let F = M.isInline && !M.isLeaf ? a.filter((V) => !V.inline) : a.slice();
|
36136
|
+
n(M, F, e.forChild(l, M), P), l = I;
|
36144
36137
|
}
|
36145
36138
|
}
|
36146
36139
|
function B3(t) {
|
@@ -36602,9 +36595,9 @@ function RT(t, e, i, n, r) {
|
|
36602
36595
|
a = k;
|
36603
36596
|
else {
|
36604
36597
|
let M = r.marks(), { schema: P } = t.state, I = Mc.fromSchema(P);
|
36605
|
-
u = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((
|
36598
|
+
u = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((F) => {
|
36606
36599
|
let V = u.appendChild(document.createElement("p"));
|
36607
|
-
|
36600
|
+
F && V.appendChild(I.serializeNode(P.text(F, M)));
|
36608
36601
|
});
|
36609
36602
|
}
|
36610
36603
|
} else
|
@@ -37143,7 +37136,7 @@ Ir.drop = (t, e) => {
|
|
37143
37136
|
_.setSelection(new Ft(P));
|
37144
37137
|
else {
|
37145
37138
|
let I = _.mapping.map(g);
|
37146
|
-
_.mapping.maps[_.mapping.maps.length - 1].forEach((
|
37139
|
+
_.mapping.maps[_.mapping.maps.length - 1].forEach((F, V, W, se) => I = se), _.setSelection(yv(t, P, _.doc.resolve(I)));
|
37147
37140
|
}
|
37148
37141
|
t.focus(), t.dispatch(_.setMeta("uiEvent", "drop"));
|
37149
37142
|
};
|
@@ -37548,8 +37541,8 @@ function w5(t, e, i, n, r, l, u) {
|
|
37548
37541
|
let a = t.slice();
|
37549
37542
|
for (let _ = 0, S = l; _ < i.maps.length; _++) {
|
37550
37543
|
let k = 0;
|
37551
|
-
i.maps[_].forEach((M, P, I,
|
37552
|
-
let V =
|
37544
|
+
i.maps[_].forEach((M, P, I, F) => {
|
37545
|
+
let V = F - I - (P - M);
|
37553
37546
|
for (let W = 0; W < a.length; W += 3) {
|
37554
37547
|
let se = a[W + 1];
|
37555
37548
|
if (se < 0 || M > se + S - k)
|
@@ -37572,8 +37565,8 @@ function w5(t, e, i, n, r, l, u) {
|
|
37572
37565
|
g = !0;
|
37573
37566
|
continue;
|
37574
37567
|
}
|
37575
|
-
let M = i.map(t[_ + 1] + l, -1), P = M - r, { index: I, offset:
|
37576
|
-
if (V &&
|
37568
|
+
let M = i.map(t[_ + 1] + l, -1), P = M - r, { index: I, offset: F } = n.content.findIndex(k), V = n.maybeChild(I);
|
37569
|
+
if (V && F == k && F + V.nodeSize == P) {
|
37577
37570
|
let W = a[_ + 2].mapInner(i, V, S + 1, t[_] + l + 1, u);
|
37578
37571
|
W != fr ? (a[_] = k, a[_ + 1] = P, a[_ + 2] = W) : (a[_ + 1] = -2, g = !0);
|
37579
37572
|
} else
|
@@ -37889,7 +37882,7 @@ function I5(t, e, i) {
|
|
37889
37882
|
if (!se || se.size)
|
37890
37883
|
break;
|
37891
37884
|
}
|
37892
|
-
let k = t.state.doc, M = t.someProp("domParser") || Bd.fromSchema(t.state.schema), P = k.resolve(u), I = null,
|
37885
|
+
let k = t.state.doc, M = t.someProp("domParser") || Bd.fromSchema(t.state.schema), P = k.resolve(u), I = null, F = M.parse(n, {
|
37893
37886
|
topNode: P.parent,
|
37894
37887
|
topMatch: P.parent.contentMatchAt(P.index()),
|
37895
37888
|
topOpen: !0,
|
@@ -37904,7 +37897,7 @@ function I5(t, e, i) {
|
|
37904
37897
|
let V = _[0].pos, W = _[1] && _[1].pos;
|
37905
37898
|
W == null && (W = V), I = { anchor: V + u, head: W + u };
|
37906
37899
|
}
|
37907
|
-
return { doc:
|
37900
|
+
return { doc: F, sel: I, from: u, to: a };
|
37908
37901
|
}
|
37909
37902
|
function D5(t) {
|
37910
37903
|
let e = t.pmViewDesc;
|
@@ -37956,31 +37949,31 @@ function z5(t, e, i, n, r) {
|
|
37956
37949
|
return;
|
37957
37950
|
}
|
37958
37951
|
t.state.selection.from < t.state.selection.to && I.start == I.endB && t.state.selection instanceof Ut && (I.start > t.state.selection.from && I.start <= t.state.selection.from + 2 && t.state.selection.from >= _.from ? I.start = t.state.selection.from : I.endA < t.state.selection.to && I.endA >= t.state.selection.to - 2 && t.state.selection.to <= _.to && (I.endB += t.state.selection.to - I.endA, I.endA = t.state.selection.to)), Xr && fl <= 11 && I.endB == I.start + 1 && I.endA == I.start && I.start > _.from && _.doc.textBetween(I.start - _.from - 1, I.start - _.from + 1) == " " && (I.start--, I.endA--, I.endB--);
|
37959
|
-
let
|
37960
|
-
if ((Xu && t.input.lastIOSEnter > Date.now() - 225 && (!se || r.some((ze) => ze.nodeName == "DIV" || ze.nodeName == "P")) || !se &&
|
37952
|
+
let F = _.doc.resolveNoCache(I.start - _.from), V = _.doc.resolveNoCache(I.endB - _.from), W = S.resolve(I.start), se = F.sameParent(V) && F.parent.inlineContent && W.end() >= I.endA, ce;
|
37953
|
+
if ((Xu && t.input.lastIOSEnter > Date.now() - 225 && (!se || r.some((ze) => ze.nodeName == "DIV" || ze.nodeName == "P")) || !se && F.pos < _.doc.content.size && !F.sameParent(V) && (ce = Jt.findFrom(_.doc.resolve(F.pos + 1), 1, !0)) && ce.head == V.pos) && t.someProp("handleKeyDown", (ze) => ze(t, ic(13, "Enter")))) {
|
37961
37954
|
t.input.lastIOSEnter = 0;
|
37962
37955
|
return;
|
37963
37956
|
}
|
37964
|
-
if (t.state.selection.anchor > I.start && L5(S, I.start, I.endA,
|
37957
|
+
if (t.state.selection.anchor > I.start && L5(S, I.start, I.endA, F, V) && t.someProp("handleKeyDown", (ze) => ze(t, ic(8, "Backspace")))) {
|
37965
37958
|
Js && yr && t.domObserver.suppressSelectionUpdates();
|
37966
37959
|
return;
|
37967
37960
|
}
|
37968
|
-
yr && Js && I.endB == I.start && (t.input.lastAndroidDelete = Date.now()), Js && !se &&
|
37961
|
+
yr && Js && I.endB == I.start && (t.input.lastAndroidDelete = Date.now()), Js && !se && F.start() != V.start() && V.parentOffset == 0 && F.depth == V.depth && _.sel && _.sel.anchor == _.sel.head && _.sel.head == I.endA && (I.endB -= 2, V = _.doc.resolveNoCache(I.endB - _.from), setTimeout(() => {
|
37969
37962
|
t.someProp("handleKeyDown", function(ze) {
|
37970
37963
|
return ze(t, ic(13, "Enter"));
|
37971
37964
|
});
|
37972
37965
|
}, 20));
|
37973
37966
|
let Q = I.start, Oe = I.endA, ke, Pe, Xe;
|
37974
37967
|
if (se) {
|
37975
|
-
if (
|
37976
|
-
Xr && fl <= 11 &&
|
37968
|
+
if (F.pos == V.pos)
|
37969
|
+
Xr && fl <= 11 && F.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => da(t), 20)), ke = t.state.tr.delete(Q, Oe), Pe = S.resolve(I.start).marksAcross(S.resolve(I.endA));
|
37977
37970
|
else if (
|
37978
37971
|
// Adding or removing a mark
|
37979
|
-
I.endA == I.endB && (Xe = R5(
|
37972
|
+
I.endA == I.endB && (Xe = R5(F.parent.content.cut(F.parentOffset, V.parentOffset), W.parent.content.cut(W.parentOffset, I.endA - W.start())))
|
37980
37973
|
)
|
37981
37974
|
ke = t.state.tr, Xe.type == "add" ? ke.addMark(Q, Oe, Xe.mark) : ke.removeMark(Q, Oe, Xe.mark);
|
37982
|
-
else if (
|
37983
|
-
let ze =
|
37975
|
+
else if (F.parent.child(F.index()).isText && F.index() == V.index() - (V.textOffset ? 0 : 1)) {
|
37976
|
+
let ze = F.parent.textBetween(F.parentOffset, V.parentOffset);
|
37984
37977
|
if (t.someProp("handleTextInput", (Qe) => Qe(t, Q, Oe, ze)))
|
37985
37978
|
return;
|
37986
37979
|
ke = t.state.tr.insertText(ze, Q, Oe);
|
@@ -38828,8 +38821,8 @@ function iM(t, e, i, n) {
|
|
38828
38821
|
for (let W = u.length - 1; W >= 0; W--)
|
38829
38822
|
I = Ve.from(u[W].create(null, I));
|
38830
38823
|
I = Ve.from(r.copy(I));
|
38831
|
-
let
|
38832
|
-
xl(
|
38824
|
+
let F = t.tr.step(new Hn(e.pos - 1, P, e.pos, P, new ft(I, 1, 0), u.length, !0)), V = P + 2 * u.length;
|
38825
|
+
xl(F.doc, V) && F.join(V), i(F.scrollIntoView());
|
38833
38826
|
}
|
38834
38827
|
return !0;
|
38835
38828
|
}
|
@@ -38840,10 +38833,10 @@ function iM(t, e, i, n) {
|
|
38840
38833
|
let P = r, I = [];
|
38841
38834
|
for (; I.push(P), !P.isTextblock; )
|
38842
38835
|
P = P.lastChild;
|
38843
|
-
let
|
38844
|
-
for (; !
|
38836
|
+
let F = l, V = 1;
|
38837
|
+
for (; !F.isTextblock; F = F.firstChild)
|
38845
38838
|
V++;
|
38846
|
-
if (P.canReplace(P.childCount, P.childCount,
|
38839
|
+
if (P.canReplace(P.childCount, P.childCount, F.content)) {
|
38847
38840
|
if (i) {
|
38848
38841
|
let W = Ve.empty;
|
38849
38842
|
for (let ce = I.length - 1; ce >= 0; ce--)
|
@@ -38951,7 +38944,7 @@ function g4(t, e, i, n) {
|
|
38951
38944
|
}
|
38952
38945
|
function y4(t, e, i) {
|
38953
38946
|
let n = t.tr, r = i.parent;
|
38954
|
-
for (let P = i.end, I = i.endIndex - 1,
|
38947
|
+
for (let P = i.end, I = i.endIndex - 1, F = i.startIndex; I > F; I--)
|
38955
38948
|
P -= r.child(I).nodeSize, n.delete(P - 1, P + 1);
|
38956
38949
|
let l = n.doc.resolve(i.start), u = l.nodeAfter;
|
38957
38950
|
if (n.mapping.map(i.end) != i.start + l.nodeAfter.nodeSize)
|
@@ -39030,8 +39023,8 @@ class fg {
|
|
39030
39023
|
}
|
39031
39024
|
createChain(e, i = !0) {
|
39032
39025
|
const { rawCommands: n, editor: r, state: l } = this, { view: u } = r, a = [], g = !!e, _ = e || l.tr, S = () => (!g && i && !_.getMeta("preventDispatch") && !this.hasCustomState && u.dispatch(_), a.every((M) => M === !0)), k = {
|
39033
|
-
...Object.fromEntries(Object.entries(n).map(([M, P]) => [M, (...
|
39034
|
-
const V = this.buildProps(_, i), W = P(...
|
39026
|
+
...Object.fromEntries(Object.entries(n).map(([M, P]) => [M, (...F) => {
|
39027
|
+
const V = this.buildProps(_, i), W = P(...F)(V);
|
39035
39028
|
return a.push(W), k;
|
39036
39029
|
}])),
|
39037
39030
|
run: S
|
@@ -39259,8 +39252,8 @@ function w4(t, e) {
|
|
39259
39252
|
}))
|
39260
39253
|
}), I = ri(wt(_, "parseHTML", k));
|
39261
39254
|
I && (P.parseDOM = I.map((W) => Nw(W, S)));
|
39262
|
-
const
|
39263
|
-
|
39255
|
+
const F = wt(_, "renderHTML", k);
|
39256
|
+
F && (P.toDOM = (W) => F({
|
39264
39257
|
node: W,
|
39265
39258
|
HTMLAttributes: v_(W, S)
|
39266
39259
|
}));
|
@@ -39291,8 +39284,8 @@ function w4(t, e) {
|
|
39291
39284
|
}))
|
39292
39285
|
}), I = ri(wt(_, "parseHTML", k));
|
39293
39286
|
I && (P.parseDOM = I.map((V) => Nw(V, S)));
|
39294
|
-
const
|
39295
|
-
return
|
39287
|
+
const F = wt(_, "renderHTML", k);
|
39288
|
+
return F && (P.toDOM = (V) => F({
|
39296
39289
|
mark: V,
|
39297
39290
|
HTMLAttributes: v_(V, S)
|
39298
39291
|
})), [_.name, P];
|
@@ -39359,7 +39352,7 @@ function qf(t) {
|
|
39359
39352
|
const P = k4(k, M.find);
|
39360
39353
|
if (!P)
|
39361
39354
|
return;
|
39362
|
-
const I = g.state.tr,
|
39355
|
+
const I = g.state.tr, F = pg({
|
39363
39356
|
state: g.state,
|
39364
39357
|
transaction: I
|
39365
39358
|
}), V = {
|
@@ -39367,10 +39360,10 @@ function qf(t) {
|
|
39367
39360
|
to: r
|
39368
39361
|
}, { commands: W, chain: se, can: ce } = new fg({
|
39369
39362
|
editor: i,
|
39370
|
-
state:
|
39363
|
+
state: F
|
39371
39364
|
});
|
39372
39365
|
M.handler({
|
39373
|
-
state:
|
39366
|
+
state: F,
|
39374
39367
|
range: V,
|
39375
39368
|
match: P,
|
39376
39369
|
commands: W,
|
@@ -39537,11 +39530,11 @@ function P4(t) {
|
|
39537
39530
|
return i.doc.nodesBetween(n, r, (P, I) => {
|
39538
39531
|
if (!P.isTextblock || P.type.spec.code)
|
39539
39532
|
return;
|
39540
|
-
const
|
39533
|
+
const F = Math.max(n, I), V = Math.min(r, I + P.content.size), W = P.textBetween(F - I, V - I, void 0, "");
|
39541
39534
|
A4(W, l.find, u).forEach((ce) => {
|
39542
39535
|
if (ce.index === void 0)
|
39543
39536
|
return;
|
39544
|
-
const Q =
|
39537
|
+
const Q = F + ce.index + 1, Oe = Q + ce[0].length, ke = {
|
39545
39538
|
from: i.tr.mapping.map(Q),
|
39546
39539
|
to: i.tr.mapping.map(Oe)
|
39547
39540
|
}, Pe = l.handler({
|
@@ -39569,9 +39562,9 @@ function D4(t) {
|
|
39569
39562
|
const { editor: e, rules: i } = t;
|
39570
39563
|
let n = null, r = !1, l = !1, u = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, a = typeof DragEvent < "u" ? new DragEvent("drop") : null;
|
39571
39564
|
const g = ({ state: S, from: k, to: M, rule: P, pasteEvt: I }) => {
|
39572
|
-
const
|
39565
|
+
const F = S.tr, V = pg({
|
39573
39566
|
state: S,
|
39574
|
-
transaction:
|
39567
|
+
transaction: F
|
39575
39568
|
});
|
39576
39569
|
if (!(!P4({
|
39577
39570
|
editor: e,
|
@@ -39581,8 +39574,8 @@ function D4(t) {
|
|
39581
39574
|
rule: P,
|
39582
39575
|
pasteEvent: I,
|
39583
39576
|
dropEvent: a
|
39584
|
-
}) || !
|
39585
|
-
return a = typeof DragEvent < "u" ? new DragEvent("drop") : null, u = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null,
|
39577
|
+
}) || !F.steps.length))
|
39578
|
+
return a = typeof DragEvent < "u" ? new DragEvent("drop") : null, u = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, F;
|
39586
39579
|
};
|
39587
39580
|
return i.map((S) => new nr({
|
39588
39581
|
// we register a global drag handler to track the current drag source element
|
@@ -39608,8 +39601,8 @@ function D4(t) {
|
|
39608
39601
|
}
|
39609
39602
|
},
|
39610
39603
|
appendTransaction: (k, M, P) => {
|
39611
|
-
const I = k[0],
|
39612
|
-
if (!
|
39604
|
+
const I = k[0], F = I.getMeta("uiEvent") === "paste" && !r, V = I.getMeta("uiEvent") === "drop" && !l, W = I.getMeta("applyPasteRules"), se = !!W;
|
39605
|
+
if (!F && !V && !se)
|
39613
39606
|
return;
|
39614
39607
|
if (se) {
|
39615
39608
|
const { from: Oe, text: ke } = W, Pe = Oe + ke.length, Xe = I4(ke);
|
@@ -39711,8 +39704,8 @@ class Bu {
|
|
39711
39704
|
}, g = [], _ = wt(u, "addKeyboardShortcuts", a);
|
39712
39705
|
let S = {};
|
39713
39706
|
if (u.type === "mark" && wt(u, "exitable", a) && (S.ArrowRight = () => Po.handleExit({ editor: e, mark: u })), _) {
|
39714
|
-
const
|
39715
|
-
S = { ...S, ...
|
39707
|
+
const F = Object.fromEntries(Object.entries(_()).map(([V, W]) => [V, () => W({ editor: e })]));
|
39708
|
+
S = { ...S, ...F };
|
39716
39709
|
}
|
39717
39710
|
const k = G5(S);
|
39718
39711
|
g.push(k);
|
@@ -39722,8 +39715,8 @@ class Bu {
|
|
39722
39715
|
Vw(u, e.options.enablePasteRules) && P && r.push(...P());
|
39723
39716
|
const I = wt(u, "addProseMirrorPlugins", a);
|
39724
39717
|
if (I) {
|
39725
|
-
const
|
39726
|
-
g.push(...
|
39718
|
+
const F = I();
|
39719
|
+
g.push(...F);
|
39727
39720
|
}
|
39728
39721
|
return g;
|
39729
39722
|
}).flat();
|
@@ -39896,8 +39889,8 @@ const z4 = Gn.create({
|
|
39896
39889
|
return;
|
39897
39890
|
const I = ch(P);
|
39898
39891
|
if (a.type.isTextblock) {
|
39899
|
-
const { defaultType:
|
39900
|
-
e.setNodeMarkup(P.start,
|
39892
|
+
const { defaultType: F } = k.parent.contentMatchAt(k.index());
|
39893
|
+
e.setNodeMarkup(P.start, F);
|
39901
39894
|
}
|
39902
39895
|
(I || I === 0) && e.lift(P, I);
|
39903
39896
|
});
|
@@ -40349,11 +40342,11 @@ function w_(t, e, i = {}) {
|
|
40349
40342
|
const a = [];
|
40350
40343
|
if (r.forEach(({ $from: k, $to: M }) => {
|
40351
40344
|
const P = k.pos, I = M.pos;
|
40352
|
-
t.doc.nodesBetween(P, I, (
|
40353
|
-
if (!
|
40345
|
+
t.doc.nodesBetween(P, I, (F, V) => {
|
40346
|
+
if (!F.isText && !F.marks.length)
|
40354
40347
|
return;
|
40355
|
-
const W = Math.max(P, V), se = Math.min(I, V +
|
40356
|
-
u += ce, a.push(...
|
40348
|
+
const W = Math.max(P, V), se = Math.min(I, V + F.nodeSize), ce = se - W;
|
40349
|
+
u += ce, a.push(...F.marks.map((Q) => ({
|
40357
40350
|
mark: Q,
|
40358
40351
|
from: W,
|
40359
40352
|
to: se
|
@@ -40437,7 +40430,7 @@ function D$(t, e, i) {
|
|
40437
40430
|
if (_)
|
40438
40431
|
return !1;
|
40439
40432
|
if (S.isInline) {
|
40440
|
-
const P = !M || M.type.allowsMarkType(i), I = !!i.isInSet(S.marks) || !S.marks.some((
|
40433
|
+
const P = !M || M.type.allowsMarkType(i), I = !!i.isInSet(S.marks) || !S.marks.some((F) => F.type.excludes(i));
|
40441
40434
|
_ = P && I;
|
40442
40435
|
}
|
40443
40436
|
return !_;
|
@@ -40457,13 +40450,13 @@ const O$ = (t, e = {}) => ({ tr: i, state: n, dispatch: r }) => {
|
|
40457
40450
|
a.forEach((_) => {
|
40458
40451
|
const S = _.$from.pos, k = _.$to.pos;
|
40459
40452
|
n.doc.nodesBetween(S, k, (M, P) => {
|
40460
|
-
const I = Math.max(P, S),
|
40453
|
+
const I = Math.max(P, S), F = Math.min(P + M.nodeSize, k);
|
40461
40454
|
M.marks.find((W) => W.type === g) ? M.marks.forEach((W) => {
|
40462
|
-
g === W.type && i.addMark(I,
|
40455
|
+
g === W.type && i.addMark(I, F, g.create({
|
40463
40456
|
...W.attrs,
|
40464
40457
|
...e
|
40465
40458
|
}));
|
40466
|
-
}) : i.addMark(I,
|
40459
|
+
}) : i.addMark(I, F, g.create(e));
|
40467
40460
|
});
|
40468
40461
|
});
|
40469
40462
|
return D$(n, i, g);
|
@@ -40513,7 +40506,7 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
|
|
40513
40506
|
}
|
40514
40507
|
] : void 0), n) {
|
40515
40508
|
if (I && (l instanceof Ut && e.deleteSelection(), e.split(e.mapping.map(a.pos), 1, P), M && !k && !a.parentOffset && a.parent.type !== M)) {
|
40516
|
-
const
|
40509
|
+
const F = e.mapping.map(a.before()), V = e.doc.resolve(F);
|
40517
40510
|
a.node(-1).canReplaceWith(V.index(), V.index() + 1, M) && e.setNodeMarkup(e.mapping.map(a.before()), M);
|
40518
40511
|
}
|
40519
40512
|
t && Hw(i, r.extensionManager.splittableMarks), e.scrollIntoView();
|
@@ -40555,14 +40548,14 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
|
|
40555
40548
|
const P = _.pos === g.end() ? k.contentMatchAt(0).defaultType : null, I = {
|
40556
40549
|
...sm(M, k.type.name, k.attrs),
|
40557
40550
|
...e
|
40558
|
-
},
|
40551
|
+
}, F = {
|
40559
40552
|
...sm(M, g.node().type.name, g.node().attrs),
|
40560
40553
|
...e
|
40561
40554
|
};
|
40562
40555
|
i.delete(g.pos, _.pos);
|
40563
40556
|
const V = P ? [
|
40564
40557
|
{ type: a, attrs: I },
|
40565
|
-
{ type: P, attrs:
|
40558
|
+
{ type: P, attrs: F }
|
40566
40559
|
] : [{ type: a, attrs: I }];
|
40567
40560
|
if (!Uu(i.doc, g.pos, 2))
|
40568
40561
|
return !1;
|
@@ -40593,10 +40586,10 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
|
|
40593
40586
|
const r = t.doc.nodeAt(n);
|
40594
40587
|
return i.node.type === (r == null ? void 0 : r.type) && xl(t.doc, n) && t.join(n), !0;
|
40595
40588
|
}, V$ = (t, e, i, n = {}) => ({ editor: r, tr: l, state: u, dispatch: a, chain: g, commands: _, can: S }) => {
|
40596
|
-
const { extensions: k, splittableMarks: M } = r.extensionManager, P = Wn(t, u.schema), I = Wn(e, u.schema), { selection:
|
40589
|
+
const { extensions: k, splittableMarks: M } = r.extensionManager, P = Wn(t, u.schema), I = Wn(e, u.schema), { selection: F, storedMarks: V } = u, { $from: W, $to: se } = F, ce = W.blockRange(se), Q = V || F.$to.parentOffset && F.$from.marks();
|
40597
40590
|
if (!ce)
|
40598
40591
|
return !1;
|
40599
|
-
const Oe = Pv((ke) => Uw(ke.type.name, k))(
|
40592
|
+
const Oe = Pv((ke) => Uw(ke.type.name, k))(F);
|
40600
40593
|
if (ce.depth >= 1 && Oe && ce.depth - Oe.depth <= 1) {
|
40601
40594
|
if (Oe.node.type === P)
|
40602
40595
|
return _.liftListItem(I);
|
@@ -40649,8 +40642,8 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
|
|
40649
40642
|
return !0;
|
40650
40643
|
if (S && u) {
|
40651
40644
|
let { from: M, to: P } = a;
|
40652
|
-
const I = (l = _.marks().find((V) => V.type === g)) === null || l === void 0 ? void 0 : l.attrs,
|
40653
|
-
|
40645
|
+
const I = (l = _.marks().find((V) => V.type === g)) === null || l === void 0 ? void 0 : l.attrs, F = Mv(_, g, I);
|
40646
|
+
F && (M = F.from, P = F.to), i.removeMark(M, P, g);
|
40654
40647
|
} else
|
40655
40648
|
k.forEach((M) => {
|
40656
40649
|
i.removeMark(M.$from.pos, M.$to.pos, g);
|
@@ -40667,8 +40660,8 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
|
|
40667
40660
|
...e
|
40668
40661
|
}), u && k.marks.length && k.marks.forEach((P) => {
|
40669
40662
|
if (u === P.type) {
|
40670
|
-
const I = Math.max(M, _),
|
40671
|
-
i.addMark(I,
|
40663
|
+
const I = Math.max(M, _), F = Math.min(M + k.nodeSize, S);
|
40664
|
+
i.addMark(I, F, u.create({
|
40672
40665
|
...P.attrs,
|
40673
40666
|
...e
|
40674
40667
|
}));
|
@@ -40813,7 +40806,7 @@ const J$ = Gn.create({
|
|
40813
40806
|
() => u.undoInputRule(),
|
40814
40807
|
// maybe convert first text block node to default node
|
40815
40808
|
() => u.command(({ tr: a }) => {
|
40816
|
-
const { selection: g, doc: _ } = a, { empty: S, $anchor: k } = g, { pos: M, parent: P } = k, I = k.parent.isTextblock && M > 0 ? a.doc.resolve(M - 1) : k,
|
40809
|
+
const { selection: g, doc: _ } = a, { empty: S, $anchor: k } = g, { pos: M, parent: P } = k, I = k.parent.isTextblock && M > 0 ? a.doc.resolve(M - 1) : k, F = I.parent.type.spec.isolating, V = k.pos - k.parentOffset, W = F && I.parent.childCount === 1 ? V === k.pos : Jt.atStart(_).from === M;
|
40817
40810
|
return !S || !P.type.isTextblock || P.textContent.length || !W || W && k.parent.type.name === "paragraph" ? !1 : u.clearNodes();
|
40818
40811
|
}),
|
40819
40812
|
() => u.deleteSelection(),
|
@@ -40863,7 +40856,7 @@ const J$ = Gn.create({
|
|
40863
40856
|
new nr({
|
40864
40857
|
key: new Qr("clearDocument"),
|
40865
40858
|
appendTransaction: (t, e, i) => {
|
40866
|
-
const n = t.some((
|
40859
|
+
const n = t.some((F) => F.docChanged) && !e.doc.eq(i.doc), r = t.some((F) => F.getMeta("preventClearDocument"));
|
40867
40860
|
if (!n || r)
|
40868
40861
|
return;
|
40869
40862
|
const { empty: l, from: u, to: a } = e.selection, g = Jt.atStart(e.doc).from, _ = Jt.atEnd(e.doc).to;
|
@@ -41459,7 +41452,7 @@ function Ju(t) {
|
|
41459
41452
|
const { tr: l } = e, u = n[n.length - 1], a = n[0];
|
41460
41453
|
if (u) {
|
41461
41454
|
const g = a.search(/\S/), _ = i.from + a.indexOf(u), S = _ + u.length;
|
41462
|
-
if (hM(i.from, i.to, e.doc).filter((P) => P.mark.type.excluded.find((
|
41455
|
+
if (hM(i.from, i.to, e.doc).filter((P) => P.mark.type.excluded.find((F) => F === t.type && F !== P.mark.type)).filter((P) => P.to > _).length)
|
41463
41456
|
return null;
|
41464
41457
|
S < i.to && l.delete(S, i.to), _ > i.from && l.delete(i.from + g, _);
|
41465
41458
|
const M = i.from + g + u.length;
|
@@ -41510,8 +41503,8 @@ function sp(t) {
|
|
41510
41503
|
if (u.wrap(g, _), t.keepMarks && t.editor) {
|
41511
41504
|
const { selection: k, storedMarks: M } = e, { splittableMarks: P } = t.editor.extensionManager, I = M || k.$to.parentOffset && k.$from.marks();
|
41512
41505
|
if (I) {
|
41513
|
-
const
|
41514
|
-
u.ensureMarks(
|
41506
|
+
const F = I.filter((V) => P.includes(V.type.name));
|
41507
|
+
u.ensureMarks(F);
|
41515
41508
|
}
|
41516
41509
|
}
|
41517
41510
|
if (t.keepAttributes) {
|
@@ -41787,7 +41780,7 @@ var CV = function(e, i) {
|
|
41787
41780
|
function EV(t) {
|
41788
41781
|
var e, i = t.state, n = t.name, r = t.options, l = i.elements.arrow, u = i.modifiersData.popperOffsets, a = Mo(i.placement), g = Rv(a), _ = [Jr, Us].indexOf(a) >= 0, S = _ ? "height" : "width";
|
41789
41782
|
if (!(!l || !u)) {
|
41790
|
-
var k = CV(r.padding, i), M = zv(l), P = g === "y" ? Kr : Jr, I = g === "y" ? js : Us,
|
41783
|
+
var k = CV(r.padding, i), M = zv(l), P = g === "y" ? Kr : Jr, I = g === "y" ? js : Us, F = i.rects.reference[S] + i.rects.reference[g] - u[g] - i.rects.popper[S], V = u[g] - i.rects.reference[g], W = bp(l), se = W ? g === "y" ? W.clientHeight || 0 : W.clientWidth || 0 : 0, ce = F / 2 - V / 2, Q = k[P], Oe = se - M[S] - k[I], ke = se / 2 - M[S] / 2 + ce, Pe = jd(Q, ke, Oe), Xe = g;
|
41791
41784
|
i.modifiersData[n] = (e = {}, e[Xe] = Pe, e.centerOffset = Pe - ke, e);
|
41792
41785
|
}
|
41793
41786
|
}
|
@@ -41821,14 +41814,14 @@ function DV(t, e) {
|
|
41821
41814
|
};
|
41822
41815
|
}
|
41823
41816
|
function Gw(t) {
|
41824
|
-
var e, i = t.popper, n = t.popperRect, r = t.placement, l = t.variation, u = t.offsets, a = t.position, g = t.gpuAcceleration, _ = t.adaptive, S = t.roundOffsets, k = t.isFixed, M = u.x, P = M === void 0 ? 0 : M, I = u.y,
|
41817
|
+
var e, i = t.popper, n = t.popperRect, r = t.placement, l = t.variation, u = t.offsets, a = t.position, g = t.gpuAcceleration, _ = t.adaptive, S = t.roundOffsets, k = t.isFixed, M = u.x, P = M === void 0 ? 0 : M, I = u.y, F = I === void 0 ? 0 : I, V = typeof S == "function" ? S({
|
41825
41818
|
x: P,
|
41826
|
-
y:
|
41819
|
+
y: F
|
41827
41820
|
}) : {
|
41828
41821
|
x: P,
|
41829
|
-
y:
|
41822
|
+
y: F
|
41830
41823
|
};
|
41831
|
-
P = V.x,
|
41824
|
+
P = V.x, F = V.y;
|
41832
41825
|
var W = u.hasOwnProperty("x"), se = u.hasOwnProperty("y"), ce = Jr, Q = Kr, Oe = window;
|
41833
41826
|
if (_) {
|
41834
41827
|
var ke = bp(i), Pe = "clientHeight", Xe = "clientWidth";
|
@@ -41838,7 +41831,7 @@ function Gw(t) {
|
|
41838
41831
|
// $FlowFixMe[prop-missing]
|
41839
41832
|
ke[Pe]
|
41840
41833
|
);
|
41841
|
-
|
41834
|
+
F -= ze - n.height, F *= g ? 1 : -1;
|
41842
41835
|
}
|
41843
41836
|
if (r === Jr || (r === Kr || r === js) && l === op) {
|
41844
41837
|
ce = Us;
|
@@ -41853,16 +41846,16 @@ function Gw(t) {
|
|
41853
41846
|
position: a
|
41854
41847
|
}, _ && IV), Ht = S === !0 ? DV({
|
41855
41848
|
x: P,
|
41856
|
-
y:
|
41849
|
+
y: F
|
41857
41850
|
}, _s(i)) : {
|
41858
41851
|
x: P,
|
41859
|
-
y:
|
41852
|
+
y: F
|
41860
41853
|
};
|
41861
|
-
if (P = Ht.x,
|
41854
|
+
if (P = Ht.x, F = Ht.y, g) {
|
41862
41855
|
var yt;
|
41863
|
-
return Object.assign({}, lt, (yt = {}, yt[Q] = se ? "0" : "", yt[ce] = W ? "0" : "", yt.transform = (Oe.devicePixelRatio || 1) <= 1 ? "translate(" + P + "px, " +
|
41856
|
+
return Object.assign({}, lt, (yt = {}, yt[Q] = se ? "0" : "", yt[ce] = W ? "0" : "", yt.transform = (Oe.devicePixelRatio || 1) <= 1 ? "translate(" + P + "px, " + F + "px)" : "translate3d(" + P + "px, " + F + "px, 0)", yt));
|
41864
41857
|
}
|
41865
|
-
return Object.assign({}, lt, (e = {}, e[Q] = se ?
|
41858
|
+
return Object.assign({}, lt, (e = {}, e[Q] = se ? F + "px" : "", e[ce] = W ? P + "px" : "", e.transform = "", e));
|
41866
41859
|
}
|
41867
41860
|
function OV(t) {
|
41868
41861
|
var e = t.state, i = t.options, n = i.gpuAcceleration, r = n === void 0 ? !0 : n, l = i.adaptive, u = l === void 0 ? !0 : l, a = i.roundOffsets, g = a === void 0 ? !0 : a, _ = {
|
@@ -42062,7 +42055,7 @@ function SM(t) {
|
|
42062
42055
|
}
|
42063
42056
|
function ap(t, e) {
|
42064
42057
|
e === void 0 && (e = {});
|
42065
|
-
var i = e, n = i.placement, r = n === void 0 ? t.placement : n, l = i.strategy, u = l === void 0 ? t.strategy : l, a = i.boundary, g = a === void 0 ? uV : a, _ = i.rootBoundary, S = _ === void 0 ? fM : _, k = i.elementContext, M = k === void 0 ? Cd : k, P = i.altBoundary, I = P === void 0 ? !1 : P,
|
42058
|
+
var i = e, n = i.placement, r = n === void 0 ? t.placement : n, l = i.strategy, u = l === void 0 ? t.strategy : l, a = i.boundary, g = a === void 0 ? uV : a, _ = i.rootBoundary, S = _ === void 0 ? fM : _, k = i.elementContext, M = k === void 0 ? Cd : k, P = i.altBoundary, I = P === void 0 ? !1 : P, F = i.padding, V = F === void 0 ? 0 : F, W = xM(typeof V != "number" ? V : bM(V, xp)), se = M === Cd ? hV : Cd, ce = t.rects.popper, Q = t.elements[I ? se : M], Oe = UV(Sc(Q) ? Q : Q.contextElement || Sl(t.elements.popper), g, S, u), ke = ih(t.elements.reference), Pe = SM({
|
42066
42059
|
reference: ke,
|
42067
42060
|
element: ce,
|
42068
42061
|
strategy: "absolute",
|
@@ -42090,16 +42083,16 @@ function HV(t, e) {
|
|
42090
42083
|
return _.indexOf(I) >= 0;
|
42091
42084
|
});
|
42092
42085
|
M.length === 0 && (M = k);
|
42093
|
-
var P = M.reduce(function(I,
|
42094
|
-
return I[
|
42095
|
-
placement:
|
42086
|
+
var P = M.reduce(function(I, F) {
|
42087
|
+
return I[F] = ap(t, {
|
42088
|
+
placement: F,
|
42096
42089
|
boundary: r,
|
42097
42090
|
rootBoundary: l,
|
42098
42091
|
padding: u
|
42099
|
-
})[Mo(
|
42092
|
+
})[Mo(F)], I;
|
42100
42093
|
}, {});
|
42101
|
-
return Object.keys(P).sort(function(I,
|
42102
|
-
return P[I] - P[
|
42094
|
+
return Object.keys(P).sort(function(I, F) {
|
42095
|
+
return P[I] - P[F];
|
42103
42096
|
});
|
42104
42097
|
}
|
42105
42098
|
function qV(t) {
|
@@ -42111,14 +42104,14 @@ function qV(t) {
|
|
42111
42104
|
function WV(t) {
|
42112
42105
|
var e = t.state, i = t.options, n = t.name;
|
42113
42106
|
if (!e.modifiersData[n]._skip) {
|
42114
|
-
for (var r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !0 : u, g = i.fallbackPlacements, _ = i.padding, S = i.boundary, k = i.rootBoundary, M = i.altBoundary, P = i.flipVariations, I = P === void 0 ? !0 : P,
|
42107
|
+
for (var r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !0 : u, g = i.fallbackPlacements, _ = i.padding, S = i.boundary, k = i.rootBoundary, M = i.altBoundary, P = i.flipVariations, I = P === void 0 ? !0 : P, F = i.allowedAutoPlacements, V = e.options.placement, W = Mo(V), se = W === V, ce = g || (se || !I ? [om(V)] : qV(V)), Q = [V].concat(ce).reduce(function(Yi, Wi) {
|
42115
42108
|
return Yi.concat(Mo(Wi) === Dv ? HV(e, {
|
42116
42109
|
placement: Wi,
|
42117
42110
|
boundary: S,
|
42118
42111
|
rootBoundary: k,
|
42119
42112
|
padding: _,
|
42120
42113
|
flipVariations: I,
|
42121
|
-
allowedAutoPlacements:
|
42114
|
+
allowedAutoPlacements: F
|
42122
42115
|
}) : Wi);
|
42123
42116
|
}, []), Oe = e.rects.reference, ke = e.rects.popper, Pe = /* @__PURE__ */ new Map(), Xe = !0, ze = Q[0], Qe = 0; Qe < Q.length; Qe++) {
|
42124
42117
|
var lt = Q[Qe], Ht = Mo(lt), yt = nh(lt) === eh, Nt = [Kr, js].indexOf(Ht) >= 0, si = Nt ? "width" : "height", fi = ap(e, {
|
@@ -42250,14 +42243,14 @@ function t6(t) {
|
|
42250
42243
|
return t === "x" ? "y" : "x";
|
42251
42244
|
}
|
42252
42245
|
function i6(t) {
|
42253
|
-
var e = t.state, i = t.options, n = t.name, r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !1 : u, g = i.boundary, _ = i.rootBoundary, S = i.altBoundary, k = i.padding, M = i.tether, P = M === void 0 ? !0 : M, I = i.tetherOffset,
|
42246
|
+
var e = t.state, i = t.options, n = t.name, r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !1 : u, g = i.boundary, _ = i.rootBoundary, S = i.altBoundary, k = i.padding, M = i.tether, P = M === void 0 ? !0 : M, I = i.tetherOffset, F = I === void 0 ? 0 : I, V = ap(e, {
|
42254
42247
|
boundary: g,
|
42255
42248
|
rootBoundary: _,
|
42256
42249
|
padding: k,
|
42257
42250
|
altBoundary: S
|
42258
|
-
}), W = Mo(e.placement), se = nh(e.placement), ce = !se, Q = Rv(W), Oe = t6(Q), ke = e.modifiersData.popperOffsets, Pe = e.rects.reference, Xe = e.rects.popper, ze = typeof
|
42251
|
+
}), W = Mo(e.placement), se = nh(e.placement), ce = !se, Q = Rv(W), Oe = t6(Q), ke = e.modifiersData.popperOffsets, Pe = e.rects.reference, Xe = e.rects.popper, ze = typeof F == "function" ? F(Object.assign({}, e.rects, {
|
42259
42252
|
placement: e.placement
|
42260
|
-
})) :
|
42253
|
+
})) : F, Qe = typeof ze == "number" ? {
|
42261
42254
|
mainAxis: ze,
|
42262
42255
|
altAxis: ze
|
42263
42256
|
} : Object.assign({
|
@@ -42400,7 +42393,7 @@ function d6(t) {
|
|
42400
42393
|
state: S,
|
42401
42394
|
setOptions: function(W) {
|
42402
42395
|
var se = typeof W == "function" ? W(S.options) : W;
|
42403
|
-
|
42396
|
+
F(), S.options = Object.assign({}, l, S.options, se), S.scrollParents = {
|
42404
42397
|
reference: Sc(a) ? Ud(a) : a.contextElement ? Ud(a.contextElement) : [],
|
42405
42398
|
popper: Ud(g)
|
42406
42399
|
};
|
@@ -42448,7 +42441,7 @@ function d6(t) {
|
|
42448
42441
|
});
|
42449
42442
|
}),
|
42450
42443
|
destroy: function() {
|
42451
|
-
|
42444
|
+
F(), M = !0;
|
42452
42445
|
}
|
42453
42446
|
};
|
42454
42447
|
if (!Qw(a, g))
|
@@ -42471,7 +42464,7 @@ function d6(t) {
|
|
42471
42464
|
}
|
42472
42465
|
});
|
42473
42466
|
}
|
42474
|
-
function
|
42467
|
+
function F() {
|
42475
42468
|
k.forEach(function(V) {
|
42476
42469
|
return V();
|
42477
42470
|
}), k = [];
|
@@ -42585,8 +42578,8 @@ function C6(t, e) {
|
|
42585
42578
|
var l = r.popperRect, u = r.popperState, a = r.props, g = a.interactiveBorder, _ = b6(u.placement), S = u.modifiersData.offset;
|
42586
42579
|
if (!S)
|
42587
42580
|
return !0;
|
42588
|
-
var k = _ === "bottom" ? S.top.y : 0, M = _ === "top" ? S.bottom.y : 0, P = _ === "right" ? S.left.x : 0, I = _ === "left" ? S.right.x : 0,
|
42589
|
-
return
|
42581
|
+
var k = _ === "bottom" ? S.top.y : 0, M = _ === "top" ? S.bottom.y : 0, P = _ === "right" ? S.left.x : 0, I = _ === "left" ? S.right.x : 0, F = l.top - n + k > g, V = n - l.bottom - M > g, W = l.left - i + P > g, se = i - l.right - I > g;
|
42582
|
+
return F || V || W || se;
|
42590
42583
|
});
|
42591
42584
|
}
|
42592
42585
|
function E0(t, e, i) {
|
@@ -42844,7 +42837,7 @@ function zM(t) {
|
|
42844
42837
|
zM.$$tippy = !0;
|
42845
42838
|
var V6 = 1, Yf = [], A0 = [];
|
42846
42839
|
function j6(t, e) {
|
42847
|
-
var i = aS(t, Object.assign({}, fs, DM(iS(e)))), n, r, l, u = !1, a = !1, g = !1, _ = !1, S, k, M, P = [], I = eS(Dt, i.interactiveDebounce),
|
42840
|
+
var i = aS(t, Object.assign({}, fs, DM(iS(e)))), n, r, l, u = !1, a = !1, g = !1, _ = !1, S, k, M, P = [], I = eS(Dt, i.interactiveDebounce), F, V = V6++, W = null, se = x6(i.plugins), ce = {
|
42848
42841
|
// Is the instance currently enabled?
|
42849
42842
|
isEnabled: !0,
|
42850
42843
|
// Is the tippy currently showing and not transitioning out?
|
@@ -42900,7 +42893,7 @@ function j6(t, e) {
|
|
42900
42893
|
return !!((we = Q.props.render) != null && we.$$tippy);
|
42901
42894
|
}
|
42902
42895
|
function yt() {
|
42903
|
-
return
|
42896
|
+
return F || t;
|
42904
42897
|
}
|
42905
42898
|
function Nt() {
|
42906
42899
|
var we = yt().parentNode;
|
@@ -43041,7 +43034,7 @@ function j6(t, e) {
|
|
43041
43034
|
var Fe, bt = !1;
|
43042
43035
|
if (!(!Q.state.isEnabled || Ci(we) || a)) {
|
43043
43036
|
var qt = ((Fe = S) == null ? void 0 : Fe.type) === "focus";
|
43044
|
-
S = we,
|
43037
|
+
S = we, F = we.currentTarget, bi(), !Q.state.isVisible && S6(we) && Yf.forEach(function(et) {
|
43045
43038
|
return et(we);
|
43046
43039
|
}), we.type === "click" && (Q.props.trigger.indexOf("mouseenter") < 0 || u) && Q.props.hideOnClick !== !1 && Q.state.isVisible ? bt = !0 : sr(we), we.type === "click" && (u = !bt), bt && !qt && Cn(we);
|
43047
43040
|
}
|
@@ -43292,8 +43285,8 @@ uh.setDefaultProps({
|
|
43292
43285
|
class U6 {
|
43293
43286
|
constructor({ editor: e, element: i, view: n, tippyOptions: r = {}, updateDelay: l = 250, shouldShow: u }) {
|
43294
43287
|
this.preventHide = !1, this.shouldShow = ({ view: a, state: g, from: _, to: S }) => {
|
43295
|
-
const { doc: k, selection: M } = g, { empty: P } = M, I = !k.textBetween(_, S).length && Cv(g.selection),
|
43296
|
-
return !(!(a.hasFocus() ||
|
43288
|
+
const { doc: k, selection: M } = g, { empty: P } = M, I = !k.textBetween(_, S).length && Cv(g.selection), F = this.element.contains(document.activeElement);
|
43289
|
+
return !(!(a.hasFocus() || F) || P || I || !this.editor.isEditable);
|
43297
43290
|
}, this.mousedownHandler = () => {
|
43298
43291
|
this.preventHide = !0;
|
43299
43292
|
}, this.dragstartHandler = () => {
|
@@ -43316,8 +43309,8 @@ class U6 {
|
|
43316
43309
|
}, this.updateDelay));
|
43317
43310
|
}, this.updateHandler = (a, g, _, S) => {
|
43318
43311
|
var k, M, P;
|
43319
|
-
const { state: I, composing:
|
43320
|
-
if (
|
43312
|
+
const { state: I, composing: F } = a, { selection: V } = I;
|
43313
|
+
if (F || !g && !_)
|
43321
43314
|
return;
|
43322
43315
|
this.createTooltip();
|
43323
43316
|
const { ranges: se } = V, ce = Math.min(...se.map((ke) => ke.$from.pos)), Q = Math.max(...se.map((ke) => ke.$to.pos));
|
@@ -44667,8 +44660,8 @@ class Qs {
|
|
44667
44660
|
u = Math.min(u, P);
|
44668
44661
|
let I = l.maps[P];
|
44669
44662
|
if (M.step) {
|
44670
|
-
let
|
44671
|
-
V && a++, n.push(new xo(I,
|
44663
|
+
let F = e.steps[P].invert(e.docs[P]), V = M.selection && M.selection.map(l.slice(g + 1, P));
|
44664
|
+
V && a++, n.push(new xo(I, F, V));
|
44672
44665
|
} else
|
44673
44666
|
n.push(new xo(I));
|
44674
44667
|
}, r);
|
@@ -45129,9 +45122,9 @@ const $M = NM(!1, !0), VM = NM(!0, !0), Aj = Gn.create({
|
|
45129
45122
|
}), Vj = Gn.create({
|
45130
45123
|
name: "starterKit",
|
45131
45124
|
addExtensions() {
|
45132
|
-
var t, e, i, n, r, l, u, a, g, _, S, k, M, P, I,
|
45125
|
+
var t, e, i, n, r, l, u, a, g, _, S, k, M, P, I, F, V, W;
|
45133
45126
|
const se = [];
|
45134
|
-
return this.options.bold !== !1 && se.push(Q6.configure((t = this.options) === null || t === void 0 ? void 0 : t.bold)), this.options.blockquote !== !1 && se.push(Z6.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && se.push(ej.configure((i = this.options) === null || i === void 0 ? void 0 : i.bulletList)), this.options.code !== !1 && se.push(nj.configure((n = this.options) === null || n === void 0 ? void 0 : n.code)), this.options.codeBlock !== !1 && se.push(FM.configure((r = this.options) === null || r === void 0 ? void 0 : r.codeBlock)), this.options.document !== !1 && se.push(oj.configure((l = this.options) === null || l === void 0 ? void 0 : l.document)), this.options.dropcursor !== !1 && se.push(cj.configure((u = this.options) === null || u === void 0 ? void 0 : u.dropcursor)), this.options.gapcursor !== !1 && se.push(yj.configure((a = this.options) === null || a === void 0 ? void 0 : a.gapcursor)), this.options.hardBreak !== !1 && se.push(_j.configure((g = this.options) === null || g === void 0 ? void 0 : g.hardBreak)), this.options.heading !== !1 && se.push(vj.configure((_ = this.options) === null || _ === void 0 ? void 0 : _.heading)), this.options.history !== !1 && se.push(Aj.configure((S = this.options) === null || S === void 0 ? void 0 : S.history)), this.options.horizontalRule !== !1 && se.push(Pj.configure((k = this.options) === null || k === void 0 ? void 0 : k.horizontalRule)), this.options.italic !== !1 && se.push(Rj.configure((M = this.options) === null || M === void 0 ? void 0 : M.italic)), this.options.listItem !== !1 && se.push($v.configure((P = this.options) === null || P === void 0 ? void 0 : P.listItem)), this.options.orderedList !== !1 && se.push(Lj.configure((I = this.options) === null || I === void 0 ? void 0 : I.orderedList)), this.options.paragraph !== !1 && se.push(Fj.configure((
|
45127
|
+
return this.options.bold !== !1 && se.push(Q6.configure((t = this.options) === null || t === void 0 ? void 0 : t.bold)), this.options.blockquote !== !1 && se.push(Z6.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && se.push(ej.configure((i = this.options) === null || i === void 0 ? void 0 : i.bulletList)), this.options.code !== !1 && se.push(nj.configure((n = this.options) === null || n === void 0 ? void 0 : n.code)), this.options.codeBlock !== !1 && se.push(FM.configure((r = this.options) === null || r === void 0 ? void 0 : r.codeBlock)), this.options.document !== !1 && se.push(oj.configure((l = this.options) === null || l === void 0 ? void 0 : l.document)), this.options.dropcursor !== !1 && se.push(cj.configure((u = this.options) === null || u === void 0 ? void 0 : u.dropcursor)), this.options.gapcursor !== !1 && se.push(yj.configure((a = this.options) === null || a === void 0 ? void 0 : a.gapcursor)), this.options.hardBreak !== !1 && se.push(_j.configure((g = this.options) === null || g === void 0 ? void 0 : g.hardBreak)), this.options.heading !== !1 && se.push(vj.configure((_ = this.options) === null || _ === void 0 ? void 0 : _.heading)), this.options.history !== !1 && se.push(Aj.configure((S = this.options) === null || S === void 0 ? void 0 : S.history)), this.options.horizontalRule !== !1 && se.push(Pj.configure((k = this.options) === null || k === void 0 ? void 0 : k.horizontalRule)), this.options.italic !== !1 && se.push(Rj.configure((M = this.options) === null || M === void 0 ? void 0 : M.italic)), this.options.listItem !== !1 && se.push($v.configure((P = this.options) === null || P === void 0 ? void 0 : P.listItem)), this.options.orderedList !== !1 && se.push(Lj.configure((I = this.options) === null || I === void 0 ? void 0 : I.orderedList)), this.options.paragraph !== !1 && se.push(Fj.configure((F = this.options) === null || F === void 0 ? void 0 : F.paragraph)), this.options.strike !== !1 && se.push($j.configure((V = this.options) === null || V === void 0 ? void 0 : V.strike)), this.options.text !== !1 && se.push(jM.configure((W = this.options) === null || W === void 0 ? void 0 : W.text)), se;
|
45135
45128
|
}
|
45136
45129
|
}), jj = Gn.create({
|
45137
45130
|
name: "color",
|
@@ -45174,8 +45167,8 @@ function Uj(t) {
|
|
45174
45167
|
const M = u.pos - k.length, P = Array.from(k.matchAll(S)).pop();
|
45175
45168
|
if (!P || P.input === void 0 || P.index === void 0)
|
45176
45169
|
return null;
|
45177
|
-
const I = P.input.slice(Math.max(0, P.index - 1), P.index),
|
45178
|
-
if (r !== null && !
|
45170
|
+
const I = P.input.slice(Math.max(0, P.index - 1), P.index), F = new RegExp(`^[${r == null ? void 0 : r.join("")}\0]?$`).test(I);
|
45171
|
+
if (r !== null && !F)
|
45179
45172
|
return null;
|
45180
45173
|
const V = M + P.index;
|
45181
45174
|
let W = V + P[0].length;
|
@@ -45191,7 +45184,7 @@ function Uj(t) {
|
|
45191
45184
|
const Hj = new Qr("suggestion");
|
45192
45185
|
function qj({ pluginKey: t = Hj, editor: e, char: i = "@", allowSpaces: n = !1, allowedPrefixes: r = [" "], startOfLine: l = !1, decorationTag: u = "span", decorationClass: a = "suggestion", command: g = () => null, items: _ = () => [], render: S = () => ({}), allow: k = () => !0, findSuggestionMatch: M = Uj }) {
|
45193
45186
|
let P;
|
45194
|
-
const I = S == null ? void 0 : S(),
|
45187
|
+
const I = S == null ? void 0 : S(), F = new nr({
|
45195
45188
|
key: t,
|
45196
45189
|
view() {
|
45197
45190
|
return {
|
@@ -45272,12 +45265,12 @@ function qj({ pluginKey: t = Hj, editor: e, char: i = "@", allowSpaces: n = !1,
|
|
45272
45265
|
// Call the keydown hook if suggestion is active.
|
45273
45266
|
handleKeyDown(V, W) {
|
45274
45267
|
var se;
|
45275
|
-
const { active: ce, range: Q } =
|
45268
|
+
const { active: ce, range: Q } = F.getState(V.state);
|
45276
45269
|
return ce && ((se = I == null ? void 0 : I.onKeyDown) === null || se === void 0 ? void 0 : se.call(I, { view: V, event: W, range: Q })) || !1;
|
45277
45270
|
},
|
45278
45271
|
// Setup decorator on the currently active suggestion.
|
45279
45272
|
decorations(V) {
|
45280
|
-
const { active: W, range: se, decorationId: ce } =
|
45273
|
+
const { active: W, range: se, decorationId: ce } = F.getState(V);
|
45281
45274
|
return W ? Tn.create(V.doc, [
|
45282
45275
|
ms.inline(se.from, se.to, {
|
45283
45276
|
nodeName: u,
|
@@ -45288,7 +45281,7 @@ function qj({ pluginKey: t = Hj, editor: e, char: i = "@", allowSpaces: n = !1,
|
|
45288
45281
|
}
|
45289
45282
|
}
|
45290
45283
|
});
|
45291
|
-
return
|
45284
|
+
return F;
|
45292
45285
|
}
|
45293
45286
|
const Wj = new Qr("mention"), Gj = Ws.create({
|
45294
45287
|
name: "mention",
|
@@ -46667,18 +46660,18 @@ const XU = /* @__PURE__ */ Pt(qU, [["render", YU]]), KU = { class: "overflow-x-a
|
|
46667
46660
|
]),
|
46668
46661
|
Z("tbody", tH, [
|
46669
46662
|
(xe(!0), Me(xi, null, Qi(u.value, (P, I) => (xe(), Me("tr", { key: I }, [
|
46670
|
-
(xe(!0), Me(xi, null, Qi(t.columns, (
|
46663
|
+
(xe(!0), Me(xi, null, Qi(t.columns, (F, V) => (xe(), Me("td", {
|
46671
46664
|
key: V,
|
46672
46665
|
class: "px-6 py-4 text-sm font-medium text-gray-800 dark:text-neutral-200"
|
46673
|
-
}, St(P == null ? void 0 : P[
|
46666
|
+
}, St(P == null ? void 0 : P[F.name]), 1))), 128))
|
46674
46667
|
]))), 128))
|
46675
46668
|
])
|
46676
46669
|
], 64)) : (xe(), Me("tbody", iH, [
|
46677
46670
|
(xe(!0), Me(xi, null, Qi(u.value, (P, I) => (xe(), Me("tr", { key: I }, [
|
46678
|
-
(xe(!0), Me(xi, null, Qi(P, (
|
46671
|
+
(xe(!0), Me(xi, null, Qi(P, (F, V) => (xe(), Me("td", {
|
46679
46672
|
key: V,
|
46680
46673
|
class: "px-6 py-4 text-sm font-medium text-gray-800 dark:text-neutral-200"
|
46681
|
-
}, St(
|
46674
|
+
}, St(F), 1))), 128))
|
46682
46675
|
]))), 128))
|
46683
46676
|
]))
|
46684
46677
|
])
|
@@ -47630,7 +47623,7 @@ function yq(t, e, i, n, r, l) {
|
|
47630
47623
|
], 40, gq))), 128))
|
47631
47624
|
]);
|
47632
47625
|
}
|
47633
|
-
const _q = /* @__PURE__ */ Pt(fq, [["render", yq], ["__scopeId", "data-v-
|
47626
|
+
const _q = /* @__PURE__ */ Pt(fq, [["render", yq], ["__scopeId", "data-v-87c0b333"]]), vq = {
|
47634
47627
|
components: {
|
47635
47628
|
VsNoData: eq,
|
47636
47629
|
VsChoceColor: HM,
|
@@ -47716,7 +47709,7 @@ const _q = /* @__PURE__ */ Pt(fq, [["render", yq], ["__scopeId", "data-v-293d773
|
|
47716
47709
|
style: { "max-height": "calc(100vh - 300px)", width: "calc(100vw - 1000px)" }
|
47717
47710
|
}, wq = { class: "flex items-end w-full gap-[4px]" };
|
47718
47711
|
function Sq(t, e, i, n, r, l) {
|
47719
|
-
var k, M, P, I,
|
47712
|
+
var k, M, P, I, F;
|
47720
47713
|
const u = At("VsForm"), a = At("VsChoceColor"), g = At("IconCheck"), _ = At("VsReesterUsersList"), S = At("VsNoData");
|
47721
47714
|
return xe(), Me("div", xq, [
|
47722
47715
|
(M = (k = t.$route) == null ? void 0 : k.query) != null && M.name ? (xe(), Me("div", bq, [
|
@@ -47746,7 +47739,7 @@ function Sq(t, e, i, n, r, l) {
|
|
47746
47739
|
]),
|
47747
47740
|
(I = (P = r.data) == null ? void 0 : P.children) != null && I.length ? (xe(), en(_, {
|
47748
47741
|
key: 0,
|
47749
|
-
list: (
|
47742
|
+
list: (F = r.data) == null ? void 0 : F.children,
|
47750
47743
|
onUpdateList: l.updateChildren
|
47751
47744
|
}, null, 8, ["list", "onUpdateList"])) : Gr("", !0)
|
47752
47745
|
])) : (xe(), en(S, {
|
@@ -47782,15 +47775,15 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
|
|
47782
47775
|
i.menu ? e.push(...qM(i.menu)) : e.push(i);
|
47783
47776
|
}), e;
|
47784
47777
|
}, Pq = gr(null), gS = gr(!1), Iq = ({ token: t, api: e, id: i, form: n }) => new Promise((r) => {
|
47785
|
-
var
|
47786
|
-
const { VsDialog: l, VsForm: u } = (
|
47787
|
-
if (!
|
47778
|
+
var k, M, P, I;
|
47779
|
+
const { VsDialog: l, VsForm: u } = (M = (k = window.app) == null ? void 0 : k._context) == null ? void 0 : M.components, { $notify: a } = (I = (P = window.app) == null ? void 0 : P.config) == null ? void 0 : I.globalProperties, g = document.querySelector("#modal");
|
47780
|
+
if (!g) {
|
47788
47781
|
console.error('Modal root element with id "#modal" not found!');
|
47789
47782
|
return;
|
47790
47783
|
}
|
47791
|
-
const
|
47792
|
-
|
47793
|
-
const
|
47784
|
+
const _ = document.createElement("div");
|
47785
|
+
g.appendChild(_);
|
47786
|
+
const S = kS({
|
47794
47787
|
components: { VsDialog: l, VsForm: u },
|
47795
47788
|
data() {
|
47796
47789
|
return {
|
@@ -47800,31 +47793,39 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
|
|
47800
47793
|
};
|
47801
47794
|
},
|
47802
47795
|
methods: {
|
47803
|
-
close(
|
47804
|
-
this.visible = !1, this.$el.remove(),
|
47796
|
+
close(F) {
|
47797
|
+
this.visible = !1, this.$el.remove(), S.unmount(), r(F || "Success");
|
47805
47798
|
},
|
47806
47799
|
async getFormScheme() {
|
47807
47800
|
try {
|
47808
47801
|
if (t) {
|
47809
|
-
const
|
47810
|
-
this.formValues =
|
47802
|
+
const V = await Ct.get(`/api/table/${t}`);
|
47803
|
+
this.formValues = V.data;
|
47811
47804
|
}
|
47812
|
-
const { data:
|
47813
|
-
this.scheme = (
|
47814
|
-
} catch (
|
47815
|
-
console.error("Error fetching form scheme:",
|
47805
|
+
const { data: F } = await Ct.get(`/api/template/form/${t || n}`);
|
47806
|
+
this.scheme = (F == null ? void 0 : F.schema) || F;
|
47807
|
+
} catch (F) {
|
47808
|
+
console.error("Error fetching form scheme:", F);
|
47816
47809
|
} finally {
|
47817
47810
|
this.visible = !0;
|
47818
47811
|
}
|
47819
47812
|
},
|
47820
47813
|
async updateData() {
|
47821
|
-
const
|
47814
|
+
const F = this.$refs.form;
|
47822
47815
|
try {
|
47823
|
-
await
|
47824
|
-
const { data:
|
47825
|
-
gS.value = !gS.value, this.visible = !1, this.close(
|
47826
|
-
|
47827
|
-
|
47816
|
+
await F.doValidation();
|
47817
|
+
const { data: V } = await Ct.put(`${e || "/api/table/"}${t || i}`, this.formValues);
|
47818
|
+
gS.value = !gS.value, this.visible = !1, this.close(V), a({
|
47819
|
+
title: "Успішно!",
|
47820
|
+
type: "success",
|
47821
|
+
message: "Операція виконана успішно"
|
47822
|
+
});
|
47823
|
+
} catch {
|
47824
|
+
a({
|
47825
|
+
title: "Помилка!",
|
47826
|
+
type: "error",
|
47827
|
+
message: "Сталася помилка"
|
47828
|
+
});
|
47828
47829
|
}
|
47829
47830
|
}
|
47830
47831
|
},
|
@@ -47851,17 +47852,17 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
|
|
47851
47852
|
</div>
|
47852
47853
|
`
|
47853
47854
|
});
|
47854
|
-
|
47855
|
+
S.mount(_);
|
47855
47856
|
}), Dq = ({ api: t, confirm: e, method: i }) => new Promise((n) => {
|
47856
|
-
var
|
47857
|
-
const { VsDialog: r } = (
|
47858
|
-
if (!
|
47857
|
+
var _, S, k, M;
|
47858
|
+
const { VsDialog: r } = (S = (_ = window.app) == null ? void 0 : _._context) == null ? void 0 : S.components, { $notify: l } = (M = (k = window.app) == null ? void 0 : k.config) == null ? void 0 : M.globalProperties, u = document.querySelector("#modal");
|
47859
|
+
if (!u) {
|
47859
47860
|
console.error('Modal root element with id "#modal" not found!');
|
47860
47861
|
return;
|
47861
47862
|
}
|
47862
|
-
const
|
47863
|
-
|
47864
|
-
const
|
47863
|
+
const a = document.createElement("div");
|
47864
|
+
u.appendChild(a);
|
47865
|
+
const g = kS({
|
47865
47866
|
components: { VsDialog: r },
|
47866
47867
|
data() {
|
47867
47868
|
return {
|
@@ -47870,18 +47871,26 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
|
|
47870
47871
|
};
|
47871
47872
|
},
|
47872
47873
|
methods: {
|
47873
|
-
close(
|
47874
|
-
this.visible = !1, this.$el.remove(),
|
47874
|
+
close(P) {
|
47875
|
+
this.visible = !1, this.$el.remove(), g.unmount(), n(P || "Success");
|
47875
47876
|
},
|
47876
47877
|
async doRequest() {
|
47877
47878
|
try {
|
47878
|
-
const { data:
|
47879
|
+
const { data: P } = await Ct({
|
47879
47880
|
url: t || "",
|
47880
47881
|
method: i || "POST"
|
47881
47882
|
});
|
47882
|
-
this.close(
|
47883
|
-
|
47884
|
-
|
47883
|
+
this.close(P), l({
|
47884
|
+
title: "Успішно!",
|
47885
|
+
type: "success",
|
47886
|
+
message: "Операція виконана успішно"
|
47887
|
+
});
|
47888
|
+
} catch {
|
47889
|
+
l({
|
47890
|
+
title: "Помилка!",
|
47891
|
+
type: "error",
|
47892
|
+
message: "Сталася помилка"
|
47893
|
+
});
|
47885
47894
|
}
|
47886
47895
|
}
|
47887
47896
|
},
|
@@ -47917,7 +47926,7 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
|
|
47917
47926
|
</div>
|
47918
47927
|
`
|
47919
47928
|
});
|
47920
|
-
|
47929
|
+
g.mount(a);
|
47921
47930
|
}), yS = { $form: Iq, $api: Dq }, Oq = async () => {
|
47922
47931
|
try {
|
47923
47932
|
const { data: t } = await Ct.get("/api/user-menu");
|