@malloydata/render 0.0.203-dev241022191525 → 0.0.203-dev241022210817
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/index.mjs +11409 -11647
- package/dist/module/index.umd.js +248 -248
- package/dist/register/register.mjs +322 -318
- package/dist/register/register.umd.js +1 -1
- package/dist/webcomponent/malloy-render.mjs +322 -318
- package/dist/webcomponent/malloy-render.umd.js +1 -1
- package/package.json +2 -2
|
@@ -1407,10 +1407,10 @@ var F0 = {}, Ve = {};
|
|
|
1407
1407
|
return Q === void 0 ? !1 : Q.by === "name";
|
|
1408
1408
|
}
|
|
1409
1409
|
t.isByExpression = X;
|
|
1410
|
-
function
|
|
1410
|
+
function se(Q) {
|
|
1411
1411
|
return typeof Q != "string";
|
|
1412
1412
|
}
|
|
1413
|
-
t.refIsStructDef =
|
|
1413
|
+
t.refIsStructDef = se;
|
|
1414
1414
|
function oe(Q) {
|
|
1415
1415
|
return !!((Q.type === "reduce" || Q.type === "project" || Q.type === "partial") && (Q.extendSource && Q.extendSource.some((fe) => fe.type === "error") || Q.queryFields.some((fe) => fe.type === "error")));
|
|
1416
1416
|
}
|
|
@@ -2198,7 +2198,7 @@ var L0 = {}, JQ = {};
|
|
|
2198
2198
|
takes: { value: "string" },
|
|
2199
2199
|
returns: "string",
|
|
2200
2200
|
impl: { function: "REVERSE" }
|
|
2201
|
-
},
|
|
2201
|
+
}, se = {
|
|
2202
2202
|
to_integer: {
|
|
2203
2203
|
takes: { value: "number" },
|
|
2204
2204
|
returns: "number",
|
|
@@ -2504,7 +2504,7 @@ var L0 = {}, JQ = {};
|
|
|
2504
2504
|
repeat: J,
|
|
2505
2505
|
replace: ne,
|
|
2506
2506
|
reverse: X,
|
|
2507
|
-
round:
|
|
2507
|
+
round: se,
|
|
2508
2508
|
rtrim: oe,
|
|
2509
2509
|
sign: Ee,
|
|
2510
2510
|
sin: D,
|
|
@@ -6411,12 +6411,12 @@ var Ede = function(e) {
|
|
|
6411
6411
|
return ne(ee);
|
|
6412
6412
|
}
|
|
6413
6413
|
t.isWeakSet = X;
|
|
6414
|
-
function
|
|
6414
|
+
function se(ee) {
|
|
6415
6415
|
return a(ee) === "[object ArrayBuffer]";
|
|
6416
6416
|
}
|
|
6417
|
-
|
|
6417
|
+
se.working = typeof ArrayBuffer < "u" && se(new ArrayBuffer());
|
|
6418
6418
|
function oe(ee) {
|
|
6419
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
6419
|
+
return typeof ArrayBuffer > "u" ? !1 : se.working ? se(ee) : ee instanceof ArrayBuffer;
|
|
6420
6420
|
}
|
|
6421
6421
|
t.isArrayBuffer = oe;
|
|
6422
6422
|
function Ee(ee) {
|
|
@@ -6831,15 +6831,15 @@ var Cde = FO.exports;
|
|
|
6831
6831
|
function X(D, k) {
|
|
6832
6832
|
return Object.prototype.hasOwnProperty.call(D, k);
|
|
6833
6833
|
}
|
|
6834
|
-
var
|
|
6834
|
+
var se = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
6835
6835
|
t.promisify = function(k) {
|
|
6836
6836
|
if (typeof k != "function")
|
|
6837
6837
|
throw new TypeError('The "original" argument must be of type Function');
|
|
6838
|
-
if (
|
|
6839
|
-
var j = k[
|
|
6838
|
+
if (se && k[se]) {
|
|
6839
|
+
var j = k[se];
|
|
6840
6840
|
if (typeof j != "function")
|
|
6841
6841
|
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
6842
|
-
return Object.defineProperty(j,
|
|
6842
|
+
return Object.defineProperty(j, se, {
|
|
6843
6843
|
value: j,
|
|
6844
6844
|
enumerable: !1,
|
|
6845
6845
|
writable: !1,
|
|
@@ -6861,7 +6861,7 @@ var Cde = FO.exports;
|
|
|
6861
6861
|
}
|
|
6862
6862
|
return $;
|
|
6863
6863
|
}
|
|
6864
|
-
return Object.setPrototypeOf(j, Object.getPrototypeOf(k)),
|
|
6864
|
+
return Object.setPrototypeOf(j, Object.getPrototypeOf(k)), se && Object.defineProperty(j, se, {
|
|
6865
6865
|
value: j,
|
|
6866
6866
|
enumerable: !1,
|
|
6867
6867
|
writable: !1,
|
|
@@ -6870,7 +6870,7 @@ var Cde = FO.exports;
|
|
|
6870
6870
|
j,
|
|
6871
6871
|
n(k)
|
|
6872
6872
|
);
|
|
6873
|
-
}, t.promisify.custom =
|
|
6873
|
+
}, t.promisify.custom = se;
|
|
6874
6874
|
function oe(D, k) {
|
|
6875
6875
|
if (!D) {
|
|
6876
6876
|
var j = new Error("Promise was rejected with a falsy value");
|
|
@@ -7080,20 +7080,20 @@ function bde() {
|
|
|
7080
7080
|
if (zB)
|
|
7081
7081
|
return UT;
|
|
7082
7082
|
zB = 1;
|
|
7083
|
-
function t(X,
|
|
7083
|
+
function t(X, se) {
|
|
7084
7084
|
var oe = Object.keys(X);
|
|
7085
7085
|
if (Object.getOwnPropertySymbols) {
|
|
7086
7086
|
var Ee = Object.getOwnPropertySymbols(X);
|
|
7087
|
-
|
|
7087
|
+
se && (Ee = Ee.filter(function(D) {
|
|
7088
7088
|
return Object.getOwnPropertyDescriptor(X, D).enumerable;
|
|
7089
7089
|
})), oe.push.apply(oe, Ee);
|
|
7090
7090
|
}
|
|
7091
7091
|
return oe;
|
|
7092
7092
|
}
|
|
7093
7093
|
function e(X) {
|
|
7094
|
-
for (var
|
|
7095
|
-
var oe = arguments[
|
|
7096
|
-
|
|
7094
|
+
for (var se = 1; se < arguments.length; se++) {
|
|
7095
|
+
var oe = arguments[se] != null ? arguments[se] : {};
|
|
7096
|
+
se % 2 ? t(Object(oe), !0).forEach(function(Ee) {
|
|
7097
7097
|
n(X, Ee, oe[Ee]);
|
|
7098
7098
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(X, Object.getOwnPropertyDescriptors(oe)) : t(Object(oe)).forEach(function(Ee) {
|
|
7099
7099
|
Object.defineProperty(X, Ee, Object.getOwnPropertyDescriptor(oe, Ee));
|
|
@@ -7101,48 +7101,48 @@ function bde() {
|
|
|
7101
7101
|
}
|
|
7102
7102
|
return X;
|
|
7103
7103
|
}
|
|
7104
|
-
function n(X,
|
|
7105
|
-
return
|
|
7104
|
+
function n(X, se, oe) {
|
|
7105
|
+
return se = o(se), se in X ? Object.defineProperty(X, se, { value: oe, enumerable: !0, configurable: !0, writable: !0 }) : X[se] = oe, X;
|
|
7106
7106
|
}
|
|
7107
|
-
function r(X,
|
|
7108
|
-
if (!(X instanceof
|
|
7107
|
+
function r(X, se) {
|
|
7108
|
+
if (!(X instanceof se))
|
|
7109
7109
|
throw new TypeError("Cannot call a class as a function");
|
|
7110
7110
|
}
|
|
7111
|
-
function i(X,
|
|
7112
|
-
for (var oe = 0; oe <
|
|
7113
|
-
var Ee =
|
|
7111
|
+
function i(X, se) {
|
|
7112
|
+
for (var oe = 0; oe < se.length; oe++) {
|
|
7113
|
+
var Ee = se[oe];
|
|
7114
7114
|
Ee.enumerable = Ee.enumerable || !1, Ee.configurable = !0, "value" in Ee && (Ee.writable = !0), Object.defineProperty(X, o(Ee.key), Ee);
|
|
7115
7115
|
}
|
|
7116
7116
|
}
|
|
7117
|
-
function s(X,
|
|
7118
|
-
return
|
|
7117
|
+
function s(X, se, oe) {
|
|
7118
|
+
return se && i(X.prototype, se), oe && i(X, oe), Object.defineProperty(X, "prototype", { writable: !1 }), X;
|
|
7119
7119
|
}
|
|
7120
7120
|
function o(X) {
|
|
7121
|
-
var
|
|
7122
|
-
return E(
|
|
7121
|
+
var se = u(X, "string");
|
|
7122
|
+
return E(se) === "symbol" ? se : String(se);
|
|
7123
7123
|
}
|
|
7124
|
-
function u(X,
|
|
7124
|
+
function u(X, se) {
|
|
7125
7125
|
if (E(X) !== "object" || X === null)
|
|
7126
7126
|
return X;
|
|
7127
7127
|
var oe = X[Symbol.toPrimitive];
|
|
7128
7128
|
if (oe !== void 0) {
|
|
7129
|
-
var Ee = oe.call(X,
|
|
7129
|
+
var Ee = oe.call(X, se || "default");
|
|
7130
7130
|
if (E(Ee) !== "object")
|
|
7131
7131
|
return Ee;
|
|
7132
7132
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7133
7133
|
}
|
|
7134
|
-
return (
|
|
7134
|
+
return (se === "string" ? String : Number)(X);
|
|
7135
7135
|
}
|
|
7136
|
-
function a(X,
|
|
7137
|
-
if (typeof
|
|
7136
|
+
function a(X, se) {
|
|
7137
|
+
if (typeof se != "function" && se !== null)
|
|
7138
7138
|
throw new TypeError("Super expression must either be null or a function");
|
|
7139
|
-
X.prototype = Object.create(
|
|
7139
|
+
X.prototype = Object.create(se && se.prototype, { constructor: { value: X, writable: !0, configurable: !0 } }), Object.defineProperty(X, "prototype", { writable: !1 }), se && g(X, se);
|
|
7140
7140
|
}
|
|
7141
7141
|
function l(X) {
|
|
7142
|
-
var
|
|
7142
|
+
var se = p();
|
|
7143
7143
|
return function() {
|
|
7144
7144
|
var Ee = y(X), D;
|
|
7145
|
-
if (
|
|
7145
|
+
if (se) {
|
|
7146
7146
|
var k = y(this).constructor;
|
|
7147
7147
|
D = Reflect.construct(Ee, arguments, k);
|
|
7148
7148
|
} else
|
|
@@ -7150,10 +7150,10 @@ function bde() {
|
|
|
7150
7150
|
return c(this, D);
|
|
7151
7151
|
};
|
|
7152
7152
|
}
|
|
7153
|
-
function c(X,
|
|
7154
|
-
if (
|
|
7155
|
-
return
|
|
7156
|
-
if (
|
|
7153
|
+
function c(X, se) {
|
|
7154
|
+
if (se && (E(se) === "object" || typeof se == "function"))
|
|
7155
|
+
return se;
|
|
7156
|
+
if (se !== void 0)
|
|
7157
7157
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
7158
7158
|
return f(X);
|
|
7159
7159
|
}
|
|
@@ -7163,16 +7163,16 @@ function bde() {
|
|
|
7163
7163
|
return X;
|
|
7164
7164
|
}
|
|
7165
7165
|
function x(X) {
|
|
7166
|
-
var
|
|
7166
|
+
var se = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
7167
7167
|
return x = function(Ee) {
|
|
7168
7168
|
if (Ee === null || !m(Ee))
|
|
7169
7169
|
return Ee;
|
|
7170
7170
|
if (typeof Ee != "function")
|
|
7171
7171
|
throw new TypeError("Super expression must either be null or a function");
|
|
7172
|
-
if (typeof
|
|
7173
|
-
if (
|
|
7174
|
-
return
|
|
7175
|
-
|
|
7172
|
+
if (typeof se < "u") {
|
|
7173
|
+
if (se.has(Ee))
|
|
7174
|
+
return se.get(Ee);
|
|
7175
|
+
se.set(Ee, D);
|
|
7176
7176
|
}
|
|
7177
7177
|
function D() {
|
|
7178
7178
|
return h(Ee, arguments, y(this).constructor);
|
|
@@ -7180,7 +7180,7 @@ function bde() {
|
|
|
7180
7180
|
return D.prototype = Object.create(Ee.prototype, { constructor: { value: D, enumerable: !1, writable: !0, configurable: !0 } }), g(D, Ee);
|
|
7181
7181
|
}, x(X);
|
|
7182
7182
|
}
|
|
7183
|
-
function h(X,
|
|
7183
|
+
function h(X, se, oe) {
|
|
7184
7184
|
return p() ? h = Reflect.construct.bind() : h = function(D, k, j) {
|
|
7185
7185
|
var V = [null];
|
|
7186
7186
|
V.push.apply(V, k);
|
|
@@ -7203,10 +7203,10 @@ function bde() {
|
|
|
7203
7203
|
function m(X) {
|
|
7204
7204
|
return Function.toString.call(X).indexOf("[native code]") !== -1;
|
|
7205
7205
|
}
|
|
7206
|
-
function g(X,
|
|
7206
|
+
function g(X, se) {
|
|
7207
7207
|
return g = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(Ee, D) {
|
|
7208
7208
|
return Ee.__proto__ = D, Ee;
|
|
7209
|
-
}, g(X,
|
|
7209
|
+
}, g(X, se);
|
|
7210
7210
|
}
|
|
7211
7211
|
function y(X) {
|
|
7212
7212
|
return y = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(oe) {
|
|
@@ -7215,22 +7215,22 @@ function bde() {
|
|
|
7215
7215
|
}
|
|
7216
7216
|
function E(X) {
|
|
7217
7217
|
"@babel/helpers - typeof";
|
|
7218
|
-
return E = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
7219
|
-
return typeof
|
|
7220
|
-
} : function(
|
|
7221
|
-
return
|
|
7218
|
+
return E = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(se) {
|
|
7219
|
+
return typeof se;
|
|
7220
|
+
} : function(se) {
|
|
7221
|
+
return se && typeof Symbol == "function" && se.constructor === Symbol && se !== Symbol.prototype ? "symbol" : typeof se;
|
|
7222
7222
|
}, E(X);
|
|
7223
7223
|
}
|
|
7224
7224
|
var A = u0, v = A.inspect, _ = SG(), S = _.codes.ERR_INVALID_ARG_TYPE;
|
|
7225
|
-
function C(X,
|
|
7226
|
-
return (oe === void 0 || oe > X.length) && (oe = X.length), X.substring(oe -
|
|
7225
|
+
function C(X, se, oe) {
|
|
7226
|
+
return (oe === void 0 || oe > X.length) && (oe = X.length), X.substring(oe - se.length, oe) === se;
|
|
7227
7227
|
}
|
|
7228
|
-
function b(X,
|
|
7229
|
-
if (
|
|
7228
|
+
function b(X, se) {
|
|
7229
|
+
if (se = Math.floor(se), X.length == 0 || se == 0)
|
|
7230
7230
|
return "";
|
|
7231
|
-
var oe = X.length *
|
|
7232
|
-
for (
|
|
7233
|
-
X += X,
|
|
7231
|
+
var oe = X.length * se;
|
|
7232
|
+
for (se = Math.floor(Math.log(se) / Math.log(2)); se; )
|
|
7233
|
+
X += X, se--;
|
|
7234
7234
|
return X += X.substring(0, oe - X.length), X;
|
|
7235
7235
|
}
|
|
7236
7236
|
var R = "", O = "", L = "", M = "", H = {
|
|
@@ -7247,8 +7247,8 @@ function bde() {
|
|
|
7247
7247
|
notIdentical: "Values identical but not reference-equal:"
|
|
7248
7248
|
}, W = 10;
|
|
7249
7249
|
function G(X) {
|
|
7250
|
-
var
|
|
7251
|
-
return
|
|
7250
|
+
var se = Object.keys(X), oe = Object.create(Object.getPrototypeOf(X));
|
|
7251
|
+
return se.forEach(function(Ee) {
|
|
7252
7252
|
oe[Ee] = X[Ee];
|
|
7253
7253
|
}), Object.defineProperty(oe, "message", {
|
|
7254
7254
|
value: X.message
|
|
@@ -7275,14 +7275,14 @@ function bde() {
|
|
|
7275
7275
|
getters: !0
|
|
7276
7276
|
});
|
|
7277
7277
|
}
|
|
7278
|
-
function J(X,
|
|
7278
|
+
function J(X, se, oe) {
|
|
7279
7279
|
var Ee = "", D = "", k = 0, j = "", V = !1, U = K(X), $ = U.split(`
|
|
7280
|
-
`), T = K(
|
|
7280
|
+
`), T = K(se).split(`
|
|
7281
7281
|
`), N = 0, B = "";
|
|
7282
|
-
if (oe === "strictEqual" && E(X) === "object" && E(
|
|
7282
|
+
if (oe === "strictEqual" && E(X) === "object" && E(se) === "object" && X !== null && se !== null && (oe = "strictEqualObject"), $.length === 1 && T.length === 1 && $[0] !== T[0]) {
|
|
7283
7283
|
var q = $[0].length + T[0].length;
|
|
7284
7284
|
if (q <= W) {
|
|
7285
|
-
if ((E(X) !== "object" || X === null) && (E(
|
|
7285
|
+
if ((E(X) !== "object" || X === null) && (E(se) !== "object" || se === null) && (X !== 0 || se !== 0))
|
|
7286
7286
|
return "".concat(H[oe], `
|
|
7287
7287
|
|
|
7288
7288
|
`) + "".concat($[0], " !== ").concat(T[0], `
|
|
@@ -7351,7 +7351,7 @@ function bde() {
|
|
|
7351
7351
|
return "".concat(ee).concat(V ? xe : "", `
|
|
7352
7352
|
`).concat(D).concat(Ee).concat(j).concat(B);
|
|
7353
7353
|
}
|
|
7354
|
-
var ne = /* @__PURE__ */ function(X,
|
|
7354
|
+
var ne = /* @__PURE__ */ function(X, se) {
|
|
7355
7355
|
a(Ee, X);
|
|
7356
7356
|
var oe = l(Ee);
|
|
7357
7357
|
function Ee(D) {
|
|
@@ -7399,7 +7399,7 @@ should equal
|
|
|
7399
7399
|
return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
|
|
7400
7400
|
}
|
|
7401
7401
|
}, {
|
|
7402
|
-
key:
|
|
7402
|
+
key: se,
|
|
7403
7403
|
value: function(k, j) {
|
|
7404
7404
|
return v(this, e(e({}, j), {}, {
|
|
7405
7405
|
customInspect: !1,
|
|
@@ -7774,7 +7774,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7774
7774
|
}
|
|
7775
7775
|
return be < je ? -1 : je < be ? 1 : 0;
|
|
7776
7776
|
}
|
|
7777
|
-
var
|
|
7777
|
+
var se = !0, oe = !1, Ee = 0, D = 1, k = 2, j = 3;
|
|
7778
7778
|
function V(re, ce) {
|
|
7779
7779
|
return u ? re.source === ce.source && re.flags === ce.flags : RegExp.prototype.toString.call(re) === RegExp.prototype.toString.call(ce);
|
|
7780
7780
|
}
|
|
@@ -8036,7 +8036,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8036
8036
|
return B(re, ce, oe);
|
|
8037
8037
|
}
|
|
8038
8038
|
function mt(re, ce) {
|
|
8039
|
-
return B(re, ce,
|
|
8039
|
+
return B(re, ce, se);
|
|
8040
8040
|
}
|
|
8041
8041
|
return XT = {
|
|
8042
8042
|
isDeepEqual: rt,
|
|
@@ -8279,7 +8279,7 @@ function di() {
|
|
|
8279
8279
|
}
|
|
8280
8280
|
return $.prototype !== void 0 && U instanceof $ ? !0 : Error.isPrototypeOf($) ? !1 : $.call({}, U) === !0;
|
|
8281
8281
|
}
|
|
8282
|
-
function
|
|
8282
|
+
function se(U) {
|
|
8283
8283
|
if (typeof U != "function")
|
|
8284
8284
|
throw new l("fn", "Function", U);
|
|
8285
8285
|
try {
|
|
@@ -8357,7 +8357,7 @@ function di() {
|
|
|
8357
8357
|
O.throws = function U($) {
|
|
8358
8358
|
for (var T = arguments.length, N = new Array(T > 1 ? T - 1 : 0), B = 1; B < T; B++)
|
|
8359
8359
|
N[B - 1] = arguments[B];
|
|
8360
|
-
D.apply(void 0, [U,
|
|
8360
|
+
D.apply(void 0, [U, se($)].concat(N));
|
|
8361
8361
|
}, O.rejects = function U($) {
|
|
8362
8362
|
for (var T = arguments.length, N = new Array(T > 1 ? T - 1 : 0), B = 1; B < T; B++)
|
|
8363
8363
|
N[B - 1] = arguments[B];
|
|
@@ -8367,7 +8367,7 @@ function di() {
|
|
|
8367
8367
|
}, O.doesNotThrow = function U($) {
|
|
8368
8368
|
for (var T = arguments.length, N = new Array(T > 1 ? T - 1 : 0), B = 1; B < T; B++)
|
|
8369
8369
|
N[B - 1] = arguments[B];
|
|
8370
|
-
k.apply(void 0, [U,
|
|
8370
|
+
k.apply(void 0, [U, se($)].concat(N));
|
|
8371
8371
|
}, O.doesNotReject = function U($) {
|
|
8372
8372
|
for (var T = arguments.length, N = new Array(T > 1 ? T - 1 : 0), B = 1; B < T; B++)
|
|
8373
8373
|
N[B - 1] = arguments[B];
|
|
@@ -15925,7 +15925,7 @@ function Gh() {
|
|
|
15925
15925
|
};
|
|
15926
15926
|
};
|
|
15927
15927
|
Object.defineProperty(cp, "__esModule", { value: !0 }), cp.ParserATNSimulator = void 0;
|
|
15928
|
-
const n = Cm, r = Nm, i = Fo, s = $4, o = Bo(), u = Yf, a = vm(), l = k4(), c = cr, f = Im, x = Io, h = Z4, p = qu, m = B4(), g = Ph, y = lr, E = il, A = Ae, v = uw(), _ = jm(), S = As, C = Zs(), b = Lo(), R = tw(), O = oW, L = U0, M = Uh, H = Kf, W = ow(), G = uW(), K = Gt, J = vs, ne = di(), X = 65535,
|
|
15928
|
+
const n = Cm, r = Nm, i = Fo, s = $4, o = Bo(), u = Yf, a = vm(), l = k4(), c = cr, f = Im, x = Io, h = Z4, p = qu, m = B4(), g = Ph, y = lr, E = il, A = Ae, v = uw(), _ = jm(), S = As, C = Zs(), b = Lo(), R = tw(), O = oW, L = U0, M = Uh, H = Kf, W = ow(), G = uW(), K = Gt, J = vs, ne = di(), X = 65535, se = -(1 << 31 >>> 0);
|
|
15929
15929
|
let oe = class at extends l.ATNSimulator {
|
|
15930
15930
|
constructor(D, k) {
|
|
15931
15931
|
super(D), this.predictionMode = O.PredictionMode.LL, this.force_global_context = !1, this.always_try_local_context = !0, this.enable_global_context_dfa = !1, this.optimize_unique_closure = !0, this.optimize_ll1 = !0, this.optimize_tail_calls = !0, this.tail_call_preserves_sll = !0, this.treat_sllk1_conflict_as_ambiguity = !1, this.reportAmbiguities = !1, this.userWantsCtxSensitive = !0, this._parser = k;
|
|
@@ -16569,7 +16569,7 @@ function Gh() {
|
|
|
16569
16569
|
let I = D.context.hasEmpty, z = D.context.size - (I ? 1 : 0);
|
|
16570
16570
|
for (let P = 0; P < z; P++) {
|
|
16571
16571
|
let Z = D.context.getParent(P), he = this.atn.states[D.context.getReturnState(P)], ue = u.ATNConfig.create(he, D.alt, Z, D.semanticContext);
|
|
16572
|
-
ue.outerContextDepth = D.outerContextDepth, ue.isPrecedenceFilterSuppressed = D.isPrecedenceFilterSuppressed, ne(N >
|
|
16572
|
+
ue.outerContextDepth = D.outerContextDepth, ue.isPrecedenceFilterSuppressed = D.isPrecedenceFilterSuppressed, ne(N > se), this.closureImpl(ue, k, j, V, U, $, T, N - 1, B);
|
|
16573
16573
|
}
|
|
16574
16574
|
if (!I || !$)
|
|
16575
16575
|
return;
|
|
@@ -16598,7 +16598,7 @@ function Gh() {
|
|
|
16598
16598
|
if (D.state instanceof L.RuleStopState) {
|
|
16599
16599
|
if (this.dfa != null && this.dfa.isPrecedenceDfa && z.outermostPrecedenceReturn === this.dfa.atnStartState.ruleIndex && (Z.isPrecedenceFilterSuppressed = !0), Z.outerContextDepth = Z.outerContextDepth + 1, !V.add(Z))
|
|
16600
16600
|
continue;
|
|
16601
|
-
ne(he >
|
|
16601
|
+
ne(he > se), he--, at.debug && console.log("dips into outer ctx: " + Z);
|
|
16602
16602
|
} else if (z instanceof M.RuleTransition)
|
|
16603
16603
|
this.optimize_tail_calls && z.optimizedTailCall && (!this.tail_call_preserves_sll || !b.PredictionContext.isEmptyLocal(D.context)) ? (ne(Z.context === D.context), he === 0 && (he--, !this.tail_call_preserves_sll && b.PredictionContext.isEmptyLocal(D.context) && (Z.outerContextDepth = Z.outerContextDepth + 1))) : he >= 0 && he++;
|
|
16604
16604
|
else if (!z.isEpsilon && !V.add(Z))
|
|
@@ -17411,7 +17411,7 @@ function Wh() {
|
|
|
17411
17411
|
};
|
|
17412
17412
|
};
|
|
17413
17413
|
Object.defineProperty(ap, "__esModule", { value: !0 }), ap.ATNDeserializer = void 0;
|
|
17414
|
-
const n = Nm, r = Fo, i = Bo(), s = wm, o = cr, u = Im, a = Q4, l = Rm, c = Io, f = G4, x = nx, h = qu, p = jG(), m = W4, g = tx(), y = Tm, E = V4, A = Y4, v = K4, _ = JG, S = ZG, C = X4, b = eW, R = J4, O = Mm, L = Ae, M = uw(), H = Gh(), W = e_, G = t_, K = n_, J = zm, ne = r_, X = i_,
|
|
17414
|
+
const n = Nm, r = Fo, i = Bo(), s = wm, o = cr, u = Im, a = Q4, l = Rm, c = Io, f = G4, x = nx, h = qu, p = jG(), m = W4, g = tx(), y = Tm, E = V4, A = Y4, v = K4, _ = JG, S = ZG, C = X4, b = eW, R = J4, O = Mm, L = Ae, M = uw(), H = Gh(), W = e_, G = t_, K = n_, J = zm, ne = r_, X = i_, se = U0, oe = Uh, Ee = ow(), D = s_, k = o_, j = Mh, V = Gt, U = u_, $ = a_, T = Dm;
|
|
17415
17415
|
var N;
|
|
17416
17416
|
(function(q) {
|
|
17417
17417
|
q[q.UNICODE_BMP = 0] = "UNICODE_BMP", q[q.UNICODE_SMP = 1] = "UNICODE_SMP";
|
|
@@ -17512,7 +17512,7 @@ function Wh() {
|
|
|
17512
17512
|
}
|
|
17513
17513
|
xe.ruleToStopState = new Array(je);
|
|
17514
17514
|
for (let Y of xe.states)
|
|
17515
|
-
Y instanceof
|
|
17515
|
+
Y instanceof se.RuleStopState && (xe.ruleToStopState[Y.ruleIndex] = Y, xe.ruleToStartState[Y.ruleIndex].stopState = Y);
|
|
17516
17516
|
let Pe = He.toInt(I[z++]);
|
|
17517
17517
|
for (let Y = 0; Y < Pe; Y++) {
|
|
17518
17518
|
let de = He.toInt(I[z++]);
|
|
@@ -17626,7 +17626,7 @@ function Wh() {
|
|
|
17626
17626
|
if (nt.ruleIndex !== Y || !(nt instanceof j.StarLoopEntryState))
|
|
17627
17627
|
continue;
|
|
17628
17628
|
let Kn = nt.transition(nt.numberOfTransitions - 1).target;
|
|
17629
|
-
if (Kn instanceof O.LoopEndState && Kn.epsilonOnlyTransitions && Kn.transition(0).target instanceof
|
|
17629
|
+
if (Kn instanceof O.LoopEndState && Kn.epsilonOnlyTransitions && Kn.transition(0).target instanceof se.RuleStopState) {
|
|
17630
17630
|
qe = nt;
|
|
17631
17631
|
break;
|
|
17632
17632
|
}
|
|
@@ -17691,7 +17691,7 @@ function Wh() {
|
|
|
17691
17691
|
for (let P of I.states)
|
|
17692
17692
|
if (P instanceof j.StarLoopEntryState && I.ruleToStartState[P.ruleIndex].isPrecedenceRule) {
|
|
17693
17693
|
let Z = P.transition(P.numberOfTransitions - 1).target;
|
|
17694
|
-
Z instanceof O.LoopEndState && Z.epsilonOnlyTransitions && Z.transition(0).target instanceof
|
|
17694
|
+
Z instanceof O.LoopEndState && Z.epsilonOnlyTransitions && Z.transition(0).target instanceof se.RuleStopState && (z.set(P.ruleIndex, P), P.precedenceRuleDecision = !0, P.precedenceLoopbackStates = new c.BitSet(I.states.length));
|
|
17695
17695
|
}
|
|
17696
17696
|
for (let P of z)
|
|
17697
17697
|
for (let Z of I.ruleToStopState[P[0]].getTransitions())
|
|
@@ -17713,7 +17713,7 @@ function Wh() {
|
|
|
17713
17713
|
let P = z;
|
|
17714
17714
|
this.checkCondition(P.numberOfTransitions <= 1 || P.decision >= 0);
|
|
17715
17715
|
} else
|
|
17716
|
-
this.checkCondition(z.numberOfTransitions <= 1 || z instanceof
|
|
17716
|
+
this.checkCondition(z.numberOfTransitions <= 1 || z instanceof se.RuleStopState);
|
|
17717
17717
|
}
|
|
17718
17718
|
}
|
|
17719
17719
|
checkCondition(I, z) {
|
|
@@ -17729,7 +17729,7 @@ function Wh() {
|
|
|
17729
17729
|
if (ue.numberOfOptimizedTransitions !== 1)
|
|
17730
17730
|
continue;
|
|
17731
17731
|
let ee = ue.getOptimizedTransition(0), xe = ee.target;
|
|
17732
|
-
if (!(ee.isEpsilon || !xe.onlyHasEpsilonTransitions || xe.numberOfOptimizedTransitions !== 1 || !(xe.getOptimizedTransition(0).target instanceof
|
|
17732
|
+
if (!(ee.isEpsilon || !xe.onlyHasEpsilonTransitions || xe.numberOfOptimizedTransitions !== 1 || !(xe.getOptimizedTransition(0).target instanceof se.RuleStopState)))
|
|
17733
17733
|
switch (ee.serializationType) {
|
|
17734
17734
|
case 5:
|
|
17735
17735
|
case 2:
|
|
@@ -17792,7 +17792,7 @@ function Wh() {
|
|
|
17792
17792
|
static combineChainedEpsilons(I) {
|
|
17793
17793
|
let z = 0;
|
|
17794
17794
|
for (let P of I.states) {
|
|
17795
|
-
if (!P.onlyHasEpsilonTransitions || P instanceof
|
|
17795
|
+
if (!P.onlyHasEpsilonTransitions || P instanceof se.RuleStopState)
|
|
17796
17796
|
continue;
|
|
17797
17797
|
let Z;
|
|
17798
17798
|
e:
|
|
@@ -17893,7 +17893,7 @@ function Wh() {
|
|
|
17893
17893
|
let ue = he.pop();
|
|
17894
17894
|
if (!ue)
|
|
17895
17895
|
break;
|
|
17896
|
-
if (Z.get(ue.stateNumber) || ue instanceof
|
|
17896
|
+
if (Z.get(ue.stateNumber) || ue instanceof se.RuleStopState)
|
|
17897
17897
|
continue;
|
|
17898
17898
|
if (!ue.onlyHasEpsilonTransitions)
|
|
17899
17899
|
return !1;
|
|
@@ -17967,7 +17967,7 @@ function Wh() {
|
|
|
17967
17967
|
P = new U.TokensStartState();
|
|
17968
17968
|
break;
|
|
17969
17969
|
case o.ATNStateType.RULE_STOP:
|
|
17970
|
-
P = new
|
|
17970
|
+
P = new se.RuleStopState();
|
|
17971
17971
|
break;
|
|
17972
17972
|
case o.ATNStateType.BLOCK_END:
|
|
17973
17973
|
P = new f.BlockEndState();
|
|
@@ -21540,8 +21540,8 @@ function Mpe() {
|
|
|
21540
21540
|
for (let G = 0; G < W; G++) {
|
|
21541
21541
|
let K = b.substring(M[G] + this.start.length, H[G]), J = K, ne, X = K.indexOf(":");
|
|
21542
21542
|
if (X >= 0 && (ne = K.substring(0, X), J = K.substring(X + 1, K.length)), L.push(new y.TagChunk(J, ne)), G + 1 < W) {
|
|
21543
|
-
let
|
|
21544
|
-
L.push(new A.TextChunk(
|
|
21543
|
+
let se = b.substring(H[G] + this.stop.length, M[G + 1]);
|
|
21544
|
+
L.push(new A.TextChunk(se));
|
|
21545
21545
|
}
|
|
21546
21546
|
}
|
|
21547
21547
|
if (W > 0) {
|
|
@@ -50316,13 +50316,13 @@ var abe = w && w.__createBinding || (Object.create ? function(t, e, n, r) {
|
|
|
50316
50316
|
};
|
|
50317
50317
|
Object.defineProperty(xC, "__esModule", { value: !0 });
|
|
50318
50318
|
xC.MalloyToAST = void 0;
|
|
50319
|
-
const nj = y_, fbe = gm,
|
|
50320
|
-
class ij extends
|
|
50319
|
+
const nj = y_, fbe = gm, ie = cbe(Y_), q6 = K_, rj = lr, xbe = Y_, Tn = an, z6 = Ve, dbe = Pu, hbe = Jd;
|
|
50320
|
+
class ij extends ie.SourceQueryElement {
|
|
50321
50321
|
constructor() {
|
|
50322
50322
|
super(...arguments), this.elementType = "parseErrorSourceQuery";
|
|
50323
50323
|
}
|
|
50324
50324
|
}
|
|
50325
|
-
class H6 extends
|
|
50325
|
+
class H6 extends ie.MalloyElement {
|
|
50326
50326
|
constructor(e) {
|
|
50327
50327
|
super(), this.elementType = "ignoredByParser", this.malloySrc = e;
|
|
50328
50328
|
}
|
|
@@ -50402,13 +50402,13 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50402
50402
|
return Number.parseInt(e.text);
|
|
50403
50403
|
}
|
|
50404
50404
|
getFieldName(e) {
|
|
50405
|
-
return this.astAt(new
|
|
50405
|
+
return this.astAt(new ie.FieldName((0, Tn.getId)(e)), e.id());
|
|
50406
50406
|
}
|
|
50407
50407
|
getModelEntryName(e) {
|
|
50408
|
-
return this.astAt(new
|
|
50408
|
+
return this.astAt(new ie.ModelEntryReference((0, Tn.getId)(e)), e.id());
|
|
50409
50409
|
}
|
|
50410
50410
|
defaultResult() {
|
|
50411
|
-
return new
|
|
50411
|
+
return new ie.Unimplemented();
|
|
50412
50412
|
}
|
|
50413
50413
|
astAt(e, n) {
|
|
50414
50414
|
return e.location = {
|
|
@@ -50421,7 +50421,7 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50421
50421
|
return this.parseInfo.sourceStream.getText(i);
|
|
50422
50422
|
}
|
|
50423
50423
|
getFilterElement(e) {
|
|
50424
|
-
const n = this.getFieldExpr(e), r = new
|
|
50424
|
+
const n = this.getFieldExpr(e), r = new ie.FilterElement(n, this.getSourceCode(e));
|
|
50425
50425
|
return this.astAt(r, e);
|
|
50426
50426
|
}
|
|
50427
50427
|
getFieldDefs(e, n) {
|
|
@@ -50429,13 +50429,13 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50429
50429
|
}
|
|
50430
50430
|
getFieldExpr(e) {
|
|
50431
50431
|
const n = this.visit(e);
|
|
50432
|
-
if (n instanceof
|
|
50432
|
+
if (n instanceof ie.ExpressionDef)
|
|
50433
50433
|
return this.astAt(n, e);
|
|
50434
50434
|
throw this.internalError(e, `expression node unknown type '${n.elementType}'`);
|
|
50435
50435
|
}
|
|
50436
50436
|
getFilterShortcut(e) {
|
|
50437
50437
|
const n = this.getFilterElement(e.fieldExpr());
|
|
50438
|
-
return this.m4advisory(e, "filter-shortcut", "Filter shortcut `{? condition }` is deprecated; use `{ where: condition } instead"), new
|
|
50438
|
+
return this.m4advisory(e, "filter-shortcut", "Filter shortcut `{? condition }` is deprecated; use `{ where: condition } instead"), new ie.Filter([n]);
|
|
50439
50439
|
}
|
|
50440
50440
|
getPlainStringFrom(e) {
|
|
50441
50441
|
const [n, r] = (0, Tn.getPlainString)(e);
|
|
@@ -50456,7 +50456,7 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50456
50456
|
*/
|
|
50457
50457
|
parseTime(e, n) {
|
|
50458
50458
|
let r = n(e.text);
|
|
50459
|
-
return r || (this.contextError(e, "failed-to-parse-time-literal", "Time data parse error"), r = new
|
|
50459
|
+
return r || (this.contextError(e, "failed-to-parse-time-literal", "Time data parse error"), r = new ie.LiteralTimestamp({ text: e.text })), this.astAt(r, e);
|
|
50460
50460
|
}
|
|
50461
50461
|
/**
|
|
50462
50462
|
* Get all the possibly missing annotations from this parse rule
|
|
@@ -50473,16 +50473,16 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50473
50473
|
return this.getNotes(e._beforeIs).concat(this.getNotes(e._afterIs));
|
|
50474
50474
|
}
|
|
50475
50475
|
visitMalloyDocument(e) {
|
|
50476
|
-
const n = this.only(e.malloyStatement().map((r) => this.visit(r)), (r) =>
|
|
50477
|
-
return new
|
|
50476
|
+
const n = this.only(e.malloyStatement().map((r) => this.visit(r)), (r) => ie.isDocStatementOrDocStatementList(r) && r, "statement");
|
|
50477
|
+
return new ie.Document(n);
|
|
50478
50478
|
}
|
|
50479
50479
|
visitDefineSourceStatement(e) {
|
|
50480
|
-
const r = e.sourcePropertyList().sourceDefinition().map((o) => this.visitSourceDefinition(o)), i = this.getNotes(e.tags()), s = new
|
|
50480
|
+
const r = e.sourcePropertyList().sourceDefinition().map((o) => this.visitSourceDefinition(o)), i = this.getNotes(e.tags()), s = new ie.DefineSourceList(r);
|
|
50481
50481
|
return s.extendNote({ blockNotes: i }), s;
|
|
50482
50482
|
}
|
|
50483
50483
|
getSourceParameter(e) {
|
|
50484
50484
|
const n = e.fieldExpr(), r = n ? this.astAt(new hbe.ConstantExpression(this.getFieldExpr(n)), n) : void 0, i = e.malloyType(), s = i ? this.getMalloyType(i) : void 0;
|
|
50485
|
-
return this.astAt(new
|
|
50485
|
+
return this.astAt(new ie.HasParameter({
|
|
50486
50486
|
name: (0, Tn.getId)(e.parameterNameDef()),
|
|
50487
50487
|
type: s,
|
|
50488
50488
|
default: r
|
|
@@ -50492,57 +50492,57 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50492
50492
|
return e === void 0 ? [] : (this.inExperiment("parameters", e), e.sourceParameter().map((n) => this.getSourceParameter(n)));
|
|
50493
50493
|
}
|
|
50494
50494
|
visitSourceDefinition(e) {
|
|
50495
|
-
const n = this.visit(e.sqExplore()), r = this.getSourceParameters(e.sourceParameters()), i = new
|
|
50495
|
+
const n = this.visit(e.sqExplore()), r = this.getSourceParameters(e.sourceParameters()), i = new ie.DefineSource((0, Tn.getId)(e.sourceNameDef()), n instanceof ie.SourceQueryElement ? n : void 0, !0, r), s = this.getNotes(e.tags()).concat(this.getIsNotes(e.isDefine()));
|
|
50496
50496
|
return i.extendNote({ notes: s }), this.astAt(i, e);
|
|
50497
50497
|
}
|
|
50498
50498
|
getSourceExtensions(e) {
|
|
50499
50499
|
return this.astAt(this.visitExploreProperties(e), e);
|
|
50500
50500
|
}
|
|
50501
50501
|
visitExploreProperties(e) {
|
|
50502
|
-
const n = e.filterShortcut(), r = this.only(e.exploreStatement().map((s) => this.visit(s)), (s) =>
|
|
50502
|
+
const n = e.filterShortcut(), r = this.only(e.exploreStatement().map((s) => this.visit(s)), (s) => ie.isSourceProperty(s) && s, "source property"), i = new ie.SourceDesc(r);
|
|
50503
50503
|
return n && i.push(this.getFilterShortcut(n)), i;
|
|
50504
50504
|
}
|
|
50505
50505
|
visitTableFunction(e) {
|
|
50506
|
-
const n = this.getPlainStringFrom(e.tableURI()), r = this.astAt(new
|
|
50506
|
+
const n = this.getPlainStringFrom(e.tableURI()), r = this.astAt(new ie.TableFunctionSource(n), e);
|
|
50507
50507
|
return this.m4advisory(e, "table-function", "`table('connection_name:table_path')` is deprecated; use `connection_name.table('table_path')`"), r;
|
|
50508
50508
|
}
|
|
50509
50509
|
visitTableMethod(e) {
|
|
50510
50510
|
const n = e.connectionId(), r = this.astAt(this.getModelEntryName(n), n), i = this.getPlainStringFrom(e.tablePath());
|
|
50511
|
-
return this.astAt(new
|
|
50511
|
+
return this.astAt(new ie.TableMethodSource(r, i), e);
|
|
50512
50512
|
}
|
|
50513
50513
|
visitSqlSource(e) {
|
|
50514
|
-
const n = e.connectionId(), r = this.astAt(this.getModelEntryName(n), n), i = new
|
|
50514
|
+
const n = e.connectionId(), r = this.astAt(this.getModelEntryName(n), n), i = new ie.SQLString(), s = e.sqlString();
|
|
50515
50515
|
s && this.makeSqlString(s, i);
|
|
50516
50516
|
const o = e.shortString();
|
|
50517
50517
|
o && i.push((0, Tn.getShortString)(o));
|
|
50518
|
-
const u = new
|
|
50518
|
+
const u = new ie.SQLSource(r, i);
|
|
50519
50519
|
return this.astAt(u, e);
|
|
50520
50520
|
}
|
|
50521
50521
|
visitDefJoinMany(e) {
|
|
50522
50522
|
const n = [];
|
|
50523
50523
|
for (const i of e.joinList().joinDef()) {
|
|
50524
50524
|
const s = this.visit(i);
|
|
50525
|
-
s instanceof
|
|
50525
|
+
s instanceof ie.Join && (n.push(s), s instanceof ie.ExpressionJoin ? (s.joinType = "many", s.joinOn === void 0 && this.contextError(e, "missing-on-in-join-many", "join_many: requires ON expression")) : s instanceof ie.KeyJoin && this.contextError(e, "foreign-key-in-join-many", "Foreign key join not legal in join_many:"));
|
|
50526
50526
|
}
|
|
50527
|
-
const r = new
|
|
50527
|
+
const r = new ie.JoinStatement(n);
|
|
50528
50528
|
return r.extendNote({ blockNotes: this.getNotes(e.tags()) }), r;
|
|
50529
50529
|
}
|
|
50530
50530
|
visitDefJoinOne(e) {
|
|
50531
50531
|
const n = this.getJoinList(e.joinList()), r = [];
|
|
50532
50532
|
for (const s of n)
|
|
50533
|
-
s instanceof
|
|
50534
|
-
const i = new
|
|
50533
|
+
s instanceof ie.Join && (r.push(s), s instanceof ie.ExpressionJoin && (s.joinType = "one"));
|
|
50534
|
+
const i = new ie.JoinStatement(r);
|
|
50535
50535
|
return i.extendNote({ blockNotes: this.getNotes(e.tags()) }), i;
|
|
50536
50536
|
}
|
|
50537
50537
|
visitDefJoinCross(e) {
|
|
50538
50538
|
const n = this.getJoinList(e.joinList()), r = [];
|
|
50539
50539
|
for (const s of n)
|
|
50540
|
-
s instanceof
|
|
50541
|
-
const i = new
|
|
50540
|
+
s instanceof ie.Join && (r.push(s), s instanceof ie.ExpressionJoin ? s.joinType = "cross" : s.logError("foreign-key-in-join-cross", "Foreign key join not legal in join_cross:"));
|
|
50541
|
+
const i = new ie.JoinStatement(r);
|
|
50542
50542
|
return i.extendNote({ blockNotes: this.getNotes(e.tags()) }), i;
|
|
50543
50543
|
}
|
|
50544
50544
|
getJoinList(e) {
|
|
50545
|
-
return this.only(e.joinDef().map((n) => this.visit(n)), (n) => n instanceof
|
|
50545
|
+
return this.only(e.joinDef().map((n) => this.visit(n)), (n) => n instanceof ie.Join && n, "join");
|
|
50546
50546
|
}
|
|
50547
50547
|
getJoinFrom(e) {
|
|
50548
50548
|
const n = e.isExplore(), r = this.getModelEntryName(e.joinNameDef());
|
|
@@ -50551,18 +50551,18 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50551
50551
|
return { joinFrom: s, notes: o, joinAs: r };
|
|
50552
50552
|
}
|
|
50553
50553
|
const i = e.sourceArguments();
|
|
50554
|
-
return i ? { joinFrom: this.astAt(new
|
|
50554
|
+
return i ? { joinFrom: this.astAt(new ie.SQReference(r, this.getSQArguments(i)), e), notes: [], joinAs: r } : { joinAs: r, joinFrom: new ie.SQReference(r), notes: [] };
|
|
50555
50555
|
}
|
|
50556
50556
|
visitQueryJoinStatement(e) {
|
|
50557
50557
|
return this.astAt(this.visit(e.joinStatement()), e);
|
|
50558
50558
|
}
|
|
50559
50559
|
visitJoinOn(e) {
|
|
50560
50560
|
var n;
|
|
50561
|
-
const { joinAs: r, joinFrom: i, notes: s } = this.getJoinFrom(e.joinFrom()), o = new
|
|
50561
|
+
const { joinAs: r, joinFrom: i, notes: s } = this.getJoinFrom(e.joinFrom()), o = new ie.ExpressionJoin(r, i), u = e.joinExpression(), a = ((n = e.matrixOperation()) === null || n === void 0 ? void 0 : n.text.toLocaleLowerCase()) || "left";
|
|
50562
50562
|
return (0, z6.isMatrixOperation)(a) ? o.matrixOperation = a : this.contextError(e, "unknown-matrix-operation", "Internal Error: Unknown matrixOperation"), u && (o.joinOn = this.getFieldExpr(u)), o.extendNote({ notes: this.getNotes(e).concat(s) }), this.astAt(o, e);
|
|
50563
50563
|
}
|
|
50564
50564
|
visitJoinWith(e) {
|
|
50565
|
-
const { joinAs: n, joinFrom: r, notes: i } = this.getJoinFrom(e.joinFrom()), s = this.getFieldExpr(e.fieldExpr()), o = new
|
|
50565
|
+
const { joinAs: n, joinFrom: r, notes: i } = this.getJoinFrom(e.joinFrom()), s = this.getFieldExpr(e.fieldExpr()), o = new ie.KeyJoin(n, r, s);
|
|
50566
50566
|
return o.extendNote({ notes: this.getNotes(e).concat(i) }), this.astAt(o, e);
|
|
50567
50567
|
}
|
|
50568
50568
|
getFieldDef(e, n) {
|
|
@@ -50570,37 +50570,37 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50570
50570
|
return o.extendNote({ notes: u }), this.astAt(o, e);
|
|
50571
50571
|
}
|
|
50572
50572
|
visitDefDimensions(e) {
|
|
50573
|
-
const n = this.getFieldDefs(e.defList().fieldDef(),
|
|
50573
|
+
const n = this.getFieldDefs(e.defList().fieldDef(), ie.DimensionFieldDeclaration), r = new ie.Dimensions(n);
|
|
50574
50574
|
return r.extendNote({ blockNotes: this.getNotes(e.tags()) }), this.astAt(r, e);
|
|
50575
50575
|
}
|
|
50576
50576
|
visitDefMeasures(e) {
|
|
50577
|
-
const n = this.getFieldDefs(e.defList().fieldDef(),
|
|
50577
|
+
const n = this.getFieldDefs(e.defList().fieldDef(), ie.MeasureFieldDeclaration), r = new ie.Measures(n);
|
|
50578
50578
|
return r.extendNote({ blockNotes: this.getNotes(e.tags()) }), this.astAt(r, e);
|
|
50579
50579
|
}
|
|
50580
50580
|
visitQueryExtend(e) {
|
|
50581
50581
|
const n = [], r = e.queryExtendStatementList().queryExtendStatement().map((s) => this.visit(s));
|
|
50582
50582
|
for (const s of r)
|
|
50583
|
-
if (
|
|
50583
|
+
if (ie.isQueryExtendProperty(s))
|
|
50584
50584
|
n.push(s);
|
|
50585
50585
|
else
|
|
50586
50586
|
throw this.internalError(e, `Query extend matched, but ${s.elementType} found`);
|
|
50587
|
-
const i = new
|
|
50587
|
+
const i = new ie.ExtendBlock(n);
|
|
50588
50588
|
return this.astAt(i, e);
|
|
50589
50589
|
}
|
|
50590
50590
|
visitDeclareStatement(e) {
|
|
50591
|
-
const n = this.getFieldDefs(e.defList().fieldDef(),
|
|
50591
|
+
const n = this.getFieldDefs(e.defList().fieldDef(), ie.DeclareFieldDeclaration), r = new ie.DeclareFields(n), i = this.astAt(r, e);
|
|
50592
50592
|
return this.m4advisory(e, "declare", "`declare:` is deprecated; use `dimension:` or `measure:` inside a source or `extend:` block"), i;
|
|
50593
50593
|
}
|
|
50594
50594
|
visitExploreRenameDef(e) {
|
|
50595
|
-
const n = e.fieldName(0), r = e.fieldName(1), i = new
|
|
50595
|
+
const n = e.fieldName(0), r = e.fieldName(1), i = new ie.RenameField((0, Tn.getId)(n), this.getFieldName(r));
|
|
50596
50596
|
return this.astAt(i, e);
|
|
50597
50597
|
}
|
|
50598
50598
|
visitDefExploreRename(e) {
|
|
50599
|
-
const r = e.renameList().exploreRenameDef().map((s) => this.visitExploreRenameDef(s)), i = new
|
|
50599
|
+
const r = e.renameList().exploreRenameDef().map((s) => this.visitExploreRenameDef(s)), i = new ie.Renames(r);
|
|
50600
50600
|
return this.astAt(i, e);
|
|
50601
50601
|
}
|
|
50602
50602
|
visitFilterClauseList(e) {
|
|
50603
|
-
return new
|
|
50603
|
+
return new ie.Filter(e.fieldExpr().map((n) => this.getFilterElement(n)));
|
|
50604
50604
|
}
|
|
50605
50605
|
visitWhereStatement(e) {
|
|
50606
50606
|
const n = this.visitFilterClauseList(e.filterClauseList());
|
|
@@ -50612,36 +50612,36 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50612
50612
|
}
|
|
50613
50613
|
visitSubQueryDefList(e) {
|
|
50614
50614
|
const n = e.exploreQueryDef().map((r) => this.visitExploreQueryDef(r));
|
|
50615
|
-
return new
|
|
50615
|
+
return new ie.Views(n);
|
|
50616
50616
|
}
|
|
50617
50617
|
visitDefExploreQuery(e) {
|
|
50618
50618
|
const n = this.visitSubQueryDefList(e.subQueryDefList()), r = this.getNotes(e.tags());
|
|
50619
50619
|
return n.extendNote({ blockNotes: r }), e.QUERY() && this.m4advisory(e, "query-in-source", "Use view: inside of a source instead of query:"), n;
|
|
50620
50620
|
}
|
|
50621
50621
|
visitDefExplorePrimaryKey(e) {
|
|
50622
|
-
const n = new
|
|
50622
|
+
const n = new ie.PrimaryKey(this.getFieldName(e.fieldName()));
|
|
50623
50623
|
return this.astAt(n, e);
|
|
50624
50624
|
}
|
|
50625
50625
|
visitFieldNameList(e) {
|
|
50626
|
-
const n = e.fieldName().map((r) => new
|
|
50627
|
-
return new
|
|
50626
|
+
const n = e.fieldName().map((r) => new ie.AcceptExceptFieldReference([this.getFieldName(r)]));
|
|
50627
|
+
return new ie.FieldReferences(n);
|
|
50628
50628
|
}
|
|
50629
50629
|
visitDefExploreEditField(e) {
|
|
50630
50630
|
const n = e.ACCEPT() ? "accept" : "except";
|
|
50631
|
-
return new
|
|
50631
|
+
return new ie.FieldListEdit(n, this.visitFieldNameList(e.fieldNameList()));
|
|
50632
50632
|
}
|
|
50633
50633
|
visitDefExploreTimezone(e) {
|
|
50634
50634
|
return this.visitTimezoneStatement(e.timezoneStatement());
|
|
50635
50635
|
}
|
|
50636
50636
|
visitTimezoneStatement(e) {
|
|
50637
|
-
const n = this.getPlainStringFrom(e), r = this.astAt(new
|
|
50637
|
+
const n = this.getPlainStringFrom(e), r = this.astAt(new ie.TimezoneStatement(n), e.string());
|
|
50638
50638
|
return r.isValid || this.astError(r, "invalid-timezone", {
|
|
50639
50639
|
timezone: r.tz
|
|
50640
50640
|
}), this.astAt(r, e);
|
|
50641
50641
|
}
|
|
50642
50642
|
visitQueryProperties(e) {
|
|
50643
|
-
const n = this.only(e.queryStatement().map((i) => this.astAt(this.visit(i), i)), (i) =>
|
|
50644
|
-
return r && n.push(this.getFilterShortcut(r)), new
|
|
50643
|
+
const n = this.only(e.queryStatement().map((i) => this.astAt(this.visit(i), i)), (i) => ie.isQueryProperty(i) && i, "query statement"), r = e.filterShortcut();
|
|
50644
|
+
return r && n.push(this.getFilterShortcut(r)), new ie.QOpDesc(n);
|
|
50645
50645
|
}
|
|
50646
50646
|
getFieldPath(e, n) {
|
|
50647
50647
|
const r = e.fieldName().map((i) => this.getFieldName(i));
|
|
@@ -50661,32 +50661,32 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50661
50661
|
throw new Error("Expected query field entry to be a field reference or definition");
|
|
50662
50662
|
}
|
|
50663
50663
|
getQueryItems(e, n, r) {
|
|
50664
|
-
return this.only(e.queryFieldEntry().map((i) => this.getQueryFieldEntry(i, n, r)), (i) => i instanceof
|
|
50664
|
+
return this.only(e.queryFieldEntry().map((i) => this.getQueryFieldEntry(i, n, r)), (i) => i instanceof ie.FieldReference || i instanceof ie.AtomicFieldDeclaration ? i : !1, "view field");
|
|
50665
50665
|
}
|
|
50666
50666
|
visitAggregateStatement(e) {
|
|
50667
|
-
const n = new
|
|
50667
|
+
const n = new ie.Aggregate(this.getQueryItems(e.queryFieldList(), ie.AggregateFieldDeclaration, ie.AggregateFieldReference));
|
|
50668
50668
|
return n.extendNote({ blockNotes: this.getNotes(e.tags()) }), n;
|
|
50669
50669
|
}
|
|
50670
50670
|
visitGroupByStatement(e) {
|
|
50671
|
-
const n = new
|
|
50671
|
+
const n = new ie.GroupBy(this.getQueryItems(e.queryFieldList(), ie.GroupByFieldDeclaration, ie.GroupByFieldReference));
|
|
50672
50672
|
return n.extendNote({ blockNotes: this.getNotes(e.tags()) }), n;
|
|
50673
50673
|
}
|
|
50674
50674
|
visitCalculateStatement(e) {
|
|
50675
|
-
const n = new
|
|
50675
|
+
const n = new ie.Calculate(this.getQueryItems(e.queryFieldList(), ie.CalculateFieldDeclaration, ie.CalculateFieldReference));
|
|
50676
50676
|
return n.extendNote({ blockNotes: this.getNotes(e.tags()) }), n;
|
|
50677
50677
|
}
|
|
50678
50678
|
getTaggedRef(e, n, r) {
|
|
50679
50679
|
const i = e.refExpr();
|
|
50680
50680
|
if (i) {
|
|
50681
|
-
const o = this.getFieldPath(e.fieldPath(),
|
|
50681
|
+
const o = this.getFieldPath(e.fieldPath(), ie.ExpressionFieldReference);
|
|
50682
50682
|
let u;
|
|
50683
50683
|
const a = i.timeframe();
|
|
50684
|
-
a && (u = new
|
|
50684
|
+
a && (u = new ie.ExprGranularTime(new ie.ExprIdReference(o), this.visitTimeframe(a).text, !0));
|
|
50685
50685
|
const l = i.aggregate();
|
|
50686
50686
|
if (l) {
|
|
50687
50687
|
const f = l.text.toLowerCase();
|
|
50688
50688
|
if (f === "sum")
|
|
50689
|
-
u = new
|
|
50689
|
+
u = new ie.ExprSum(void 0, o);
|
|
50690
50690
|
else
|
|
50691
50691
|
return this.contextError(l, "invalid-reference-only-aggregation", `\`${f}\` is not legal in a reference-only aggregation`), o;
|
|
50692
50692
|
}
|
|
@@ -50710,8 +50710,8 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50710
50710
|
}
|
|
50711
50711
|
// "FieldCollection" can only mean a select statement today
|
|
50712
50712
|
visitFieldCollection(e) {
|
|
50713
|
-
const n = e.collectionMember().map((r) => this.getFieldCollectionMember(r,
|
|
50714
|
-
return this.astAt(new
|
|
50713
|
+
const n = e.collectionMember().map((r) => this.getFieldCollectionMember(r, ie.ProjectFieldDeclaration, ie.ProjectFieldReference));
|
|
50714
|
+
return this.astAt(new ie.ProjectStatement(n), e);
|
|
50715
50715
|
}
|
|
50716
50716
|
visitProjectStatement(e) {
|
|
50717
50717
|
e.PROJECT() && this.m4advisory(e, "project", "project: keyword is deprecated, use select:");
|
|
@@ -50720,7 +50720,7 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50720
50720
|
}
|
|
50721
50721
|
visitCollectionWildCard(e) {
|
|
50722
50722
|
var n;
|
|
50723
|
-
const r = e.fieldPath(), i = r ? this.getFieldPath(r,
|
|
50723
|
+
const r = e.fieldPath(), i = r ? this.getFieldPath(r, ie.ProjectFieldReference) : void 0, s = this.astAt(new ie.WildcardFieldReference(i), e), o = ((n = e.starQualified()) === null || n === void 0 ? void 0 : n.fieldNameList()) || [];
|
|
50724
50724
|
for (const u of o)
|
|
50725
50725
|
for (const a of u.fieldName())
|
|
50726
50726
|
s.except.add((0, Tn.getId)(a));
|
|
@@ -50730,45 +50730,45 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50730
50730
|
const n = e.indexElement().map((r) => {
|
|
50731
50731
|
const i = r.fieldPath();
|
|
50732
50732
|
if (!i)
|
|
50733
|
-
return this.astAt(new
|
|
50734
|
-
const s = this.getFieldPath(i,
|
|
50735
|
-
return r.STAR() ? this.astAt(new
|
|
50733
|
+
return this.astAt(new ie.WildcardFieldReference(void 0), e);
|
|
50734
|
+
const s = this.getFieldPath(i, ie.IndexFieldReference);
|
|
50735
|
+
return r.STAR() ? this.astAt(new ie.WildcardFieldReference(s), e) : this.astAt(s, e);
|
|
50736
50736
|
});
|
|
50737
|
-
return new
|
|
50737
|
+
return new ie.FieldReferences(n);
|
|
50738
50738
|
}
|
|
50739
50739
|
visitIndexStatement(e) {
|
|
50740
|
-
const n = this.visitIndexFields(e.indexFields()), r = new
|
|
50740
|
+
const n = this.visitIndexFields(e.indexFields()), r = new ie.Index(n), i = e.fieldName();
|
|
50741
50741
|
return i && r.useWeight(this.getFieldName(i)), this.astAt(r, e);
|
|
50742
50742
|
}
|
|
50743
50743
|
visitFieldPropertyLimitStatement(e) {
|
|
50744
50744
|
return this.inExperiment("aggregate_limit", e), this.visitLimitStatement(e.limitStatement());
|
|
50745
50745
|
}
|
|
50746
50746
|
visitLimitStatement(e) {
|
|
50747
|
-
return new
|
|
50747
|
+
return new ie.Limit(this.getNumber(e.INTEGER_LITERAL()));
|
|
50748
50748
|
}
|
|
50749
50749
|
visitAggregateOrderBySpec(e) {
|
|
50750
50750
|
const n = e.ASC() ? "asc" : e.DESC() ? "desc" : void 0, r = e.fieldExpr(), i = r ? this.getFieldExpr(r) : void 0;
|
|
50751
|
-
return this.astAt(new
|
|
50751
|
+
return this.astAt(new ie.FunctionOrderBy(i, n), e);
|
|
50752
50752
|
}
|
|
50753
50753
|
visitAggregateOrderByStatement(e) {
|
|
50754
50754
|
return this.visitAggregateOrdering(e.aggregateOrdering());
|
|
50755
50755
|
}
|
|
50756
50756
|
visitAggregateOrdering(e) {
|
|
50757
50757
|
const n = e.aggregateOrderBySpec().map((r) => this.visitAggregateOrderBySpec(r));
|
|
50758
|
-
return this.astAt(new
|
|
50758
|
+
return this.astAt(new ie.FunctionOrdering(n), e);
|
|
50759
50759
|
}
|
|
50760
50760
|
visitOrderBySpec(e) {
|
|
50761
50761
|
const n = e.ASC() ? "asc" : e.DESC() ? "desc" : void 0, r = e.INTEGER_LITERAL();
|
|
50762
50762
|
if (r)
|
|
50763
|
-
return new
|
|
50763
|
+
return new ie.OrderBy(this.getNumber(r), n);
|
|
50764
50764
|
const i = e.fieldName();
|
|
50765
50765
|
if (i)
|
|
50766
|
-
return new
|
|
50766
|
+
return new ie.OrderBy(this.getFieldName(i), n);
|
|
50767
50767
|
throw this.internalError(e, "can't parse order_by specification");
|
|
50768
50768
|
}
|
|
50769
50769
|
visitOrdering(e) {
|
|
50770
50770
|
const n = e.orderBySpec().map((r) => this.visitOrderBySpec(r));
|
|
50771
|
-
return this.astAt(new
|
|
50771
|
+
return this.astAt(new ie.Ordering(n), e);
|
|
50772
50772
|
}
|
|
50773
50773
|
visitTopStatement(e) {
|
|
50774
50774
|
const n = e.bySpec(), r = this.getNumber(e.INTEGER_LITERAL());
|
|
@@ -50778,31 +50778,31 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50778
50778
|
const s = n.fieldName();
|
|
50779
50779
|
if (s) {
|
|
50780
50780
|
const u = this.getFieldName(s);
|
|
50781
|
-
i = new
|
|
50781
|
+
i = new ie.Top(r, u);
|
|
50782
50782
|
}
|
|
50783
50783
|
const o = n.fieldExpr();
|
|
50784
|
-
o && (i = new
|
|
50784
|
+
o && (i = new ie.Top(r, this.getFieldExpr(o)));
|
|
50785
50785
|
}
|
|
50786
|
-
return i || (i = new
|
|
50786
|
+
return i || (i = new ie.Top(r, void 0)), this.astAt(i, e);
|
|
50787
50787
|
}
|
|
50788
50788
|
visitTopLevelQueryDefs(e) {
|
|
50789
|
-
const n = e.topLevelQueryDef().map((s) => this.visitTopLevelQueryDef(s)), r = this.getNotes(e.tags()), i = new
|
|
50789
|
+
const n = e.topLevelQueryDef().map((s) => this.visitTopLevelQueryDef(s)), r = this.getNotes(e.tags()), i = new ie.DefineQueryList(n);
|
|
50790
50790
|
return i.extendNote({ blockNotes: r }), i;
|
|
50791
50791
|
}
|
|
50792
50792
|
visitTopLevelQueryDef(e) {
|
|
50793
50793
|
const n = (0, Tn.getId)(e.queryName()), r = this.visit(e.sqExpr()), i = this.getNotes(e.tags()).concat(this.getIsNotes(e.isDefine()));
|
|
50794
|
-
if (r instanceof
|
|
50795
|
-
const s = new
|
|
50794
|
+
if (r instanceof ie.SourceQueryElement) {
|
|
50795
|
+
const s = new ie.DefineQuery(n, r);
|
|
50796
50796
|
return s.extendNote({ notes: i }), this.astAt(s, e);
|
|
50797
50797
|
}
|
|
50798
50798
|
throw this.internalError(e, `Expected query definition, got a '${r.elementType}'`);
|
|
50799
50799
|
}
|
|
50800
50800
|
visitAnonymousQuery(e) {
|
|
50801
|
-
const n = e.topLevelAnonQueryDef(), r = this.getSqExpr(n.sqExpr()), i = this.astAt(new
|
|
50801
|
+
const n = e.topLevelAnonQueryDef(), r = this.getSqExpr(n.sqExpr()), i = this.astAt(new ie.AnonymousQuery(r), n), s = this.getNotes(e.topLevelAnonQueryDef().tags()), o = this.getNotes(e.tags());
|
|
50802
50802
|
return i.extendNote({ notes: s, blockNotes: o }), this.m4advisory(n, "anonymous-query", "Anonymous `query:` statements are deprecated, use `run:` instead"), this.astAt(i, e);
|
|
50803
50803
|
}
|
|
50804
50804
|
visitRunStatement(e) {
|
|
50805
|
-
const n = e.topLevelAnonQueryDef(), r = this.getSqExpr(n.sqExpr()), i = this.astAt(new
|
|
50805
|
+
const n = e.topLevelAnonQueryDef(), r = this.getSqExpr(n.sqExpr()), i = this.astAt(new ie.AnonymousQuery(r), n), s = this.getNotes(e.topLevelAnonQueryDef().tags()), o = this.getNotes(e.tags());
|
|
50806
50806
|
return i.extendNote({ notes: s, blockNotes: o }), this.astAt(i, e);
|
|
50807
50807
|
}
|
|
50808
50808
|
visitNestStatement(e) {
|
|
@@ -50810,7 +50810,7 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50810
50810
|
return n.extendNote({ blockNotes: this.getNotes(e.tags()) }), n;
|
|
50811
50811
|
}
|
|
50812
50812
|
visitNestedQueryList(e) {
|
|
50813
|
-
return new
|
|
50813
|
+
return new ie.Nests(this.only(e.nestEntry().map((n) => this.visit(n)), (n) => n instanceof ie.NestFieldDeclaration && n, "query"));
|
|
50814
50814
|
}
|
|
50815
50815
|
visitNestDef(e) {
|
|
50816
50816
|
const n = e.queryName();
|
|
@@ -50822,100 +50822,100 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50822
50822
|
const u = i.getImplicitName();
|
|
50823
50823
|
u === void 0 && this.contextError(e, "anonymous-nest", "`nest:` view requires a name (add `nest_name is ...`)"), r = u ?? "__unnamed__";
|
|
50824
50824
|
}
|
|
50825
|
-
const s = new
|
|
50825
|
+
const s = new ie.NestFieldDeclaration(r, i), o = e.isDefine();
|
|
50826
50826
|
return s.extendNote({
|
|
50827
50827
|
notes: this.getNotes(e.tags()).concat(o ? this.getIsNotes(o) : [])
|
|
50828
50828
|
}), this.astAt(s, e);
|
|
50829
50829
|
}
|
|
50830
50830
|
visitExploreQueryDef(e) {
|
|
50831
|
-
const n = (0, Tn.getId)(e.exploreQueryNameDef()), r = new
|
|
50831
|
+
const n = (0, Tn.getId)(e.exploreQueryNameDef()), r = new ie.ViewFieldDeclaration(n, this.getVExpr(e.vExpr())), i = this.getNotes(e).concat(this.getIsNotes(e.isDefine()));
|
|
50832
50832
|
return r.extendNote({ notes: i }), this.astAt(r, e);
|
|
50833
50833
|
}
|
|
50834
50834
|
visitExprNot(e) {
|
|
50835
|
-
return new
|
|
50835
|
+
return new ie.ExprNot(this.getFieldExpr(e.fieldExpr()));
|
|
50836
50836
|
}
|
|
50837
50837
|
visitExprBool(e) {
|
|
50838
|
-
return new
|
|
50838
|
+
return new ie.Boolean(e.TRUE() ? "true" : "false");
|
|
50839
50839
|
}
|
|
50840
50840
|
allFieldExpressions(e) {
|
|
50841
50841
|
return e.map((n) => this.getFieldExpr(n));
|
|
50842
50842
|
}
|
|
50843
50843
|
visitExprLogicalOr(e) {
|
|
50844
50844
|
const n = this.getFieldExpr(e.fieldExpr(0)), r = this.getFieldExpr(e.fieldExpr(1));
|
|
50845
|
-
return new
|
|
50845
|
+
return new ie.ExprLogicalOp(n, "or", r);
|
|
50846
50846
|
}
|
|
50847
50847
|
visitExprLogicalAnd(e) {
|
|
50848
50848
|
const n = this.getFieldExpr(e.fieldExpr(0)), r = this.getFieldExpr(e.fieldExpr(1));
|
|
50849
|
-
return new
|
|
50849
|
+
return new ie.ExprLogicalOp(n, "and", r);
|
|
50850
50850
|
}
|
|
50851
50851
|
visitExprOrTree(e) {
|
|
50852
50852
|
const n = this.getFieldExpr(e.fieldExpr()), r = this.getFieldExpr(e.partialAllowedFieldExpr());
|
|
50853
|
-
return this.astAt(new
|
|
50853
|
+
return this.astAt(new ie.ExprAlternationTree(n, "|", r), e);
|
|
50854
50854
|
}
|
|
50855
50855
|
visitExprAndTree(e) {
|
|
50856
50856
|
const n = this.getFieldExpr(e.fieldExpr()), r = this.getFieldExpr(e.partialAllowedFieldExpr());
|
|
50857
|
-
return this.astAt(new
|
|
50857
|
+
return this.astAt(new ie.ExprAlternationTree(n, "&", r), e);
|
|
50858
50858
|
}
|
|
50859
50859
|
visitExprCoalesce(e) {
|
|
50860
50860
|
const n = this.getFieldExpr(e.fieldExpr()[0]), r = this.getFieldExpr(e.fieldExpr()[1]);
|
|
50861
|
-
return this.astAt(new
|
|
50861
|
+
return this.astAt(new ie.ExprCoalesce(n, r), e);
|
|
50862
50862
|
}
|
|
50863
50863
|
visitPartialAllowedFieldExpr(e) {
|
|
50864
50864
|
var n;
|
|
50865
50865
|
const r = this.getFieldExpr(e.fieldExpr()), i = (n = e.compareOp()) === null || n === void 0 ? void 0 : n.text;
|
|
50866
50866
|
if (i) {
|
|
50867
|
-
if (
|
|
50868
|
-
return this.astAt(new
|
|
50867
|
+
if (ie.isComparison(i))
|
|
50868
|
+
return this.astAt(new ie.PartialCompare(i, r), e);
|
|
50869
50869
|
throw this.internalError(e, `partial comparison '${i}' not recognized`);
|
|
50870
50870
|
}
|
|
50871
50871
|
return r;
|
|
50872
50872
|
}
|
|
50873
50873
|
visitExprString(e) {
|
|
50874
50874
|
const n = this.getPlainStringFrom(e);
|
|
50875
|
-
return new
|
|
50875
|
+
return new ie.ExprString(n);
|
|
50876
50876
|
}
|
|
50877
50877
|
visitExprRegex(e) {
|
|
50878
50878
|
const n = e.HACKY_REGEX().text;
|
|
50879
|
-
return new
|
|
50879
|
+
return new ie.ExprRegEx(n.slice(2, -1));
|
|
50880
50880
|
}
|
|
50881
50881
|
visitExprNow(e) {
|
|
50882
|
-
return new
|
|
50882
|
+
return new ie.ExprNow();
|
|
50883
50883
|
}
|
|
50884
50884
|
visitExprNumber(e) {
|
|
50885
|
-
return new
|
|
50885
|
+
return new ie.ExprNumber(e.text);
|
|
50886
50886
|
}
|
|
50887
50887
|
visitExprFieldPath(e) {
|
|
50888
|
-
const n = new
|
|
50888
|
+
const n = new ie.ExprIdReference(this.getFieldPath(e.fieldPath(), ie.ExpressionFieldReference));
|
|
50889
50889
|
return this.astAt(n, e);
|
|
50890
50890
|
}
|
|
50891
50891
|
visitExprNULL(e) {
|
|
50892
|
-
return new
|
|
50892
|
+
return new ie.ExprNULL();
|
|
50893
50893
|
}
|
|
50894
50894
|
visitExprExpr(e) {
|
|
50895
|
-
return new
|
|
50895
|
+
return new ie.ExprParens(this.getFieldExpr(e.fieldExpr()));
|
|
50896
50896
|
}
|
|
50897
50897
|
visitExprMinus(e) {
|
|
50898
|
-
return new
|
|
50898
|
+
return new ie.ExprMinus(this.getFieldExpr(e.fieldExpr()));
|
|
50899
50899
|
}
|
|
50900
50900
|
visitExprAddSub(e) {
|
|
50901
50901
|
const n = this.getFieldExpr(e.fieldExpr(0)), r = this.getFieldExpr(e.fieldExpr(1)), i = e.PLUS() ? "+" : "-";
|
|
50902
|
-
return new
|
|
50902
|
+
return new ie.ExprAddSub(n, i, r);
|
|
50903
50903
|
}
|
|
50904
50904
|
visitExprMulDiv(e) {
|
|
50905
50905
|
const n = e.STAR() ? "*" : e.SLASH() ? "/" : "%";
|
|
50906
|
-
return new
|
|
50906
|
+
return new ie.ExprMulDiv(this.getFieldExpr(e.fieldExpr(0)), n, this.getFieldExpr(e.fieldExpr(1)));
|
|
50907
50907
|
}
|
|
50908
50908
|
visitExprCompare(e) {
|
|
50909
50909
|
const n = e.compareOp().text, r = this.getFieldExpr(e.fieldExpr(0)), i = this.getFieldExpr(e.fieldExpr(1));
|
|
50910
|
-
if (
|
|
50911
|
-
return this.astAt(new
|
|
50912
|
-
if (
|
|
50913
|
-
return this.astAt(new
|
|
50910
|
+
if (ie.isEquality(n))
|
|
50911
|
+
return this.astAt(new ie.ExprEquality(r, n, i), e);
|
|
50912
|
+
if (ie.isComparison(n))
|
|
50913
|
+
return this.astAt(new ie.ExprCompare(r, n, i), e);
|
|
50914
50914
|
throw this.internalError(e, `untranslatable comparison operator '${n}'`);
|
|
50915
50915
|
}
|
|
50916
50916
|
visitExprUngroup(e) {
|
|
50917
50917
|
const n = e.fieldName().map((i) => this.getFieldName(i)), r = e.ungroup().text.toLowerCase();
|
|
50918
|
-
return this.astAt(new
|
|
50918
|
+
return this.astAt(new ie.ExprUngroup(r === "all" ? r : "exclude", this.getFieldExpr(e.fieldExpr()), n), e);
|
|
50919
50919
|
}
|
|
50920
50920
|
symmetricAggregateUsageError(e) {
|
|
50921
50921
|
return `Symmetric aggregate function \`${e}\` must be written as \`${e}(expression)\` or \`path.to.field.${e}()\``;
|
|
@@ -50924,25 +50924,25 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50924
50924
|
return `Asymmetric aggregate function \`${e}\` must be written as \`path.to.field.${e}()\`, \`path.to.join.${e}(expression)\`, or \`${e}(expression)\``;
|
|
50925
50925
|
}
|
|
50926
50926
|
visitExprAggregate(e) {
|
|
50927
|
-
const n = e.fieldPath(), r = this.getFieldPath(n,
|
|
50927
|
+
const n = e.fieldPath(), r = this.getFieldPath(n, ie.ExpressionFieldReference), i = n && r ? this.astAt(r, n) : void 0, s = e.aggregate().text.toLowerCase(), o = e.fieldExpr();
|
|
50928
50928
|
if (e.aggregate().COUNT())
|
|
50929
|
-
return o && this.contextError(o, "count-expression-with-locality", "Expression illegal inside path.count()"), new
|
|
50929
|
+
return o && this.contextError(o, "count-expression-with-locality", "Expression illegal inside path.count()"), new ie.ExprCount(i);
|
|
50930
50930
|
const u = o ? this.getFieldExpr(o) : void 0;
|
|
50931
50931
|
if (s === "min" || s === "max")
|
|
50932
50932
|
if (u)
|
|
50933
50933
|
this.contextError(e, "invalid-symmetric-aggregate", this.symmetricAggregateUsageError(s));
|
|
50934
50934
|
else {
|
|
50935
|
-
const a = this.astAt(new
|
|
50936
|
-
return s === "min" ? new
|
|
50935
|
+
const a = this.astAt(new ie.ExprIdReference(r), n);
|
|
50936
|
+
return s === "min" ? new ie.ExprMin(a) : new ie.ExprMax(a);
|
|
50937
50937
|
}
|
|
50938
50938
|
else {
|
|
50939
50939
|
if (s === "avg")
|
|
50940
|
-
return new
|
|
50940
|
+
return new ie.ExprAvg(u, i);
|
|
50941
50941
|
if (s === "sum")
|
|
50942
|
-
return new
|
|
50942
|
+
return new ie.ExprSum(u, i);
|
|
50943
50943
|
this.contextError(e, "aggregate-parse-error", `Cannot parse aggregate function ${s}`);
|
|
50944
50944
|
}
|
|
50945
|
-
return new
|
|
50945
|
+
return new ie.ExprNULL();
|
|
50946
50946
|
}
|
|
50947
50947
|
/*
|
|
50948
50948
|
* error toodos
|
|
@@ -50960,35 +50960,35 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
50960
50960
|
visitExprPathlessAggregate(e) {
|
|
50961
50961
|
const n = e.fieldExpr(), r = n ? this.getFieldExpr(n) : void 0, i = void 0, s = e.aggregate().text.toLowerCase();
|
|
50962
50962
|
if (e.STAR() && this.m4advisory(e, "wildcard-in-aggregate", `* illegal inside ${s}()`), s === "count")
|
|
50963
|
-
return this.astAt(r ? new
|
|
50963
|
+
return this.astAt(r ? new ie.ExprCountDistinct(r) : new ie.ExprCount(), e);
|
|
50964
50964
|
if (s === "min") {
|
|
50965
50965
|
if (r)
|
|
50966
|
-
return new
|
|
50966
|
+
return new ie.ExprMin(r);
|
|
50967
50967
|
this.contextError(e, "invalid-symmetric-aggregate", this.symmetricAggregateUsageError(s));
|
|
50968
50968
|
} else if (s === "max") {
|
|
50969
50969
|
if (r)
|
|
50970
|
-
return new
|
|
50970
|
+
return new ie.ExprMax(r);
|
|
50971
50971
|
this.contextError(e, "invalid-symmetric-aggregate", this.symmetricAggregateUsageError(s));
|
|
50972
50972
|
} else {
|
|
50973
50973
|
if (r === void 0)
|
|
50974
|
-
return this.contextError(e, "invalid-asymmetric-aggregate", this.asymmetricAggregateUsageError(s)), new
|
|
50974
|
+
return this.contextError(e, "invalid-asymmetric-aggregate", this.asymmetricAggregateUsageError(s)), new ie.ExprNULL();
|
|
50975
50975
|
const o = e.SOURCE_KW() !== void 0;
|
|
50976
50976
|
if (s === "avg")
|
|
50977
|
-
return new
|
|
50977
|
+
return new ie.ExprAvg(r, i, o);
|
|
50978
50978
|
if (s === "sum")
|
|
50979
|
-
return new
|
|
50979
|
+
return new ie.ExprSum(r, i, o);
|
|
50980
50980
|
}
|
|
50981
|
-
return new
|
|
50981
|
+
return new ie.ExprNULL();
|
|
50982
50982
|
}
|
|
50983
50983
|
visitExprApply(e) {
|
|
50984
|
-
return new
|
|
50984
|
+
return new ie.Apply(this.getFieldExpr(e.fieldExpr()), this.getFieldExpr(e.partialAllowedFieldExpr()));
|
|
50985
50985
|
}
|
|
50986
50986
|
visitExprRange(e) {
|
|
50987
|
-
return new
|
|
50987
|
+
return new ie.Range(this.getFieldExpr(e.fieldExpr(0)), this.getFieldExpr(e.fieldExpr(1)));
|
|
50988
50988
|
}
|
|
50989
50989
|
visitExprCast(e) {
|
|
50990
50990
|
const n = this.getMalloyOrSQLType(e.malloyOrSQLType());
|
|
50991
|
-
return new
|
|
50991
|
+
return new ie.ExprCast(this.getFieldExpr(e.fieldExpr()), n);
|
|
50992
50992
|
}
|
|
50993
50993
|
getMalloyType(e) {
|
|
50994
50994
|
const n = e.text;
|
|
@@ -51007,21 +51007,21 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51007
51007
|
}
|
|
51008
51008
|
visitExprSafeCast(e) {
|
|
51009
51009
|
const n = this.getMalloyOrSQLType(e.malloyOrSQLType());
|
|
51010
|
-
return new
|
|
51010
|
+
return new ie.ExprCast(this.getFieldExpr(e.fieldExpr()), n, !0);
|
|
51011
51011
|
}
|
|
51012
51012
|
visitExprTimeTrunc(e) {
|
|
51013
|
-
return new
|
|
51013
|
+
return new ie.ExprGranularTime(this.getFieldExpr(e.fieldExpr()), this.visitTimeframe(e.timeframe()).text, !0);
|
|
51014
51014
|
}
|
|
51015
51015
|
visitTimeframe(e) {
|
|
51016
|
-
return new
|
|
51016
|
+
return new ie.Timeframe(e.text);
|
|
51017
51017
|
}
|
|
51018
51018
|
visitExprForRange(e) {
|
|
51019
51019
|
const n = this.getFieldExpr(e._startAt), r = this.getFieldExpr(e._duration), i = this.visitTimeframe(e.timeframe());
|
|
51020
|
-
return new
|
|
51020
|
+
return new ie.ForRange(n, r, i);
|
|
51021
51021
|
}
|
|
51022
51022
|
visitExprAggFunc(e) {
|
|
51023
|
-
const n = e.argumentList(), r = n ? this.allFieldExpressions(n.fieldExpr()) : [], i = (0, Tn.getId)(e), s = e.fieldPath(), o = s ? this.getFieldPath(s,
|
|
51024
|
-
return
|
|
51023
|
+
const n = e.argumentList(), r = n ? this.allFieldExpressions(n.fieldExpr()) : [], i = (0, Tn.getId)(e), s = e.fieldPath(), o = s ? this.getFieldPath(s, ie.ExpressionFieldReference) : void 0, u = s && o ? this.astAt(o, s) : void 0;
|
|
51024
|
+
return ie.ExprTimeExtract.extractor(i) ? this.astAt(new ie.ExprTimeExtract(i, r), e) : this.astAt(new ie.ExprFunc(i, r, !1, void 0, u), e);
|
|
51025
51025
|
}
|
|
51026
51026
|
visitExprFunc(e) {
|
|
51027
51027
|
var n, r;
|
|
@@ -51029,62 +51029,62 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51029
51029
|
let a;
|
|
51030
51030
|
u && ((0, z6.isCastType)(u) ? a = u : (this.contextError(e, "unexpected-malloy-type", `'#' assertion for unknown type '${u}'`), a = void 0));
|
|
51031
51031
|
let l = (0, Tn.getOptionalId)(e) || ((r = e.timeframe()) === null || r === void 0 ? void 0 : r.text);
|
|
51032
|
-
return l === void 0 && (this.contextError(e, "failed-to-parse-function-name", "Function name error"), l = "FUNCTION_NAME_ERROR"),
|
|
51032
|
+
return l === void 0 && (this.contextError(e, "failed-to-parse-function-name", "Function name error"), l = "FUNCTION_NAME_ERROR"), ie.ExprTimeExtract.extractor(l) ? this.astAt(new ie.ExprTimeExtract(l, s), e) : this.astAt(new ie.ExprFunc(l, s, o, a), e);
|
|
51033
51033
|
}
|
|
51034
51034
|
visitExprDuration(e) {
|
|
51035
|
-
return new
|
|
51035
|
+
return new ie.ExprDuration(this.getFieldExpr(e.fieldExpr()), this.visitTimeframe(e.timeframe()).text);
|
|
51036
51036
|
}
|
|
51037
51037
|
visitCaseStatement(e) {
|
|
51038
|
-
const n = e._valueExpr, r = n ? this.getFieldExpr(n) : void 0, i = e.caseWhen(), s = i.map((a) => new
|
|
51038
|
+
const n = e._valueExpr, r = n ? this.getFieldExpr(n) : void 0, i = e.caseWhen(), s = i.map((a) => new ie.CaseWhen(this.getFieldExpr(a._condition), this.getFieldExpr(a._result))), o = e._caseElse, u = o ? this.getFieldExpr(o) : void 0;
|
|
51039
51039
|
return this.warnWithReplacement("sql-case", "Use a `pick` statement instead of `case`", this.parseInfo.rangeFromContext(e), `${[
|
|
51040
51040
|
...n ? [`${this.getSourceCode(n)} ?`] : [],
|
|
51041
51041
|
...i.map((a) => `pick ${this.getSourceCode(a._result)} when ${this.getSourceCode(a._condition)}`),
|
|
51042
51042
|
o ? `else ${o.text}` : "else null"
|
|
51043
|
-
].join(" ")}`), new
|
|
51043
|
+
].join(" ")}`), new ie.Case(r, s, u);
|
|
51044
51044
|
}
|
|
51045
51045
|
visitPickStatement(e) {
|
|
51046
51046
|
const n = e.pick().map((r) => {
|
|
51047
51047
|
let i;
|
|
51048
|
-
return r._pickValue && (i = this.getFieldExpr(r._pickValue)), new
|
|
51048
|
+
return r._pickValue && (i = this.getFieldExpr(r._pickValue)), new ie.PickWhen(i, this.getFieldExpr(r._pickWhen));
|
|
51049
51049
|
});
|
|
51050
|
-
return e.ELSE() ? new
|
|
51050
|
+
return e.ELSE() ? new ie.Pick(n, this.getFieldExpr(e._pickElse)) : new ie.Pick(n);
|
|
51051
51051
|
}
|
|
51052
51052
|
visitExprFieldProps(e) {
|
|
51053
|
-
const n = this.only(e.fieldProperties().fieldPropertyStatement().map((r) => this.visit(r)), (r) =>
|
|
51054
|
-
return new
|
|
51053
|
+
const n = this.only(e.fieldProperties().fieldPropertyStatement().map((r) => this.visit(r)), (r) => ie.isFieldPropStatement(r) && r, "field property statement");
|
|
51054
|
+
return new ie.ExprProps(this.getFieldExpr(e.fieldExpr()), n);
|
|
51055
51055
|
}
|
|
51056
51056
|
visitPartitionByStatement(e) {
|
|
51057
|
-
return this.astAt(new
|
|
51058
|
-
this.astAt(new
|
|
51057
|
+
return this.astAt(new ie.PartitionBy(e.id().map((n) => this.astAt(new ie.PartitionByFieldReference([
|
|
51058
|
+
this.astAt(new ie.FieldName((0, Tn.idToStr)(n)), n)
|
|
51059
51059
|
]), n))), e);
|
|
51060
51060
|
}
|
|
51061
51061
|
visitLiteralTimestamp(e) {
|
|
51062
|
-
return this.parseTime(e,
|
|
51062
|
+
return this.parseTime(e, ie.LiteralTimestamp.parse);
|
|
51063
51063
|
}
|
|
51064
51064
|
visitLiteralHour(e) {
|
|
51065
|
-
return this.parseTime(e,
|
|
51065
|
+
return this.parseTime(e, ie.LiteralHour.parse);
|
|
51066
51066
|
}
|
|
51067
51067
|
visitLiteralDay(e) {
|
|
51068
|
-
return this.parseTime(e,
|
|
51068
|
+
return this.parseTime(e, ie.LiteralDay.parse);
|
|
51069
51069
|
}
|
|
51070
51070
|
visitLiteralWeek(e) {
|
|
51071
|
-
return this.parseTime(e,
|
|
51071
|
+
return this.parseTime(e, ie.LiteralWeek.parse);
|
|
51072
51072
|
}
|
|
51073
51073
|
visitLiteralMonth(e) {
|
|
51074
|
-
return this.parseTime(e,
|
|
51074
|
+
return this.parseTime(e, ie.LiteralMonth.parse);
|
|
51075
51075
|
}
|
|
51076
51076
|
visitLiteralQuarter(e) {
|
|
51077
|
-
return this.parseTime(e,
|
|
51077
|
+
return this.parseTime(e, ie.LiteralQuarter.parse);
|
|
51078
51078
|
}
|
|
51079
51079
|
visitLiteralYear(e) {
|
|
51080
|
-
return this.parseTime(e,
|
|
51080
|
+
return this.parseTime(e, ie.LiteralYear.parse);
|
|
51081
51081
|
}
|
|
51082
51082
|
visitImportStatement(e) {
|
|
51083
|
-
const n = this.getPlainStringFrom(e.importURL()), r = this.astAt(new
|
|
51083
|
+
const n = this.getPlainStringFrom(e.importURL()), r = this.astAt(new ie.ImportStatement(n, this.parseInfo.importBaseURL), e), i = e.importSelect();
|
|
51084
51084
|
if (i)
|
|
51085
51085
|
for (const s of i.importItem()) {
|
|
51086
|
-
const o = s.id(), u = o[1] ? this.astAt(new
|
|
51087
|
-
r.push(this.astAt(new
|
|
51086
|
+
const o = s.id(), u = o[1] ? this.astAt(new ie.ImportSourceName((0, Tn.idToStr)(o[1])), o[1]) : void 0;
|
|
51087
|
+
r.push(this.astAt(new ie.ImportSelect((0, Tn.idToStr)(o[0]), u), o[0]));
|
|
51088
51088
|
}
|
|
51089
51089
|
return r;
|
|
51090
51090
|
}
|
|
@@ -51094,18 +51094,18 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51094
51094
|
visitSampleStatement(e) {
|
|
51095
51095
|
const n = e.sampleSpec().INTEGER_LITERAL();
|
|
51096
51096
|
if (n)
|
|
51097
|
-
return new
|
|
51097
|
+
return new ie.SampleProperty({ rows: this.getNumber(n) });
|
|
51098
51098
|
const r = e.sampleSpec().PERCENT_LITERAL();
|
|
51099
51099
|
if (r)
|
|
51100
|
-
return new
|
|
51100
|
+
return new ie.SampleProperty({ percent: this.getNumber(r) });
|
|
51101
51101
|
const i = e.sampleSpec().TRUE() !== void 0;
|
|
51102
|
-
return new
|
|
51102
|
+
return new ie.SampleProperty({ enable: i });
|
|
51103
51103
|
}
|
|
51104
51104
|
visitDocAnnotations(e) {
|
|
51105
51105
|
const n = e.DOC_ANNOTATION().map((i) => ({
|
|
51106
51106
|
text: i.text,
|
|
51107
51107
|
at: this.getLocation(e)
|
|
51108
|
-
})), r = new
|
|
51108
|
+
})), r = new ie.ModelAnnotation(n);
|
|
51109
51109
|
return this.compilerFlags = r.getCompilerFlags(this.compilerFlags, this.msgLog), r;
|
|
51110
51110
|
}
|
|
51111
51111
|
visitIgnoredObjectAnnotations(e) {
|
|
@@ -51116,13 +51116,13 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51116
51116
|
}
|
|
51117
51117
|
visitDefExploreAnnotation(e) {
|
|
51118
51118
|
const n = this.getNotes(e);
|
|
51119
|
-
return new
|
|
51119
|
+
return new ie.ObjectAnnotation(n);
|
|
51120
51120
|
}
|
|
51121
51121
|
getSQArgument(e) {
|
|
51122
|
-
const n = e.argumentId(), r = n ? this.astAt(new
|
|
51123
|
-
this.astAt(new
|
|
51122
|
+
const n = e.argumentId(), r = n ? this.astAt(new ie.PartitionByFieldReference([
|
|
51123
|
+
this.astAt(new ie.FieldName((0, Tn.idToStr)(n.id())), n)
|
|
51124
51124
|
]), n) : void 0;
|
|
51125
|
-
return this.astAt(new
|
|
51125
|
+
return this.astAt(new ie.Argument({
|
|
51126
51126
|
id: r,
|
|
51127
51127
|
value: this.getFieldExpr(e.fieldExpr())
|
|
51128
51128
|
}), e);
|
|
@@ -51133,14 +51133,14 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51133
51133
|
}
|
|
51134
51134
|
visitSQID(e) {
|
|
51135
51135
|
const n = this.getModelEntryName(e), r = this.getSQArguments(e.sourceArguments());
|
|
51136
|
-
return this.astAt(new
|
|
51136
|
+
return this.astAt(new ie.SQReference(n, r), e.id());
|
|
51137
51137
|
}
|
|
51138
51138
|
getSqExpr(e) {
|
|
51139
51139
|
const n = this.visit(e);
|
|
51140
|
-
return n instanceof
|
|
51140
|
+
return n instanceof ie.SourceQueryElement ? n : (this.contextError(e, "unexpected-non-source-query-expression-node", `Expected a source/query expression, not '${n.elementType}'`), new ij());
|
|
51141
51141
|
}
|
|
51142
51142
|
visitSQExtendedSource(e) {
|
|
51143
|
-
const n = this.getSqExpr(e.sqExpr()), r = new
|
|
51143
|
+
const n = this.getSqExpr(e.sqExpr()), r = new ie.SQExtend(n, this.getSourceExtensions(e.exploreProperties()));
|
|
51144
51144
|
return this.astAt(r, e);
|
|
51145
51145
|
}
|
|
51146
51146
|
visitSQParens(e) {
|
|
@@ -51148,20 +51148,20 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51148
51148
|
return this.astAt(n, e);
|
|
51149
51149
|
}
|
|
51150
51150
|
visitSQArrow(e) {
|
|
51151
|
-
const n = this.getSqExpr(e.sqExpr()), r = e.segExpr(), i = new
|
|
51151
|
+
const n = this.getSqExpr(e.sqExpr()), r = e.segExpr(), i = new ie.SQArrow(n, this.getVExpr(r));
|
|
51152
51152
|
return this.astAt(i, e);
|
|
51153
51153
|
}
|
|
51154
51154
|
getVExpr(e) {
|
|
51155
51155
|
const n = this.visit(e);
|
|
51156
|
-
if (n instanceof
|
|
51156
|
+
if (n instanceof ie.View)
|
|
51157
51157
|
return n;
|
|
51158
51158
|
throw this.internalError(e, `Expected view, got a '${n.elementType}'`);
|
|
51159
51159
|
}
|
|
51160
51160
|
visitSegField(e) {
|
|
51161
|
-
return new
|
|
51161
|
+
return new ie.ReferenceView(this.getFieldPath(e.fieldPath(), ie.ViewOrScalarFieldReference));
|
|
51162
51162
|
}
|
|
51163
51163
|
visitSegOps(e) {
|
|
51164
|
-
return new
|
|
51164
|
+
return new ie.QOpDescView(this.visitQueryProperties(e.queryProperties()));
|
|
51165
51165
|
}
|
|
51166
51166
|
visitSegParen(e) {
|
|
51167
51167
|
return this.visit(e.vExpr());
|
|
@@ -51170,60 +51170,64 @@ class gbe extends fbe.AbstractParseTreeVisitor {
|
|
|
51170
51170
|
return this.visit(e.segExpr());
|
|
51171
51171
|
}
|
|
51172
51172
|
visitSegRefine(e) {
|
|
51173
|
-
return new
|
|
51173
|
+
return new ie.ViewRefine(this.getVExpr(e._lhs), this.getVExpr(e._rhs));
|
|
51174
51174
|
}
|
|
51175
51175
|
visitVArrow(e) {
|
|
51176
|
-
return new
|
|
51176
|
+
return new ie.ViewArrow(this.getVExpr(e._lhs), this.getVExpr(e._rhs));
|
|
51177
51177
|
}
|
|
51178
51178
|
visitSQRefinedQuery(e) {
|
|
51179
|
-
const n = this.getSqExpr(e.sqExpr()), r = e.segExpr(), i = new
|
|
51179
|
+
const n = this.getSqExpr(e.sqExpr()), r = e.segExpr(), i = new ie.SQRefine(n, this.getVExpr(r));
|
|
51180
51180
|
return this.astAt(i, e);
|
|
51181
51181
|
}
|
|
51182
51182
|
visitSQTable(e) {
|
|
51183
51183
|
const n = this.visit(e.exploreTable());
|
|
51184
51184
|
if (n instanceof xbe.TableSource) {
|
|
51185
|
-
const r = new
|
|
51185
|
+
const r = new ie.SQSource(n);
|
|
51186
51186
|
return this.astAt(r, e);
|
|
51187
51187
|
}
|
|
51188
51188
|
return new ij();
|
|
51189
51189
|
}
|
|
51190
51190
|
visitSQSQL(e) {
|
|
51191
|
-
const n = new
|
|
51191
|
+
const n = new ie.SQSource(this.visitSqlSource(e.sqlSource()));
|
|
51192
51192
|
return this.astAt(n, e);
|
|
51193
51193
|
}
|
|
51194
51194
|
visitExperimentalStatementForTesting(e) {
|
|
51195
|
-
return this.inExperiment("compilerTestExperimentParse", e), this.astAt(new
|
|
51195
|
+
return this.inExperiment("compilerTestExperimentParse", e), this.astAt(new ie.ExperimentalExperiment("compilerTestExperimentTranslate"), e);
|
|
51196
51196
|
}
|
|
51197
51197
|
visitRecordRef(e) {
|
|
51198
51198
|
const n = e.fieldPath(), r = n.fieldName().at(-1);
|
|
51199
51199
|
if (r) {
|
|
51200
|
-
const i = (0, Tn.getId)(r), s = new
|
|
51201
|
-
return new
|
|
51200
|
+
const i = (0, Tn.getId)(r), s = new ie.ExprIdReference(this.getFieldPath(n, ie.ExpressionFieldReference));
|
|
51201
|
+
return new ie.RecordElement(i, s);
|
|
51202
51202
|
}
|
|
51203
51203
|
throw this.internalError(n, "IMPOSSIBLY A PATH CONTAINED ZERO ELEMENTS");
|
|
51204
51204
|
}
|
|
51205
51205
|
visitRecordExpr(e) {
|
|
51206
51206
|
const n = (0, Tn.getId)(e.recordKey()), r = this.getFieldExpr(e.fieldExpr());
|
|
51207
|
-
return new
|
|
51207
|
+
return new ie.RecordElement(n, r);
|
|
51208
51208
|
}
|
|
51209
51209
|
visitExprLiteralRecord(e) {
|
|
51210
|
-
|
|
51211
|
-
|
|
51210
|
+
this.contextError(e, "not-yet-implemented", "Record data is not yet implemented");
|
|
51211
|
+
const n = this.only(e.recordElement().map((r) => this.astAt(this.visit(r), r)), (r) => r instanceof ie.RecordElement && r, "a key value pair");
|
|
51212
|
+
return new ie.RecordLiteral(n);
|
|
51213
|
+
}
|
|
51214
|
+
visitExprArrayLiteral(e) {
|
|
51215
|
+
return this.contextError(e, "not-yet-implemented", "Array data is not yet implemented"), new ie.Unimplemented();
|
|
51212
51216
|
}
|
|
51213
51217
|
visitExprWarnLike(e) {
|
|
51214
51218
|
let n = "~";
|
|
51215
51219
|
const r = e.fieldExpr(0), i = e.fieldExpr(1), s = this.parseInfo.rangeFromContext(e);
|
|
51216
|
-
return e.NOT() ? (n = "!~", this.warnWithReplacement("sql-not-like", "Use Malloy operator '!~' instead of 'NOT LIKE'", s, `${this.getSourceCode(r)} !~ ${this.getSourceCode(i)}`)) : this.warnWithReplacement("sql-like", "Use Malloy operator '~' instead of 'LIKE'", s, `${this.getSourceCode(r)} ~ ${this.getSourceCode(i)}`), this.astAt(new
|
|
51220
|
+
return e.NOT() ? (n = "!~", this.warnWithReplacement("sql-not-like", "Use Malloy operator '!~' instead of 'NOT LIKE'", s, `${this.getSourceCode(r)} !~ ${this.getSourceCode(i)}`)) : this.warnWithReplacement("sql-like", "Use Malloy operator '~' instead of 'LIKE'", s, `${this.getSourceCode(r)} ~ ${this.getSourceCode(i)}`), this.astAt(new ie.ExprCompare(this.getFieldExpr(r), n, this.getFieldExpr(i)), e);
|
|
51217
51221
|
}
|
|
51218
51222
|
visitExprWarnNullCmp(e) {
|
|
51219
51223
|
let n = "=";
|
|
51220
51224
|
const r = e.fieldExpr(), i = this.parseInfo.rangeFromContext(e);
|
|
51221
51225
|
e.NOT() ? (n = "!=", this.warnWithReplacement("sql-is-not-null", "Use '!= NULL' to check for NULL instead of 'IS NOT NULL'", i, `${this.getSourceCode(r)} != null`)) : this.warnWithReplacement("sql-is-null", "Use '= NULL' to check for NULL instead of 'IS NULL'", i, `${this.getSourceCode(r)} = null`);
|
|
51222
|
-
const s = new
|
|
51223
|
-
return this.astAt(new
|
|
51226
|
+
const s = new ie.ExprNULL();
|
|
51227
|
+
return this.astAt(new ie.ExprCompare(this.getFieldExpr(r), n, s), e);
|
|
51224
51228
|
}
|
|
51225
51229
|
visitExprWarnIn(e) {
|
|
51226
|
-
const n = this.getFieldExpr(e.fieldExpr()), r = !!e.NOT(), i = e.fieldExprList().fieldExpr(), s = this.astAt(new
|
|
51230
|
+
const n = this.getFieldExpr(e.fieldExpr()), r = !!e.NOT(), i = e.fieldExprList().fieldExpr(), s = this.astAt(new ie.ExprLegacyIn(n, r, i.map((o) => this.getFieldExpr(o))), e);
|
|
51227
51231
|
return this.warnWithReplacement("sql-in", `Use = (a|b|c) instead of${r ? " NOT" : ""} IN (a,b,c)`, this.parseInfo.rangeFromContext(e), `${this.getSourceCode(e.fieldExpr())} ${r ? "!=" : "="} (${i.map((o) => this.getSourceCode(o)).join(" | ")})`), s;
|
|
51228
51232
|
}
|
|
51229
51233
|
}
|
|
@@ -55437,7 +55441,7 @@ var rJ = { exports: {} };
|
|
|
55437
55441
|
return N;
|
|
55438
55442
|
}
|
|
55439
55443
|
i._split = X;
|
|
55440
|
-
var
|
|
55444
|
+
var se = /\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;
|
|
55441
55445
|
function oe(T) {
|
|
55442
55446
|
for (var N = 0, B = "", q = ""; N < T.length; )
|
|
55443
55447
|
switch (B = T.charAt(N)) {
|
|
@@ -55490,7 +55494,7 @@ var rJ = { exports: {} };
|
|
|
55490
55494
|
case "[":
|
|
55491
55495
|
for (q = B; T.charAt(N++) !== "]" && N < T.length; )
|
|
55492
55496
|
q += T.charAt(N);
|
|
55493
|
-
if (q.match(
|
|
55497
|
+
if (q.match(se))
|
|
55494
55498
|
return !0;
|
|
55495
55499
|
break;
|
|
55496
55500
|
case ".":
|
|
@@ -55596,7 +55600,7 @@ var rJ = { exports: {} };
|
|
|
55596
55600
|
z += T.charAt(P);
|
|
55597
55601
|
if (z.slice(-1) !== "]")
|
|
55598
55602
|
throw 'unterminated "[" block: |' + z + "|";
|
|
55599
|
-
if (z.match(
|
|
55603
|
+
if (z.match(se)) {
|
|
55600
55604
|
if (ue == null && (ue = C(N, B), ue == null))
|
|
55601
55605
|
return "";
|
|
55602
55606
|
I[I.length] = { t: "Z", v: z.toLowerCase() }, he = z.charAt(1);
|
|
@@ -58079,7 +58083,7 @@ function SZ(t) {
|
|
|
58079
58083
|
a: J,
|
|
58080
58084
|
A: ne,
|
|
58081
58085
|
b: X,
|
|
58082
|
-
B:
|
|
58086
|
+
B: se,
|
|
58083
58087
|
c: null,
|
|
58084
58088
|
d: jj,
|
|
58085
58089
|
e: jj,
|
|
@@ -58252,7 +58256,7 @@ function SZ(t) {
|
|
|
58252
58256
|
function X(T) {
|
|
58253
58257
|
return a[T.getMonth()];
|
|
58254
58258
|
}
|
|
58255
|
-
function
|
|
58259
|
+
function se(T) {
|
|
58256
58260
|
return u[T.getMonth()];
|
|
58257
58261
|
}
|
|
58258
58262
|
function oe(T) {
|
|
@@ -62765,17 +62769,17 @@ function VNe() {
|
|
|
62765
62769
|
var G = oU(R / x * Ko(b)), K = oU(R / h * Ko(b));
|
|
62766
62770
|
(S -= G * 2) > Nr ? (G *= y ? 1 : -1, v += G, _ -= G) : (S = 0, v = _ = (p + m) / 2), (C -= K * 2) > Nr ? (K *= y ? 1 : -1, E += K, A -= K) : (C = 0, E = A = (p + m) / 2);
|
|
62767
62771
|
}
|
|
62768
|
-
var J = h * Sc(E), ne = h * Ko(E), X = x * Sc(_),
|
|
62772
|
+
var J = h * Sc(E), ne = h * Ko(E), X = x * Sc(_), se = x * Ko(_);
|
|
62769
62773
|
if (O > Nr) {
|
|
62770
62774
|
var oe = h * Sc(A), Ee = h * Ko(A), D = x * Sc(v), k = x * Ko(v), j;
|
|
62771
62775
|
if (g < oh)
|
|
62772
|
-
if (j = WNe(J, ne, D, k, oe, Ee, X,
|
|
62776
|
+
if (j = WNe(J, ne, D, k, oe, Ee, X, se)) {
|
|
62773
62777
|
var V = J - j[0], U = ne - j[1], $ = oe - j[0], T = Ee - j[1], N = 1 / Ko(PNe((V * $ + U * T) / (Uc(V * V + U * U) * Uc($ * $ + T * T))) / 2), B = Uc(j[0] * j[0] + j[1] * j[1]);
|
|
62774
62778
|
L = uR(O, (x - B) / (N - 1)), M = uR(O, (h - B) / (N + 1));
|
|
62775
62779
|
} else
|
|
62776
62780
|
L = M = 0;
|
|
62777
62781
|
}
|
|
62778
|
-
C > Nr ? M > Nr ? (H = uE(D, k, J, ne, h, M, y), W = uE(oe, Ee, X,
|
|
62782
|
+
C > Nr ? M > Nr ? (H = uE(D, k, J, ne, h, M, y), W = uE(oe, Ee, X, se, h, M, y), u.moveTo(H.cx + H.x01, H.cy + H.y01), M < O ? u.arc(H.cx, H.cy, M, Dr(H.y01, H.x01), Dr(W.y01, W.x01), !y) : (u.arc(H.cx, H.cy, M, Dr(H.y01, H.x01), Dr(H.y11, H.x11), !y), u.arc(0, 0, h, Dr(H.cy + H.y11, H.cx + H.x11), Dr(W.cy + W.y11, W.cx + W.x11), !y), u.arc(W.cx, W.cy, M, Dr(W.y11, W.x11), Dr(W.y01, W.x01), !y))) : (u.moveTo(J, ne), u.arc(0, 0, h, E, A, !y)) : u.moveTo(J, ne), !(x > Nr) || !(S > Nr) ? u.lineTo(X, se) : L > Nr ? (H = uE(X, se, oe, Ee, x, -L, y), W = uE(J, ne, D, k, x, -L, y), u.lineTo(H.cx + H.x01, H.cy + H.y01), L < O ? u.arc(H.cx, H.cy, L, Dr(H.y01, H.x01), Dr(W.y01, W.x01), !y) : (u.arc(H.cx, H.cy, L, Dr(H.y01, H.x01), Dr(H.y11, H.x11), !y), u.arc(0, 0, x, Dr(H.cy + H.y11, H.cx + H.x11), Dr(W.cy + W.y11, W.cx + W.x11), y), u.arc(W.cx, W.cy, L, Dr(W.y11, W.x11), Dr(W.y01, W.x01), !y))) : u.arc(0, 0, x, _, v, y);
|
|
62779
62783
|
}
|
|
62780
62784
|
if (u.closePath(), c)
|
|
62781
62785
|
return u = null, c + "" || null;
|
|
@@ -65477,8 +65481,8 @@ function rLe(t, e, n, r, i, s, o, u, a) {
|
|
|
65477
65481
|
G < 0 && s === 1 ? G += uu : G > 0 && s === 0 && (G -= uu);
|
|
65478
65482
|
const K = Math.ceil(Math.abs(G / (Bc + 1e-3))), J = [];
|
|
65479
65483
|
for (let ne = 0; ne < K; ++ne) {
|
|
65480
|
-
const X = H + ne * G / K,
|
|
65481
|
-
J[ne] = [L, M, X,
|
|
65484
|
+
const X = H + ne * G / K, se = H + (ne + 1) * G / K;
|
|
65485
|
+
J[ne] = [L, M, X, se, n, r, f, x];
|
|
65482
65486
|
}
|
|
65483
65487
|
return pR[l] = J;
|
|
65484
65488
|
}
|
|
@@ -69552,8 +69556,8 @@ function pke(t) {
|
|
|
69552
69556
|
return W;
|
|
69553
69557
|
var G = c[0], K = f[0], J = c[1], ne = f[1], X;
|
|
69554
69558
|
K < G && (X = G, G = K, K = X);
|
|
69555
|
-
var
|
|
69556
|
-
if (!oe && ne < J && (X = J, J = ne, ne = X), Ee ? oe ? J + ne > 0 ^ W[1] < (vt(W[0] - G) < Ze ? J : ne) : J <= W[1] && W[1] <= ne :
|
|
69559
|
+
var se = K - G, oe = vt(se - gt) < Ze, Ee = oe || se < Ze;
|
|
69560
|
+
if (!oe && ne < J && (X = J, J = ne, ne = X), Ee ? oe ? J + ne > 0 ^ W[1] < (vt(W[0] - G) < Ze ? J : ne) : J <= W[1] && W[1] <= ne : se > gt ^ (G <= W[0] && W[0] <= K)) {
|
|
69557
69561
|
var D = yE(R, (-O + H) / L);
|
|
69558
69562
|
return _R(D, C), [W, Xv(D)];
|
|
69559
69563
|
}
|
|
@@ -69650,7 +69654,7 @@ function Vre(t, e, n, r) {
|
|
|
69650
69654
|
}
|
|
69651
69655
|
function R() {
|
|
69652
69656
|
for (var G = 0, K = 0, J = h.length; K < J; ++K)
|
|
69653
|
-
for (var ne = h[K], X = 1,
|
|
69657
|
+
for (var ne = h[K], X = 1, se = ne.length, oe = ne[0], Ee, D, k = oe[0], j = oe[1]; X < se; ++X)
|
|
69654
69658
|
Ee = k, D = j, oe = ne[X], k = oe[0], j = oe[1], D <= r ? j > r && (k - Ee) * (r - D) > (j - D) * (t - Ee) && ++G : j <= r && (k - Ee) * (r - D) < (j - D) * (t - Ee) && --G;
|
|
69655
69659
|
return G;
|
|
69656
69660
|
}
|
|
@@ -73921,13 +73925,13 @@ class vS {
|
|
|
73921
73925
|
continue;
|
|
73922
73926
|
let X = this._addTriangle(J, H, r[J], -1, -1, i[J]);
|
|
73923
73927
|
i[H] = this._legalize(X + 2), i[J] = X, R++;
|
|
73924
|
-
let
|
|
73925
|
-
for (; ne = r[
|
|
73926
|
-
X = this._addTriangle(
|
|
73928
|
+
let se = r[J];
|
|
73929
|
+
for (; ne = r[se], CE(W, G, e[2 * se], e[2 * se + 1], e[2 * ne], e[2 * ne + 1]) < 0; )
|
|
73930
|
+
X = this._addTriangle(se, H, ne, i[H], -1, i[se]), i[H] = this._legalize(X + 2), r[se] = se, R--, se = ne;
|
|
73927
73931
|
if (J === K)
|
|
73928
73932
|
for (; ne = n[J], CE(W, G, e[2 * ne], e[2 * ne + 1], e[2 * J], e[2 * J + 1]) < 0; )
|
|
73929
73933
|
X = this._addTriangle(ne, H, J, -1, i[J], i[ne]), this._legalize(X + 2), i[ne] = X, r[J] = J, R--, J = ne;
|
|
73930
|
-
this._hullStart = n[H] = J, r[J] = n[
|
|
73934
|
+
this._hullStart = n[H] = J, r[J] = n[se] = H, r[H] = se, s[this._hashKey(W, G)] = H, s[this._hashKey(e[2 * J], e[2 * J + 1])] = J;
|
|
73931
73935
|
}
|
|
73932
73936
|
this.hull = new Uint32Array(R);
|
|
73933
73937
|
for (let O = 0, L = this._hullStart; O < R; O++)
|
|
@@ -74120,8 +74124,8 @@ let dUe = class {
|
|
|
74120
74124
|
const ne = 1e9 * Math.sign((s - C) * K - (o - b) * G);
|
|
74121
74125
|
E = (C + L) / 2 - ne * K, A = (b + M) / 2 + ne * G;
|
|
74122
74126
|
} else {
|
|
74123
|
-
const ne = 1 / J, X = H * H + W * W,
|
|
74124
|
-
E = C + (K * X - W *
|
|
74127
|
+
const ne = 1 / J, X = H * H + W * W, se = G * G + K * K;
|
|
74128
|
+
E = C + (K * X - W * se) * ne, A = b + (H * se - G * X) * ne;
|
|
74125
74129
|
}
|
|
74126
74130
|
u[g] = E, u[g + 1] = A;
|
|
74127
74131
|
}
|
|
@@ -74616,8 +74620,8 @@ function CUe() {
|
|
|
74616
74620
|
if (m.x = y + b, m.y = E + R, !(m.x + m.x0 < 0 || m.y + m.y0 < 0 || m.x + m.x1 > t[0] || m.y + m.y1 > t[1]) && (!g || !TUe(m, p, t[0])) && (!g || OUe(m, g))) {
|
|
74617
74621
|
for (var O = m.sprite, L = m.width >> 5, M = t[0] >> 5, H = m.x - (L << 4), W = H & 127, G = 32 - W, K = m.y1 - m.y0, J = (m.y + m.y0) * M + (H >> 5), ne, X = 0; X < K; X++) {
|
|
74618
74622
|
ne = 0;
|
|
74619
|
-
for (var
|
|
74620
|
-
p[J +
|
|
74623
|
+
for (var se = 0; se <= L; se++)
|
|
74624
|
+
p[J + se] |= ne << G | (se < L ? (ne = O[X * L + se]) >>> W : 0);
|
|
74621
74625
|
J += M;
|
|
74622
74626
|
}
|
|
74623
74627
|
return m.sprite = null, !0;
|
|
@@ -80102,8 +80106,8 @@ var foe = { exports: {} };
|
|
|
80102
80106
|
y.push(_), E.push(C);
|
|
80103
80107
|
}
|
|
80104
80108
|
n(_, r) && _.forEach(function(J, ne) {
|
|
80105
|
-
var X = v(ne, S - 1),
|
|
80106
|
-
C.set(X,
|
|
80109
|
+
var X = v(ne, S - 1), se = v(J, S - 1);
|
|
80110
|
+
C.set(X, se);
|
|
80107
80111
|
}), n(_, i) && _.forEach(function(J) {
|
|
80108
80112
|
var ne = v(J, S - 1);
|
|
80109
80113
|
C.add(ne);
|
|
@@ -83413,7 +83417,7 @@ function jue(t, { config: e }) {
|
|
|
83413
83417
|
];
|
|
83414
83418
|
if (x === "min-max")
|
|
83415
83419
|
return Object.assign(Object.assign({}, a), { transform: ((r = a.transform) !== null && r !== void 0 ? r : []).concat(m), layer: X });
|
|
83416
|
-
const
|
|
83420
|
+
const se = `datum["lower_box_${g.field}"]`, oe = `datum["upper_box_${g.field}"]`, Ee = `(${oe} - ${se})`, D = `${se} - ${c} * ${Ee}`, k = `${oe} + ${c} * ${Ee}`, j = `datum["${g.field}"]`, V = {
|
|
83417
83421
|
joinaggregate: Uue(g.field),
|
|
83418
83422
|
groupby: E
|
|
83419
83423
|
}, U = {
|
|
@@ -93084,11 +93088,11 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93084
93088
|
};
|
|
93085
93089
|
if (n.root) {
|
|
93086
93090
|
let ne = 0;
|
|
93087
|
-
Object.entries(n.headerSizeStore[0]).sort(([
|
|
93088
|
-
J[`--malloy-render--table-header-height-${
|
|
93091
|
+
Object.entries(n.headerSizeStore[0]).sort(([se], [oe]) => parseInt(se) - parseInt(oe)).forEach(([se, oe]) => {
|
|
93092
|
+
J[`--malloy-render--table-header-height-${se}`] = `${oe}px`, ne += oe, J[`--malloy-render--table-header-cumulative-height-${se}`] = `${ne}px`;
|
|
93089
93093
|
}), J["--total-header-size"] = n.layout.totalHeaderSize;
|
|
93090
|
-
const X = o().map(([
|
|
93091
|
-
const oe = n.store.columnWidths[
|
|
93094
|
+
const X = o().map(([se]) => {
|
|
93095
|
+
const oe = n.store.columnWidths[se];
|
|
93092
93096
|
return `minmax(${oe ? oe + "px" : "auto"}, max-content)`;
|
|
93093
93097
|
}).join(" ");
|
|
93094
93098
|
J["grid-template-columns"] = X;
|
|
@@ -93123,13 +93127,13 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93123
93127
|
id(() => {
|
|
93124
93128
|
if (n.root) {
|
|
93125
93129
|
const [K, J] = n.headerSizeStore, ne = new ResizeObserver((X) => {
|
|
93126
|
-
const
|
|
93130
|
+
const se = X.reduce((oe, Ee) => {
|
|
93127
93131
|
const D = Ee.target.getAttribute("data-depth"), k = Ee.contentRect.height;
|
|
93128
93132
|
return typeof D == "string" && K[D] !== k && (oe[D] = k), oe;
|
|
93129
93133
|
}, {});
|
|
93130
|
-
Object.entries(
|
|
93134
|
+
Object.entries(se).length > 0 && J((oe) => ({
|
|
93131
93135
|
...oe,
|
|
93132
|
-
...
|
|
93136
|
+
...se
|
|
93133
93137
|
}));
|
|
93134
93138
|
});
|
|
93135
93139
|
v.forEach((X) => {
|
|
@@ -93160,10 +93164,10 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93160
93164
|
if (M || W) {
|
|
93161
93165
|
const J = L.querySelectorAll("[data-pinned-header]"), ne = [];
|
|
93162
93166
|
J.forEach((X) => {
|
|
93163
|
-
const
|
|
93164
|
-
(typeof Ee > "u" || oe > Ee) && ne.push([
|
|
93167
|
+
const se = X.getAttribute("data-pinned-header"), oe = X.clientWidth, Ee = n.store.columnWidths[se];
|
|
93168
|
+
(typeof Ee > "u" || oe > Ee) && ne.push([se, oe]);
|
|
93165
93169
|
}), ne.length > 0 && n.setStore("columnWidths", ait((X) => {
|
|
93166
|
-
ne.forEach(([
|
|
93170
|
+
ne.forEach(([se, oe]) => X[se] = oe);
|
|
93167
93171
|
})), setTimeout(() => W = !1, 0);
|
|
93168
93172
|
}
|
|
93169
93173
|
}).observe(L);
|
|
@@ -93173,8 +93177,8 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93173
93177
|
new ResizeObserver((ne) => {
|
|
93174
93178
|
if (!M && !W) {
|
|
93175
93179
|
const [X] = ne;
|
|
93176
|
-
K !== X.contentRect.width && (K = X.contentRect.width, n.setStore((
|
|
93177
|
-
...
|
|
93180
|
+
K !== X.contentRect.width && (K = X.contentRect.width, n.setStore((se) => ({
|
|
93181
|
+
...se,
|
|
93178
93182
|
columnWidths: {}
|
|
93179
93183
|
})));
|
|
93180
93184
|
}
|
|
@@ -93205,9 +93209,9 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93205
93209
|
get each() {
|
|
93206
93210
|
return x();
|
|
93207
93211
|
},
|
|
93208
|
-
children: (X,
|
|
93212
|
+
children: (X, se) => (() => {
|
|
93209
93213
|
var oe = Nit();
|
|
93210
|
-
return iu((Ee) => v[
|
|
93214
|
+
return iu((Ee) => v[se()] = Ee, oe), At(oe, ot(ts, {
|
|
93211
93215
|
each: X,
|
|
93212
93216
|
children: (Ee) => ot(yQ, {
|
|
93213
93217
|
get field() {
|
|
@@ -93215,7 +93219,7 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93215
93219
|
},
|
|
93216
93220
|
isPinned: !0
|
|
93217
93221
|
})
|
|
93218
|
-
})), $r(() => du(oe, "data-depth",
|
|
93222
|
+
})), $r(() => du(oe, "data-depth", se())), oe;
|
|
93219
93223
|
})()
|
|
93220
93224
|
})), $r((X) => Dd(J, G(), X)), J;
|
|
93221
93225
|
})()];
|
|
@@ -93227,10 +93231,10 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93227
93231
|
return J.style.setProperty("width", "100%"), J.style.setProperty("position", "relative"), ne.style.setProperty("height", "fit-content"), ne.style.setProperty("width", "100%"), At(ne, ot(ts, {
|
|
93228
93232
|
each: O,
|
|
93229
93233
|
children: (X) => (() => {
|
|
93230
|
-
var
|
|
93234
|
+
var se = dO();
|
|
93231
93235
|
return iu((oe) => queueMicrotask(() => {
|
|
93232
93236
|
S.measureElement(oe), X.index === 0 && b(oe.clientHeight);
|
|
93233
|
-
}),
|
|
93237
|
+
}), se), At(se, ot(Bl, {
|
|
93234
93238
|
get when() {
|
|
93235
93239
|
return X.index >= 0;
|
|
93236
93240
|
},
|
|
@@ -93247,12 +93251,12 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93247
93251
|
})
|
|
93248
93252
|
});
|
|
93249
93253
|
}
|
|
93250
|
-
})), $r(() => du(
|
|
93254
|
+
})), $r(() => du(se, "data-index", X.index)), se;
|
|
93251
93255
|
})()
|
|
93252
93256
|
})), $r((X) => {
|
|
93253
93257
|
var Ee;
|
|
93254
|
-
var
|
|
93255
|
-
return
|
|
93258
|
+
var se = S.getTotalSize() + "px", oe = `${((Ee = O[0]) == null ? void 0 : Ee.start) ?? 0}px`;
|
|
93259
|
+
return se !== X.e && ((X.e = se) != null ? J.style.setProperty("height", se) : J.style.removeProperty("height")), oe !== X.t && ((X.t = oe) != null ? ne.style.setProperty("padding-top", oe) : ne.style.removeProperty("padding-top")), X;
|
|
93256
93260
|
}, {
|
|
93257
93261
|
e: void 0,
|
|
93258
93262
|
t: void 0
|
|
@@ -93303,8 +93307,8 @@ const Fit = navigator.userAgent.toLowerCase().indexOf("chrome") >= 0, Lit = Fit,
|
|
|
93303
93307
|
})];
|
|
93304
93308
|
}
|
|
93305
93309
|
}), null), $r((J) => {
|
|
93306
|
-
var ne = !!n.root, X = !!A(),
|
|
93307
|
-
return ne !== J.e && K.classList.toggle("root", J.e = ne), X !== J.t && K.classList.toggle("pinned", J.t = X),
|
|
93310
|
+
var ne = !!n.root, X = !!A(), se = n.root ? "table-container" : "", oe = u();
|
|
93311
|
+
return ne !== J.e && K.classList.toggle("root", J.e = ne), X !== J.t && K.classList.toggle("pinned", J.t = X), se !== J.a && du(K, "part", J.a = se), J.o = Dd(K, oe, J.o), J;
|
|
93308
93312
|
}, {
|
|
93309
93313
|
e: void 0,
|
|
93310
93314
|
t: void 0,
|
|
@@ -93610,9 +93614,9 @@ function nB(t, e, n, r) {
|
|
|
93610
93614
|
e.fields[b].max
|
|
93611
93615
|
], L = Ot("linear")().domain([R, O]).nice().range([a, 0]), M = L.domain();
|
|
93612
93616
|
if (v) {
|
|
93613
|
-
const J = L.domain().at(1), ne = L.domain().at(0), X = LZ(),
|
|
93617
|
+
const J = L.domain().at(1), ne = L.domain().at(0), X = LZ(), se = X.format(",")(ne), oe = X.format(",")(J);
|
|
93614
93618
|
h = Math.max(
|
|
93615
|
-
W6(
|
|
93619
|
+
W6(se, "10px Inter, sans-serif") + 4,
|
|
93616
93620
|
W6(oe, "10px Inter, sans-serif") + 4
|
|
93617
93621
|
) + 5 + 31;
|
|
93618
93622
|
const k = Math.ceil(a / 40), V = L.ticks(k).at(-1);
|
|
@@ -93622,8 +93626,8 @@ function nB(t, e, n, r) {
|
|
|
93622
93626
|
}
|
|
93623
93627
|
}
|
|
93624
93628
|
if (A) {
|
|
93625
|
-
const J = Us(i), ne = e.fields[J].maxString, X = W6(ne, "10px Inter, sans-serif") + 4,
|
|
93626
|
-
E = 26, x = Math.min(X,
|
|
93629
|
+
const J = Us(i), ne = e.fields[J].maxString, X = W6(ne, "10px Inter, sans-serif") + 4, se = 1;
|
|
93630
|
+
E = 26, x = Math.min(X, se * a), y = x;
|
|
93627
93631
|
const oe = e.fields[J].values.size, D = oe <= 20 ? oe : _.maxUniqueFieldValueCounts.get(
|
|
93628
93632
|
e.getFieldKey(i)
|
|
93629
93633
|
), k = u / D;
|
|
@@ -146384,8 +146388,8 @@ function yst(t, e, n, r) {
|
|
|
146384
146388
|
throw new Error("Malloy Bar Chart: Missing y field");
|
|
146385
146389
|
const u = ss(t, i), a = ss(t, s), l = o ? ss(t, o) : null;
|
|
146386
146390
|
let c = 1 / 0, f = -1 / 0;
|
|
146387
|
-
for (const
|
|
146388
|
-
const oe = ss(t,
|
|
146391
|
+
for (const se of e.yChannel.fields) {
|
|
146392
|
+
const oe = ss(t, se), Ee = n.field(oe).min;
|
|
146389
146393
|
Ee !== null && (c = Math.min(c, Ee));
|
|
146390
146394
|
const D = n.field(oe).max;
|
|
146391
146395
|
D !== null && (f = Math.max(f, D));
|
|
@@ -146490,7 +146494,7 @@ function yst(t, e, n, r) {
|
|
|
146490
146494
|
}, G = l || e.yChannel.fields.length > 1;
|
|
146491
146495
|
let K = 0;
|
|
146492
146496
|
G && (l ? (K = ((X = n.field(l).maxString) == null ? void 0 : X.length) ?? 0, K = Math.max(K, l.name.length)) : K = e.yChannel.fields.reduce(
|
|
146493
|
-
(
|
|
146497
|
+
(se, oe) => Math.max(se, oe.length),
|
|
146494
146498
|
K
|
|
146495
146499
|
));
|
|
146496
146500
|
const J = Math.min(
|
|
@@ -146675,7 +146679,7 @@ function Sst(t, e, n, r) {
|
|
|
146675
146679
|
], W.encoding.y.field = "value", W.encoding.color.field = "key", delete W.encoding.color.datum, [...e.yChannel.fields], X.title = "", W.encoding.color.legend = X, W.encoding.y.axis.title = ""), e.isStreamGraph && (W.encoding.y.stack = "center", W.encoding.y.axis = null, W.encoding.x.axis.grid = !0, W.mark.line = !1, W.encoding.opacity = { value: 1 }, W.encoding.fillOpacity = { value: 1 }), e.isDiffChart && (W.encoding.y2 = {
|
|
146676
146680
|
field: e.y2Channel.fields.at(0)
|
|
146677
146681
|
});
|
|
146678
|
-
const
|
|
146682
|
+
const se = [W];
|
|
146679
146683
|
e.isDiffChart && !e.isDimensionalSeries && (G.transform = [
|
|
146680
146684
|
{
|
|
146681
146685
|
fold: [...h]
|
|
@@ -146685,7 +146689,7 @@ function Sst(t, e, n, r) {
|
|
|
146685
146689
|
legend: X
|
|
146686
146690
|
}, X.title = "", W.encoding.color.legend = null, W.encoding.y.axis.title = "", G.encoding.y.axis.title = "", W.encoding.y2 = {
|
|
146687
146691
|
field: e.y2Channel.fields.at(0)
|
|
146688
|
-
},
|
|
146692
|
+
}, se.push(G));
|
|
146689
146693
|
const oe = g.padding;
|
|
146690
146694
|
return K && (oe.right = ne), {
|
|
146691
146695
|
spec: {
|
|
@@ -146700,7 +146704,7 @@ function Sst(t, e, n, r) {
|
|
|
146700
146704
|
padding: oe,
|
|
146701
146705
|
data: { values: [] },
|
|
146702
146706
|
params: [{ name: "dataLength", expr: "length(data('source_0'))" }],
|
|
146703
|
-
layer:
|
|
146707
|
+
layer: se
|
|
146704
146708
|
},
|
|
146705
146709
|
specType: "vega-lite",
|
|
146706
146710
|
plotWidth: g.plotWidth,
|