@stencil/core 4.32.0 → 4.33.0
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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +21 -9
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/index.d.ts +2 -0
- package/internal/app-globals/index.js +14 -0
- package/internal/app-globals/package.json +14 -0
- package/internal/client/index.js +285 -286
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +284 -293
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +53 -32
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +4 -1
- package/internal/stencil-public-runtime.d.ts +1 -1
- package/internal/testing/index.js +294 -288
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +28 -10
- package/mock-doc/index.d.ts +5 -4
- package/mock-doc/index.js +28 -10
- package/mock-doc/package.json +1 -1
- package/package.json +5 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +21 -21
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +27 -24
- package/testing/package.json +1 -1
|
@@ -21,7 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
Build: () => Build,
|
|
24
|
-
Env: () =>
|
|
24
|
+
Env: () => import_app_data23.Env,
|
|
25
25
|
Fragment: () => Fragment,
|
|
26
26
|
HYDRATED_STYLE_ID: () => HYDRATED_STYLE_ID,
|
|
27
27
|
Host: () => Host,
|
|
@@ -371,7 +371,7 @@ var isMemberInElement = (elm, memberName) => {
|
|
|
371
371
|
};
|
|
372
372
|
|
|
373
373
|
// src/testing/platform/index.ts
|
|
374
|
-
var
|
|
374
|
+
var import_app_data23 = require("@stencil/core/internal/app-data");
|
|
375
375
|
|
|
376
376
|
// src/runtime/asset-path.ts
|
|
377
377
|
var getAssetPath = (path) => {
|
|
@@ -381,7 +381,7 @@ var getAssetPath = (path) => {
|
|
|
381
381
|
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
382
382
|
|
|
383
383
|
// src/runtime/bootstrap-custom-element.ts
|
|
384
|
-
var
|
|
384
|
+
var import_app_data20 = require("@stencil/core/internal/app-data");
|
|
385
385
|
|
|
386
386
|
// src/utils/constants.ts
|
|
387
387
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
@@ -581,6 +581,26 @@ function deserializeProperty(value) {
|
|
|
581
581
|
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
+
// src/utils/shadow-root.ts
|
|
585
|
+
var import_app_data = require("@stencil/core/internal/app-data");
|
|
586
|
+
|
|
587
|
+
// src/app-globals/index.ts
|
|
588
|
+
var globalStyles = (
|
|
589
|
+
/* default */
|
|
590
|
+
""
|
|
591
|
+
);
|
|
592
|
+
|
|
593
|
+
// src/utils/shadow-root.ts
|
|
594
|
+
function createShadowRoot(cmpMeta) {
|
|
595
|
+
const shadowRoot = import_app_data.BUILD.shadowDelegatesFocus ? this.attachShadow({
|
|
596
|
+
mode: "open",
|
|
597
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
598
|
+
}) : this.attachShadow({ mode: "open" });
|
|
599
|
+
const sheet = new CSSStyleSheet();
|
|
600
|
+
sheet.replaceSync(globalStyles);
|
|
601
|
+
shadowRoot.adoptedStyleSheets.push(sheet);
|
|
602
|
+
}
|
|
603
|
+
|
|
584
604
|
// src/utils/util.ts
|
|
585
605
|
var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
|
|
586
606
|
var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
|
|
@@ -596,16 +616,16 @@ var isJsxFile = lowerPathParam(
|
|
|
596
616
|
var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
|
|
597
617
|
|
|
598
618
|
// src/runtime/connected-callback.ts
|
|
599
|
-
var
|
|
619
|
+
var import_app_data18 = require("@stencil/core/internal/app-data");
|
|
600
620
|
|
|
601
621
|
// src/runtime/client-hydrate.ts
|
|
602
|
-
var
|
|
622
|
+
var import_app_data6 = require("@stencil/core/internal/app-data");
|
|
603
623
|
|
|
604
624
|
// src/runtime/dom-extras.ts
|
|
605
|
-
var
|
|
625
|
+
var import_app_data3 = require("@stencil/core/internal/app-data");
|
|
606
626
|
|
|
607
627
|
// src/runtime/slot-polyfill-utils.ts
|
|
608
|
-
var
|
|
628
|
+
var import_app_data2 = require("@stencil/core/internal/app-data");
|
|
609
629
|
|
|
610
630
|
// src/runtime/runtime-constants.ts
|
|
611
631
|
var CONTENT_REF_ID = "r";
|
|
@@ -711,7 +731,7 @@ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
|
711
731
|
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
712
732
|
const parent = slotNode["s-cr"].parentNode;
|
|
713
733
|
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
714
|
-
if (
|
|
734
|
+
if (import_app_data2.BUILD.hydrateClientSide && typeof position !== "undefined") {
|
|
715
735
|
slottedNodeLocation["s-oo"] = position;
|
|
716
736
|
const childNodes = internalCall(parent, "childNodes");
|
|
717
737
|
const slotRelocateNodes = [slottedNodeLocation];
|
|
@@ -789,9 +809,9 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
789
809
|
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
790
810
|
HostElementPrototype.cloneNode = function(deep) {
|
|
791
811
|
const srcNode = this;
|
|
792
|
-
const isShadowDom =
|
|
812
|
+
const isShadowDom = import_app_data3.BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
793
813
|
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
794
|
-
if (
|
|
814
|
+
if (import_app_data3.BUILD.slot && !isShadowDom && deep) {
|
|
795
815
|
let i2 = 0;
|
|
796
816
|
let slotted, nonStencilNode;
|
|
797
817
|
const stencilPrivates = [
|
|
@@ -816,7 +836,7 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
816
836
|
slotted = childNodes[i2]["s-nr"];
|
|
817
837
|
nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
|
|
818
838
|
if (slotted) {
|
|
819
|
-
if (
|
|
839
|
+
if (import_app_data3.BUILD.appendChildSlotFix && clonedNode.__appendChild) {
|
|
820
840
|
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
821
841
|
} else {
|
|
822
842
|
clonedNode.appendChild(slotted.cloneNode(true));
|
|
@@ -1148,10 +1168,10 @@ function internalCall(node, method) {
|
|
|
1148
1168
|
}
|
|
1149
1169
|
|
|
1150
1170
|
// src/runtime/profile.ts
|
|
1151
|
-
var
|
|
1171
|
+
var import_app_data4 = require("@stencil/core/internal/app-data");
|
|
1152
1172
|
var i = 0;
|
|
1153
1173
|
var createTime = (fnName, tagName = "") => {
|
|
1154
|
-
if (
|
|
1174
|
+
if (import_app_data4.BUILD.profile && performance.mark) {
|
|
1155
1175
|
const key = `st:${fnName}:${tagName}:${i++}`;
|
|
1156
1176
|
performance.mark(key);
|
|
1157
1177
|
return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
|
|
@@ -1162,7 +1182,7 @@ var createTime = (fnName, tagName = "") => {
|
|
|
1162
1182
|
}
|
|
1163
1183
|
};
|
|
1164
1184
|
var uniqueTime = (key, measureText) => {
|
|
1165
|
-
if (
|
|
1185
|
+
if (import_app_data4.BUILD.profile && performance.mark) {
|
|
1166
1186
|
if (performance.getEntriesByName(key, "mark").length === 0) {
|
|
1167
1187
|
performance.mark(key);
|
|
1168
1188
|
}
|
|
@@ -1220,7 +1240,7 @@ var inspect = (ref) => {
|
|
|
1220
1240
|
};
|
|
1221
1241
|
};
|
|
1222
1242
|
var installDevTools = () => {
|
|
1223
|
-
if (
|
|
1243
|
+
if (import_app_data4.BUILD.devTools) {
|
|
1224
1244
|
const stencil = win.stencil = win.stencil || {};
|
|
1225
1245
|
const originalInspect = stencil.inspect;
|
|
1226
1246
|
stencil.inspect = (ref) => {
|
|
@@ -1234,7 +1254,7 @@ var installDevTools = () => {
|
|
|
1234
1254
|
};
|
|
1235
1255
|
|
|
1236
1256
|
// src/runtime/vdom/h.ts
|
|
1237
|
-
var
|
|
1257
|
+
var import_app_data5 = require("@stencil/core/internal/app-data");
|
|
1238
1258
|
var h = (nodeName, vnodeData, ...children) => {
|
|
1239
1259
|
let child = null;
|
|
1240
1260
|
let key = null;
|
|
@@ -1250,7 +1270,7 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
1250
1270
|
} else if (child != null && typeof child !== "boolean") {
|
|
1251
1271
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
1252
1272
|
child = String(child);
|
|
1253
|
-
} else if (
|
|
1273
|
+
} else if (import_app_data5.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
1254
1274
|
consoleDevError(`vNode passed as children has unexpected type.
|
|
1255
1275
|
Make sure it's using the correct h() function.
|
|
1256
1276
|
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
@@ -1266,28 +1286,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
1266
1286
|
};
|
|
1267
1287
|
walk(children);
|
|
1268
1288
|
if (vnodeData) {
|
|
1269
|
-
if (
|
|
1289
|
+
if (import_app_data5.BUILD.isDev && nodeName === "input") {
|
|
1270
1290
|
validateInputProperties(vnodeData);
|
|
1271
1291
|
}
|
|
1272
|
-
if (
|
|
1292
|
+
if (import_app_data5.BUILD.vdomKey && vnodeData.key) {
|
|
1273
1293
|
key = vnodeData.key;
|
|
1274
1294
|
}
|
|
1275
|
-
if (
|
|
1295
|
+
if (import_app_data5.BUILD.slotRelocation && vnodeData.name) {
|
|
1276
1296
|
slotName = vnodeData.name;
|
|
1277
1297
|
}
|
|
1278
|
-
if (
|
|
1298
|
+
if (import_app_data5.BUILD.vdomClass) {
|
|
1279
1299
|
const classData = vnodeData.className || vnodeData.class;
|
|
1280
1300
|
if (classData) {
|
|
1281
1301
|
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
1282
1302
|
}
|
|
1283
1303
|
}
|
|
1284
1304
|
}
|
|
1285
|
-
if (
|
|
1305
|
+
if (import_app_data5.BUILD.isDev && vNodeChildren.some(isHost)) {
|
|
1286
1306
|
consoleDevError(`The <Host> must be the single root component. Make sure:
|
|
1287
1307
|
- You are NOT using hostData() and <Host> in the same component.
|
|
1288
1308
|
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
1289
1309
|
}
|
|
1290
|
-
if (
|
|
1310
|
+
if (import_app_data5.BUILD.vdomFunctional && typeof nodeName === "function") {
|
|
1291
1311
|
return nodeName(
|
|
1292
1312
|
vnodeData === null ? {} : vnodeData,
|
|
1293
1313
|
vNodeChildren,
|
|
@@ -1299,10 +1319,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
1299
1319
|
if (vNodeChildren.length > 0) {
|
|
1300
1320
|
vnode.$children$ = vNodeChildren;
|
|
1301
1321
|
}
|
|
1302
|
-
if (
|
|
1322
|
+
if (import_app_data5.BUILD.vdomKey) {
|
|
1303
1323
|
vnode.$key$ = key;
|
|
1304
1324
|
}
|
|
1305
|
-
if (
|
|
1325
|
+
if (import_app_data5.BUILD.slotRelocation) {
|
|
1306
1326
|
vnode.$name$ = slotName;
|
|
1307
1327
|
}
|
|
1308
1328
|
return vnode;
|
|
@@ -1315,13 +1335,13 @@ var newVNode = (tag, text) => {
|
|
|
1315
1335
|
$elm$: null,
|
|
1316
1336
|
$children$: null
|
|
1317
1337
|
};
|
|
1318
|
-
if (
|
|
1338
|
+
if (import_app_data5.BUILD.vdomAttribute) {
|
|
1319
1339
|
vnode.$attrs$ = null;
|
|
1320
1340
|
}
|
|
1321
|
-
if (
|
|
1341
|
+
if (import_app_data5.BUILD.vdomKey) {
|
|
1322
1342
|
vnode.$key$ = null;
|
|
1323
1343
|
}
|
|
1324
|
-
if (
|
|
1344
|
+
if (import_app_data5.BUILD.slotRelocation) {
|
|
1325
1345
|
vnode.$name$ = null;
|
|
1326
1346
|
}
|
|
1327
1347
|
return vnode;
|
|
@@ -1381,7 +1401,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1381
1401
|
const childRenderNodes = [];
|
|
1382
1402
|
const slotNodes = [];
|
|
1383
1403
|
const slottedNodes = [];
|
|
1384
|
-
const shadowRootNodes =
|
|
1404
|
+
const shadowRootNodes = import_app_data6.BUILD.shadowDom && shadowRoot ? [] : null;
|
|
1385
1405
|
const vnode = newVNode(tagName, null);
|
|
1386
1406
|
vnode.$elm$ = hostElm;
|
|
1387
1407
|
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
@@ -1398,7 +1418,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1398
1418
|
}
|
|
1399
1419
|
});
|
|
1400
1420
|
let scopeId2;
|
|
1401
|
-
if (
|
|
1421
|
+
if (import_app_data6.BUILD.scoped) {
|
|
1402
1422
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1403
1423
|
if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
|
|
1404
1424
|
scopeId2 = hostElm["s-sc"];
|
|
@@ -1487,7 +1507,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1487
1507
|
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1488
1508
|
}
|
|
1489
1509
|
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1490
|
-
if (
|
|
1510
|
+
if (import_app_data6.BUILD.experimentalSlotFixes) {
|
|
1491
1511
|
patchSlottedNode(slottedItem.node);
|
|
1492
1512
|
}
|
|
1493
1513
|
}
|
|
@@ -1496,12 +1516,12 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1496
1516
|
}
|
|
1497
1517
|
}
|
|
1498
1518
|
}
|
|
1499
|
-
if (
|
|
1519
|
+
if (import_app_data6.BUILD.scoped && scopeId2 && slotNodes.length) {
|
|
1500
1520
|
slotNodes.forEach((slot) => {
|
|
1501
1521
|
slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
|
|
1502
1522
|
});
|
|
1503
1523
|
}
|
|
1504
|
-
if (
|
|
1524
|
+
if (import_app_data6.BUILD.shadowDom && shadowRoot && !shadowRoot.childNodes.length) {
|
|
1505
1525
|
let rnIdex = 0;
|
|
1506
1526
|
const rnLen = shadowRootNodes.length;
|
|
1507
1527
|
if (rnLen) {
|
|
@@ -1551,7 +1571,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
1551
1571
|
if (!parentVNode.$children$) {
|
|
1552
1572
|
parentVNode.$children$ = [];
|
|
1553
1573
|
}
|
|
1554
|
-
if (
|
|
1574
|
+
if (import_app_data6.BUILD.scoped && scopeId2) {
|
|
1555
1575
|
node["s-si"] = scopeId2;
|
|
1556
1576
|
childVNode.$attrs$.class += " " + scopeId2;
|
|
1557
1577
|
}
|
|
@@ -1569,7 +1589,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
1569
1589
|
shadowRootNodes,
|
|
1570
1590
|
slottedNodes
|
|
1571
1591
|
);
|
|
1572
|
-
if (
|
|
1592
|
+
if (import_app_data6.BUILD.scoped && scopeId2) {
|
|
1573
1593
|
node.classList.add(scopeId2);
|
|
1574
1594
|
}
|
|
1575
1595
|
}
|
|
@@ -1666,9 +1686,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
1666
1686
|
slottedNodes
|
|
1667
1687
|
);
|
|
1668
1688
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1669
|
-
if (
|
|
1689
|
+
if (import_app_data6.BUILD.shadowDom && shadowRootNodes) {
|
|
1670
1690
|
node.remove();
|
|
1671
|
-
} else if (
|
|
1691
|
+
} else if (import_app_data6.BUILD.slotRelocation) {
|
|
1672
1692
|
hostElm["s-cr"] = node;
|
|
1673
1693
|
node["s-cn"] = true;
|
|
1674
1694
|
}
|
|
@@ -1734,7 +1754,7 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1734
1754
|
childVNode.$name$ = slotName || null;
|
|
1735
1755
|
childVNode.$tag$ = "slot";
|
|
1736
1756
|
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1737
|
-
if (
|
|
1757
|
+
if (import_app_data6.BUILD.shadowDom && shadowRootNodes && win.document) {
|
|
1738
1758
|
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1739
1759
|
if (childVNode.$name$) {
|
|
1740
1760
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
@@ -1783,7 +1803,7 @@ var findCorrespondingNode = (node, type) => {
|
|
|
1783
1803
|
};
|
|
1784
1804
|
|
|
1785
1805
|
// src/runtime/initialize-component.ts
|
|
1786
|
-
var
|
|
1806
|
+
var import_app_data17 = require("@stencil/core/internal/app-data");
|
|
1787
1807
|
|
|
1788
1808
|
// src/utils/shadow-css.ts
|
|
1789
1809
|
/**
|
|
@@ -2158,33 +2178,33 @@ var setMode = (handler) => modeResolutionChain.push(handler);
|
|
|
2158
2178
|
var getMode = (ref) => getHostRef(ref).$modeName$;
|
|
2159
2179
|
|
|
2160
2180
|
// src/runtime/proxy-component.ts
|
|
2161
|
-
var
|
|
2181
|
+
var import_app_data16 = require("@stencil/core/internal/app-data");
|
|
2162
2182
|
|
|
2163
2183
|
// src/runtime/set-value.ts
|
|
2164
|
-
var
|
|
2184
|
+
var import_app_data15 = require("@stencil/core/internal/app-data");
|
|
2165
2185
|
|
|
2166
2186
|
// src/runtime/parse-property-value.ts
|
|
2167
|
-
var
|
|
2187
|
+
var import_app_data7 = require("@stencil/core/internal/app-data");
|
|
2168
2188
|
var parsePropertyValue = (propValue, propType) => {
|
|
2169
|
-
if ((
|
|
2189
|
+
if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
2170
2190
|
try {
|
|
2171
2191
|
propValue = JSON.parse(propValue);
|
|
2172
2192
|
return propValue;
|
|
2173
2193
|
} catch (e) {
|
|
2174
2194
|
}
|
|
2175
2195
|
}
|
|
2176
|
-
if ((
|
|
2196
|
+
if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
2177
2197
|
propValue = deserializeProperty(propValue);
|
|
2178
2198
|
return propValue;
|
|
2179
2199
|
}
|
|
2180
2200
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2181
|
-
if (
|
|
2201
|
+
if (import_app_data7.BUILD.propBoolean && propType & 4 /* Boolean */) {
|
|
2182
2202
|
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
2183
2203
|
}
|
|
2184
|
-
if (
|
|
2204
|
+
if (import_app_data7.BUILD.propNumber && propType & 2 /* Number */) {
|
|
2185
2205
|
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
2186
2206
|
}
|
|
2187
|
-
if (
|
|
2207
|
+
if (import_app_data7.BUILD.propString && propType & 1 /* String */) {
|
|
2188
2208
|
return String(propValue);
|
|
2189
2209
|
}
|
|
2190
2210
|
return propValue;
|
|
@@ -2193,21 +2213,21 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
2193
2213
|
};
|
|
2194
2214
|
|
|
2195
2215
|
// src/runtime/update-component.ts
|
|
2196
|
-
var
|
|
2216
|
+
var import_app_data14 = require("@stencil/core/internal/app-data");
|
|
2197
2217
|
|
|
2198
2218
|
// src/runtime/event-emitter.ts
|
|
2199
|
-
var
|
|
2219
|
+
var import_app_data9 = require("@stencil/core/internal/app-data");
|
|
2200
2220
|
|
|
2201
2221
|
// src/runtime/element.ts
|
|
2202
|
-
var
|
|
2203
|
-
var getElement = (ref) =>
|
|
2222
|
+
var import_app_data8 = require("@stencil/core/internal/app-data");
|
|
2223
|
+
var getElement = (ref) => import_app_data8.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
|
|
2204
2224
|
|
|
2205
2225
|
// src/runtime/event-emitter.ts
|
|
2206
2226
|
var createEvent = (ref, name, flags) => {
|
|
2207
2227
|
const elm = getElement(ref);
|
|
2208
2228
|
return {
|
|
2209
2229
|
emit: (detail) => {
|
|
2210
|
-
if (
|
|
2230
|
+
if (import_app_data9.BUILD.isDev && !elm.isConnected) {
|
|
2211
2231
|
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
2212
2232
|
}
|
|
2213
2233
|
return emitEvent(elm, name, {
|
|
@@ -2226,7 +2246,7 @@ var emitEvent = (elm, name, opts) => {
|
|
|
2226
2246
|
};
|
|
2227
2247
|
|
|
2228
2248
|
// src/runtime/styles.ts
|
|
2229
|
-
var
|
|
2249
|
+
var import_app_data10 = require("@stencil/core/internal/app-data");
|
|
2230
2250
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2231
2251
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2232
2252
|
let style = styles.get(scopeId2);
|
|
@@ -2246,7 +2266,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2246
2266
|
var _a;
|
|
2247
2267
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
2248
2268
|
const style = styles.get(scopeId2);
|
|
2249
|
-
if (!
|
|
2269
|
+
if (!import_app_data10.BUILD.attachStyles || !win.document) {
|
|
2250
2270
|
return scopeId2;
|
|
2251
2271
|
}
|
|
2252
2272
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
@@ -2259,7 +2279,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2259
2279
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
2260
2280
|
}
|
|
2261
2281
|
if (!appliedStyles.has(scopeId2)) {
|
|
2262
|
-
if (
|
|
2282
|
+
if (import_app_data10.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
2263
2283
|
styleElm.innerHTML = style;
|
|
2264
2284
|
} else {
|
|
2265
2285
|
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
@@ -2268,7 +2288,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2268
2288
|
if (nonce != null) {
|
|
2269
2289
|
styleElm.setAttribute("nonce", nonce);
|
|
2270
2290
|
}
|
|
2271
|
-
if ((
|
|
2291
|
+
if ((import_app_data10.BUILD.hydrateServerSide || import_app_data10.BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
|
|
2272
2292
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
2273
2293
|
}
|
|
2274
2294
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
@@ -2307,7 +2327,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2307
2327
|
appliedStyles.add(scopeId2);
|
|
2308
2328
|
}
|
|
2309
2329
|
}
|
|
2310
|
-
} else if (
|
|
2330
|
+
} else if (import_app_data10.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
2311
2331
|
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
2312
2332
|
}
|
|
2313
2333
|
}
|
|
@@ -2319,17 +2339,17 @@ var attachStyles = (hostRef) => {
|
|
|
2319
2339
|
const flags = cmpMeta.$flags$;
|
|
2320
2340
|
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
2321
2341
|
const scopeId2 = addStyle(
|
|
2322
|
-
|
|
2342
|
+
import_app_data10.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
2323
2343
|
cmpMeta,
|
|
2324
2344
|
hostRef.$modeName$
|
|
2325
2345
|
);
|
|
2326
|
-
if ((
|
|
2346
|
+
if ((import_app_data10.BUILD.shadowDom || import_app_data10.BUILD.scoped) && import_app_data10.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
2327
2347
|
elm["s-sc"] = scopeId2;
|
|
2328
2348
|
elm.classList.add(scopeId2 + "-h");
|
|
2329
2349
|
}
|
|
2330
2350
|
endAttachStyles();
|
|
2331
2351
|
};
|
|
2332
|
-
var getScopeId = (cmp, mode) => "sc-" + (
|
|
2352
|
+
var getScopeId = (cmp, mode) => "sc-" + (import_app_data10.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
2333
2353
|
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
2334
2354
|
var hydrateScopedToShadow = () => {
|
|
2335
2355
|
if (!win.document) {
|
|
@@ -2343,24 +2363,24 @@ var hydrateScopedToShadow = () => {
|
|
|
2343
2363
|
};
|
|
2344
2364
|
|
|
2345
2365
|
// src/runtime/vdom/vdom-render.ts
|
|
2346
|
-
var
|
|
2366
|
+
var import_app_data13 = require("@stencil/core/internal/app-data");
|
|
2347
2367
|
|
|
2348
2368
|
// src/runtime/vdom/update-element.ts
|
|
2349
|
-
var
|
|
2369
|
+
var import_app_data12 = require("@stencil/core/internal/app-data");
|
|
2350
2370
|
|
|
2351
2371
|
// src/runtime/vdom/set-accessor.ts
|
|
2352
|
-
var
|
|
2372
|
+
var import_app_data11 = require("@stencil/core/internal/app-data");
|
|
2353
2373
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
2354
2374
|
if (oldValue === newValue) {
|
|
2355
2375
|
return;
|
|
2356
2376
|
}
|
|
2357
2377
|
let isProp = isMemberInElement(elm, memberName);
|
|
2358
2378
|
let ln = memberName.toLowerCase();
|
|
2359
|
-
if (
|
|
2379
|
+
if (import_app_data11.BUILD.vdomClass && memberName === "class") {
|
|
2360
2380
|
const classList = elm.classList;
|
|
2361
2381
|
const oldClasses = parseClassList(oldValue);
|
|
2362
2382
|
let newClasses = parseClassList(newValue);
|
|
2363
|
-
if (
|
|
2383
|
+
if (import_app_data11.BUILD.hydrateClientSide && elm["s-si"] && initialRender) {
|
|
2364
2384
|
newClasses.push(elm["s-si"]);
|
|
2365
2385
|
oldClasses.forEach((c) => {
|
|
2366
2386
|
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
@@ -2371,11 +2391,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2371
2391
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
2372
2392
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
2373
2393
|
}
|
|
2374
|
-
} else if (
|
|
2375
|
-
if (
|
|
2394
|
+
} else if (import_app_data11.BUILD.vdomStyle && memberName === "style") {
|
|
2395
|
+
if (import_app_data11.BUILD.updatable) {
|
|
2376
2396
|
for (const prop in oldValue) {
|
|
2377
2397
|
if (!newValue || newValue[prop] == null) {
|
|
2378
|
-
if (!
|
|
2398
|
+
if (!import_app_data11.BUILD.hydrateServerSide && prop.includes("-")) {
|
|
2379
2399
|
elm.style.removeProperty(prop);
|
|
2380
2400
|
} else {
|
|
2381
2401
|
elm.style[prop] = "";
|
|
@@ -2385,19 +2405,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2385
2405
|
}
|
|
2386
2406
|
for (const prop in newValue) {
|
|
2387
2407
|
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
2388
|
-
if (!
|
|
2408
|
+
if (!import_app_data11.BUILD.hydrateServerSide && prop.includes("-")) {
|
|
2389
2409
|
elm.style.setProperty(prop, newValue[prop]);
|
|
2390
2410
|
} else {
|
|
2391
2411
|
elm.style[prop] = newValue[prop];
|
|
2392
2412
|
}
|
|
2393
2413
|
}
|
|
2394
2414
|
}
|
|
2395
|
-
} else if (
|
|
2396
|
-
} else if (
|
|
2415
|
+
} else if (import_app_data11.BUILD.vdomKey && memberName === "key") {
|
|
2416
|
+
} else if (import_app_data11.BUILD.vdomRef && memberName === "ref") {
|
|
2397
2417
|
if (newValue) {
|
|
2398
2418
|
newValue(elm);
|
|
2399
2419
|
}
|
|
2400
|
-
} else if (
|
|
2420
|
+
} else if (import_app_data11.BUILD.vdomListener && (import_app_data11.BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2401
2421
|
if (memberName[2] === "-") {
|
|
2402
2422
|
memberName = memberName.slice(3);
|
|
2403
2423
|
} else if (isMemberInElement(win, ln)) {
|
|
@@ -2415,7 +2435,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2415
2435
|
plt.ael(elm, memberName, newValue, capture);
|
|
2416
2436
|
}
|
|
2417
2437
|
}
|
|
2418
|
-
} else if (
|
|
2438
|
+
} else if (import_app_data11.BUILD.vdomPropOrAttr) {
|
|
2419
2439
|
const isComplex = isComplexType(newValue);
|
|
2420
2440
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
2421
2441
|
try {
|
|
@@ -2437,7 +2457,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2437
2457
|
}
|
|
2438
2458
|
}
|
|
2439
2459
|
let xlink = false;
|
|
2440
|
-
if (
|
|
2460
|
+
if (import_app_data11.BUILD.vdomXlink) {
|
|
2441
2461
|
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
2442
2462
|
memberName = ln;
|
|
2443
2463
|
xlink = true;
|
|
@@ -2445,7 +2465,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2445
2465
|
}
|
|
2446
2466
|
if (newValue == null || newValue === false) {
|
|
2447
2467
|
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
2448
|
-
if (
|
|
2468
|
+
if (import_app_data11.BUILD.vdomXlink && xlink) {
|
|
2449
2469
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
2450
2470
|
} else {
|
|
2451
2471
|
elm.removeAttribute(memberName);
|
|
@@ -2453,7 +2473,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2453
2473
|
}
|
|
2454
2474
|
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
2455
2475
|
newValue = newValue === true ? "" : newValue;
|
|
2456
|
-
if (
|
|
2476
|
+
if (import_app_data11.BUILD.vdomXlink && xlink) {
|
|
2457
2477
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
2458
2478
|
} else {
|
|
2459
2479
|
elm.setAttribute(memberName, newValue);
|
|
@@ -2479,7 +2499,7 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
2479
2499
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
2480
2500
|
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
2481
2501
|
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
2482
|
-
if (
|
|
2502
|
+
if (import_app_data12.BUILD.updatable) {
|
|
2483
2503
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
2484
2504
|
if (!(memberName in newVnodeAttrs)) {
|
|
2485
2505
|
setAccessor(
|
|
@@ -2531,7 +2551,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2531
2551
|
let elm;
|
|
2532
2552
|
let childNode;
|
|
2533
2553
|
let oldVNode;
|
|
2534
|
-
if (
|
|
2554
|
+
if (import_app_data13.BUILD.slotRelocation && !useNativeShadowDom) {
|
|
2535
2555
|
checkSlotRelocate = true;
|
|
2536
2556
|
if (newVNode2.$tag$ === "slot") {
|
|
2537
2557
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
@@ -2546,20 +2566,20 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2546
2566
|
);
|
|
2547
2567
|
}
|
|
2548
2568
|
}
|
|
2549
|
-
if (
|
|
2569
|
+
if (import_app_data13.BUILD.isDev && newVNode2.$elm$) {
|
|
2550
2570
|
consoleDevError(
|
|
2551
2571
|
`The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
|
|
2552
2572
|
);
|
|
2553
2573
|
}
|
|
2554
|
-
if (
|
|
2574
|
+
if (import_app_data13.BUILD.vdomText && newVNode2.$text$ !== null) {
|
|
2555
2575
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2556
|
-
} else if (
|
|
2557
|
-
elm = newVNode2.$elm$ =
|
|
2558
|
-
if (
|
|
2576
|
+
} else if (import_app_data13.BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2577
|
+
elm = newVNode2.$elm$ = import_app_data13.BUILD.isDebug || import_app_data13.BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : win.document.createTextNode("");
|
|
2578
|
+
if (import_app_data13.BUILD.vdomAttribute) {
|
|
2559
2579
|
updateElement(null, newVNode2, isSvgMode);
|
|
2560
2580
|
}
|
|
2561
2581
|
} else {
|
|
2562
|
-
if (
|
|
2582
|
+
if (import_app_data13.BUILD.svg && !isSvgMode) {
|
|
2563
2583
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2564
2584
|
}
|
|
2565
2585
|
if (!win.document) {
|
|
@@ -2567,19 +2587,19 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2567
2587
|
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2568
2588
|
);
|
|
2569
2589
|
}
|
|
2570
|
-
elm = newVNode2.$elm$ =
|
|
2590
|
+
elm = newVNode2.$elm$ = import_app_data13.BUILD.svg ? win.document.createElementNS(
|
|
2571
2591
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
2572
|
-
!useNativeShadowDom &&
|
|
2592
|
+
!useNativeShadowDom && import_app_data13.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2573
2593
|
) : win.document.createElement(
|
|
2574
|
-
!useNativeShadowDom &&
|
|
2594
|
+
!useNativeShadowDom && import_app_data13.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2575
2595
|
);
|
|
2576
|
-
if (
|
|
2596
|
+
if (import_app_data13.BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
2577
2597
|
isSvgMode = false;
|
|
2578
2598
|
}
|
|
2579
|
-
if (
|
|
2599
|
+
if (import_app_data13.BUILD.vdomAttribute) {
|
|
2580
2600
|
updateElement(null, newVNode2, isSvgMode);
|
|
2581
2601
|
}
|
|
2582
|
-
if ((
|
|
2602
|
+
if ((import_app_data13.BUILD.scoped || import_app_data13.BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
2583
2603
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
2584
2604
|
}
|
|
2585
2605
|
if (newVNode2.$children$) {
|
|
@@ -2590,7 +2610,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2590
2610
|
}
|
|
2591
2611
|
}
|
|
2592
2612
|
}
|
|
2593
|
-
if (
|
|
2613
|
+
if (import_app_data13.BUILD.svg) {
|
|
2594
2614
|
if (newVNode2.$tag$ === "svg") {
|
|
2595
2615
|
isSvgMode = false;
|
|
2596
2616
|
} else if (elm.tagName === "foreignObject") {
|
|
@@ -2599,7 +2619,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2599
2619
|
}
|
|
2600
2620
|
}
|
|
2601
2621
|
elm["s-hn"] = hostTagName;
|
|
2602
|
-
if (
|
|
2622
|
+
if (import_app_data13.BUILD.slotRelocation) {
|
|
2603
2623
|
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
2604
2624
|
elm["s-sr"] = true;
|
|
2605
2625
|
elm["s-cr"] = contentRef;
|
|
@@ -2608,13 +2628,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2608
2628
|
patchSlotNode(elm);
|
|
2609
2629
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2610
2630
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2611
|
-
if (
|
|
2631
|
+
if (import_app_data13.BUILD.experimentalSlotFixes) {
|
|
2612
2632
|
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2613
2633
|
} else {
|
|
2614
2634
|
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2615
2635
|
}
|
|
2616
2636
|
}
|
|
2617
|
-
if (
|
|
2637
|
+
if (import_app_data13.BUILD.scoped || import_app_data13.BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) {
|
|
2618
2638
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
2619
2639
|
}
|
|
2620
2640
|
}
|
|
@@ -2644,7 +2664,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
2644
2664
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2645
2665
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2646
2666
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
2647
|
-
if (parentElm["s-sr"] &&
|
|
2667
|
+
if (parentElm["s-sr"] && import_app_data13.BUILD.experimentalSlotFixes) {
|
|
2648
2668
|
let node = parentElm;
|
|
2649
2669
|
while (node = node.nextSibling) {
|
|
2650
2670
|
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
@@ -2668,9 +2688,9 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
2668
2688
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
2669
2689
|
};
|
|
2670
2690
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
2671
|
-
let containerElm =
|
|
2691
|
+
let containerElm = import_app_data13.BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
2672
2692
|
let childNode;
|
|
2673
|
-
if (
|
|
2693
|
+
if (import_app_data13.BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
2674
2694
|
containerElm = containerElm.shadowRoot;
|
|
2675
2695
|
}
|
|
2676
2696
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
@@ -2678,7 +2698,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
2678
2698
|
childNode = createElm(null, parentVNode, startIdx);
|
|
2679
2699
|
if (childNode) {
|
|
2680
2700
|
vnodes[startIdx].$elm$ = childNode;
|
|
2681
|
-
insertBefore(containerElm, childNode,
|
|
2701
|
+
insertBefore(containerElm, childNode, import_app_data13.BUILD.slotRelocation ? referenceNode(before) : before);
|
|
2682
2702
|
}
|
|
2683
2703
|
}
|
|
2684
2704
|
}
|
|
@@ -2690,7 +2710,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
2690
2710
|
const elm = vnode.$elm$;
|
|
2691
2711
|
nullifyVNodeRefs(vnode);
|
|
2692
2712
|
if (elm) {
|
|
2693
|
-
if (
|
|
2713
|
+
if (import_app_data13.BUILD.slotRelocation) {
|
|
2694
2714
|
checkSlotFallbackVisibility = true;
|
|
2695
2715
|
if (elm["s-ol"]) {
|
|
2696
2716
|
elm["s-ol"].remove();
|
|
@@ -2734,7 +2754,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2734
2754
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
2735
2755
|
newEndVnode = newCh[--newEndIdx];
|
|
2736
2756
|
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
2737
|
-
if (
|
|
2757
|
+
if (import_app_data13.BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
2738
2758
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
2739
2759
|
}
|
|
2740
2760
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
@@ -2742,7 +2762,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2742
2762
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
2743
2763
|
newEndVnode = newCh[--newEndIdx];
|
|
2744
2764
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
2745
|
-
if (
|
|
2765
|
+
if (import_app_data13.BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
2746
2766
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
2747
2767
|
}
|
|
2748
2768
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
@@ -2751,7 +2771,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2751
2771
|
newStartVnode = newCh[++newStartIdx];
|
|
2752
2772
|
} else {
|
|
2753
2773
|
idxInOld = -1;
|
|
2754
|
-
if (
|
|
2774
|
+
if (import_app_data13.BUILD.vdomKey) {
|
|
2755
2775
|
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
2756
2776
|
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
2757
2777
|
idxInOld = i2;
|
|
@@ -2759,7 +2779,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2759
2779
|
}
|
|
2760
2780
|
}
|
|
2761
2781
|
}
|
|
2762
|
-
if (
|
|
2782
|
+
if (import_app_data13.BUILD.vdomKey && idxInOld >= 0) {
|
|
2763
2783
|
elmToMove = oldCh[idxInOld];
|
|
2764
2784
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2765
2785
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
@@ -2774,7 +2794,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2774
2794
|
newStartVnode = newCh[++newStartIdx];
|
|
2775
2795
|
}
|
|
2776
2796
|
if (node) {
|
|
2777
|
-
if (
|
|
2797
|
+
if (import_app_data13.BUILD.slotRelocation) {
|
|
2778
2798
|
insertBefore(
|
|
2779
2799
|
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
2780
2800
|
node,
|
|
@@ -2795,16 +2815,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2795
2815
|
newStartIdx,
|
|
2796
2816
|
newEndIdx
|
|
2797
2817
|
);
|
|
2798
|
-
} else if (
|
|
2818
|
+
} else if (import_app_data13.BUILD.updatable && newStartIdx > newEndIdx) {
|
|
2799
2819
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
2800
2820
|
}
|
|
2801
2821
|
};
|
|
2802
2822
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
2803
2823
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
2804
|
-
if (
|
|
2824
|
+
if (import_app_data13.BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
|
|
2805
2825
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
2806
2826
|
}
|
|
2807
|
-
if (
|
|
2827
|
+
if (import_app_data13.BUILD.vdomKey && !isInitialRender) {
|
|
2808
2828
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
2809
2829
|
}
|
|
2810
2830
|
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
@@ -2822,38 +2842,38 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2822
2842
|
const tag = newVNode2.$tag$;
|
|
2823
2843
|
const text = newVNode2.$text$;
|
|
2824
2844
|
let defaultHolder;
|
|
2825
|
-
if (!
|
|
2826
|
-
if (
|
|
2845
|
+
if (!import_app_data13.BUILD.vdomText || text === null) {
|
|
2846
|
+
if (import_app_data13.BUILD.svg) {
|
|
2827
2847
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2828
2848
|
}
|
|
2829
|
-
if (
|
|
2830
|
-
if (
|
|
2831
|
-
if (
|
|
2849
|
+
if (import_app_data13.BUILD.vdomAttribute || import_app_data13.BUILD.reflect) {
|
|
2850
|
+
if (import_app_data13.BUILD.slot && tag === "slot" && !useNativeShadowDom) {
|
|
2851
|
+
if (import_app_data13.BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
|
|
2832
2852
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
2833
2853
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
2834
2854
|
}
|
|
2835
2855
|
}
|
|
2836
2856
|
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
2837
2857
|
}
|
|
2838
|
-
if (
|
|
2858
|
+
if (import_app_data13.BUILD.updatable && oldChildren !== null && newChildren !== null) {
|
|
2839
2859
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
2840
2860
|
} else if (newChildren !== null) {
|
|
2841
|
-
if (
|
|
2861
|
+
if (import_app_data13.BUILD.updatable && import_app_data13.BUILD.vdomText && oldVNode.$text$ !== null) {
|
|
2842
2862
|
elm.textContent = "";
|
|
2843
2863
|
}
|
|
2844
2864
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
2845
2865
|
} else if (
|
|
2846
2866
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
2847
|
-
!isInitialRender &&
|
|
2867
|
+
!isInitialRender && import_app_data13.BUILD.updatable && oldChildren !== null
|
|
2848
2868
|
) {
|
|
2849
2869
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
2850
2870
|
}
|
|
2851
|
-
if (
|
|
2871
|
+
if (import_app_data13.BUILD.svg && isSvgMode && tag === "svg") {
|
|
2852
2872
|
isSvgMode = false;
|
|
2853
2873
|
}
|
|
2854
|
-
} else if (
|
|
2874
|
+
} else if (import_app_data13.BUILD.vdomText && import_app_data13.BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) {
|
|
2855
2875
|
defaultHolder.parentNode.textContent = text;
|
|
2856
|
-
} else if (
|
|
2876
|
+
} else if (import_app_data13.BUILD.vdomText && oldVNode.$text$ !== text) {
|
|
2857
2877
|
elm.data = text;
|
|
2858
2878
|
}
|
|
2859
2879
|
};
|
|
@@ -2869,7 +2889,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2869
2889
|
const slotName = childNode["s-sn"];
|
|
2870
2890
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2871
2891
|
node = hostContentNodes[j];
|
|
2872
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!
|
|
2892
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!import_app_data13.BUILD.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
2873
2893
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2874
2894
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2875
2895
|
checkSlotFallbackVisibility = true;
|
|
@@ -2908,15 +2928,15 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2908
2928
|
}
|
|
2909
2929
|
};
|
|
2910
2930
|
var nullifyVNodeRefs = (vNode) => {
|
|
2911
|
-
if (
|
|
2931
|
+
if (import_app_data13.BUILD.vdomRef) {
|
|
2912
2932
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
2913
2933
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2914
2934
|
}
|
|
2915
2935
|
};
|
|
2916
2936
|
var insertBefore = (parent, newNode, reference) => {
|
|
2917
|
-
if (
|
|
2937
|
+
if (import_app_data13.BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
2918
2938
|
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
2919
|
-
} else if (
|
|
2939
|
+
} else if (import_app_data13.BUILD.experimentalSlotFixes && typeof newNode["s-sn"] === "string") {
|
|
2920
2940
|
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
2921
2941
|
patchParentNode(newNode);
|
|
2922
2942
|
}
|
|
@@ -2925,7 +2945,7 @@ var insertBefore = (parent, newNode, reference) => {
|
|
|
2925
2945
|
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
2926
2946
|
return newNode;
|
|
2927
2947
|
}
|
|
2928
|
-
if (
|
|
2948
|
+
if (import_app_data13.BUILD.experimentalSlotFixes && parent.__insertBefore) {
|
|
2929
2949
|
return parent.__insertBefore(newNode, reference);
|
|
2930
2950
|
} else {
|
|
2931
2951
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -2960,7 +2980,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2960
2980
|
const isHostElement = isHost(renderFnResults);
|
|
2961
2981
|
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
2962
2982
|
hostTagName = hostElm.tagName;
|
|
2963
|
-
if (
|
|
2983
|
+
if (import_app_data13.BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
|
|
2964
2984
|
throw new Error(`The <Host> must be the single root component.
|
|
2965
2985
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2966
2986
|
|
|
@@ -2974,7 +2994,7 @@ render() {
|
|
|
2974
2994
|
}
|
|
2975
2995
|
`);
|
|
2976
2996
|
}
|
|
2977
|
-
if (
|
|
2997
|
+
if (import_app_data13.BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
2978
2998
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
2979
2999
|
cmpMeta.$attrsToReflect$.map(
|
|
2980
3000
|
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
@@ -2990,24 +3010,24 @@ render() {
|
|
|
2990
3010
|
rootVnode.$tag$ = null;
|
|
2991
3011
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
2992
3012
|
hostRef.$vnode$ = rootVnode;
|
|
2993
|
-
rootVnode.$elm$ = oldVNode.$elm$ =
|
|
2994
|
-
if (
|
|
3013
|
+
rootVnode.$elm$ = oldVNode.$elm$ = import_app_data13.BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
|
|
3014
|
+
if (import_app_data13.BUILD.scoped || import_app_data13.BUILD.shadowDom) {
|
|
2995
3015
|
scopeId = hostElm["s-sc"];
|
|
2996
3016
|
}
|
|
2997
3017
|
useNativeShadowDom = supportsShadow && !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
2998
|
-
if (
|
|
3018
|
+
if (import_app_data13.BUILD.slotRelocation) {
|
|
2999
3019
|
contentRef = hostElm["s-cr"];
|
|
3000
3020
|
checkSlotFallbackVisibility = false;
|
|
3001
3021
|
}
|
|
3002
3022
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
3003
|
-
if (
|
|
3023
|
+
if (import_app_data13.BUILD.slotRelocation) {
|
|
3004
3024
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
3005
3025
|
if (checkSlotRelocate) {
|
|
3006
3026
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
3007
3027
|
for (const relocateData of relocateNodes) {
|
|
3008
3028
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
3009
3029
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
3010
|
-
const orgLocationNode =
|
|
3030
|
+
const orgLocationNode = import_app_data13.BUILD.isDebug || import_app_data13.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
3011
3031
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
3012
3032
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
3013
3033
|
}
|
|
@@ -3018,7 +3038,7 @@ render() {
|
|
|
3018
3038
|
if (slotRefNode) {
|
|
3019
3039
|
const parentNodeRef = slotRefNode.parentNode;
|
|
3020
3040
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
3021
|
-
if (!
|
|
3041
|
+
if (!import_app_data13.BUILD.hydrateServerSide && (!import_app_data13.BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
|
|
3022
3042
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
3023
3043
|
while (orgLocationNode) {
|
|
3024
3044
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
@@ -3039,7 +3059,7 @@ render() {
|
|
|
3039
3059
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
3040
3060
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
3041
3061
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
3042
|
-
if (!
|
|
3062
|
+
if (!import_app_data13.BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
3043
3063
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
3044
3064
|
}
|
|
3045
3065
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
@@ -3065,7 +3085,7 @@ render() {
|
|
|
3065
3085
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
3066
3086
|
relocateNodes.length = 0;
|
|
3067
3087
|
}
|
|
3068
|
-
if (
|
|
3088
|
+
if (import_app_data13.BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3069
3089
|
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
3070
3090
|
for (const childNode of children) {
|
|
3071
3091
|
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
@@ -3093,7 +3113,7 @@ var originalLocationDebugNode = (nodeToRelocate) => {
|
|
|
3093
3113
|
|
|
3094
3114
|
// src/runtime/update-component.ts
|
|
3095
3115
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
3096
|
-
if (
|
|
3116
|
+
if (import_app_data14.BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
3097
3117
|
const index = ancestorComponent["s-p"].push(
|
|
3098
3118
|
new Promise(
|
|
3099
3119
|
(r) => hostRef.$onRenderResolve$ = () => {
|
|
@@ -3105,21 +3125,21 @@ var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
3105
3125
|
}
|
|
3106
3126
|
};
|
|
3107
3127
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
3108
|
-
if (
|
|
3128
|
+
if (import_app_data14.BUILD.taskQueue && import_app_data14.BUILD.updatable) {
|
|
3109
3129
|
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
3110
3130
|
}
|
|
3111
|
-
if (
|
|
3131
|
+
if (import_app_data14.BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
3112
3132
|
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
3113
3133
|
return;
|
|
3114
3134
|
}
|
|
3115
3135
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
3116
3136
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
3117
|
-
return
|
|
3137
|
+
return import_app_data14.BUILD.taskQueue ? writeTask(dispatch) : dispatch();
|
|
3118
3138
|
};
|
|
3119
3139
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
3120
3140
|
const elm = hostRef.$hostElement$;
|
|
3121
3141
|
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
3122
|
-
const instance =
|
|
3142
|
+
const instance = import_app_data14.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3123
3143
|
if (!instance) {
|
|
3124
3144
|
throw new Error(
|
|
3125
3145
|
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
|
@@ -3127,7 +3147,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3127
3147
|
}
|
|
3128
3148
|
let maybePromise;
|
|
3129
3149
|
if (isInitialLoad) {
|
|
3130
|
-
if (
|
|
3150
|
+
if (import_app_data14.BUILD.lazyLoad && import_app_data14.BUILD.hostListener) {
|
|
3131
3151
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3132
3152
|
if (hostRef.$queuedListeners$) {
|
|
3133
3153
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
@@ -3155,23 +3175,23 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3155
3175
|
const elm = hostRef.$hostElement$;
|
|
3156
3176
|
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
|
3157
3177
|
const rc = elm["s-rc"];
|
|
3158
|
-
if (
|
|
3178
|
+
if (import_app_data14.BUILD.style && isInitialLoad) {
|
|
3159
3179
|
attachStyles(hostRef);
|
|
3160
3180
|
}
|
|
3161
3181
|
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
3162
|
-
if (
|
|
3182
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3163
3183
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
3164
3184
|
}
|
|
3165
|
-
if (
|
|
3185
|
+
if (import_app_data14.BUILD.hydrateServerSide) {
|
|
3166
3186
|
await callRender(hostRef, instance, elm, isInitialLoad);
|
|
3167
3187
|
} else {
|
|
3168
3188
|
callRender(hostRef, instance, elm, isInitialLoad);
|
|
3169
3189
|
}
|
|
3170
|
-
if (
|
|
3190
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3171
3191
|
hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
|
|
3172
3192
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
3173
3193
|
}
|
|
3174
|
-
if (
|
|
3194
|
+
if (import_app_data14.BUILD.hydrateServerSide) {
|
|
3175
3195
|
try {
|
|
3176
3196
|
serverSideConnected(elm);
|
|
3177
3197
|
if (isInitialLoad) {
|
|
@@ -3185,13 +3205,13 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3185
3205
|
consoleError(e, elm);
|
|
3186
3206
|
}
|
|
3187
3207
|
}
|
|
3188
|
-
if (
|
|
3208
|
+
if (import_app_data14.BUILD.asyncLoading && rc) {
|
|
3189
3209
|
rc.map((cb) => cb());
|
|
3190
3210
|
elm["s-rc"] = void 0;
|
|
3191
3211
|
}
|
|
3192
3212
|
endRender();
|
|
3193
3213
|
endUpdate();
|
|
3194
|
-
if (
|
|
3214
|
+
if (import_app_data14.BUILD.asyncLoading) {
|
|
3195
3215
|
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
|
3196
3216
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
3197
3217
|
if (childrenPromises.length === 0) {
|
|
@@ -3207,10 +3227,10 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3207
3227
|
};
|
|
3208
3228
|
var renderingRef = null;
|
|
3209
3229
|
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
3210
|
-
const allRenderFn =
|
|
3211
|
-
const lazyLoad =
|
|
3212
|
-
const taskQueue =
|
|
3213
|
-
const updatable =
|
|
3230
|
+
const allRenderFn = import_app_data14.BUILD.allRenderFn ? true : false;
|
|
3231
|
+
const lazyLoad = import_app_data14.BUILD.lazyLoad ? true : false;
|
|
3232
|
+
const taskQueue = import_app_data14.BUILD.taskQueue ? true : false;
|
|
3233
|
+
const updatable = import_app_data14.BUILD.updatable ? true : false;
|
|
3214
3234
|
try {
|
|
3215
3235
|
renderingRef = instance;
|
|
3216
3236
|
instance = allRenderFn ? instance.render() : instance.render && instance.render();
|
|
@@ -3220,9 +3240,9 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
3220
3240
|
if (updatable || lazyLoad) {
|
|
3221
3241
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
3222
3242
|
}
|
|
3223
|
-
if (
|
|
3224
|
-
if (
|
|
3225
|
-
if (
|
|
3243
|
+
if (import_app_data14.BUILD.hasRenderFn || import_app_data14.BUILD.reflect) {
|
|
3244
|
+
if (import_app_data14.BUILD.vdomRender || import_app_data14.BUILD.reflect) {
|
|
3245
|
+
if (import_app_data14.BUILD.hydrateServerSide) {
|
|
3226
3246
|
return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
|
|
3227
3247
|
} else {
|
|
3228
3248
|
renderVdom(hostRef, instance, isInitialLoad);
|
|
@@ -3247,51 +3267,51 @@ var postUpdateComponent = (hostRef) => {
|
|
|
3247
3267
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
3248
3268
|
const elm = hostRef.$hostElement$;
|
|
3249
3269
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
3250
|
-
const instance =
|
|
3270
|
+
const instance = import_app_data14.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3251
3271
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3252
|
-
if (
|
|
3272
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3253
3273
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
3254
3274
|
}
|
|
3255
3275
|
safeCall(instance, "componentDidRender", void 0, elm);
|
|
3256
|
-
if (
|
|
3276
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3257
3277
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
3258
3278
|
}
|
|
3259
3279
|
emitLifecycleEvent(elm, "componentDidRender");
|
|
3260
3280
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
3261
3281
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
3262
|
-
if (
|
|
3282
|
+
if (import_app_data14.BUILD.asyncLoading && import_app_data14.BUILD.cssAnnotations) {
|
|
3263
3283
|
addHydratedFlag(elm);
|
|
3264
3284
|
}
|
|
3265
|
-
if (
|
|
3285
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3266
3286
|
hostRef.$flags$ |= 2048 /* devOnDidLoad */;
|
|
3267
3287
|
}
|
|
3268
3288
|
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
3269
|
-
if (
|
|
3289
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3270
3290
|
hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
|
|
3271
3291
|
}
|
|
3272
3292
|
emitLifecycleEvent(elm, "componentDidLoad");
|
|
3273
3293
|
endPostUpdate();
|
|
3274
|
-
if (
|
|
3294
|
+
if (import_app_data14.BUILD.asyncLoading) {
|
|
3275
3295
|
hostRef.$onReadyResolve$(elm);
|
|
3276
3296
|
if (!ancestorComponent) {
|
|
3277
3297
|
appDidLoad(tagName);
|
|
3278
3298
|
}
|
|
3279
3299
|
}
|
|
3280
3300
|
} else {
|
|
3281
|
-
if (
|
|
3301
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3282
3302
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
3283
3303
|
}
|
|
3284
3304
|
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
3285
|
-
if (
|
|
3305
|
+
if (import_app_data14.BUILD.isDev) {
|
|
3286
3306
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
3287
3307
|
}
|
|
3288
3308
|
emitLifecycleEvent(elm, "componentDidUpdate");
|
|
3289
3309
|
endPostUpdate();
|
|
3290
3310
|
}
|
|
3291
|
-
if (
|
|
3311
|
+
if (import_app_data14.BUILD.method && import_app_data14.BUILD.lazyLoad) {
|
|
3292
3312
|
hostRef.$onInstanceResolve$(elm);
|
|
3293
3313
|
}
|
|
3294
|
-
if (
|
|
3314
|
+
if (import_app_data14.BUILD.asyncLoading) {
|
|
3295
3315
|
if (hostRef.$onRenderResolve$) {
|
|
3296
3316
|
hostRef.$onRenderResolve$();
|
|
3297
3317
|
hostRef.$onRenderResolve$ = void 0;
|
|
@@ -3303,7 +3323,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
3303
3323
|
}
|
|
3304
3324
|
};
|
|
3305
3325
|
var forceUpdate = (ref) => {
|
|
3306
|
-
if (
|
|
3326
|
+
if (import_app_data14.BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
3307
3327
|
const hostRef = getHostRef(ref);
|
|
3308
3328
|
const isConnected = hostRef.$hostElement$.isConnected;
|
|
3309
3329
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
@@ -3314,12 +3334,12 @@ var forceUpdate = (ref) => {
|
|
|
3314
3334
|
return false;
|
|
3315
3335
|
};
|
|
3316
3336
|
var appDidLoad = (who) => {
|
|
3317
|
-
if (
|
|
3337
|
+
if (import_app_data14.BUILD.asyncQueue) {
|
|
3318
3338
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
3319
3339
|
}
|
|
3320
|
-
nextTick(() => emitEvent(win, "appload", { detail: { namespace:
|
|
3321
|
-
if (
|
|
3322
|
-
performance.measure(`[Stencil] ${
|
|
3340
|
+
nextTick(() => emitEvent(win, "appload", { detail: { namespace: import_app_data14.NAMESPACE } }));
|
|
3341
|
+
if (import_app_data14.BUILD.profile && performance.measure) {
|
|
3342
|
+
performance.measure(`[Stencil] ${import_app_data14.NAMESPACE} initial load (by ${who})`, "st:app:start");
|
|
3323
3343
|
}
|
|
3324
3344
|
};
|
|
3325
3345
|
var safeCall = (instance, method, arg, elm) => {
|
|
@@ -3333,19 +3353,19 @@ var safeCall = (instance, method, arg, elm) => {
|
|
|
3333
3353
|
return void 0;
|
|
3334
3354
|
};
|
|
3335
3355
|
var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
3336
|
-
if (
|
|
3356
|
+
if (import_app_data14.BUILD.lifecycleDOMEvents) {
|
|
3337
3357
|
emitEvent(elm, "stencil_" + lifecycleName, {
|
|
3338
3358
|
bubbles: true,
|
|
3339
3359
|
composed: true,
|
|
3340
3360
|
detail: {
|
|
3341
|
-
namespace:
|
|
3361
|
+
namespace: import_app_data14.NAMESPACE
|
|
3342
3362
|
}
|
|
3343
3363
|
});
|
|
3344
3364
|
}
|
|
3345
3365
|
};
|
|
3346
3366
|
var addHydratedFlag = (elm) => {
|
|
3347
3367
|
var _a, _b;
|
|
3348
|
-
return
|
|
3368
|
+
return import_app_data14.BUILD.hydratedClass ? elm.classList.add((_a = import_app_data14.BUILD.hydratedSelectorName) != null ? _a : "hydrated") : import_app_data14.BUILD.hydratedAttribute ? elm.setAttribute((_b = import_app_data14.BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
|
|
3349
3369
|
};
|
|
3350
3370
|
var serverSideConnected = (elm) => {
|
|
3351
3371
|
const children = elm.children;
|
|
@@ -3364,21 +3384,21 @@ var serverSideConnected = (elm) => {
|
|
|
3364
3384
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
3365
3385
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
3366
3386
|
const hostRef = getHostRef(ref);
|
|
3367
|
-
if (
|
|
3387
|
+
if (import_app_data15.BUILD.lazyLoad && !hostRef) {
|
|
3368
3388
|
throw new Error(
|
|
3369
3389
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
3370
3390
|
);
|
|
3371
3391
|
}
|
|
3372
|
-
const elm =
|
|
3392
|
+
const elm = import_app_data15.BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
|
|
3373
3393
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
3374
3394
|
const flags = hostRef.$flags$;
|
|
3375
|
-
const instance =
|
|
3395
|
+
const instance = import_app_data15.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3376
3396
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
3377
3397
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
3378
3398
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
3379
|
-
if ((!
|
|
3399
|
+
if ((!import_app_data15.BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
3380
3400
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
3381
|
-
if (
|
|
3401
|
+
if (import_app_data15.BUILD.isDev) {
|
|
3382
3402
|
if (hostRef.$flags$ & 1024 /* devOnRender */) {
|
|
3383
3403
|
consoleDevWarn(
|
|
3384
3404
|
`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
|
|
@@ -3401,8 +3421,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3401
3421
|
);
|
|
3402
3422
|
}
|
|
3403
3423
|
}
|
|
3404
|
-
if (!
|
|
3405
|
-
if (
|
|
3424
|
+
if (!import_app_data15.BUILD.lazyLoad || instance) {
|
|
3425
|
+
if (import_app_data15.BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
3406
3426
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
3407
3427
|
if (watchMethods) {
|
|
3408
3428
|
watchMethods.map((watchMethodName) => {
|
|
@@ -3414,7 +3434,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3414
3434
|
});
|
|
3415
3435
|
}
|
|
3416
3436
|
}
|
|
3417
|
-
if (
|
|
3437
|
+
if (import_app_data15.BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3418
3438
|
if (instance.componentShouldUpdate) {
|
|
3419
3439
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
3420
3440
|
return;
|
|
@@ -3430,46 +3450,46 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3430
3450
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3431
3451
|
var _a, _b;
|
|
3432
3452
|
const prototype = Cstr.prototype;
|
|
3433
|
-
if (
|
|
3453
|
+
if (import_app_data16.BUILD.isTesting) {
|
|
3434
3454
|
if (prototype.__stencilAugmented) {
|
|
3435
3455
|
return;
|
|
3436
3456
|
}
|
|
3437
3457
|
prototype.__stencilAugmented = true;
|
|
3438
3458
|
}
|
|
3439
|
-
if (
|
|
3459
|
+
if (import_app_data16.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
3440
3460
|
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
3441
3461
|
const originalFormAssociatedCallback = prototype[cbName];
|
|
3442
3462
|
Object.defineProperty(prototype, cbName, {
|
|
3443
3463
|
value(...args) {
|
|
3444
3464
|
const hostRef = getHostRef(this);
|
|
3445
|
-
const instance =
|
|
3465
|
+
const instance = import_app_data16.BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
|
|
3446
3466
|
if (!instance) {
|
|
3447
3467
|
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
3448
3468
|
const cb = asyncInstance[cbName];
|
|
3449
3469
|
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
3450
3470
|
});
|
|
3451
3471
|
} else {
|
|
3452
|
-
const cb =
|
|
3472
|
+
const cb = import_app_data16.BUILD.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
|
|
3453
3473
|
typeof cb === "function" && cb.call(instance, ...args);
|
|
3454
3474
|
}
|
|
3455
3475
|
}
|
|
3456
3476
|
});
|
|
3457
3477
|
});
|
|
3458
3478
|
}
|
|
3459
|
-
if (
|
|
3460
|
-
if (
|
|
3479
|
+
if (import_app_data16.BUILD.member && cmpMeta.$members$ || import_app_data16.BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
3480
|
+
if (import_app_data16.BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3461
3481
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3462
3482
|
}
|
|
3463
3483
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3464
3484
|
members.map(([memberName, [memberFlags]]) => {
|
|
3465
|
-
if ((
|
|
3485
|
+
if ((import_app_data16.BUILD.prop || import_app_data16.BUILD.state) && (memberFlags & 31 /* Prop */ || (!import_app_data16.BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3466
3486
|
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
3467
3487
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3468
3488
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3469
3489
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
3470
3490
|
Object.defineProperty(prototype, memberName, {
|
|
3471
3491
|
get() {
|
|
3472
|
-
if (
|
|
3492
|
+
if (import_app_data16.BUILD.lazyLoad) {
|
|
3473
3493
|
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
3474
3494
|
return getValue(this, memberName);
|
|
3475
3495
|
}
|
|
@@ -3478,7 +3498,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3478
3498
|
if (!instance) return;
|
|
3479
3499
|
return instance[memberName];
|
|
3480
3500
|
}
|
|
3481
|
-
if (!
|
|
3501
|
+
if (!import_app_data16.BUILD.lazyLoad) {
|
|
3482
3502
|
return origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
3483
3503
|
}
|
|
3484
3504
|
},
|
|
@@ -3489,7 +3509,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3489
3509
|
Object.defineProperty(prototype, memberName, {
|
|
3490
3510
|
set(newValue) {
|
|
3491
3511
|
const ref = getHostRef(this);
|
|
3492
|
-
if (
|
|
3512
|
+
if (import_app_data16.BUILD.isDev) {
|
|
3493
3513
|
if (
|
|
3494
3514
|
// we are proxying the instance (not element)
|
|
3495
3515
|
(flags & 1 /* isElementConstructor */) === 0 && // if the class has a setter, then the Element can update instance values, so ignore
|
|
@@ -3516,11 +3536,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3516
3536
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3517
3537
|
return;
|
|
3518
3538
|
}
|
|
3519
|
-
if (!
|
|
3539
|
+
if (!import_app_data16.BUILD.lazyLoad) {
|
|
3520
3540
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3521
3541
|
return;
|
|
3522
3542
|
}
|
|
3523
|
-
if (
|
|
3543
|
+
if (import_app_data16.BUILD.lazyLoad) {
|
|
3524
3544
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
3525
3545
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3526
3546
|
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
@@ -3548,7 +3568,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3548
3568
|
}
|
|
3549
3569
|
}
|
|
3550
3570
|
});
|
|
3551
|
-
} else if (
|
|
3571
|
+
} else if (import_app_data16.BUILD.lazyLoad && import_app_data16.BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
3552
3572
|
Object.defineProperty(prototype, memberName, {
|
|
3553
3573
|
value(...args) {
|
|
3554
3574
|
var _a2;
|
|
@@ -3561,13 +3581,13 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3561
3581
|
});
|
|
3562
3582
|
}
|
|
3563
3583
|
});
|
|
3564
|
-
if (
|
|
3584
|
+
if (import_app_data16.BUILD.observeAttribute && (!import_app_data16.BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) {
|
|
3565
3585
|
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
3566
3586
|
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
3567
3587
|
plt.jmp(() => {
|
|
3568
3588
|
var _a2;
|
|
3569
3589
|
const propName = attrNameToPropName.get(attrName);
|
|
3570
|
-
if (this.hasOwnProperty(propName) &&
|
|
3590
|
+
if (this.hasOwnProperty(propName) && import_app_data16.BUILD.lazyLoad) {
|
|
3571
3591
|
newValue = this[propName];
|
|
3572
3592
|
delete this[propName];
|
|
3573
3593
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -3577,8 +3597,8 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3577
3597
|
const hostRef = getHostRef(this);
|
|
3578
3598
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
3579
3599
|
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
3580
|
-
const elm =
|
|
3581
|
-
const instance =
|
|
3600
|
+
const elm = import_app_data16.BUILD.lazyLoad ? hostRef.$hostElement$ : this;
|
|
3601
|
+
const instance = import_app_data16.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3582
3602
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
3583
3603
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
3584
3604
|
if (instance[callbackName] != null) {
|
|
@@ -3602,7 +3622,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3602
3622
|
var _a2;
|
|
3603
3623
|
const attrName = m[1] || propName;
|
|
3604
3624
|
attrNameToPropName.set(attrName, propName);
|
|
3605
|
-
if (
|
|
3625
|
+
if (import_app_data16.BUILD.reflect && m[0] & 512 /* ReflectAttr */) {
|
|
3606
3626
|
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
3607
3627
|
}
|
|
3608
3628
|
return attrName;
|
|
@@ -3620,7 +3640,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3620
3640
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
3621
3641
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
3622
3642
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
3623
|
-
if (
|
|
3643
|
+
if (import_app_data17.BUILD.lazyLoad && bundleId) {
|
|
3624
3644
|
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
3625
3645
|
if (CstrImport && "then" in CstrImport) {
|
|
3626
3646
|
const endLoad = uniqueTime(
|
|
@@ -3635,15 +3655,15 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3635
3655
|
if (!Cstr) {
|
|
3636
3656
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
3637
3657
|
}
|
|
3638
|
-
if (
|
|
3639
|
-
if (
|
|
3658
|
+
if (import_app_data17.BUILD.member && !Cstr.isProxied) {
|
|
3659
|
+
if (import_app_data17.BUILD.watchCallback) {
|
|
3640
3660
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3641
3661
|
}
|
|
3642
3662
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
3643
3663
|
Cstr.isProxied = true;
|
|
3644
3664
|
}
|
|
3645
3665
|
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3646
|
-
if (
|
|
3666
|
+
if (import_app_data17.BUILD.member) {
|
|
3647
3667
|
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3648
3668
|
}
|
|
3649
3669
|
try {
|
|
@@ -3651,10 +3671,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3651
3671
|
} catch (e) {
|
|
3652
3672
|
consoleError(e, elm);
|
|
3653
3673
|
}
|
|
3654
|
-
if (
|
|
3674
|
+
if (import_app_data17.BUILD.member) {
|
|
3655
3675
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
3656
3676
|
}
|
|
3657
|
-
if (
|
|
3677
|
+
if (import_app_data17.BUILD.watchCallback) {
|
|
3658
3678
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3659
3679
|
}
|
|
3660
3680
|
endNewInstance();
|
|
@@ -3664,23 +3684,23 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3664
3684
|
const cmpTag = elm.localName;
|
|
3665
3685
|
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3666
3686
|
}
|
|
3667
|
-
if (
|
|
3687
|
+
if (import_app_data17.BUILD.style && Cstr && Cstr.style) {
|
|
3668
3688
|
let style;
|
|
3669
3689
|
if (typeof Cstr.style === "string") {
|
|
3670
3690
|
style = Cstr.style;
|
|
3671
|
-
} else if (
|
|
3691
|
+
} else if (import_app_data17.BUILD.mode && typeof Cstr.style !== "string") {
|
|
3672
3692
|
hostRef.$modeName$ = computeMode(elm);
|
|
3673
3693
|
if (hostRef.$modeName$) {
|
|
3674
3694
|
style = Cstr.style[hostRef.$modeName$];
|
|
3675
3695
|
}
|
|
3676
|
-
if (
|
|
3696
|
+
if (import_app_data17.BUILD.hydrateServerSide && hostRef.$modeName$) {
|
|
3677
3697
|
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
3678
3698
|
}
|
|
3679
3699
|
}
|
|
3680
3700
|
const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
3681
3701
|
if (!styles.has(scopeId2)) {
|
|
3682
3702
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
3683
|
-
if (
|
|
3703
|
+
if (import_app_data17.BUILD.hydrateServerSide && import_app_data17.BUILD.shadowDom && cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
|
|
3684
3704
|
style = scopeCss(style, scopeId2, true);
|
|
3685
3705
|
}
|
|
3686
3706
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
@@ -3690,14 +3710,14 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3690
3710
|
}
|
|
3691
3711
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3692
3712
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3693
|
-
if (
|
|
3713
|
+
if (import_app_data17.BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3694
3714
|
ancestorComponent["s-rc"].push(schedule);
|
|
3695
3715
|
} else {
|
|
3696
3716
|
schedule();
|
|
3697
3717
|
}
|
|
3698
3718
|
};
|
|
3699
3719
|
var fireConnectedCallback = (instance, elm) => {
|
|
3700
|
-
if (
|
|
3720
|
+
if (import_app_data17.BUILD.lazyLoad) {
|
|
3701
3721
|
safeCall(instance, "connectedCallback", void 0, elm);
|
|
3702
3722
|
}
|
|
3703
3723
|
};
|
|
@@ -3708,41 +3728,41 @@ var connectedCallback = (elm) => {
|
|
|
3708
3728
|
const hostRef = getHostRef(elm);
|
|
3709
3729
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3710
3730
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
3711
|
-
if (
|
|
3731
|
+
if (import_app_data18.BUILD.hostListenerTargetParent) {
|
|
3712
3732
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
|
|
3713
3733
|
}
|
|
3714
3734
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
3715
3735
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
3716
3736
|
let hostId;
|
|
3717
|
-
if (
|
|
3737
|
+
if (import_app_data18.BUILD.hydrateClientSide) {
|
|
3718
3738
|
hostId = elm.getAttribute(HYDRATE_ID);
|
|
3719
3739
|
if (hostId) {
|
|
3720
|
-
if (
|
|
3721
|
-
const scopeId2 =
|
|
3740
|
+
if (import_app_data18.BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3741
|
+
const scopeId2 = import_app_data18.BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
|
|
3722
3742
|
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
3723
|
-
} else if (
|
|
3724
|
-
const scopeId2 = getScopeId(cmpMeta,
|
|
3743
|
+
} else if (import_app_data18.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3744
|
+
const scopeId2 = getScopeId(cmpMeta, import_app_data18.BUILD.mode ? elm.getAttribute("s-mode") : void 0);
|
|
3725
3745
|
elm["s-sc"] = scopeId2;
|
|
3726
3746
|
}
|
|
3727
3747
|
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
3728
3748
|
}
|
|
3729
3749
|
}
|
|
3730
|
-
if (
|
|
3731
|
-
if (
|
|
3750
|
+
if (import_app_data18.BUILD.slotRelocation && !hostId) {
|
|
3751
|
+
if (import_app_data18.BUILD.hydrateServerSide || (import_app_data18.BUILD.slot || import_app_data18.BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
3732
3752
|
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
3733
3753
|
setContentReference(elm);
|
|
3734
3754
|
}
|
|
3735
3755
|
}
|
|
3736
|
-
if (
|
|
3756
|
+
if (import_app_data18.BUILD.asyncLoading) {
|
|
3737
3757
|
let ancestorComponent = elm;
|
|
3738
3758
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
3739
|
-
if (
|
|
3759
|
+
if (import_app_data18.BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
3740
3760
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
3741
3761
|
break;
|
|
3742
3762
|
}
|
|
3743
3763
|
}
|
|
3744
3764
|
}
|
|
3745
|
-
if (
|
|
3765
|
+
if (import_app_data18.BUILD.prop && !import_app_data18.BUILD.hydrateServerSide && cmpMeta.$members$) {
|
|
3746
3766
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3747
3767
|
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
3748
3768
|
const value = elm[memberName];
|
|
@@ -3751,7 +3771,7 @@ var connectedCallback = (elm) => {
|
|
|
3751
3771
|
}
|
|
3752
3772
|
});
|
|
3753
3773
|
}
|
|
3754
|
-
if (
|
|
3774
|
+
if (import_app_data18.BUILD.initializeNextTick) {
|
|
3755
3775
|
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
3756
3776
|
} else {
|
|
3757
3777
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
@@ -3772,29 +3792,29 @@ var setContentReference = (elm) => {
|
|
|
3772
3792
|
return;
|
|
3773
3793
|
}
|
|
3774
3794
|
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
3775
|
-
|
|
3795
|
+
import_app_data18.BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
|
|
3776
3796
|
);
|
|
3777
3797
|
contentRefElm["s-cn"] = true;
|
|
3778
3798
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
3779
3799
|
};
|
|
3780
3800
|
|
|
3781
3801
|
// src/runtime/disconnected-callback.ts
|
|
3782
|
-
var
|
|
3802
|
+
var import_app_data19 = require("@stencil/core/internal/app-data");
|
|
3783
3803
|
var disconnectInstance = (instance, elm) => {
|
|
3784
|
-
if (
|
|
3804
|
+
if (import_app_data19.BUILD.lazyLoad) {
|
|
3785
3805
|
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
3786
3806
|
}
|
|
3787
3807
|
};
|
|
3788
3808
|
var disconnectedCallback = async (elm) => {
|
|
3789
3809
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3790
3810
|
const hostRef = getHostRef(elm);
|
|
3791
|
-
if (
|
|
3811
|
+
if (import_app_data19.BUILD.hostListener) {
|
|
3792
3812
|
if (hostRef.$rmListeners$) {
|
|
3793
3813
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
3794
3814
|
hostRef.$rmListeners$ = void 0;
|
|
3795
3815
|
}
|
|
3796
3816
|
}
|
|
3797
|
-
if (!
|
|
3817
|
+
if (!import_app_data19.BUILD.lazyLoad) {
|
|
3798
3818
|
disconnectInstance(elm);
|
|
3799
3819
|
} else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3800
3820
|
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
@@ -3819,40 +3839,40 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
3819
3839
|
$flags$: compactMeta[0],
|
|
3820
3840
|
$tagName$: compactMeta[1]
|
|
3821
3841
|
};
|
|
3822
|
-
if (
|
|
3842
|
+
if (import_app_data20.BUILD.member) {
|
|
3823
3843
|
cmpMeta.$members$ = compactMeta[2];
|
|
3824
3844
|
}
|
|
3825
|
-
if (
|
|
3845
|
+
if (import_app_data20.BUILD.hostListener) {
|
|
3826
3846
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
3827
3847
|
}
|
|
3828
|
-
if (
|
|
3848
|
+
if (import_app_data20.BUILD.watchCallback) {
|
|
3829
3849
|
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
3830
3850
|
}
|
|
3831
|
-
if (
|
|
3851
|
+
if (import_app_data20.BUILD.reflect) {
|
|
3832
3852
|
cmpMeta.$attrsToReflect$ = [];
|
|
3833
3853
|
}
|
|
3834
|
-
if (
|
|
3854
|
+
if (import_app_data20.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3835
3855
|
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3836
3856
|
}
|
|
3837
|
-
if (
|
|
3838
|
-
if (
|
|
3857
|
+
if (import_app_data20.BUILD.experimentalSlotFixes) {
|
|
3858
|
+
if (import_app_data20.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3839
3859
|
patchPseudoShadowDom(Cstr.prototype);
|
|
3840
3860
|
}
|
|
3841
3861
|
} else {
|
|
3842
|
-
if (
|
|
3862
|
+
if (import_app_data20.BUILD.slotChildNodesFix) {
|
|
3843
3863
|
patchChildSlotNodes(Cstr.prototype);
|
|
3844
3864
|
}
|
|
3845
|
-
if (
|
|
3865
|
+
if (import_app_data20.BUILD.cloneNodeFix) {
|
|
3846
3866
|
patchCloneNode(Cstr.prototype);
|
|
3847
3867
|
}
|
|
3848
|
-
if (
|
|
3868
|
+
if (import_app_data20.BUILD.appendChildSlotFix) {
|
|
3849
3869
|
patchSlotAppendChild(Cstr.prototype);
|
|
3850
3870
|
}
|
|
3851
|
-
if (
|
|
3871
|
+
if (import_app_data20.BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3852
3872
|
patchTextContent(Cstr.prototype);
|
|
3853
3873
|
}
|
|
3854
3874
|
}
|
|
3855
|
-
if (
|
|
3875
|
+
if (import_app_data20.BUILD.hydrateClientSide && import_app_data20.BUILD.shadowDom) {
|
|
3856
3876
|
hydrateScopedToShadow();
|
|
3857
3877
|
}
|
|
3858
3878
|
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
@@ -3882,14 +3902,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
3882
3902
|
__attachShadow() {
|
|
3883
3903
|
if (supportsShadow) {
|
|
3884
3904
|
if (!this.shadowRoot) {
|
|
3885
|
-
|
|
3886
|
-
this.attachShadow({
|
|
3887
|
-
mode: "open",
|
|
3888
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
3889
|
-
});
|
|
3890
|
-
} else {
|
|
3891
|
-
this.attachShadow({ mode: "open" });
|
|
3892
|
-
}
|
|
3905
|
+
createShadowRoot.call(this, cmpMeta);
|
|
3893
3906
|
} else {
|
|
3894
3907
|
if (this.shadowRoot.mode !== "open") {
|
|
3895
3908
|
throw new Error(
|
|
@@ -3906,7 +3919,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
3906
3919
|
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
3907
3920
|
};
|
|
3908
3921
|
var forceModeUpdate = (elm) => {
|
|
3909
|
-
if (
|
|
3922
|
+
if (import_app_data20.BUILD.style && import_app_data20.BUILD.mode && !import_app_data20.BUILD.lazyLoad) {
|
|
3910
3923
|
const mode = computeMode(elm);
|
|
3911
3924
|
const hostRef = getHostRef(elm);
|
|
3912
3925
|
if (hostRef.$modeName$ !== mode) {
|
|
@@ -3929,7 +3942,7 @@ var forceModeUpdate = (elm) => {
|
|
|
3929
3942
|
};
|
|
3930
3943
|
|
|
3931
3944
|
// src/runtime/bootstrap-lazy.ts
|
|
3932
|
-
var
|
|
3945
|
+
var import_app_data21 = require("@stencil/core/internal/app-data");
|
|
3933
3946
|
|
|
3934
3947
|
// src/runtime/hmr-component.ts
|
|
3935
3948
|
var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
@@ -3941,7 +3954,7 @@ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
|
3941
3954
|
// src/runtime/bootstrap-lazy.ts
|
|
3942
3955
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
3943
3956
|
var _a;
|
|
3944
|
-
if (
|
|
3957
|
+
if (import_app_data21.BUILD.profile && performance.mark) {
|
|
3945
3958
|
performance.mark("st:app:start");
|
|
3946
3959
|
}
|
|
3947
3960
|
installDevTools();
|
|
@@ -3961,15 +3974,15 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3961
3974
|
let isBootstrapping = true;
|
|
3962
3975
|
Object.assign(plt, options);
|
|
3963
3976
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
3964
|
-
if (
|
|
3977
|
+
if (import_app_data21.BUILD.asyncQueue) {
|
|
3965
3978
|
if (options.syncQueue) {
|
|
3966
3979
|
plt.$flags$ |= 4 /* queueSync */;
|
|
3967
3980
|
}
|
|
3968
3981
|
}
|
|
3969
|
-
if (
|
|
3982
|
+
if (import_app_data21.BUILD.hydrateClientSide) {
|
|
3970
3983
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
3971
3984
|
}
|
|
3972
|
-
if (
|
|
3985
|
+
if (import_app_data21.BUILD.hydrateClientSide && import_app_data21.BUILD.shadowDom) {
|
|
3973
3986
|
hydrateScopedToShadow();
|
|
3974
3987
|
}
|
|
3975
3988
|
let hasSlotRelocation = false;
|
|
@@ -3985,22 +3998,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3985
3998
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
3986
3999
|
hasSlotRelocation = true;
|
|
3987
4000
|
}
|
|
3988
|
-
if (
|
|
4001
|
+
if (import_app_data21.BUILD.member) {
|
|
3989
4002
|
cmpMeta.$members$ = compactMeta[2];
|
|
3990
4003
|
}
|
|
3991
|
-
if (
|
|
4004
|
+
if (import_app_data21.BUILD.hostListener) {
|
|
3992
4005
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
3993
4006
|
}
|
|
3994
|
-
if (
|
|
4007
|
+
if (import_app_data21.BUILD.reflect) {
|
|
3995
4008
|
cmpMeta.$attrsToReflect$ = [];
|
|
3996
4009
|
}
|
|
3997
|
-
if (
|
|
4010
|
+
if (import_app_data21.BUILD.watchCallback) {
|
|
3998
4011
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
3999
4012
|
}
|
|
4000
|
-
if (
|
|
4013
|
+
if (import_app_data21.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
4001
4014
|
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
4002
4015
|
}
|
|
4003
|
-
const tagName =
|
|
4016
|
+
const tagName = import_app_data21.BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
|
|
4004
4017
|
const HostElement = class extends HTMLElement {
|
|
4005
4018
|
// StencilLazyHost
|
|
4006
4019
|
constructor(self) {
|
|
@@ -4008,17 +4021,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4008
4021
|
this.hasRegisteredEventListeners = false;
|
|
4009
4022
|
self = this;
|
|
4010
4023
|
registerHost(self, cmpMeta);
|
|
4011
|
-
if (
|
|
4024
|
+
if (import_app_data21.BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
4012
4025
|
if (supportsShadow) {
|
|
4013
4026
|
if (!self.shadowRoot) {
|
|
4014
|
-
|
|
4015
|
-
self.attachShadow({
|
|
4016
|
-
mode: "open",
|
|
4017
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
4018
|
-
});
|
|
4019
|
-
} else {
|
|
4020
|
-
self.attachShadow({ mode: "open" });
|
|
4021
|
-
}
|
|
4027
|
+
createShadowRoot.call(self, cmpMeta);
|
|
4022
4028
|
} else {
|
|
4023
4029
|
if (self.shadowRoot.mode !== "open") {
|
|
4024
4030
|
throw new Error(
|
|
@@ -4026,7 +4032,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4026
4032
|
);
|
|
4027
4033
|
}
|
|
4028
4034
|
}
|
|
4029
|
-
} else if (!
|
|
4035
|
+
} else if (!import_app_data21.BUILD.hydrateServerSide && !("shadowRoot" in self)) {
|
|
4030
4036
|
self.shadowRoot = self;
|
|
4031
4037
|
}
|
|
4032
4038
|
}
|
|
@@ -4065,28 +4071,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4065
4071
|
return getHostRef(this).$onReadyPromise$;
|
|
4066
4072
|
}
|
|
4067
4073
|
};
|
|
4068
|
-
if (
|
|
4069
|
-
if (
|
|
4074
|
+
if (import_app_data21.BUILD.experimentalSlotFixes) {
|
|
4075
|
+
if (import_app_data21.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4070
4076
|
patchPseudoShadowDom(HostElement.prototype);
|
|
4071
4077
|
}
|
|
4072
4078
|
} else {
|
|
4073
|
-
if (
|
|
4079
|
+
if (import_app_data21.BUILD.slotChildNodesFix) {
|
|
4074
4080
|
patchChildSlotNodes(HostElement.prototype);
|
|
4075
4081
|
}
|
|
4076
|
-
if (
|
|
4082
|
+
if (import_app_data21.BUILD.cloneNodeFix) {
|
|
4077
4083
|
patchCloneNode(HostElement.prototype);
|
|
4078
4084
|
}
|
|
4079
|
-
if (
|
|
4085
|
+
if (import_app_data21.BUILD.appendChildSlotFix) {
|
|
4080
4086
|
patchSlotAppendChild(HostElement.prototype);
|
|
4081
4087
|
}
|
|
4082
|
-
if (
|
|
4088
|
+
if (import_app_data21.BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4083
4089
|
patchTextContent(HostElement.prototype);
|
|
4084
4090
|
}
|
|
4085
4091
|
}
|
|
4086
|
-
if (
|
|
4092
|
+
if (import_app_data21.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
4087
4093
|
HostElement.formAssociated = true;
|
|
4088
4094
|
}
|
|
4089
|
-
if (
|
|
4095
|
+
if (import_app_data21.BUILD.hotModuleReplacement) {
|
|
4090
4096
|
HostElement.prototype["s-hmr"] = function(hmrVersionId) {
|
|
4091
4097
|
hmrStart(this, cmpMeta, hmrVersionId);
|
|
4092
4098
|
};
|
|
@@ -4105,7 +4111,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4105
4111
|
if (hasSlotRelocation) {
|
|
4106
4112
|
dataStyles.textContent += SLOT_FB_CSS;
|
|
4107
4113
|
}
|
|
4108
|
-
if (
|
|
4114
|
+
if (import_app_data21.BUILD.invisiblePrehydration && (import_app_data21.BUILD.hydratedClass || import_app_data21.BUILD.hydratedAttribute)) {
|
|
4109
4115
|
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
4110
4116
|
}
|
|
4111
4117
|
if (dataStyles.innerHTML.length) {
|
|
@@ -4121,7 +4127,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4121
4127
|
if (deferredConnectedCallbacks.length) {
|
|
4122
4128
|
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
4123
4129
|
} else {
|
|
4124
|
-
if (
|
|
4130
|
+
if (import_app_data21.BUILD.profile) {
|
|
4125
4131
|
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
|
|
4126
4132
|
} else {
|
|
4127
4133
|
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
|
|
@@ -4134,10 +4140,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4134
4140
|
var Fragment = (_, children) => children;
|
|
4135
4141
|
|
|
4136
4142
|
// src/runtime/host-listener.ts
|
|
4137
|
-
var
|
|
4143
|
+
var import_app_data22 = require("@stencil/core/internal/app-data");
|
|
4138
4144
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
4139
|
-
if (
|
|
4140
|
-
if (
|
|
4145
|
+
if (import_app_data22.BUILD.hostListener && listeners && win.document) {
|
|
4146
|
+
if (import_app_data22.BUILD.hostListenerTargetParent) {
|
|
4141
4147
|
if (attachParentListeners) {
|
|
4142
4148
|
listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
|
|
4143
4149
|
} else {
|
|
@@ -4145,7 +4151,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
|
|
|
4145
4151
|
}
|
|
4146
4152
|
}
|
|
4147
4153
|
listeners.map(([flags, name, method]) => {
|
|
4148
|
-
const target =
|
|
4154
|
+
const target = import_app_data22.BUILD.hostListenerTarget ? getHostListenerTarget(win.document, elm, flags) : elm;
|
|
4149
4155
|
const handler = hostListenerProxy(hostRef, method);
|
|
4150
4156
|
const opts = hostListenerOpts(flags);
|
|
4151
4157
|
plt.ael(target, name, handler, opts);
|
|
@@ -4156,7 +4162,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
|
|
|
4156
4162
|
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
4157
4163
|
var _a;
|
|
4158
4164
|
try {
|
|
4159
|
-
if (
|
|
4165
|
+
if (import_app_data22.BUILD.lazyLoad) {
|
|
4160
4166
|
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
4161
4167
|
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
4162
4168
|
} else {
|
|
@@ -4170,16 +4176,16 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
4170
4176
|
}
|
|
4171
4177
|
};
|
|
4172
4178
|
var getHostListenerTarget = (doc, elm, flags) => {
|
|
4173
|
-
if (
|
|
4179
|
+
if (import_app_data22.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) {
|
|
4174
4180
|
return doc;
|
|
4175
4181
|
}
|
|
4176
|
-
if (
|
|
4182
|
+
if (import_app_data22.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) {
|
|
4177
4183
|
return win;
|
|
4178
4184
|
}
|
|
4179
|
-
if (
|
|
4185
|
+
if (import_app_data22.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) {
|
|
4180
4186
|
return doc.body;
|
|
4181
4187
|
}
|
|
4182
|
-
if (
|
|
4188
|
+
if (import_app_data22.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement) {
|
|
4183
4189
|
return elm.parentElement;
|
|
4184
4190
|
}
|
|
4185
4191
|
return elm;
|