lwc 2.6.2 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +1114 -1054
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +1114 -1054
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +1084 -1018
  5. package/dist/engine-dom/iife/es5/engine-dom.js +1166 -999
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +1181 -1014
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +1114 -1054
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +1084 -1018
  11. package/dist/engine-dom/umd/es5/engine-dom.js +1166 -999
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +1181 -1014
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +1286 -1227
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
  16. package/dist/engine-server/esm/es2017/engine-server.js +1286 -1227
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +74 -9
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +74 -9
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +74 -9
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +78 -9
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +78 -9
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +74 -9
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +74 -9
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +78 -9
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +78 -9
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +3 -3
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
  36. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service.js +3 -3
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +3 -3
  41. package/package.json +8 -8
@@ -21,7 +21,7 @@ var LWC = (function (exports) {
21
21
 
22
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -348,7 +348,7 @@ var LWC = (function (exports) {
348
348
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
349
349
  return attributeName;
350
350
  }
351
- /** version: 2.6.2 */
351
+ /** version: 2.7.3 */
352
352
 
353
353
  /*
354
354
  * Copyright (c) 2018, salesforce.com, inc.
@@ -460,7 +460,6 @@ var LWC = (function (exports) {
460
460
  ENABLE_NODE_LIST_PATCH: null,
461
461
  ENABLE_HTML_COLLECTIONS_PATCH: null,
462
462
  ENABLE_NODE_PATCH: null,
463
- ENABLE_MIXED_SHADOW_MODE: null,
464
463
  ENABLE_WIRE_SYNC_EMIT: null
465
464
  };
466
465
 
@@ -527,7 +526,7 @@ var LWC = (function (exports) {
527
526
  setFeatureFlag(name, value);
528
527
  }
529
528
  }
530
- /** version: 2.6.2 */
529
+ /** version: 2.7.3 */
531
530
 
532
531
  /* proxy-compat-disable */
533
532
 
@@ -615,609 +614,377 @@ var LWC = (function (exports) {
615
614
  }
616
615
 
617
616
  return styleMap;
618
- }
619
- /*
620
- * Copyright (c) 2019, salesforce.com, inc.
621
- * All rights reserved.
622
- * SPDX-License-Identifier: MIT
623
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
624
- */
617
+ } //
618
+ // Primitives
619
+ //
625
620
 
626
621
 
627
- var TargetToReactiveRecordMap = new WeakMap();
622
+ var ssr$1;
628
623
 
629
- function getReactiveRecord(target) {
630
- var reactiveRecord = TargetToReactiveRecordMap.get(target);
624
+ function setSsr(ssrImpl) {
625
+ ssr$1 = ssrImpl;
626
+ }
631
627
 
632
- if (isUndefined$1(reactiveRecord)) {
633
- var newRecord = create(null);
634
- reactiveRecord = newRecord;
635
- TargetToReactiveRecordMap.set(target, newRecord);
636
- }
628
+ var isNativeShadowDefined$1;
637
629
 
638
- return reactiveRecord;
630
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
631
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
639
632
  }
640
633
 
641
- var currentReactiveObserver = null;
634
+ var isSyntheticShadowDefined$1;
642
635
 
643
- function valueMutated(target, key) {
644
- var reactiveRecord = TargetToReactiveRecordMap.get(target);
636
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
637
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
638
+ }
645
639
 
646
- if (!isUndefined$1(reactiveRecord)) {
647
- var reactiveObservers = reactiveRecord[key];
640
+ var HTMLElementExported$1;
648
641
 
649
- if (!isUndefined$1(reactiveObservers)) {
650
- for (var _i4 = 0, _len2 = reactiveObservers.length; _i4 < _len2; _i4 += 1) {
651
- var ro = reactiveObservers[_i4];
652
- ro.notify();
653
- }
654
- }
655
- }
642
+ function setHTMLElement(HTMLElementImpl) {
643
+ HTMLElementExported$1 = HTMLElementImpl;
656
644
  }
657
645
 
658
- function valueObserved(target, key) {
659
- // We should determine if an active Observing Record is present to track mutations.
660
- if (currentReactiveObserver === null) {
661
- return;
662
- }
646
+ var isHydrating$1;
663
647
 
664
- var ro = currentReactiveObserver;
665
- var reactiveRecord = getReactiveRecord(target);
666
- var reactiveObservers = reactiveRecord[key];
648
+ function setIsHydrating$1(isHydratingImpl) {
649
+ isHydrating$1 = isHydratingImpl;
650
+ }
667
651
 
668
- if (isUndefined$1(reactiveObservers)) {
669
- reactiveObservers = [];
670
- reactiveRecord[key] = reactiveObservers;
671
- } else if (reactiveObservers[0] === ro) {
672
- return; // perf optimization considering that most subscriptions will come from the same record
673
- }
652
+ var insert$1;
674
653
 
675
- if (ArrayIndexOf.call(reactiveObservers, ro) === -1) {
676
- ro.link(reactiveObservers);
677
- }
654
+ function setInsert(insertImpl) {
655
+ insert$1 = insertImpl;
678
656
  }
679
657
 
680
- var ReactiveObserver = /*#__PURE__*/function () {
681
- function ReactiveObserver(callback) {
682
- _classCallCheck(this, ReactiveObserver);
683
-
684
- this.listeners = [];
685
- this.callback = callback;
686
- }
658
+ var remove$1;
687
659
 
688
- _createClass(ReactiveObserver, [{
689
- key: "observe",
690
- value: function observe(job) {
691
- var inceptionReactiveRecord = currentReactiveObserver;
692
- currentReactiveObserver = this;
693
- var error;
660
+ function setRemove(removeImpl) {
661
+ remove$1 = removeImpl;
662
+ }
694
663
 
695
- try {
696
- job();
697
- } catch (e) {
698
- error = Object(e);
699
- } finally {
700
- currentReactiveObserver = inceptionReactiveRecord;
664
+ var createElement$2;
701
665
 
702
- if (error !== undefined) {
703
- throw error; // eslint-disable-line no-unsafe-finally
704
- }
705
- }
706
- }
707
- /**
708
- * This method is responsible for disconnecting the Reactive Observer
709
- * from any Reactive Record that has a reference to it, to prevent future
710
- * notifications about previously recorded access.
711
- */
666
+ function setCreateElement(createElementImpl) {
667
+ createElement$2 = createElementImpl;
668
+ }
712
669
 
713
- }, {
714
- key: "reset",
715
- value: function reset() {
716
- var listeners = this.listeners;
717
- var len = listeners.length;
670
+ var createText$1;
718
671
 
719
- if (len > 0) {
720
- for (var _i5 = 0; _i5 < len; _i5 += 1) {
721
- var set = listeners[_i5];
722
- var pos = ArrayIndexOf.call(listeners[_i5], this);
723
- ArraySplice.call(set, pos, 1);
724
- }
672
+ function setCreateText(createTextImpl) {
673
+ createText$1 = createTextImpl;
674
+ }
725
675
 
726
- listeners.length = 0;
727
- }
728
- } // friend methods
676
+ var createComment$1;
729
677
 
730
- }, {
731
- key: "notify",
732
- value: function notify() {
733
- this.callback.call(undefined, this);
734
- }
735
- }, {
736
- key: "link",
737
- value: function link(reactiveObservers) {
738
- ArrayPush$1.call(reactiveObservers, this); // we keep track of observing records where the observing record was added to so we can do some clean up later on
678
+ function setCreateComment(createCommentImpl) {
679
+ createComment$1 = createCommentImpl;
680
+ }
739
681
 
740
- ArrayPush$1.call(this.listeners, reactiveObservers);
741
- }
742
- }]);
682
+ var nextSibling$1;
743
683
 
744
- return ReactiveObserver;
745
- }();
746
- /*
747
- * Copyright (c) 2018, salesforce.com, inc.
748
- * All rights reserved.
749
- * SPDX-License-Identifier: MIT
750
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
751
- */
684
+ function setNextSibling(nextSiblingImpl) {
685
+ nextSibling$1 = nextSiblingImpl;
686
+ }
752
687
 
688
+ var attachShadow$1;
753
689
 
754
- function componentValueMutated(vm, key) {
755
- valueMutated(vm.component, key);
690
+ function setAttachShadow(attachShadowImpl) {
691
+ attachShadow$1 = attachShadowImpl;
756
692
  }
757
693
 
758
- function componentValueObserved(vm, key) {
759
- valueObserved(vm.component, key);
694
+ var getProperty$1;
695
+
696
+ function setGetProperty(getPropertyImpl) {
697
+ getProperty$1 = getPropertyImpl;
760
698
  }
761
- /*
762
- * Copyright (c) 2018, salesforce.com, inc.
763
- * All rights reserved.
764
- * SPDX-License-Identifier: MIT
765
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
766
- */
767
699
 
700
+ var setProperty$1;
768
701
 
769
- function getComponentTag(vm) {
770
- return "<".concat(StringToLowerCase.call(vm.tagName), ">");
771
- } // TODO [#1695]: Unify getComponentStack and getErrorComponentStack
702
+ function setSetProperty(setPropertyImpl) {
703
+ setProperty$1 = setPropertyImpl;
704
+ }
772
705
 
706
+ var setText$1;
773
707
 
774
- function getComponentStack(vm) {
775
- var stack = [];
776
- var prefix = '';
708
+ function setSetText(setTextImpl) {
709
+ setText$1 = setTextImpl;
710
+ }
777
711
 
778
- while (!isNull(vm.owner)) {
779
- ArrayPush$1.call(stack, prefix + getComponentTag(vm));
780
- vm = vm.owner;
781
- prefix += '\t';
782
- }
712
+ var getAttribute$1;
783
713
 
784
- return ArrayJoin.call(stack, '\n');
714
+ function setGetAttribute(getAttributeImpl) {
715
+ getAttribute$1 = getAttributeImpl;
785
716
  }
786
717
 
787
- function getErrorComponentStack(vm) {
788
- var wcStack = [];
789
- var currentVm = vm;
718
+ var setAttribute$1;
790
719
 
791
- while (!isNull(currentVm)) {
792
- ArrayPush$1.call(wcStack, getComponentTag(currentVm));
793
- currentVm = currentVm.owner;
794
- }
795
-
796
- return wcStack.reverse().join('\n\t');
720
+ function setSetAttribute(setAttributeImpl) {
721
+ setAttribute$1 = setAttributeImpl;
797
722
  }
798
- /*
799
- * Copyright (c) 2018, salesforce.com, inc.
800
- * All rights reserved.
801
- * SPDX-License-Identifier: MIT
802
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
803
- */
804
723
 
724
+ var removeAttribute$1;
805
725
 
806
- function log(method, message, vm) {
807
- var msg = "[LWC ".concat(method, "]: ").concat(message);
726
+ function setRemoveAttribute(removeAttributeImpl) {
727
+ removeAttribute$1 = removeAttributeImpl;
728
+ }
808
729
 
809
- if (!isUndefined$1(vm)) {
810
- msg = "".concat(msg, "\n").concat(getComponentStack(vm));
811
- }
730
+ var addEventListener$1;
812
731
 
813
- if (process.env.NODE_ENV === 'test') {
814
- /* eslint-disable-next-line no-console */
815
- console[method](msg);
816
- return;
817
- }
818
-
819
- try {
820
- throw new Error(msg);
821
- } catch (e) {
822
- /* eslint-disable-next-line no-console */
823
- console[method](e);
824
- }
732
+ function setAddEventListener(addEventListenerImpl) {
733
+ addEventListener$1 = addEventListenerImpl;
825
734
  }
826
735
 
827
- function logError(message, vm) {
828
- log('error', message, vm);
829
- }
736
+ var removeEventListener$1;
830
737
 
831
- function logWarn(message, vm) {
832
- log('warn', message, vm);
738
+ function setRemoveEventListener(removeEventListenerImpl) {
739
+ removeEventListener$1 = removeEventListenerImpl;
833
740
  }
834
- /*
835
- * Copyright (c) 2018, salesforce.com, inc.
836
- * All rights reserved.
837
- * SPDX-License-Identifier: MIT
838
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
839
- */
840
741
 
742
+ var dispatchEvent$1;
841
743
 
842
- function handleEvent(event, vnode) {
843
- var type = event.type;
844
- var on = vnode.data.on;
845
- var handler = on && on[type]; // call event handler if exists
846
-
847
- if (handler) {
848
- handler.call(undefined, event);
849
- }
744
+ function setDispatchEvent(dispatchEventImpl) {
745
+ dispatchEvent$1 = dispatchEventImpl;
850
746
  }
851
747
 
852
- function createListener() {
853
- return function handler(event) {
854
- handleEvent(event, handler.vnode);
855
- };
856
- }
748
+ var getClassList$1;
857
749
 
858
- function updateAllEventListeners(oldVnode, vnode) {
859
- if (isUndefined$1(oldVnode.listener)) {
860
- createAllEventListeners(vnode);
861
- } else {
862
- vnode.listener = oldVnode.listener;
863
- vnode.listener.vnode = vnode;
864
- }
750
+ function setGetClassList(getClassListImpl) {
751
+ getClassList$1 = getClassListImpl;
865
752
  }
866
753
 
867
- function createAllEventListeners(vnode) {
868
- var elm = vnode.elm,
869
- on = vnode.data.on,
870
- renderer = vnode.owner.renderer;
754
+ var setCSSStyleProperty$1;
871
755
 
872
- if (isUndefined$1(on)) {
873
- return;
874
- }
756
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
757
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
758
+ }
875
759
 
876
- var listener = vnode.listener = createListener();
877
- listener.vnode = vnode;
878
- var name;
760
+ var getBoundingClientRect$1;
879
761
 
880
- for (name in on) {
881
- renderer.addEventListener(elm, name, listener);
882
- }
762
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
763
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
883
764
  }
884
765
 
885
- var modEvents = {
886
- update: updateAllEventListeners,
887
- create: createAllEventListeners
888
- };
889
- /*
890
- * Copyright (c) 2018, salesforce.com, inc.
891
- * All rights reserved.
892
- * SPDX-License-Identifier: MIT
893
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
894
- */
766
+ var querySelector$1;
895
767
 
896
- var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
768
+ function setQuerySelector(querySelectorImpl) {
769
+ querySelector$1 = querySelectorImpl;
770
+ }
897
771
 
898
- function offsetPropertyErrorMessage(name) {
899
- return "Using the `".concat(name, "` property is an anti-pattern because it rounds the value to an integer. Instead, use the `getBoundingClientRect` method to obtain fractional values for the size of an element and its position relative to the viewport.");
900
- } // Global HTML Attributes & Properties
901
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
902
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
772
+ var querySelectorAll$1;
903
773
 
774
+ function setQuerySelectorAll(querySelectorAllImpl) {
775
+ querySelectorAll$1 = querySelectorAllImpl;
776
+ }
904
777
 
905
- var globalHTMLProperties = assign(create(null), {
906
- accessKey: {
907
- attribute: 'accesskey'
908
- },
909
- accessKeyLabel: {
910
- readOnly: true
911
- },
912
- className: {
913
- attribute: 'class',
914
- error: 'Using the `className` property is an anti-pattern because of slow runtime behavior and potential conflicts with classes provided by the owner element. Use the `classList` API instead.'
915
- },
916
- contentEditable: {
917
- attribute: 'contenteditable'
918
- },
919
- dataset: {
920
- readOnly: true,
921
- error: "Using the `dataset` property is an anti-pattern because it can't be statically analyzed. Expose each property individually using the `@api` decorator instead."
922
- },
923
- dir: {
924
- attribute: 'dir'
925
- },
926
- draggable: {
927
- attribute: 'draggable'
928
- },
929
- dropzone: {
930
- attribute: 'dropzone',
931
- readOnly: true
932
- },
933
- hidden: {
934
- attribute: 'hidden'
935
- },
936
- id: {
937
- attribute: 'id'
938
- },
939
- inputMode: {
940
- attribute: 'inputmode'
941
- },
942
- lang: {
943
- attribute: 'lang'
944
- },
945
- slot: {
946
- attribute: 'slot',
947
- error: 'Using the `slot` property is an anti-pattern.'
948
- },
949
- spellcheck: {
950
- attribute: 'spellcheck'
951
- },
952
- style: {
953
- attribute: 'style'
954
- },
955
- tabIndex: {
956
- attribute: 'tabindex'
957
- },
958
- title: {
959
- attribute: 'title'
960
- },
961
- translate: {
962
- attribute: 'translate'
963
- },
964
- // additional "global attributes" that are not present in the link above.
965
- isContentEditable: {
966
- readOnly: true
967
- },
968
- offsetHeight: {
969
- readOnly: true,
970
- error: offsetPropertyErrorMessage('offsetHeight')
971
- },
972
- offsetLeft: {
973
- readOnly: true,
974
- error: offsetPropertyErrorMessage('offsetLeft')
975
- },
976
- offsetParent: {
977
- readOnly: true
978
- },
979
- offsetTop: {
980
- readOnly: true,
981
- error: offsetPropertyErrorMessage('offsetTop')
982
- },
983
- offsetWidth: {
984
- readOnly: true,
985
- error: offsetPropertyErrorMessage('offsetWidth')
986
- },
987
- role: {
988
- attribute: 'role'
989
- }
990
- });
991
- var controlledElement = null;
992
- var controlledAttributeName;
778
+ var getElementsByTagName$1;
993
779
 
994
- function isAttributeLocked(elm, attrName) {
995
- return elm !== controlledElement || attrName !== controlledAttributeName;
780
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
781
+ getElementsByTagName$1 = getElementsByTagNameImpl;
996
782
  }
997
783
 
998
- function lockAttribute(_elm, _key) {
999
- controlledElement = null;
1000
- controlledAttributeName = undefined;
1001
- }
784
+ var getElementsByClassName$1;
1002
785
 
1003
- function unlockAttribute(elm, key) {
1004
- controlledElement = elm;
1005
- controlledAttributeName = key;
786
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
787
+ getElementsByClassName$1 = getElementsByClassNameImpl;
1006
788
  }
1007
- /*
1008
- * Copyright (c) 2018, salesforce.com, inc.
1009
- * All rights reserved.
1010
- * SPDX-License-Identifier: MIT
1011
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1012
- */
1013
789
 
790
+ var getChildren$1;
1014
791
 
1015
- var xlinkNS = 'http://www.w3.org/1999/xlink';
1016
- var xmlNS = 'http://www.w3.org/XML/1998/namespace';
1017
- var ColonCharCode = 58;
792
+ function setGetChildren(getChildrenImpl) {
793
+ getChildren$1 = getChildrenImpl;
794
+ }
1018
795
 
1019
- function updateAttrs(oldVnode, vnode) {
1020
- var attrs = vnode.data.attrs,
1021
- renderer = vnode.owner.renderer;
796
+ var getChildNodes$1;
1022
797
 
1023
- if (isUndefined$1(attrs)) {
1024
- return;
1025
- }
798
+ function setGetChildNodes(getChildNodesImpl) {
799
+ getChildNodes$1 = getChildNodesImpl;
800
+ }
1026
801
 
1027
- var oldAttrs = oldVnode.data.attrs;
802
+ var getFirstChild$1;
1028
803
 
1029
- if (oldAttrs === attrs) {
1030
- return;
1031
- }
804
+ function setGetFirstChild(getFirstChildImpl) {
805
+ getFirstChild$1 = getFirstChildImpl;
806
+ }
1032
807
 
1033
- if (process.env.NODE_ENV !== 'production') {
1034
- assert.invariant(isUndefined$1(oldAttrs) || keys(oldAttrs).join(',') === keys(attrs).join(','), "vnode.data.attrs cannot change shape.");
1035
- }
808
+ var getFirstElementChild$1;
1036
809
 
1037
- var elm = vnode.elm;
1038
- var setAttribute = renderer.setAttribute,
1039
- removeAttribute = renderer.removeAttribute;
1040
- var key;
1041
- oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
1042
- // this routine is only useful for data-* attributes in all kind of elements
1043
- // and aria-* in standard elements (custom elements will use props for these)
1044
-
1045
- for (key in attrs) {
1046
- var cur = attrs[key];
1047
- var old = oldAttrs[key];
810
+ function setGetFirstElementChild(getFirstElementChildImpl) {
811
+ getFirstElementChild$1 = getFirstElementChildImpl;
812
+ }
1048
813
 
1049
- if (old !== cur) {
1050
- unlockAttribute(elm, key);
814
+ var getLastChild$1;
1051
815
 
1052
- if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
1053
- // Assume xml namespace
1054
- setAttribute(elm, key, cur, xmlNS);
1055
- } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
1056
- // Assume xlink namespace
1057
- setAttribute(elm, key, cur, xlinkNS);
1058
- } else if (isNull(cur)) {
1059
- removeAttribute(elm, key);
1060
- } else {
1061
- setAttribute(elm, key, cur);
1062
- }
816
+ function setGetLastChild(getLastChildImpl) {
817
+ getLastChild$1 = getLastChildImpl;
818
+ }
1063
819
 
1064
- lockAttribute();
1065
- }
1066
- }
820
+ var getLastElementChild$1;
821
+
822
+ function setGetLastElementChild(getLastElementChildImpl) {
823
+ getLastElementChild$1 = getLastElementChildImpl;
1067
824
  }
1068
825
 
1069
- var emptyVNode$3 = {
1070
- data: {}
1071
- };
1072
- var modAttrs = {
1073
- create: function create(vnode) {
1074
- return updateAttrs(emptyVNode$3, vnode);
1075
- },
1076
- update: updateAttrs
1077
- };
1078
- /*
1079
- * Copyright (c) 2018, salesforce.com, inc.
1080
- * All rights reserved.
1081
- * SPDX-License-Identifier: MIT
1082
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1083
- */
826
+ var isConnected$1;
1084
827
 
1085
- function isLiveBindingProp(sel, key) {
1086
- // For properties with live bindings, we read values from the DOM element
1087
- // instead of relying on internally tracked values.
1088
- return sel === 'input' && (key === 'value' || key === 'checked');
828
+ function setIsConnected(isConnectedImpl) {
829
+ isConnected$1 = isConnectedImpl;
1089
830
  }
1090
831
 
1091
- function update(oldVnode, vnode) {
1092
- var props = vnode.data.props;
832
+ var insertGlobalStylesheet$1;
1093
833
 
1094
- if (isUndefined$1(props)) {
1095
- return;
1096
- }
834
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
835
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
836
+ }
1097
837
 
1098
- var oldProps = oldVnode.data.props;
838
+ var insertStylesheet$1;
1099
839
 
1100
- if (oldProps === props) {
1101
- return;
1102
- }
840
+ function setInsertStylesheet(insertStylesheetImpl) {
841
+ insertStylesheet$1 = insertStylesheetImpl;
842
+ }
1103
843
 
1104
- if (process.env.NODE_ENV !== 'production') {
1105
- assert.invariant(isUndefined$1(oldProps) || keys(oldProps).join(',') === keys(props).join(','), 'vnode.data.props cannot change shape.');
1106
- }
844
+ var assertInstanceOfHTMLElement$1;
1107
845
 
1108
- var isFirstPatch = isUndefined$1(oldProps);
1109
- var elm = vnode.elm,
1110
- sel = vnode.sel,
1111
- renderer = vnode.owner.renderer;
846
+ function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
847
+ assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
848
+ }
1112
849
 
1113
- for (var key in props) {
1114
- var cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
850
+ var defineCustomElement$1;
1115
851
 
1116
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1117
- renderer.setProperty(elm, key, cur);
1118
- }
1119
- }
852
+ function setDefineCustomElement(defineCustomElementImpl) {
853
+ defineCustomElement$1 = defineCustomElementImpl;
1120
854
  }
1121
855
 
1122
- var emptyVNode$2 = {
1123
- data: {}
1124
- };
1125
- var modProps = {
1126
- create: function create(vnode) {
1127
- return update(emptyVNode$2, vnode);
1128
- },
1129
- update: update
1130
- };
856
+ var getCustomElement$1;
857
+
858
+ function setGetCustomElement(getCustomElementImpl) {
859
+ getCustomElement$1 = getCustomElementImpl;
860
+ }
1131
861
  /*
1132
- * Copyright (c) 2018, salesforce.com, inc.
862
+ * Copyright (c) 2019, salesforce.com, inc.
1133
863
  * All rights reserved.
1134
864
  * SPDX-License-Identifier: MIT
1135
865
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1136
866
  */
1137
867
 
1138
- var classNameToClassMap = create(null);
1139
-
1140
- function getMapFromClassName(className) {
1141
- // Intentionally using == to match undefined and null values from computed style attribute
1142
- if (className == null) {
1143
- return EmptyObject;
1144
- } // computed class names must be string
1145
868
 
869
+ var TargetToReactiveRecordMap = new WeakMap();
1146
870
 
1147
- className = isString(className) ? className : className + '';
1148
- var map = classNameToClassMap[className];
871
+ function getReactiveRecord(target) {
872
+ var reactiveRecord = TargetToReactiveRecordMap.get(target);
1149
873
 
1150
- if (map) {
1151
- return map;
874
+ if (isUndefined$1(reactiveRecord)) {
875
+ var newRecord = create(null);
876
+ reactiveRecord = newRecord;
877
+ TargetToReactiveRecordMap.set(target, newRecord);
1152
878
  }
1153
879
 
1154
- map = create(null);
1155
- var start = 0;
1156
- var o;
1157
- var len = className.length;
880
+ return reactiveRecord;
881
+ }
1158
882
 
1159
- for (o = 0; o < len; o++) {
1160
- if (StringCharCodeAt.call(className, o) === SPACE_CHAR) {
1161
- if (o > start) {
1162
- map[StringSlice.call(className, start, o)] = true;
1163
- }
883
+ var currentReactiveObserver = null;
1164
884
 
1165
- start = o + 1;
885
+ function valueMutated(target, key) {
886
+ var reactiveRecord = TargetToReactiveRecordMap.get(target);
887
+
888
+ if (!isUndefined$1(reactiveRecord)) {
889
+ var reactiveObservers = reactiveRecord[key];
890
+
891
+ if (!isUndefined$1(reactiveObservers)) {
892
+ for (var _i4 = 0, _len2 = reactiveObservers.length; _i4 < _len2; _i4 += 1) {
893
+ var ro = reactiveObservers[_i4];
894
+ ro.notify();
895
+ }
1166
896
  }
1167
897
  }
898
+ }
1168
899
 
1169
- if (o > start) {
1170
- map[StringSlice.call(className, start, o)] = true;
900
+ function valueObserved(target, key) {
901
+ // We should determine if an active Observing Record is present to track mutations.
902
+ if (currentReactiveObserver === null) {
903
+ return;
1171
904
  }
1172
905
 
1173
- classNameToClassMap[className] = map;
906
+ var ro = currentReactiveObserver;
907
+ var reactiveRecord = getReactiveRecord(target);
908
+ var reactiveObservers = reactiveRecord[key];
1174
909
 
1175
- if (process.env.NODE_ENV !== 'production') {
1176
- // just to make sure that this object never changes as part of the diffing algo
1177
- freeze(map);
910
+ if (isUndefined$1(reactiveObservers)) {
911
+ reactiveObservers = [];
912
+ reactiveRecord[key] = reactiveObservers;
913
+ } else if (reactiveObservers[0] === ro) {
914
+ return; // perf optimization considering that most subscriptions will come from the same record
1178
915
  }
1179
916
 
1180
- return map;
917
+ if (ArrayIndexOf.call(reactiveObservers, ro) === -1) {
918
+ ro.link(reactiveObservers);
919
+ }
1181
920
  }
1182
921
 
1183
- function updateClassAttribute(oldVnode, vnode) {
1184
- var elm = vnode.elm,
1185
- newClass = vnode.data.className,
1186
- renderer = vnode.owner.renderer;
1187
- var oldClass = oldVnode.data.className;
922
+ var ReactiveObserver = /*#__PURE__*/function () {
923
+ function ReactiveObserver(callback) {
924
+ _classCallCheck(this, ReactiveObserver);
925
+
926
+ this.listeners = [];
927
+ this.callback = callback;
928
+ }
929
+
930
+ _createClass(ReactiveObserver, [{
931
+ key: "observe",
932
+ value: function observe(job) {
933
+ var inceptionReactiveRecord = currentReactiveObserver;
934
+ currentReactiveObserver = this;
935
+ var error;
936
+
937
+ try {
938
+ job();
939
+ } catch (e) {
940
+ error = Object(e);
941
+ } finally {
942
+ currentReactiveObserver = inceptionReactiveRecord;
943
+
944
+ if (error !== undefined) {
945
+ throw error; // eslint-disable-line no-unsafe-finally
946
+ }
947
+ }
948
+ }
949
+ /**
950
+ * This method is responsible for disconnecting the Reactive Observer
951
+ * from any Reactive Record that has a reference to it, to prevent future
952
+ * notifications about previously recorded access.
953
+ */
1188
954
 
1189
- if (oldClass === newClass) {
1190
- return;
1191
- }
955
+ }, {
956
+ key: "reset",
957
+ value: function reset() {
958
+ var listeners = this.listeners;
959
+ var len = listeners.length;
1192
960
 
1193
- var classList = renderer.getClassList(elm);
1194
- var newClassMap = getMapFromClassName(newClass);
1195
- var oldClassMap = getMapFromClassName(oldClass);
1196
- var name;
961
+ if (len > 0) {
962
+ for (var _i5 = 0; _i5 < len; _i5 += 1) {
963
+ var set = listeners[_i5];
964
+ var pos = ArrayIndexOf.call(listeners[_i5], this);
965
+ ArraySplice.call(set, pos, 1);
966
+ }
1197
967
 
1198
- for (name in oldClassMap) {
1199
- // remove only if it is not in the new class collection and it is not set from within the instance
1200
- if (isUndefined$1(newClassMap[name])) {
1201
- classList.remove(name);
968
+ listeners.length = 0;
969
+ }
970
+ } // friend methods
971
+
972
+ }, {
973
+ key: "notify",
974
+ value: function notify() {
975
+ this.callback.call(undefined, this);
1202
976
  }
1203
- }
977
+ }, {
978
+ key: "link",
979
+ value: function link(reactiveObservers) {
980
+ ArrayPush$1.call(reactiveObservers, this); // we keep track of observing records where the observing record was added to so we can do some clean up later on
1204
981
 
1205
- for (name in newClassMap) {
1206
- if (isUndefined$1(oldClassMap[name])) {
1207
- classList.add(name);
982
+ ArrayPush$1.call(this.listeners, reactiveObservers);
1208
983
  }
1209
- }
1210
- }
984
+ }]);
1211
985
 
1212
- var emptyVNode$1 = {
1213
- data: {}
1214
- };
1215
- var modComputedClassName = {
1216
- create: function create(vnode) {
1217
- return updateClassAttribute(emptyVNode$1, vnode);
1218
- },
1219
- update: updateClassAttribute
1220
- };
986
+ return ReactiveObserver;
987
+ }();
1221
988
  /*
1222
989
  * Copyright (c) 2018, salesforce.com, inc.
1223
990
  * All rights reserved.
@@ -1225,92 +992,87 @@ var LWC = (function (exports) {
1225
992
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1226
993
  */
1227
994
 
1228
- function updateStyleAttribute(oldVnode, vnode) {
1229
- var elm = vnode.elm,
1230
- newStyle = vnode.data.style,
1231
- renderer = vnode.owner.renderer;
1232
- var setAttribute = renderer.setAttribute,
1233
- removeAttribute = renderer.removeAttribute;
1234
-
1235
- if (oldVnode.data.style === newStyle) {
1236
- return;
1237
- }
1238
995
 
1239
- if (!isString(newStyle) || newStyle === '') {
1240
- removeAttribute(elm, 'style');
1241
- } else {
1242
- setAttribute(elm, 'style', newStyle);
1243
- }
996
+ function componentValueMutated(vm, key) {
997
+ valueMutated(vm.component, key);
1244
998
  }
1245
999
 
1246
- var emptyVNode = {
1247
- data: {}
1248
- };
1249
- var modComputedStyle = {
1250
- create: function create(vnode) {
1251
- return updateStyleAttribute(emptyVNode, vnode);
1252
- },
1253
- update: updateStyleAttribute
1254
- };
1000
+ function componentValueObserved(vm, key) {
1001
+ valueObserved(vm.component, key);
1002
+ }
1255
1003
  /*
1256
1004
  * Copyright (c) 2018, salesforce.com, inc.
1257
1005
  * All rights reserved.
1258
1006
  * SPDX-License-Identifier: MIT
1259
1007
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1260
1008
  */
1261
- // The compiler takes care of transforming the inline classnames into an object. It's faster to set the
1262
- // different classnames properties individually instead of via a string.
1263
1009
 
1264
- function createClassAttribute(vnode) {
1265
- var elm = vnode.elm,
1266
- classMap = vnode.data.classMap,
1267
- renderer = vnode.owner.renderer;
1268
1010
 
1269
- if (isUndefined$1(classMap)) {
1270
- return;
1271
- }
1011
+ function getComponentTag(vm) {
1012
+ return "<".concat(StringToLowerCase.call(vm.tagName), ">");
1013
+ } // TODO [#1695]: Unify getComponentStack and getErrorComponentStack
1272
1014
 
1273
- var classList = renderer.getClassList(elm);
1274
1015
 
1275
- for (var name in classMap) {
1276
- classList.add(name);
1016
+ function getComponentStack(vm) {
1017
+ var stack = [];
1018
+ var prefix = '';
1019
+
1020
+ while (!isNull(vm.owner)) {
1021
+ ArrayPush$1.call(stack, prefix + getComponentTag(vm));
1022
+ vm = vm.owner;
1023
+ prefix += '\t';
1277
1024
  }
1025
+
1026
+ return ArrayJoin.call(stack, '\n');
1278
1027
  }
1279
1028
 
1280
- var modStaticClassName = {
1281
- create: createClassAttribute
1282
- };
1029
+ function getErrorComponentStack(vm) {
1030
+ var wcStack = [];
1031
+ var currentVm = vm;
1032
+
1033
+ while (!isNull(currentVm)) {
1034
+ ArrayPush$1.call(wcStack, getComponentTag(currentVm));
1035
+ currentVm = currentVm.owner;
1036
+ }
1037
+
1038
+ return wcStack.reverse().join('\n\t');
1039
+ }
1283
1040
  /*
1284
1041
  * Copyright (c) 2018, salesforce.com, inc.
1285
1042
  * All rights reserved.
1286
1043
  * SPDX-License-Identifier: MIT
1287
1044
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1288
1045
  */
1289
- // The compiler takes care of transforming the inline style into an object. It's faster to set the
1290
- // different style properties individually instead of via a string.
1291
1046
 
1292
- function createStyleAttribute(vnode) {
1293
- var elm = vnode.elm,
1294
- styleDecls = vnode.data.styleDecls,
1295
- renderer = vnode.owner.renderer;
1296
1047
 
1297
- if (isUndefined$1(styleDecls)) {
1298
- return;
1048
+ function log(method, message, vm) {
1049
+ var msg = "[LWC ".concat(method, "]: ").concat(message);
1050
+
1051
+ if (!isUndefined$1(vm)) {
1052
+ msg = "".concat(msg, "\n").concat(getComponentStack(vm));
1299
1053
  }
1300
1054
 
1301
- for (var _i6 = 0; _i6 < styleDecls.length; _i6++) {
1302
- var _styleDecls$_i = _slicedToArray(styleDecls[_i6], 3),
1303
- prop = _styleDecls$_i[0],
1304
- value = _styleDecls$_i[1],
1305
- important = _styleDecls$_i[2];
1055
+ if (process.env.NODE_ENV === 'test') {
1056
+ /* eslint-disable-next-line no-console */
1057
+ console[method](msg);
1058
+ return;
1059
+ }
1306
1060
 
1307
- renderer.setCSSStyleProperty(elm, prop, value, important);
1061
+ try {
1062
+ throw new Error(msg);
1063
+ } catch (e) {
1064
+ /* eslint-disable-next-line no-console */
1065
+ console[method](e);
1308
1066
  }
1309
1067
  }
1310
1068
 
1311
- var modStaticStyle = {
1312
- create: createStyleAttribute
1313
- };
1069
+ function logError(message, vm) {
1070
+ log('error', message, vm);
1071
+ }
1072
+
1073
+ function logWarn(message, vm) {
1074
+ log('warn', message, vm);
1075
+ }
1314
1076
  /*
1315
1077
  * Copyright (c) 2018, salesforce.com, inc.
1316
1078
  * All rights reserved.
@@ -1318,14 +1080,6 @@ var LWC = (function (exports) {
1318
1080
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1319
1081
  */
1320
1082
 
1321
- /**
1322
- @license
1323
- Copyright (c) 2015 Simon Friis Vindum.
1324
- This code may only be used under the MIT License found at
1325
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1326
- Code distributed by Snabbdom as part of the Snabbdom project at
1327
- https://github.com/snabbdom/snabbdom/
1328
- */
1329
1083
 
1330
1084
  function isUndef(s) {
1331
1085
  return s === undefined;
@@ -1414,7 +1168,7 @@ var LWC = (function (exports) {
1414
1168
  } else if (sameVnode(oldStartVnode, newEndVnode)) {
1415
1169
  // Vnode moved right
1416
1170
  patchVnode(oldStartVnode, newEndVnode);
1417
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1171
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1418
1172
  oldStartVnode = oldCh[++oldStartIdx];
1419
1173
  newEndVnode = newCh[--newEndIdx];
1420
1174
  } else if (sameVnode(oldEndVnode, newStartVnode)) {
@@ -1459,12 +1213,12 @@ var LWC = (function (exports) {
1459
1213
  if (oldStartIdx > oldEndIdx) {
1460
1214
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
1461
1215
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
1462
- var _i7 = newEndIdx;
1216
+ var _i6 = newEndIdx;
1463
1217
  var n;
1464
1218
 
1465
1219
  do {
1466
- n = newCh[++_i7];
1467
- } while (!isVNode(n) && _i7 < newChEnd);
1220
+ n = newCh[++_i6];
1221
+ } while (!isVNode(n) && _i6 < newChEnd);
1468
1222
 
1469
1223
  before = isVNode(n) ? n.elm : null;
1470
1224
  addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx);
@@ -1495,9 +1249,9 @@ var LWC = (function (exports) {
1495
1249
 
1496
1250
  var referenceElm = null;
1497
1251
 
1498
- for (var _i8 = newChLength - 1; _i8 >= 0; _i8 -= 1) {
1499
- var vnode = newCh[_i8];
1500
- var oldVNode = oldCh[_i8];
1252
+ for (var _i7 = newChLength - 1; _i7 >= 0; _i7 -= 1) {
1253
+ var vnode = newCh[_i7];
1254
+ var oldVNode = oldCh[_i7];
1501
1255
 
1502
1256
  if (vnode !== oldVNode) {
1503
1257
  if (isVNode(oldVNode)) {
@@ -1534,6 +1288,125 @@ var LWC = (function (exports) {
1534
1288
  */
1535
1289
 
1536
1290
 
1291
+ var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
1292
+
1293
+ function offsetPropertyErrorMessage(name) {
1294
+ return "Using the `".concat(name, "` property is an anti-pattern because it rounds the value to an integer. Instead, use the `getBoundingClientRect` method to obtain fractional values for the size of an element and its position relative to the viewport.");
1295
+ } // Global HTML Attributes & Properties
1296
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
1297
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
1298
+
1299
+
1300
+ var globalHTMLProperties = assign(create(null), {
1301
+ accessKey: {
1302
+ attribute: 'accesskey'
1303
+ },
1304
+ accessKeyLabel: {
1305
+ readOnly: true
1306
+ },
1307
+ className: {
1308
+ attribute: 'class',
1309
+ error: 'Using the `className` property is an anti-pattern because of slow runtime behavior and potential conflicts with classes provided by the owner element. Use the `classList` API instead.'
1310
+ },
1311
+ contentEditable: {
1312
+ attribute: 'contenteditable'
1313
+ },
1314
+ dataset: {
1315
+ readOnly: true,
1316
+ error: "Using the `dataset` property is an anti-pattern because it can't be statically analyzed. Expose each property individually using the `@api` decorator instead."
1317
+ },
1318
+ dir: {
1319
+ attribute: 'dir'
1320
+ },
1321
+ draggable: {
1322
+ attribute: 'draggable'
1323
+ },
1324
+ dropzone: {
1325
+ attribute: 'dropzone',
1326
+ readOnly: true
1327
+ },
1328
+ hidden: {
1329
+ attribute: 'hidden'
1330
+ },
1331
+ id: {
1332
+ attribute: 'id'
1333
+ },
1334
+ inputMode: {
1335
+ attribute: 'inputmode'
1336
+ },
1337
+ lang: {
1338
+ attribute: 'lang'
1339
+ },
1340
+ slot: {
1341
+ attribute: 'slot',
1342
+ error: 'Using the `slot` property is an anti-pattern.'
1343
+ },
1344
+ spellcheck: {
1345
+ attribute: 'spellcheck'
1346
+ },
1347
+ style: {
1348
+ attribute: 'style'
1349
+ },
1350
+ tabIndex: {
1351
+ attribute: 'tabindex'
1352
+ },
1353
+ title: {
1354
+ attribute: 'title'
1355
+ },
1356
+ translate: {
1357
+ attribute: 'translate'
1358
+ },
1359
+ // additional "global attributes" that are not present in the link above.
1360
+ isContentEditable: {
1361
+ readOnly: true
1362
+ },
1363
+ offsetHeight: {
1364
+ readOnly: true,
1365
+ error: offsetPropertyErrorMessage('offsetHeight')
1366
+ },
1367
+ offsetLeft: {
1368
+ readOnly: true,
1369
+ error: offsetPropertyErrorMessage('offsetLeft')
1370
+ },
1371
+ offsetParent: {
1372
+ readOnly: true
1373
+ },
1374
+ offsetTop: {
1375
+ readOnly: true,
1376
+ error: offsetPropertyErrorMessage('offsetTop')
1377
+ },
1378
+ offsetWidth: {
1379
+ readOnly: true,
1380
+ error: offsetPropertyErrorMessage('offsetWidth')
1381
+ },
1382
+ role: {
1383
+ attribute: 'role'
1384
+ }
1385
+ });
1386
+ var controlledElement = null;
1387
+ var controlledAttributeName;
1388
+
1389
+ function isAttributeLocked(elm, attrName) {
1390
+ return elm !== controlledElement || attrName !== controlledAttributeName;
1391
+ }
1392
+
1393
+ function lockAttribute(_elm, _key) {
1394
+ controlledElement = null;
1395
+ controlledAttributeName = undefined;
1396
+ }
1397
+
1398
+ function unlockAttribute(elm, key) {
1399
+ controlledElement = elm;
1400
+ controlledAttributeName = key;
1401
+ }
1402
+ /*
1403
+ * Copyright (c) 2018, salesforce.com, inc.
1404
+ * All rights reserved.
1405
+ * SPDX-License-Identifier: MIT
1406
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1407
+ */
1408
+
1409
+
1537
1410
  function generateDataDescriptor(options) {
1538
1411
  return assign({
1539
1412
  configurable: true,
@@ -1861,7 +1734,7 @@ var LWC = (function (exports) {
1861
1734
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1862
1735
  }
1863
1736
  /*
1864
- * Copyright (c) 2020, salesforce.com, inc.
1737
+ * Copyright (c) 2018, salesforce.com, inc.
1865
1738
  * All rights reserved.
1866
1739
  * SPDX-License-Identifier: MIT
1867
1740
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -2797,21 +2670,18 @@ var LWC = (function (exports) {
2797
2670
 
2798
2671
 
2799
2672
  var LightningElement = function LightningElement() {
2800
- var _a; // This should be as performant as possible, while any initialization should be done lazily
2801
-
2802
-
2673
+ // This should be as performant as possible, while any initialization should be done lazily
2803
2674
  if (isNull(vmBeingConstructed)) {
2804
2675
  throw new ReferenceError('Illegal constructor');
2805
2676
  }
2806
2677
 
2807
2678
  var vm = vmBeingConstructed;
2808
2679
  var def = vm.def,
2809
- elm = vm.elm,
2810
- renderer = vm.renderer;
2680
+ elm = vm.elm;
2811
2681
  var bridge = def.bridge;
2812
2682
 
2813
2683
  if (process.env.NODE_ENV !== 'production') {
2814
- (_a = renderer.assertInstanceOfHTMLElement) === null || _a === void 0 ? void 0 : _a.call(renderer, vm.elm, "Component creation requires a DOM element to be associated to ".concat(vm, "."));
2684
+ assertInstanceOfHTMLElement$1(vm.elm, "Component creation requires a DOM element to be associated to ".concat(vm, "."));
2815
2685
  }
2816
2686
 
2817
2687
  var component = this;
@@ -2840,7 +2710,7 @@ var LWC = (function (exports) {
2840
2710
  if (vm.renderMode === 1
2841
2711
  /* Shadow */
2842
2712
  ) {
2843
- attachShadow(vm);
2713
+ doAttachShadow(vm);
2844
2714
  } // Adding extra guard rails in DEV mode.
2845
2715
 
2846
2716
 
@@ -2852,15 +2722,14 @@ var LWC = (function (exports) {
2852
2722
  return this;
2853
2723
  };
2854
2724
 
2855
- function attachShadow(vm) {
2856
- var _renderer$attachShado;
2725
+ function doAttachShadow(vm) {
2726
+ var _attachShadow$;
2857
2727
 
2858
2728
  var elm = vm.elm,
2859
2729
  mode = vm.mode,
2860
- renderer = vm.renderer,
2861
2730
  shadowMode = vm.shadowMode,
2862
2731
  ctor = vm.def.ctor;
2863
- var cmpRoot = renderer.attachShadow(elm, (_renderer$attachShado = {}, _defineProperty(_renderer$attachShado, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_renderer$attachShado, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_renderer$attachShado, "mode", mode), _renderer$attachShado));
2732
+ var cmpRoot = attachShadow$1(elm, (_attachShadow$ = {}, _defineProperty(_attachShadow$, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_attachShadow$, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_attachShadow$, "mode", mode), _attachShadow$));
2864
2733
  vm.cmpRoot = cmpRoot;
2865
2734
  associateVM(cmpRoot, vm);
2866
2735
 
@@ -2880,15 +2749,13 @@ var LWC = (function (exports) {
2880
2749
  constructor: LightningElement,
2881
2750
  dispatchEvent: function dispatchEvent(event) {
2882
2751
  var _getAssociatedVM = getAssociatedVM(this),
2883
- elm = _getAssociatedVM.elm,
2884
- dispatchEvent = _getAssociatedVM.renderer.dispatchEvent;
2752
+ elm = _getAssociatedVM.elm;
2885
2753
 
2886
- return dispatchEvent(elm, event);
2754
+ return dispatchEvent$1(elm, event);
2887
2755
  },
2888
2756
  addEventListener: function addEventListener(type, listener, options) {
2889
2757
  var vm = getAssociatedVM(this);
2890
- var elm = vm.elm,
2891
- addEventListener = vm.renderer.addEventListener;
2758
+ var elm = vm.elm;
2892
2759
 
2893
2760
  if (process.env.NODE_ENV !== 'production') {
2894
2761
  var _vmBeingRendered2 = getVMBeingRendered();
@@ -2899,111 +2766,99 @@ var LWC = (function (exports) {
2899
2766
  }
2900
2767
 
2901
2768
  var wrappedListener = getWrappedComponentsListener(vm, listener);
2902
- addEventListener(elm, type, wrappedListener, options);
2769
+ addEventListener$1(elm, type, wrappedListener, options);
2903
2770
  },
2904
2771
  removeEventListener: function removeEventListener(type, listener, options) {
2905
2772
  var vm = getAssociatedVM(this);
2906
- var elm = vm.elm,
2907
- removeEventListener = vm.renderer.removeEventListener;
2773
+ var elm = vm.elm;
2908
2774
  var wrappedListener = getWrappedComponentsListener(vm, listener);
2909
- removeEventListener(elm, type, wrappedListener, options);
2775
+ removeEventListener$1(elm, type, wrappedListener, options);
2910
2776
  },
2911
2777
  hasAttribute: function hasAttribute(name) {
2912
2778
  var _getAssociatedVM2 = getAssociatedVM(this),
2913
- elm = _getAssociatedVM2.elm,
2914
- getAttribute = _getAssociatedVM2.renderer.getAttribute;
2779
+ elm = _getAssociatedVM2.elm;
2915
2780
 
2916
- return !isNull(getAttribute(elm, name));
2781
+ return !isNull(getAttribute$1(elm, name));
2917
2782
  },
2918
2783
  hasAttributeNS: function hasAttributeNS(namespace, name) {
2919
2784
  var _getAssociatedVM3 = getAssociatedVM(this),
2920
- elm = _getAssociatedVM3.elm,
2921
- getAttribute = _getAssociatedVM3.renderer.getAttribute;
2785
+ elm = _getAssociatedVM3.elm;
2922
2786
 
2923
- return !isNull(getAttribute(elm, name, namespace));
2787
+ return !isNull(getAttribute$1(elm, name, namespace));
2924
2788
  },
2925
2789
  removeAttribute: function removeAttribute(name) {
2926
2790
  var _getAssociatedVM4 = getAssociatedVM(this),
2927
- elm = _getAssociatedVM4.elm,
2928
- removeAttribute = _getAssociatedVM4.renderer.removeAttribute;
2791
+ elm = _getAssociatedVM4.elm;
2929
2792
 
2930
2793
  unlockAttribute(elm, name);
2931
- removeAttribute(elm, name);
2794
+ removeAttribute$1(elm, name);
2932
2795
  lockAttribute();
2933
2796
  },
2934
2797
  removeAttributeNS: function removeAttributeNS(namespace, name) {
2935
2798
  var _getAssociatedVM5 = getAssociatedVM(this),
2936
- elm = _getAssociatedVM5.elm,
2937
- removeAttribute = _getAssociatedVM5.renderer.removeAttribute;
2799
+ elm = _getAssociatedVM5.elm;
2938
2800
 
2939
2801
  unlockAttribute(elm, name);
2940
- removeAttribute(elm, name, namespace);
2802
+ removeAttribute$1(elm, name, namespace);
2941
2803
  lockAttribute();
2942
2804
  },
2943
2805
  getAttribute: function getAttribute(name) {
2944
2806
  var _getAssociatedVM6 = getAssociatedVM(this),
2945
- elm = _getAssociatedVM6.elm,
2946
- getAttribute = _getAssociatedVM6.renderer.getAttribute;
2807
+ elm = _getAssociatedVM6.elm;
2947
2808
 
2948
- return getAttribute(elm, name);
2809
+ return getAttribute$1(elm, name);
2949
2810
  },
2950
2811
  getAttributeNS: function getAttributeNS(namespace, name) {
2951
2812
  var _getAssociatedVM7 = getAssociatedVM(this),
2952
- elm = _getAssociatedVM7.elm,
2953
- getAttribute = _getAssociatedVM7.renderer.getAttribute;
2813
+ elm = _getAssociatedVM7.elm;
2954
2814
 
2955
- return getAttribute(elm, name, namespace);
2815
+ return getAttribute$1(elm, name, namespace);
2956
2816
  },
2957
2817
  setAttribute: function setAttribute(name, value) {
2958
2818
  var vm = getAssociatedVM(this);
2959
- var elm = vm.elm,
2960
- setAttribute = vm.renderer.setAttribute;
2819
+ var elm = vm.elm;
2961
2820
 
2962
2821
  if (process.env.NODE_ENV !== 'production') {
2963
2822
  assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2964
2823
  }
2965
2824
 
2966
2825
  unlockAttribute(elm, name);
2967
- setAttribute(elm, name, value);
2826
+ setAttribute$1(elm, name, value);
2968
2827
  lockAttribute();
2969
2828
  },
2970
2829
  setAttributeNS: function setAttributeNS(namespace, name, value) {
2971
2830
  var vm = getAssociatedVM(this);
2972
- var elm = vm.elm,
2973
- setAttribute = vm.renderer.setAttribute;
2831
+ var elm = vm.elm;
2974
2832
 
2975
2833
  if (process.env.NODE_ENV !== 'production') {
2976
2834
  assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2977
2835
  }
2978
2836
 
2979
2837
  unlockAttribute(elm, name);
2980
- setAttribute(elm, name, value, namespace);
2838
+ setAttribute$1(elm, name, value, namespace);
2981
2839
  lockAttribute();
2982
2840
  },
2983
2841
  getBoundingClientRect: function getBoundingClientRect() {
2984
2842
  var vm = getAssociatedVM(this);
2985
- var elm = vm.elm,
2986
- getBoundingClientRect = vm.renderer.getBoundingClientRect;
2843
+ var elm = vm.elm;
2987
2844
 
2988
2845
  if (process.env.NODE_ENV !== 'production') {
2989
2846
  warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
2990
2847
  }
2991
2848
 
2992
- return getBoundingClientRect(elm);
2849
+ return getBoundingClientRect$1(elm);
2993
2850
  },
2994
2851
 
2995
2852
  get isConnected() {
2996
2853
  var _getAssociatedVM8 = getAssociatedVM(this),
2997
- elm = _getAssociatedVM8.elm,
2998
- isConnected = _getAssociatedVM8.renderer.isConnected;
2854
+ elm = _getAssociatedVM8.elm;
2999
2855
 
3000
- return isConnected(elm);
2856
+ return isConnected$1(elm);
3001
2857
  },
3002
2858
 
3003
2859
  get classList() {
3004
2860
  var vm = getAssociatedVM(this);
3005
- var elm = vm.elm,
3006
- getClassList = vm.renderer.getClassList;
2861
+ var elm = vm.elm;
3007
2862
 
3008
2863
  if (process.env.NODE_ENV !== 'production') {
3009
2864
  // TODO [#1290]: this still fails in dev but works in production, eventually, we should
@@ -3011,7 +2866,7 @@ var LWC = (function (exports) {
3011
2866
  assert.isFalse(isBeingConstructed(vm), "Failed to construct ".concat(vm, ": The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead."));
3012
2867
  }
3013
2868
 
3014
- return getClassList(elm);
2869
+ return getClassList$1(elm);
3015
2870
  },
3016
2871
 
3017
2872
  get template() {
@@ -3043,50 +2898,88 @@ var LWC = (function (exports) {
3043
2898
  return "[object ".concat(vm.def.name, "]");
3044
2899
  }
3045
2900
  };
3046
- var queryAndChildGetterDescriptors = create(null);
3047
- var childGetters = [['children', 'getChildren'], ['childNodes', 'getChildNodes'], ['firstChild', 'getFirstChild'], ['firstElementChild', 'getFirstElementChild'], ['lastChild', 'getLastChild'], ['lastElementChild', 'getLastElementChild']]; // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
2901
+ var queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
2902
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
2903
+ // object representing the renderer, with a lot of methods we don't actually need.
3048
2904
 
3049
- var _loop = function _loop() {
3050
- var _childGetters$_i = _slicedToArray(_childGetters[_i9], 2),
3051
- elementProp = _childGetters$_i[0],
3052
- rendererMethod = _childGetters$_i[1];
2905
+ var childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
2906
+
2907
+ function getChildGetter(methodName) {
2908
+ switch (methodName) {
2909
+ case 'children':
2910
+ return getChildren$1;
3053
2911
 
3054
- queryAndChildGetterDescriptors[elementProp] = {
2912
+ case 'childNodes':
2913
+ return getChildNodes$1;
2914
+
2915
+ case 'firstChild':
2916
+ return getFirstChild$1;
2917
+
2918
+ case 'firstElementChild':
2919
+ return getFirstElementChild$1;
2920
+
2921
+ case 'lastChild':
2922
+ return getLastChild$1;
2923
+
2924
+ case 'lastElementChild':
2925
+ return getLastElementChild$1;
2926
+ }
2927
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
2928
+
2929
+
2930
+ var _loop = function _loop() {
2931
+ var childGetter = _childGetters[_i8];
2932
+ queryAndChildGetterDescriptors[childGetter] = {
3055
2933
  get: function get() {
3056
2934
  var vm = getAssociatedVM(this);
3057
- var elm = vm.elm,
3058
- renderer = vm.renderer;
2935
+ var elm = vm.elm;
3059
2936
 
3060
2937
  if (process.env.NODE_ENV !== 'production') {
3061
- warnIfInvokedDuringConstruction(vm, elementProp);
2938
+ warnIfInvokedDuringConstruction(vm, childGetter);
3062
2939
  }
3063
2940
 
3064
- return renderer[rendererMethod](elm);
2941
+ return getChildGetter(childGetter)(elm);
3065
2942
  },
3066
2943
  configurable: true,
3067
2944
  enumerable: true
3068
2945
  };
3069
2946
  };
3070
2947
 
3071
- for (var _i9 = 0, _childGetters = childGetters; _i9 < _childGetters.length; _i9++) {
2948
+ for (var _i8 = 0, _childGetters = childGetters; _i8 < _childGetters.length; _i8++) {
3072
2949
  _loop();
3073
2950
  }
3074
2951
 
3075
- var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2952
+ var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
2953
+
2954
+ function getQueryMethod(methodName) {
2955
+ switch (methodName) {
2956
+ case 'getElementsByClassName':
2957
+ return getElementsByClassName$1;
2958
+
2959
+ case 'getElementsByTagName':
2960
+ return getElementsByTagName$1;
2961
+
2962
+ case 'querySelector':
2963
+ return querySelector$1;
2964
+
2965
+ case 'querySelectorAll':
2966
+ return querySelectorAll$1;
2967
+ }
2968
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2969
+
3076
2970
 
3077
2971
  var _loop2 = function _loop2() {
3078
- var queryMethod = _queryMethods[_i10];
2972
+ var queryMethod = _queryMethods[_i9];
3079
2973
  queryAndChildGetterDescriptors[queryMethod] = {
3080
2974
  value: function value(arg) {
3081
2975
  var vm = getAssociatedVM(this);
3082
- var elm = vm.elm,
3083
- renderer = vm.renderer;
2976
+ var elm = vm.elm;
3084
2977
 
3085
2978
  if (process.env.NODE_ENV !== 'production') {
3086
2979
  warnIfInvokedDuringConstruction(vm, "".concat(queryMethod, "()"));
3087
2980
  }
3088
2981
 
3089
- return renderer[queryMethod](elm, arg);
2982
+ return getQueryMethod(queryMethod)(elm, arg);
3090
2983
  },
3091
2984
  configurable: true,
3092
2985
  enumerable: true,
@@ -3094,7 +2987,7 @@ var LWC = (function (exports) {
3094
2987
  };
3095
2988
  };
3096
2989
 
3097
- for (var _i10 = 0, _queryMethods = queryMethods; _i10 < _queryMethods.length; _i10++) {
2990
+ for (var _i9 = 0, _queryMethods = queryMethods; _i9 < _queryMethods.length; _i9++) {
3098
2991
  _loop2();
3099
2992
  }
3100
2993
 
@@ -3617,8 +3510,8 @@ var LWC = (function (exports) {
3617
3510
  }
3618
3511
 
3619
3512
  if (!isUndefined$1(fields)) {
3620
- for (var _i11 = 0, n = fields.length; _i11 < n; _i11++) {
3621
- var _fieldName2 = fields[_i11];
3513
+ for (var _i10 = 0, n = fields.length; _i10 < n; _i10++) {
3514
+ var _fieldName2 = fields[_i10];
3622
3515
  descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
3623
3516
 
3624
3517
  if (process.env.NODE_ENV !== 'production') {
@@ -3839,8 +3732,8 @@ var LWC = (function (exports) {
3839
3732
  superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
3840
3733
  var descriptors = create(null); // expose getters and setters for each public props on the new Element Bridge
3841
3734
 
3842
- for (var _i12 = 0, _len3 = props.length; _i12 < _len3; _i12 += 1) {
3843
- var _propName2 = props[_i12];
3735
+ for (var _i11 = 0, _len3 = props.length; _i11 < _len3; _i11 += 1) {
3736
+ var _propName2 = props[_i11];
3844
3737
  attributeToPropMap[htmlPropertyToAttribute(_propName2)] = _propName2;
3845
3738
  descriptors[_propName2] = {
3846
3739
  get: createGetter(_propName2),
@@ -3851,8 +3744,8 @@ var LWC = (function (exports) {
3851
3744
  } // expose public methods as props on the new Element Bridge
3852
3745
 
3853
3746
 
3854
- for (var _i13 = 0, _len4 = methods.length; _i13 < _len4; _i13 += 1) {
3855
- var methodName = methods[_i13];
3747
+ for (var _i12 = 0, _len4 = methods.length; _i12 < _len4; _i12 += 1) {
3748
+ var methodName = methods[_i12];
3856
3749
  descriptors[methodName] = {
3857
3750
  value: createMethodCaller(methodName),
3858
3751
  writable: true,
@@ -4256,10 +4149,6 @@ var LWC = (function (exports) {
4256
4149
 
4257
4150
  assert.isTrue(Ctor.constructor, "Missing ".concat(ctorName, ".constructor, ").concat(ctorName, " should have a \"constructor\" property."));
4258
4151
 
4259
- if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
4260
- assert.isFalse('shadowSupportMode' in Ctor, "".concat(ctorName || 'Anonymous class', " is an invalid LWC component. The shadowSupportMode static property is not available in this environment."));
4261
- }
4262
-
4263
4152
  if (!isUndefined$1(ctorShadowSupportMode)) {
4264
4153
  assert.invariant(ctorShadowSupportMode === "any"
4265
4154
  /* Any */
@@ -4480,6 +4369,271 @@ var LWC = (function (exports) {
4480
4369
  */
4481
4370
 
4482
4371
 
4372
+ var xlinkNS = 'http://www.w3.org/1999/xlink';
4373
+ var xmlNS = 'http://www.w3.org/XML/1998/namespace';
4374
+ var ColonCharCode = 58;
4375
+
4376
+ function patchAttributes(oldVnode, vnode) {
4377
+ var attrs = vnode.data.attrs;
4378
+
4379
+ if (isUndefined$1(attrs)) {
4380
+ return;
4381
+ }
4382
+
4383
+ var oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
4384
+
4385
+ if (oldAttrs === attrs) {
4386
+ return;
4387
+ }
4388
+
4389
+ var elm = vnode.elm;
4390
+
4391
+ for (var key in attrs) {
4392
+ var cur = attrs[key];
4393
+ var old = oldAttrs[key];
4394
+
4395
+ if (old !== cur) {
4396
+ unlockAttribute(elm, key);
4397
+
4398
+ if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
4399
+ // Assume xml namespace
4400
+ setAttribute$1(elm, key, cur, xmlNS);
4401
+ } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
4402
+ // Assume xlink namespace
4403
+ setAttribute$1(elm, key, cur, xlinkNS);
4404
+ } else if (isNull(cur) || isUndefined$1(cur)) {
4405
+ removeAttribute$1(elm, key);
4406
+ } else {
4407
+ setAttribute$1(elm, key, cur);
4408
+ }
4409
+
4410
+ lockAttribute();
4411
+ }
4412
+ }
4413
+ }
4414
+ /*
4415
+ * Copyright (c) 2018, salesforce.com, inc.
4416
+ * All rights reserved.
4417
+ * SPDX-License-Identifier: MIT
4418
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4419
+ */
4420
+
4421
+
4422
+ function isLiveBindingProp(sel, key) {
4423
+ // For properties with live bindings, we read values from the DOM element
4424
+ // instead of relying on internally tracked values.
4425
+ return sel === 'input' && (key === 'value' || key === 'checked');
4426
+ }
4427
+
4428
+ function patchProps(oldVnode, vnode) {
4429
+ var props = vnode.data.props;
4430
+
4431
+ if (isUndefined$1(props)) {
4432
+ return;
4433
+ }
4434
+
4435
+ var oldProps = isNull(oldVnode) ? EmptyObject : oldVnode.data.props;
4436
+
4437
+ if (oldProps === props) {
4438
+ return;
4439
+ }
4440
+
4441
+ var isFirstPatch = isNull(oldVnode);
4442
+ var elm = vnode.elm,
4443
+ sel = vnode.sel;
4444
+
4445
+ for (var key in props) {
4446
+ var cur = props[key]; // Set the property if it's the first time is is patched or if the previous property is
4447
+ // different than the one previously set.
4448
+
4449
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
4450
+ setProperty$1(elm, key, cur);
4451
+ }
4452
+ }
4453
+ }
4454
+ /*
4455
+ * Copyright (c) 2018, salesforce.com, inc.
4456
+ * All rights reserved.
4457
+ * SPDX-License-Identifier: MIT
4458
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4459
+ */
4460
+
4461
+
4462
+ var classNameToClassMap = create(null);
4463
+
4464
+ function getMapFromClassName(className) {
4465
+ // Intentionally using == to match undefined and null values from computed style attribute
4466
+ if (className == null) {
4467
+ return EmptyObject;
4468
+ } // computed class names must be string
4469
+
4470
+
4471
+ className = isString(className) ? className : className + '';
4472
+ var map = classNameToClassMap[className];
4473
+
4474
+ if (map) {
4475
+ return map;
4476
+ }
4477
+
4478
+ map = create(null);
4479
+ var start = 0;
4480
+ var o;
4481
+ var len = className.length;
4482
+
4483
+ for (o = 0; o < len; o++) {
4484
+ if (StringCharCodeAt.call(className, o) === SPACE_CHAR) {
4485
+ if (o > start) {
4486
+ map[StringSlice.call(className, start, o)] = true;
4487
+ }
4488
+
4489
+ start = o + 1;
4490
+ }
4491
+ }
4492
+
4493
+ if (o > start) {
4494
+ map[StringSlice.call(className, start, o)] = true;
4495
+ }
4496
+
4497
+ classNameToClassMap[className] = map;
4498
+
4499
+ if (process.env.NODE_ENV !== 'production') {
4500
+ // just to make sure that this object never changes as part of the diffing algo
4501
+ freeze(map);
4502
+ }
4503
+
4504
+ return map;
4505
+ }
4506
+
4507
+ function patchClassAttribute(oldVnode, vnode) {
4508
+ var elm = vnode.elm,
4509
+ newClass = vnode.data.className;
4510
+ var oldClass = isNull(oldVnode) ? undefined : oldVnode.data.className;
4511
+
4512
+ if (oldClass === newClass) {
4513
+ return;
4514
+ }
4515
+
4516
+ var classList = getClassList$1(elm);
4517
+ var newClassMap = getMapFromClassName(newClass);
4518
+ var oldClassMap = getMapFromClassName(oldClass);
4519
+ var name;
4520
+
4521
+ for (name in oldClassMap) {
4522
+ // remove only if it is not in the new class collection and it is not set from within the instance
4523
+ if (isUndefined$1(newClassMap[name])) {
4524
+ classList.remove(name);
4525
+ }
4526
+ }
4527
+
4528
+ for (name in newClassMap) {
4529
+ if (isUndefined$1(oldClassMap[name])) {
4530
+ classList.add(name);
4531
+ }
4532
+ }
4533
+ }
4534
+ /*
4535
+ * Copyright (c) 2018, salesforce.com, inc.
4536
+ * All rights reserved.
4537
+ * SPDX-License-Identifier: MIT
4538
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4539
+ */
4540
+
4541
+
4542
+ function patchStyleAttribute(oldVnode, vnode) {
4543
+ var elm = vnode.elm,
4544
+ newStyle = vnode.data.style;
4545
+ var oldStyle = isNull(oldVnode) ? undefined : oldVnode.data.style;
4546
+
4547
+ if (oldStyle === newStyle) {
4548
+ return;
4549
+ }
4550
+
4551
+ if (!isString(newStyle) || newStyle === '') {
4552
+ removeAttribute$1(elm, 'style');
4553
+ } else {
4554
+ setAttribute$1(elm, 'style', newStyle);
4555
+ }
4556
+ }
4557
+ /*
4558
+ * Copyright (c) 2018, salesforce.com, inc.
4559
+ * All rights reserved.
4560
+ * SPDX-License-Identifier: MIT
4561
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4562
+ */
4563
+
4564
+
4565
+ function applyEventListeners(vnode) {
4566
+ var elm = vnode.elm,
4567
+ on = vnode.data.on;
4568
+
4569
+ if (isUndefined$1(on)) {
4570
+ return;
4571
+ }
4572
+
4573
+ for (var name in on) {
4574
+ var handler = on[name];
4575
+ addEventListener$1(elm, name, handler);
4576
+ }
4577
+ }
4578
+ /*
4579
+ * Copyright (c) 2018, salesforce.com, inc.
4580
+ * All rights reserved.
4581
+ * SPDX-License-Identifier: MIT
4582
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4583
+ */
4584
+ // The compiler takes care of transforming the inline classnames into an object. It's faster to set the
4585
+ // different classnames properties individually instead of via a string.
4586
+
4587
+
4588
+ function applyStaticClassAttribute(vnode) {
4589
+ var elm = vnode.elm,
4590
+ classMap = vnode.data.classMap;
4591
+
4592
+ if (isUndefined$1(classMap)) {
4593
+ return;
4594
+ }
4595
+
4596
+ var classList = getClassList$1(elm);
4597
+
4598
+ for (var name in classMap) {
4599
+ classList.add(name);
4600
+ }
4601
+ }
4602
+ /*
4603
+ * Copyright (c) 2018, salesforce.com, inc.
4604
+ * All rights reserved.
4605
+ * SPDX-License-Identifier: MIT
4606
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4607
+ */
4608
+ // The compiler takes care of transforming the inline style into an object. It's faster to set the
4609
+ // different style properties individually instead of via a string.
4610
+
4611
+
4612
+ function applyStaticStyleAttribute(vnode) {
4613
+ var elm = vnode.elm,
4614
+ styleDecls = vnode.data.styleDecls;
4615
+
4616
+ if (isUndefined$1(styleDecls)) {
4617
+ return;
4618
+ }
4619
+
4620
+ for (var _i13 = 0; _i13 < styleDecls.length; _i13++) {
4621
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i13], 3),
4622
+ prop = _styleDecls$_i[0],
4623
+ value = _styleDecls$_i[1],
4624
+ important = _styleDecls$_i[2];
4625
+
4626
+ setCSSStyleProperty$1(elm, prop, value, important);
4627
+ }
4628
+ }
4629
+ /*
4630
+ * Copyright (c) 2018, salesforce.com, inc.
4631
+ * All rights reserved.
4632
+ * SPDX-License-Identifier: MIT
4633
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4634
+ */
4635
+
4636
+
4483
4637
  function observeElementChildNodes(elm) {
4484
4638
  elm.$domManual$ = true;
4485
4639
  }
@@ -4495,21 +4649,20 @@ var LWC = (function (exports) {
4495
4649
  var token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
4496
4650
 
4497
4651
  if (!isUndefined$1(token) && context.hasScopedStyles) {
4498
- owner.renderer.getClassList(elm).add(token);
4652
+ getClassList$1(elm).add(token);
4499
4653
  }
4500
4654
  }
4501
4655
 
4502
4656
  function updateNodeHook(oldVnode, vnode) {
4503
4657
  var elm = vnode.elm,
4504
- text = vnode.text,
4505
- renderer = vnode.owner.renderer;
4658
+ text = vnode.text;
4506
4659
 
4507
4660
  if (oldVnode.text !== text) {
4508
4661
  if (process.env.NODE_ENV !== 'production') {
4509
4662
  unlockDomMutation();
4510
4663
  }
4511
4664
 
4512
- renderer.setText(elm, text);
4665
+ setText$1(elm, text);
4513
4666
 
4514
4667
  if (process.env.NODE_ENV !== 'production') {
4515
4668
  lockDomMutation();
@@ -4518,13 +4671,11 @@ var LWC = (function (exports) {
4518
4671
  }
4519
4672
 
4520
4673
  function insertNodeHook(vnode, parentNode, referenceNode) {
4521
- var renderer = vnode.owner.renderer;
4522
-
4523
4674
  if (process.env.NODE_ENV !== 'production') {
4524
4675
  unlockDomMutation();
4525
4676
  }
4526
4677
 
4527
- renderer.insert(vnode.elm, parentNode, referenceNode);
4678
+ insert$1(vnode.elm, parentNode, referenceNode);
4528
4679
 
4529
4680
  if (process.env.NODE_ENV !== 'production') {
4530
4681
  lockDomMutation();
@@ -4532,41 +4683,35 @@ var LWC = (function (exports) {
4532
4683
  }
4533
4684
 
4534
4685
  function removeNodeHook(vnode, parentNode) {
4535
- var renderer = vnode.owner.renderer;
4536
-
4537
4686
  if (process.env.NODE_ENV !== 'production') {
4538
4687
  unlockDomMutation();
4539
4688
  }
4540
4689
 
4541
- renderer.remove(vnode.elm, parentNode);
4690
+ remove$1(vnode.elm, parentNode);
4542
4691
 
4543
4692
  if (process.env.NODE_ENV !== 'production') {
4544
4693
  lockDomMutation();
4545
4694
  }
4546
4695
  }
4547
4696
 
4548
- function createElmHook(vnode) {
4549
- modEvents.create(vnode); // Attrs need to be applied to element before props
4550
- // IE11 will wipe out value on radio inputs if value
4551
- // is set before type=radio.
4697
+ function patchElementPropsAndAttrs(oldVnode, vnode) {
4698
+ if (isNull(oldVnode)) {
4699
+ applyEventListeners(vnode);
4700
+ applyStaticClassAttribute(vnode);
4701
+ applyStaticStyleAttribute(vnode);
4702
+ } // Attrs need to be applied to element before props IE11 will wipe out value on radio inputs if
4703
+ // value is set before type=radio.
4704
+
4552
4705
 
4553
- modAttrs.create(vnode);
4554
- modProps.create(vnode);
4555
- modStaticClassName.create(vnode);
4556
- modStaticStyle.create(vnode);
4557
- modComputedClassName.create(vnode);
4558
- modComputedStyle.create(vnode);
4706
+ patchClassAttribute(oldVnode, vnode);
4707
+ patchStyleAttribute(oldVnode, vnode);
4708
+ patchAttributes(oldVnode, vnode);
4709
+ patchProps(oldVnode, vnode);
4559
4710
  }
4560
4711
 
4561
4712
  function hydrateElmHook(vnode) {
4562
- modEvents.create(vnode); // Attrs are already on the element.
4563
- // modAttrs.create(vnode);
4564
-
4565
- modProps.create(vnode); // Already set.
4566
- // modStaticClassName.create(vnode);
4567
- // modStaticStyle.create(vnode);
4568
- // modComputedClassName.create(vnode);
4569
- // modComputedStyle.create(vnode);
4713
+ applyEventListeners(vnode);
4714
+ patchProps(null, vnode);
4570
4715
  }
4571
4716
 
4572
4717
  function fallbackElmHook(elm, vnode) {
@@ -4603,27 +4748,14 @@ var LWC = (function (exports) {
4603
4748
  isPortal: isPortal,
4604
4749
  isLight: isLight
4605
4750
  });
4606
- }
4607
- }
4608
-
4609
- function updateElmHook(oldVnode, vnode) {
4610
- // Attrs need to be applied to element before props
4611
- // IE11 will wipe out value on radio inputs if value
4612
- // is set before type=radio.
4613
- modAttrs.update(oldVnode, vnode);
4614
- modProps.update(oldVnode, vnode);
4615
- modComputedClassName.update(oldVnode, vnode);
4616
- modComputedStyle.update(oldVnode, vnode);
4751
+ }
4617
4752
  }
4618
4753
 
4619
- function updateChildrenHook(oldVnode, vnode) {
4620
- var elm = vnode.elm,
4621
- children = vnode.children;
4622
-
4623
- if (hasDynamicChildren(children)) {
4624
- updateDynamicChildren(elm, oldVnode.children, children);
4754
+ function patchChildren(parent, oldCh, newCh) {
4755
+ if (hasDynamicChildren(newCh)) {
4756
+ updateDynamicChildren(parent, oldCh, newCh);
4625
4757
  } else {
4626
- updateStaticChildren(elm, oldVnode.children, children);
4758
+ updateStaticChildren(parent, oldCh, newCh);
4627
4759
  }
4628
4760
  }
4629
4761
 
@@ -4684,8 +4816,7 @@ var LWC = (function (exports) {
4684
4816
  createVM(elm, def, {
4685
4817
  mode: mode,
4686
4818
  owner: owner,
4687
- tagName: sel,
4688
- renderer: owner.renderer
4819
+ tagName: sel
4689
4820
  });
4690
4821
 
4691
4822
  if (process.env.NODE_ENV !== 'production') {
@@ -4693,19 +4824,6 @@ var LWC = (function (exports) {
4693
4824
  }
4694
4825
  }
4695
4826
 
4696
- function createCustomElmHook(vnode) {
4697
- modEvents.create(vnode); // Attrs need to be applied to element before props
4698
- // IE11 will wipe out value on radio inputs if value
4699
- // is set before type=radio.
4700
-
4701
- modAttrs.create(vnode);
4702
- modProps.create(vnode);
4703
- modStaticClassName.create(vnode);
4704
- modStaticStyle.create(vnode);
4705
- modComputedClassName.create(vnode);
4706
- modComputedStyle.create(vnode);
4707
- }
4708
-
4709
4827
  function createChildrenHook(vnode) {
4710
4828
  var elm = vnode.elm,
4711
4829
  children = vnode.children;
@@ -4727,8 +4845,7 @@ var LWC = (function (exports) {
4727
4845
 
4728
4846
  function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
4729
4847
  var _vnode$data$attrs = vnode.data.attrs,
4730
- attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs,
4731
- renderer = vnode.owner.renderer;
4848
+ attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
4732
4849
  var nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
4733
4850
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
4734
4851
 
@@ -4737,7 +4854,7 @@ var LWC = (function (exports) {
4737
4854
  attrName = _Object$entries$_i[0],
4738
4855
  attrValue = _Object$entries$_i[1];
4739
4856
 
4740
- var elmAttrValue = renderer.getAttribute(elm, attrName);
4857
+ var elmAttrValue = getAttribute$1(elm, attrName);
4741
4858
 
4742
4859
  if (String(attrValue) !== elmAttrValue) {
4743
4860
  logError("Mismatch hydrating element <".concat(elm.tagName.toLowerCase(), ">: attribute \"").concat(attrName, "\" has different values, expected \"").concat(attrValue, "\" but found \"").concat(elmAttrValue, "\""), vnode.owner);
@@ -4751,8 +4868,7 @@ var LWC = (function (exports) {
4751
4868
  function vnodesAndElementHaveCompatibleClass(vnode, elm) {
4752
4869
  var _vnode$data = vnode.data,
4753
4870
  className = _vnode$data.className,
4754
- classMap = _vnode$data.classMap,
4755
- renderer = vnode.owner.renderer;
4871
+ classMap = _vnode$data.classMap;
4756
4872
  var nodesAreCompatible = true;
4757
4873
  var vnodeClassName;
4758
4874
 
@@ -4762,7 +4878,7 @@ var LWC = (function (exports) {
4762
4878
  vnodeClassName = className;
4763
4879
  } else if (!isUndefined$1(classMap)) {
4764
4880
  // classMap is used when class is set to static value.
4765
- var classList = renderer.getClassList(elm);
4881
+ var classList = getClassList$1(elm);
4766
4882
  var computedClassName = ''; // all classes from the vnode should be in the element.classList
4767
4883
 
4768
4884
  for (var name in classMap) {
@@ -4790,9 +4906,8 @@ var LWC = (function (exports) {
4790
4906
  function vnodesAndElementHaveCompatibleStyle(vnode, elm) {
4791
4907
  var _vnode$data2 = vnode.data,
4792
4908
  style = _vnode$data2.style,
4793
- styleDecls = _vnode$data2.styleDecls,
4794
- renderer = vnode.owner.renderer;
4795
- var elmStyle = renderer.getAttribute(elm, 'style') || '';
4909
+ styleDecls = _vnode$data2.styleDecls;
4910
+ var elmStyle = getAttribute$1(elm, 'style') || '';
4796
4911
  var vnodeStyle;
4797
4912
  var nodesAreCompatible = true;
4798
4913
 
@@ -4888,16 +5003,6 @@ var LWC = (function (exports) {
4888
5003
  }
4889
5004
  }
4890
5005
 
4891
- function updateCustomElmHook(oldVnode, vnode) {
4892
- // Attrs need to be applied to element before props
4893
- // IE11 will wipe out value on radio inputs if value
4894
- // is set before type=radio.
4895
- modAttrs.update(oldVnode, vnode);
4896
- modProps.update(oldVnode, vnode);
4897
- modComputedClassName.update(oldVnode, vnode);
4898
- modComputedStyle.update(oldVnode, vnode);
4899
- }
4900
-
4901
5006
  function removeElmHook(vnode) {
4902
5007
  // this method only needs to search on child vnodes from template
4903
5008
  // to trigger the remove hook just in case some of those children
@@ -4912,6 +5017,62 @@ var LWC = (function (exports) {
4912
5017
  ch.hook.remove(ch, elm);
4913
5018
  }
4914
5019
  }
5020
+ }
5021
+
5022
+ function allocateInSlot(vm, children) {
5023
+ var oldSlots = vm.cmpSlots;
5024
+ var cmpSlots = vm.cmpSlots = create(null);
5025
+
5026
+ for (var _i16 = 0, _len6 = children.length; _i16 < _len6; _i16 += 1) {
5027
+ var vnode = children[_i16];
5028
+
5029
+ if (isNull(vnode)) {
5030
+ continue;
5031
+ }
5032
+
5033
+ var data = vnode.data;
5034
+ var slotName = data.attrs && data.attrs.slot || '';
5035
+ var vnodes = cmpSlots[slotName] = cmpSlots[slotName] || []; // re-keying the vnodes is necessary to avoid conflicts with default content for the slot
5036
+ // which might have similar keys. Each vnode will always have a key that
5037
+ // starts with a numeric character from compiler. In this case, we add a unique
5038
+ // notation for slotted vnodes keys, e.g.: `@foo:1:1`
5039
+
5040
+ if (!isUndefined$1(vnode.key)) {
5041
+ vnode.key = "@".concat(slotName, ":").concat(vnode.key);
5042
+ }
5043
+
5044
+ ArrayPush$1.call(vnodes, vnode);
5045
+ }
5046
+
5047
+ if (isFalse(vm.isDirty)) {
5048
+ // We need to determine if the old allocation is really different from the new one
5049
+ // and mark the vm as dirty
5050
+ var oldKeys = keys(oldSlots);
5051
+
5052
+ if (oldKeys.length !== keys(cmpSlots).length) {
5053
+ markComponentAsDirty(vm);
5054
+ return;
5055
+ }
5056
+
5057
+ for (var _i17 = 0, _len7 = oldKeys.length; _i17 < _len7; _i17 += 1) {
5058
+ var key = oldKeys[_i17];
5059
+
5060
+ if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
5061
+ markComponentAsDirty(vm);
5062
+ return;
5063
+ }
5064
+
5065
+ var oldVNodes = oldSlots[key];
5066
+ var _vnodes = cmpSlots[key];
5067
+
5068
+ for (var j = 0, a = cmpSlots[key].length; j < a; j += 1) {
5069
+ if (oldVNodes[j] !== _vnodes[j]) {
5070
+ markComponentAsDirty(vm);
5071
+ return;
5072
+ }
5073
+ }
5074
+ }
5075
+ }
4915
5076
  } // Using a WeakMap instead of a WeakSet because this one works in IE11 :(
4916
5077
 
4917
5078
 
@@ -4933,12 +5094,12 @@ var LWC = (function (exports) {
4933
5094
  */
4934
5095
 
4935
5096
 
4936
- function getUpgradableConstructor(tagName, renderer) {
5097
+ function getUpgradableConstructor(tagName) {
4937
5098
  // Should never get a tag with upper case letter at this point, the compiler should
4938
5099
  // produce only tags with lowercase letters
4939
5100
  // But, for backwards compatibility, we will lower case the tagName
4940
5101
  tagName = tagName.toLowerCase();
4941
- var CE = renderer.getCustomElement(tagName);
5102
+ var CE = getCustomElement$1(tagName);
4942
5103
 
4943
5104
  if (!isUndefined$1(CE)) {
4944
5105
  return CE;
@@ -4949,8 +5110,8 @@ var LWC = (function (exports) {
4949
5110
  */
4950
5111
 
4951
5112
 
4952
- CE = /*#__PURE__*/function (_renderer$HTMLElement) {
4953
- _inherits(LWCUpgradableElement, _renderer$HTMLElement);
5113
+ CE = /*#__PURE__*/function (_HTMLElementExported$) {
5114
+ _inherits(LWCUpgradableElement, _HTMLElementExported$);
4954
5115
 
4955
5116
  var _super5 = _createSuper(LWCUpgradableElement);
4956
5117
 
@@ -4969,9 +5130,9 @@ var LWC = (function (exports) {
4969
5130
  }
4970
5131
 
4971
5132
  return _createClass(LWCUpgradableElement);
4972
- }(renderer.HTMLElement);
5133
+ }(HTMLElementExported$1);
4973
5134
 
4974
- renderer.defineCustomElement(tagName, CE);
5135
+ defineCustomElement$1(tagName, CE);
4975
5136
  return CE;
4976
5137
  }
4977
5138
  /*
@@ -4987,8 +5148,7 @@ var LWC = (function (exports) {
4987
5148
  var TextHook = {
4988
5149
  create: function create(vnode) {
4989
5150
  var owner = vnode.owner;
4990
- var renderer = owner.renderer;
4991
- var elm = renderer.createText(vnode.text);
5151
+ var elm = createText$1(vnode.text);
4992
5152
  linkNodeToShadow(elm, owner);
4993
5153
  vnode.elm = elm;
4994
5154
  },
@@ -5020,8 +5180,7 @@ var LWC = (function (exports) {
5020
5180
  create: function create(vnode) {
5021
5181
  var owner = vnode.owner,
5022
5182
  text = vnode.text;
5023
- var renderer = owner.renderer;
5024
- var elm = renderer.createComment(text);
5183
+ var elm = createComment$1(text);
5025
5184
  linkNodeToShadow(elm, owner);
5026
5185
  vnode.elm = elm;
5027
5186
  },
@@ -5059,17 +5218,16 @@ var LWC = (function (exports) {
5059
5218
  var sel = vnode.sel,
5060
5219
  owner = vnode.owner,
5061
5220
  svg = vnode.data.svg;
5062
- var renderer = owner.renderer;
5063
5221
  var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
5064
- var elm = renderer.createElement(sel, namespace);
5222
+ var elm = createElement$2(sel, namespace);
5065
5223
  linkNodeToShadow(elm, owner);
5066
5224
  fallbackElmHook(elm, vnode);
5067
5225
  vnode.elm = elm;
5068
- createElmHook(vnode);
5226
+ patchElementPropsAndAttrs(null, vnode);
5069
5227
  },
5070
5228
  update: function update(oldVnode, vnode) {
5071
- updateElmHook(oldVnode, vnode);
5072
- updateChildrenHook(oldVnode, vnode);
5229
+ patchElementPropsAndAttrs(oldVnode, vnode);
5230
+ patchChildren(vnode.elm, oldVnode.children, vnode.children);
5073
5231
  },
5074
5232
  insert: function insert(vnode, parentNode, referenceNode) {
5075
5233
  insertNodeHook(vnode, parentNode, referenceNode);
@@ -5115,8 +5273,7 @@ var LWC = (function (exports) {
5115
5273
  create: function create(vnode) {
5116
5274
  var sel = vnode.sel,
5117
5275
  owner = vnode.owner;
5118
- var renderer = owner.renderer;
5119
- var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
5276
+ var UpgradableConstructor = getUpgradableConstructor(sel);
5120
5277
  /**
5121
5278
  * Note: if the upgradable constructor does not expect, or throw when we new it
5122
5279
  * with a callback as the first argument, we could implement a more advanced
@@ -5138,10 +5295,10 @@ var LWC = (function (exports) {
5138
5295
  throw new TypeError("Incorrect Component Constructor");
5139
5296
  }
5140
5297
 
5141
- createCustomElmHook(vnode);
5298
+ patchElementPropsAndAttrs(null, vnode);
5142
5299
  },
5143
5300
  update: function update(oldVnode, vnode) {
5144
- updateCustomElmHook(oldVnode, vnode);
5301
+ patchElementPropsAndAttrs(oldVnode, vnode);
5145
5302
  var vm = getAssociatedVMIfPresent(vnode.elm);
5146
5303
 
5147
5304
  if (vm) {
@@ -5152,7 +5309,7 @@ var LWC = (function (exports) {
5152
5309
  // will happen, but in native, it does allocate the light dom
5153
5310
 
5154
5311
 
5155
- updateChildrenHook(oldVnode, vnode);
5312
+ patchChildren(vnode.elm, oldVnode.children, vnode.children);
5156
5313
 
5157
5314
  if (vm) {
5158
5315
  if (process.env.NODE_ENV !== 'production') {
@@ -5207,8 +5364,7 @@ var LWC = (function (exports) {
5207
5364
  createVM(elm, def, {
5208
5365
  mode: mode,
5209
5366
  owner: owner,
5210
- tagName: sel,
5211
- renderer: owner.renderer
5367
+ tagName: sel
5212
5368
  });
5213
5369
  vnode.elm = elm;
5214
5370
  var vm = getAssociatedVM(elm);
@@ -5236,11 +5392,10 @@ var LWC = (function (exports) {
5236
5392
  };
5237
5393
 
5238
5394
  function linkNodeToShadow(elm, owner) {
5239
- var renderer = owner.renderer,
5240
- renderMode = owner.renderMode,
5395
+ var renderMode = owner.renderMode,
5241
5396
  shadowMode = owner.shadowMode; // TODO [#1164]: this should eventually be done by the polyfill directly
5242
5397
 
5243
- if (renderer.isSyntheticShadowDefined) {
5398
+ if (isSyntheticShadowDefined$1) {
5244
5399
  if (shadowMode === 1
5245
5400
  /* Synthetic */
5246
5401
  || renderMode === 0
@@ -5761,7 +5916,6 @@ var LWC = (function (exports) {
5761
5916
  function updateStylesheetToken(vm, template) {
5762
5917
  var elm = vm.elm,
5763
5918
  context = vm.context,
5764
- renderer = vm.renderer,
5765
5919
  renderMode = vm.renderMode,
5766
5920
  shadowMode = vm.shadowMode;
5767
5921
  var newStylesheets = template.stylesheets,
@@ -5781,11 +5935,11 @@ var LWC = (function (exports) {
5781
5935
  oldHasTokenInAttribute = context.hasTokenInAttribute;
5782
5936
 
5783
5937
  if (oldHasTokenInClass) {
5784
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
5938
+ getClassList$1(elm).remove(makeHostToken(oldToken));
5785
5939
  }
5786
5940
 
5787
5941
  if (oldHasTokenInAttribute) {
5788
- renderer.removeAttribute(elm, makeHostToken(oldToken));
5942
+ removeAttribute$1(elm, makeHostToken(oldToken));
5789
5943
  } // Apply the new template styling token to the host element, if the new template has any
5790
5944
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
5791
5945
 
@@ -5797,12 +5951,12 @@ var LWC = (function (exports) {
5797
5951
 
5798
5952
  if (!isUndefined$1(newToken)) {
5799
5953
  if (hasScopedStyles) {
5800
- renderer.getClassList(elm).add(makeHostToken(newToken));
5954
+ getClassList$1(elm).add(makeHostToken(newToken));
5801
5955
  newHasTokenInClass = true;
5802
5956
  }
5803
5957
 
5804
5958
  if (isSyntheticShadow) {
5805
- renderer.setAttribute(elm, makeHostToken(newToken), '');
5959
+ setAttribute$1(elm, makeHostToken(newToken), '');
5806
5960
  newHasTokenInAttribute = true;
5807
5961
  }
5808
5962
  } // Update the styling tokens present on the context object.
@@ -5817,8 +5971,8 @@ var LWC = (function (exports) {
5817
5971
  var content = [];
5818
5972
  var root;
5819
5973
 
5820
- for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
5821
- var stylesheet = stylesheets[_i16];
5974
+ for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
5975
+ var stylesheet = stylesheets[_i18];
5822
5976
 
5823
5977
  if (isArray$1(stylesheet)) {
5824
5978
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
@@ -5920,8 +6074,7 @@ var LWC = (function (exports) {
5920
6074
  }
5921
6075
 
5922
6076
  function createStylesheet(vm, stylesheets) {
5923
- var renderer = vm.renderer,
5924
- renderMode = vm.renderMode,
6077
+ var renderMode = vm.renderMode,
5925
6078
  shadowMode = vm.shadowMode;
5926
6079
 
5927
6080
  if (renderMode === 1
@@ -5929,10 +6082,10 @@ var LWC = (function (exports) {
5929
6082
  && shadowMode === 1
5930
6083
  /* Synthetic */
5931
6084
  ) {
5932
- for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
5933
- renderer.insertGlobalStylesheet(stylesheets[_i17]);
6085
+ for (var _i19 = 0; _i19 < stylesheets.length; _i19++) {
6086
+ insertGlobalStylesheet$1(stylesheets[_i19]);
5934
6087
  }
5935
- } else if (renderer.ssr || renderer.isHydrating()) {
6088
+ } else if (ssr$1 || isHydrating$1()) {
5936
6089
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
5937
6090
  // This works in the client, because the stylesheets are created, and cached in the VM
5938
6091
  // the first time the VM renders.
@@ -5944,12 +6097,12 @@ var LWC = (function (exports) {
5944
6097
  var root = getNearestNativeShadowComponent(vm);
5945
6098
  var isGlobal = isNull(root);
5946
6099
 
5947
- for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
6100
+ for (var _i20 = 0; _i20 < stylesheets.length; _i20++) {
5948
6101
  if (isGlobal) {
5949
- renderer.insertGlobalStylesheet(stylesheets[_i18]);
6102
+ insertGlobalStylesheet$1(stylesheets[_i20]);
5950
6103
  } else {
5951
6104
  // local level
5952
- renderer.insertStylesheet(stylesheets[_i18], root.cmpRoot);
6105
+ insertStylesheet$1(stylesheets[_i20], root.cmpRoot);
5953
6106
  }
5954
6107
  }
5955
6108
  }
@@ -6226,8 +6379,8 @@ var LWC = (function (exports) {
6226
6379
  var stylesheets = template.stylesheets;
6227
6380
 
6228
6381
  if (!isUndefined$1(stylesheets)) {
6229
- for (var _i19 = 0; _i19 < stylesheets.length; _i19++) {
6230
- if (isTrue(stylesheets[_i19][KEY__SCOPED_CSS])) {
6382
+ for (var _i21 = 0; _i21 < stylesheets.length; _i21++) {
6383
+ if (isTrue(stylesheets[_i21][KEY__SCOPED_CSS])) {
6231
6384
  return true;
6232
6385
  }
6233
6386
  }
@@ -6457,8 +6610,8 @@ var LWC = (function (exports) {
6457
6610
  assert.isTrue(isObject(service), "Invalid service declaration, ".concat(service, ": service must be an object"));
6458
6611
  }
6459
6612
 
6460
- for (var _i20 = 0; _i20 < hooks.length; ++_i20) {
6461
- var hookName = hooks[_i20];
6613
+ for (var _i22 = 0; _i22 < hooks.length; ++_i22) {
6614
+ var hookName = hooks[_i22];
6462
6615
 
6463
6616
  if (hookName in service) {
6464
6617
  var l = Services[hookName];
@@ -6481,8 +6634,8 @@ var LWC = (function (exports) {
6481
6634
  def = vm.def,
6482
6635
  context = vm.context;
6483
6636
 
6484
- for (var _i21 = 0, _len6 = cbs.length; _i21 < _len6; ++_i21) {
6485
- cbs[_i21].call(undefined, component, {}, def, context);
6637
+ for (var _i23 = 0, _len8 = cbs.length; _i23 < _len8; ++_i23) {
6638
+ cbs[_i23].call(undefined, component, {}, def, context);
6486
6639
  }
6487
6640
  }
6488
6641
  /*
@@ -6611,7 +6764,6 @@ var LWC = (function (exports) {
6611
6764
  function createVM(elm, def, options) {
6612
6765
  var mode = options.mode,
6613
6766
  owner = options.owner,
6614
- renderer = options.renderer,
6615
6767
  tagName = options.tagName;
6616
6768
  var vm = {
6617
6769
  elm: elm,
@@ -6625,7 +6777,6 @@ var LWC = (function (exports) {
6625
6777
  tagName: tagName,
6626
6778
  mode: mode,
6627
6779
  owner: owner,
6628
- renderer: renderer,
6629
6780
  children: EmptyArray,
6630
6781
  aChildren: EmptyArray,
6631
6782
  velements: EmptyArray,
@@ -6679,13 +6830,10 @@ var LWC = (function (exports) {
6679
6830
  }
6680
6831
 
6681
6832
  function computeShadowMode(vm) {
6682
- var def = vm.def,
6683
- renderer = vm.renderer;
6684
- var isNativeShadowDefined = renderer.isNativeShadowDefined,
6685
- isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
6833
+ var def = vm.def;
6686
6834
  var shadowMode;
6687
6835
 
6688
- if (isSyntheticShadowDefined) {
6836
+ if (isSyntheticShadowDefined$1) {
6689
6837
  if (def.renderMode === 0
6690
6838
  /* Light */
6691
6839
  ) {
@@ -6694,7 +6842,7 @@ var LWC = (function (exports) {
6694
6842
  shadowMode = 0
6695
6843
  /* Native */
6696
6844
  ;
6697
- } else if (isNativeShadowDefined) {
6845
+ } else if (isNativeShadowDefined$1) {
6698
6846
  if (def.shadowSupportMode === "any"
6699
6847
  /* Any */
6700
6848
  ) {
@@ -6800,7 +6948,6 @@ var LWC = (function (exports) {
6800
6948
  // patch function mutates vnodes by adding the element reference,
6801
6949
  // however, if patching fails it contains partial changes.
6802
6950
  if (oldCh !== newCh) {
6803
- var fn = hasDynamicChildren(newCh) ? updateDynamicChildren : updateStaticChildren;
6804
6951
  runWithBoundaryProtection(vm, vm, function () {
6805
6952
  // pre
6806
6953
  logOperationStart(2
@@ -6808,8 +6955,8 @@ var LWC = (function (exports) {
6808
6955
  , vm);
6809
6956
  }, function () {
6810
6957
  // job
6811
- var elementToRenderTo = getRenderRoot(vm);
6812
- fn(elementToRenderTo, oldCh, newCh);
6958
+ var renderRoot = getRenderRoot(vm);
6959
+ patchChildren(renderRoot, oldCh, newCh);
6813
6960
  }, function () {
6814
6961
  // post
6815
6962
  logOperationEnd(2
@@ -6831,10 +6978,9 @@ var LWC = (function (exports) {
6831
6978
  }
6832
6979
 
6833
6980
  function runRenderedCallback(vm) {
6834
- var renderer = vm.renderer,
6835
- renderedCallback = vm.def.renderedCallback;
6981
+ var renderedCallback = vm.def.renderedCallback;
6836
6982
 
6837
- if (isTrue(renderer.ssr)) {
6983
+ if (isTrue(ssr$1)) {
6838
6984
  return;
6839
6985
  }
6840
6986
 
@@ -6871,19 +7017,19 @@ var LWC = (function (exports) {
6871
7017
  });
6872
7018
  rehydrateQueue = []; // reset to a new queue
6873
7019
 
6874
- for (var _i22 = 0, _len7 = vms.length; _i22 < _len7; _i22 += 1) {
6875
- var vm = vms[_i22];
7020
+ for (var _i24 = 0, _len9 = vms.length; _i24 < _len9; _i24 += 1) {
7021
+ var vm = vms[_i24];
6876
7022
 
6877
7023
  try {
6878
7024
  rehydrate(vm);
6879
7025
  } catch (error) {
6880
- if (_i22 + 1 < _len7) {
7026
+ if (_i24 + 1 < _len9) {
6881
7027
  // pieces of the queue are still pending to be rehydrated, those should have priority
6882
7028
  if (rehydrateQueue.length === 0) {
6883
7029
  addCallbackToNextTick(flushRehydrationQueue);
6884
7030
  }
6885
7031
 
6886
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i22 + 1));
7032
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i24 + 1));
6887
7033
  } // we need to end the measure before throwing.
6888
7034
 
6889
7035
 
@@ -6987,8 +7133,8 @@ var LWC = (function (exports) {
6987
7133
  var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
6988
7134
  // inserted in reserved order.
6989
7135
 
6990
- for (var _i23 = vCustomElementCollection.length - 1; _i23 >= 0; _i23 -= 1) {
6991
- var elm = vCustomElementCollection[_i23].elm; // There are two cases where the element could be undefined:
7136
+ for (var _i25 = vCustomElementCollection.length - 1; _i25 >= 0; _i25 -= 1) {
7137
+ var elm = vCustomElementCollection[_i25].elm; // There are two cases where the element could be undefined:
6992
7138
  // * when there is an error during the construction phase, and an error
6993
7139
  // boundary picks it, there is a possibility that the VCustomElement
6994
7140
  // is not properly initialized, and therefore is should be ignored.
@@ -7022,8 +7168,8 @@ var LWC = (function (exports) {
7022
7168
 
7023
7169
 
7024
7170
  function recursivelyDisconnectChildren(vnodes) {
7025
- for (var _i24 = 0, _len8 = vnodes.length; _i24 < _len8; _i24 += 1) {
7026
- var vnode = vnodes[_i24];
7171
+ for (var _i26 = 0, _len10 = vnodes.length; _i26 < _len10; _i26 += 1) {
7172
+ var vnode = vnodes[_i26];
7027
7173
 
7028
7174
  if (!isNull(vnode) && isArray$1(vnode.children) && !isUndefined$1(vnode.elm)) {
7029
7175
  // vnode is a VElement with children
@@ -7043,15 +7189,14 @@ var LWC = (function (exports) {
7043
7189
 
7044
7190
 
7045
7191
  function resetComponentRoot(vm) {
7046
- var children = vm.children,
7047
- renderer = vm.renderer;
7192
+ var children = vm.children;
7048
7193
  var rootNode = getRenderRoot(vm);
7049
7194
 
7050
- for (var _i25 = 0, _len9 = children.length; _i25 < _len9; _i25++) {
7051
- var child = children[_i25];
7195
+ for (var _i27 = 0, _len11 = children.length; _i27 < _len11; _i27++) {
7196
+ var child = children[_i27];
7052
7197
 
7053
7198
  if (!isNull(child) && !isUndefined$1(child.elm)) {
7054
- renderer.remove(child.elm, rootNode);
7199
+ remove$1(child.elm, rootNode);
7055
7200
  }
7056
7201
  }
7057
7202
 
@@ -7061,7 +7206,7 @@ var LWC = (function (exports) {
7061
7206
  }
7062
7207
 
7063
7208
  function scheduleRehydration(vm) {
7064
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
7209
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
7065
7210
  return;
7066
7211
  }
7067
7212
 
@@ -7084,65 +7229,6 @@ var LWC = (function (exports) {
7084
7229
 
7085
7230
  currentVm = currentVm.owner;
7086
7231
  }
7087
- } // slow path routine
7088
- // NOTE: we should probably more this routine to the synthetic shadow folder
7089
- // and get the allocation to be cached by in the elm instead of in the VM
7090
-
7091
-
7092
- function allocateInSlot(vm, children) {
7093
- var oldSlots = vm.cmpSlots;
7094
- var cmpSlots = vm.cmpSlots = create(null);
7095
-
7096
- for (var _i26 = 0, _len10 = children.length; _i26 < _len10; _i26 += 1) {
7097
- var vnode = children[_i26];
7098
-
7099
- if (isNull(vnode)) {
7100
- continue;
7101
- }
7102
-
7103
- var data = vnode.data;
7104
- var slotName = data.attrs && data.attrs.slot || '';
7105
- var vnodes = cmpSlots[slotName] = cmpSlots[slotName] || []; // re-keying the vnodes is necessary to avoid conflicts with default content for the slot
7106
- // which might have similar keys. Each vnode will always have a key that
7107
- // starts with a numeric character from compiler. In this case, we add a unique
7108
- // notation for slotted vnodes keys, e.g.: `@foo:1:1`
7109
-
7110
- if (!isUndefined$1(vnode.key)) {
7111
- vnode.key = "@".concat(slotName, ":").concat(vnode.key);
7112
- }
7113
-
7114
- ArrayPush$1.call(vnodes, vnode);
7115
- }
7116
-
7117
- if (isFalse(vm.isDirty)) {
7118
- // We need to determine if the old allocation is really different from the new one
7119
- // and mark the vm as dirty
7120
- var oldKeys = keys(oldSlots);
7121
-
7122
- if (oldKeys.length !== keys(cmpSlots).length) {
7123
- markComponentAsDirty(vm);
7124
- return;
7125
- }
7126
-
7127
- for (var _i27 = 0, _len11 = oldKeys.length; _i27 < _len11; _i27 += 1) {
7128
- var key = oldKeys[_i27];
7129
-
7130
- if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
7131
- markComponentAsDirty(vm);
7132
- return;
7133
- }
7134
-
7135
- var oldVNodes = oldSlots[key];
7136
- var _vnodes = cmpSlots[key];
7137
-
7138
- for (var j = 0, a = cmpSlots[key].length; j < a; j += 1) {
7139
- if (oldVNodes[j] !== _vnodes[j]) {
7140
- markComponentAsDirty(vm);
7141
- return;
7142
- }
7143
- }
7144
- }
7145
- }
7146
7232
  }
7147
7233
 
7148
7234
  function runWithBoundaryProtection(vm, owner, pre, job, post) {
@@ -7311,7 +7397,6 @@ var LWC = (function (exports) {
7311
7397
  }
7312
7398
 
7313
7399
  var elm = vm.elm,
7314
- renderer = vm.renderer,
7315
7400
  _vm$context = vm.context,
7316
7401
  wiredConnecting = _vm$context.wiredConnecting,
7317
7402
  wiredDisconnecting = _vm$context.wiredDisconnecting; // waiting for the component to be connected to formally request the context via the token
@@ -7334,7 +7419,7 @@ var LWC = (function (exports) {
7334
7419
  ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
7335
7420
  }
7336
7421
  });
7337
- renderer.dispatchEvent(elm, contextRegistrationEvent);
7422
+ dispatchEvent$1(elm, contextRegistrationEvent);
7338
7423
  });
7339
7424
  }
7340
7425
 
@@ -7588,7 +7673,7 @@ var LWC = (function (exports) {
7588
7673
  hooksAreSet = true;
7589
7674
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7590
7675
  }
7591
- /* version: 2.6.2 */
7676
+ /* version: 2.7.3 */
7592
7677
 
7593
7678
  /*
7594
7679
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7618,7 +7703,9 @@ var LWC = (function (exports) {
7618
7703
  var styleElements = create(null);
7619
7704
  var styleSheets = create(null);
7620
7705
  var nodesToStyleSheets = new WeakMap();
7621
- var getCustomElement, defineCustomElement, HTMLElementConstructor;
7706
+ var getCustomElement;
7707
+ var defineCustomElement;
7708
+ var HTMLElementConstructor;
7622
7709
 
7623
7710
  function isCustomElementRegistryAvailable() {
7624
7711
  if (typeof customElements === 'undefined') {
@@ -7743,152 +7830,231 @@ var LWC = (function (exports) {
7743
7830
  HTMLElementConstructor.prototype = HTMLElement.prototype;
7744
7831
  }
7745
7832
 
7746
- var _isHydrating = false;
7833
+ var hydrating = false;
7747
7834
 
7748
- function setIsHydrating(v) {
7749
- _isHydrating = v;
7835
+ function setIsHydrating(value) {
7836
+ hydrating = value;
7750
7837
  }
7751
7838
 
7752
- var renderer = {
7753
- ssr: false,
7754
- isHydrating: function isHydrating() {
7755
- return _isHydrating;
7756
- },
7757
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
7758
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
7759
- createElement: function createElement(tagName, namespace) {
7760
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7761
- },
7762
- createText: function createText(content) {
7763
- return document.createTextNode(content);
7764
- },
7765
- createComment: function createComment(content) {
7766
- return document.createComment(content);
7767
- },
7768
- insert: function insert(node, parent, anchor) {
7769
- parent.insertBefore(node, anchor);
7770
- },
7771
- remove: function remove(node, parent) {
7772
- parent.removeChild(node);
7773
- },
7774
- nextSibling: function nextSibling(node) {
7775
- return node.nextSibling;
7776
- },
7777
- attachShadow: function attachShadow(element, options) {
7778
- if (_isHydrating) {
7779
- return element.shadowRoot;
7780
- }
7839
+ var ssr = false;
7781
7840
 
7782
- return element.attachShadow(options);
7783
- },
7784
- setText: function setText(node, content) {
7785
- node.nodeValue = content;
7786
- },
7787
- getProperty: function getProperty(node, key) {
7788
- return node[key];
7789
- },
7790
- setProperty: function setProperty(node, key, value) {
7791
- if (process.env.NODE_ENV !== 'production') {
7792
- if (node instanceof Element && !(key in node)) {
7793
- // TODO [#1297]: Move this validation to the compiler
7794
- assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
7795
- }
7796
- }
7841
+ function isHydrating() {
7842
+ return hydrating;
7843
+ }
7797
7844
 
7798
- node[key] = value;
7799
- },
7800
- getAttribute: function getAttribute(element, name, namespace) {
7801
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
7802
- },
7803
- setAttribute: function setAttribute(element, name, value, namespace) {
7804
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
7805
- },
7806
- removeAttribute: function removeAttribute(element, name, namespace) {
7807
- if (isUndefined$1(namespace)) {
7808
- element.removeAttribute(name);
7809
- } else {
7810
- element.removeAttributeNS(namespace, name);
7811
- }
7812
- },
7813
- addEventListener: function addEventListener(target, type, callback, options) {
7814
- target.addEventListener(type, callback, options);
7815
- },
7816
- removeEventListener: function removeEventListener(target, type, callback, options) {
7817
- target.removeEventListener(type, callback, options);
7818
- },
7819
- dispatchEvent: function dispatchEvent(target, event) {
7820
- return target.dispatchEvent(event);
7821
- },
7822
- getClassList: function getClassList(element) {
7823
- return element.classList;
7824
- },
7825
- setCSSStyleProperty: function setCSSStyleProperty(element, name, value, important) {
7826
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
7827
- // represent elements in the engine?
7828
- element.style.setProperty(name, value, important ? 'important' : '');
7829
- },
7830
- getBoundingClientRect: function getBoundingClientRect(element) {
7831
- return element.getBoundingClientRect();
7832
- },
7833
- querySelector: function querySelector(element, selectors) {
7834
- return element.querySelector(selectors);
7835
- },
7836
- querySelectorAll: function querySelectorAll(element, selectors) {
7837
- return element.querySelectorAll(selectors);
7838
- },
7839
- getElementsByTagName: function getElementsByTagName(element, tagNameOrWildCard) {
7840
- return element.getElementsByTagName(tagNameOrWildCard);
7841
- },
7842
- getElementsByClassName: function getElementsByClassName(element, names) {
7843
- return element.getElementsByClassName(names);
7844
- },
7845
- getChildren: function getChildren(element) {
7846
- return element.children;
7847
- },
7848
- getChildNodes: function getChildNodes(element) {
7849
- return element.childNodes;
7850
- },
7851
- getFirstChild: function getFirstChild(element) {
7852
- return element.firstChild;
7853
- },
7854
- getFirstElementChild: function getFirstElementChild(element) {
7855
- return element.firstElementChild;
7856
- },
7857
- getLastChild: function getLastChild(element) {
7858
- return element.lastChild;
7859
- },
7860
- getLastElementChild: function getLastElementChild(element) {
7861
- return element.lastElementChild;
7862
- },
7863
- isConnected: function isConnected(node) {
7864
- return node.isConnected;
7865
- },
7866
- insertGlobalStylesheet: function insertGlobalStylesheet(content) {
7867
- if (!isUndefined$1(globalStylesheets[content])) {
7868
- return;
7869
- }
7845
+ var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
7846
+ var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
7870
7847
 
7871
- globalStylesheets[content] = true;
7872
- var elm = document.createElement('style');
7873
- elm.type = 'text/css';
7874
- elm.textContent = content;
7875
- globalStylesheetsParentElement.appendChild(elm);
7876
- },
7877
- insertStylesheet: function insertStylesheet(content, target) {
7878
- if (supportsConstructableStyleSheets) {
7879
- insertConstructableStyleSheet(content, target);
7880
- } else {
7881
- // Fall back to <style> element
7882
- insertStyleElement(content, target);
7848
+ function createElement$1(tagName, namespace) {
7849
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7850
+ }
7851
+
7852
+ function createText(content) {
7853
+ return document.createTextNode(content);
7854
+ }
7855
+
7856
+ function createComment(content) {
7857
+ return document.createComment(content);
7858
+ }
7859
+
7860
+ function insert(node, parent, anchor) {
7861
+ parent.insertBefore(node, anchor);
7862
+ }
7863
+
7864
+ function remove(node, parent) {
7865
+ parent.removeChild(node);
7866
+ }
7867
+
7868
+ function nextSibling(node) {
7869
+ return node.nextSibling;
7870
+ }
7871
+
7872
+ function attachShadow(element, options) {
7873
+ if (hydrating) {
7874
+ return element.shadowRoot;
7875
+ }
7876
+
7877
+ return element.attachShadow(options);
7878
+ }
7879
+
7880
+ function setText(node, content) {
7881
+ node.nodeValue = content;
7882
+ }
7883
+
7884
+ function getProperty(node, key) {
7885
+ return node[key];
7886
+ }
7887
+
7888
+ function setProperty(node, key, value) {
7889
+ if (process.env.NODE_ENV !== 'production') {
7890
+ if (node instanceof Element && !(key in node)) {
7891
+ // TODO [#1297]: Move this validation to the compiler
7892
+ assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
7883
7893
  }
7884
- },
7885
- assertInstanceOfHTMLElement: function assertInstanceOfHTMLElement(elm, msg) {
7886
- assert.invariant(elm instanceof HTMLElement, msg);
7887
- },
7888
- defineCustomElement: defineCustomElement,
7889
- getCustomElement: getCustomElement,
7890
- HTMLElement: HTMLElementConstructor
7891
- };
7894
+ }
7895
+
7896
+ node[key] = value;
7897
+ }
7898
+
7899
+ function getAttribute(element, name, namespace) {
7900
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
7901
+ }
7902
+
7903
+ function setAttribute(element, name, value, namespace) {
7904
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
7905
+ }
7906
+
7907
+ function removeAttribute(element, name, namespace) {
7908
+ if (isUndefined$1(namespace)) {
7909
+ element.removeAttribute(name);
7910
+ } else {
7911
+ element.removeAttributeNS(namespace, name);
7912
+ }
7913
+ }
7914
+
7915
+ function addEventListener(target, type, callback, options) {
7916
+ target.addEventListener(type, callback, options);
7917
+ }
7918
+
7919
+ function removeEventListener(target, type, callback, options) {
7920
+ target.removeEventListener(type, callback, options);
7921
+ }
7922
+
7923
+ function dispatchEvent(target, event) {
7924
+ return target.dispatchEvent(event);
7925
+ }
7926
+
7927
+ function getClassList(element) {
7928
+ return element.classList;
7929
+ }
7930
+
7931
+ function setCSSStyleProperty(element, name, value, important) {
7932
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
7933
+ // represent elements in the engine?
7934
+ element.style.setProperty(name, value, important ? 'important' : '');
7935
+ }
7936
+
7937
+ function getBoundingClientRect(element) {
7938
+ return element.getBoundingClientRect();
7939
+ }
7940
+
7941
+ function querySelector(element, selectors) {
7942
+ return element.querySelector(selectors);
7943
+ }
7944
+
7945
+ function querySelectorAll(element, selectors) {
7946
+ return element.querySelectorAll(selectors);
7947
+ }
7948
+
7949
+ function getElementsByTagName(element, tagNameOrWildCard) {
7950
+ return element.getElementsByTagName(tagNameOrWildCard);
7951
+ }
7952
+
7953
+ function getElementsByClassName(element, names) {
7954
+ return element.getElementsByClassName(names);
7955
+ }
7956
+
7957
+ function getChildren(element) {
7958
+ return element.children;
7959
+ }
7960
+
7961
+ function getChildNodes(element) {
7962
+ return element.childNodes;
7963
+ }
7964
+
7965
+ function getFirstChild(element) {
7966
+ return element.firstChild;
7967
+ }
7968
+
7969
+ function getFirstElementChild(element) {
7970
+ return element.firstElementChild;
7971
+ }
7972
+
7973
+ function getLastChild(element) {
7974
+ return element.lastChild;
7975
+ }
7976
+
7977
+ function getLastElementChild(element) {
7978
+ return element.lastElementChild;
7979
+ }
7980
+
7981
+ function isConnected(node) {
7982
+ return node.isConnected;
7983
+ }
7984
+
7985
+ function insertGlobalStylesheet(content) {
7986
+ if (!isUndefined$1(globalStylesheets[content])) {
7987
+ return;
7988
+ }
7989
+
7990
+ globalStylesheets[content] = true;
7991
+ var elm = document.createElement('style');
7992
+ elm.type = 'text/css';
7993
+ elm.textContent = content;
7994
+ globalStylesheetsParentElement.appendChild(elm);
7995
+ }
7996
+
7997
+ function insertStylesheet(content, target) {
7998
+ if (supportsConstructableStyleSheets) {
7999
+ insertConstructableStyleSheet(content, target);
8000
+ } else {
8001
+ // Fall back to <style> element
8002
+ insertStyleElement(content, target);
8003
+ }
8004
+ }
8005
+
8006
+ function assertInstanceOfHTMLElement(elm, msg) {
8007
+ assert.invariant(elm instanceof HTMLElement, msg);
8008
+ }
8009
+
8010
+ var HTMLElementExported = HTMLElementConstructor;
8011
+ /*
8012
+ * Copyright (c) 2020, salesforce.com, inc.
8013
+ * All rights reserved.
8014
+ * SPDX-License-Identifier: MIT
8015
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8016
+ */
8017
+
8018
+ setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
8019
+ setAttachShadow(attachShadow);
8020
+ setCreateComment(createComment);
8021
+ setCreateElement(createElement$1);
8022
+ setCreateText(createText);
8023
+ setDefineCustomElement(defineCustomElement);
8024
+ setDispatchEvent(dispatchEvent);
8025
+ setGetAttribute(getAttribute);
8026
+ setGetBoundingClientRect(getBoundingClientRect);
8027
+ setGetChildNodes(getChildNodes);
8028
+ setGetChildren(getChildren);
8029
+ setGetClassList(getClassList);
8030
+ setGetCustomElement(getCustomElement);
8031
+ setGetElementsByClassName(getElementsByClassName);
8032
+ setGetElementsByTagName(getElementsByTagName);
8033
+ setGetFirstChild(getFirstChild);
8034
+ setGetFirstElementChild(getFirstElementChild);
8035
+ setGetLastChild(getLastChild);
8036
+ setGetLastElementChild(getLastElementChild);
8037
+ setGetProperty(getProperty);
8038
+ setHTMLElement(HTMLElementExported);
8039
+ setInsert(insert);
8040
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
8041
+ setInsertStylesheet(insertStylesheet);
8042
+ setIsConnected(isConnected);
8043
+ setIsHydrating$1(isHydrating);
8044
+ setIsNativeShadowDefined(isNativeShadowDefined);
8045
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
8046
+ setNextSibling(nextSibling);
8047
+ setQuerySelector(querySelector);
8048
+ setQuerySelectorAll(querySelectorAll);
8049
+ setRemove(remove);
8050
+ setRemoveAttribute(removeAttribute);
8051
+ setRemoveEventListener(removeEventListener);
8052
+ setSetAttribute(setAttribute);
8053
+ setSetCSSStyleProperty(setCSSStyleProperty);
8054
+ setSetProperty(setProperty);
8055
+ setSetText(setText);
8056
+ setSsr(ssr);
8057
+ setAddEventListener(addEventListener);
7892
8058
  /*
7893
8059
  * Copyright (c) 2018, salesforce.com, inc.
7894
8060
  * All rights reserved.
@@ -7970,7 +8136,7 @@ var LWC = (function (exports) {
7970
8136
  throw new TypeError("\"createElement\" function expects an \"is\" option with a valid component constructor.");
7971
8137
  }
7972
8138
 
7973
- var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
8139
+ var UpgradableConstructor = getUpgradableConstructor(sel);
7974
8140
  var wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
7975
8141
 
7976
8142
  /**
@@ -7985,8 +8151,7 @@ var LWC = (function (exports) {
7985
8151
  createVM(elm, def, {
7986
8152
  tagName: sel,
7987
8153
  mode: options.mode !== 'closed' ? 'open' : 'closed',
7988
- owner: null,
7989
- renderer: renderer
8154
+ owner: null
7990
8155
  });
7991
8156
  ConnectingSlot.set(elm, connectRootElement);
7992
8157
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -8011,6 +8176,10 @@ var LWC = (function (exports) {
8011
8176
  function hydrateComponent(element, Ctor) {
8012
8177
  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8013
8178
 
8179
+ if (!(element instanceof Element)) {
8180
+ throw new TypeError("\"hydrateComponent\" expects a valid DOM element as the first parameter but instead received ".concat(element, "."));
8181
+ }
8182
+
8014
8183
  if (!isFunction$1(Ctor)) {
8015
8184
  throw new TypeError("\"hydrateComponent\" expects a valid component constructor as the second parameter but instead received ".concat(Ctor, "."));
8016
8185
  }
@@ -8028,7 +8197,6 @@ var LWC = (function (exports) {
8028
8197
  createVM(element, def, {
8029
8198
  mode: 'open',
8030
8199
  owner: null,
8031
- renderer: renderer,
8032
8200
  tagName: element.tagName.toLowerCase()
8033
8201
  });
8034
8202
 
@@ -8115,8 +8283,7 @@ var LWC = (function (exports) {
8115
8283
  createVM(_assertThisInitialized(_this6), def, {
8116
8284
  mode: 'open',
8117
8285
  owner: null,
8118
- tagName: _this6.tagName,
8119
- renderer: renderer
8286
+ tagName: _this6.tagName
8120
8287
  });
8121
8288
  return _this6;
8122
8289
  }
@@ -8189,7 +8356,7 @@ var LWC = (function (exports) {
8189
8356
  return false;
8190
8357
  }
8191
8358
 
8192
- if (renderer.isSyntheticShadowDefined) {
8359
+ if (isSyntheticShadowDefined) {
8193
8360
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
8194
8361
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
8195
8362
  // used, will be considered global elements.
@@ -8241,7 +8408,7 @@ var LWC = (function (exports) {
8241
8408
  });
8242
8409
  freeze(LightningElement);
8243
8410
  seal(LightningElement.prototype);
8244
- /* version: 2.6.2 */
8411
+ /* version: 2.7.3 */
8245
8412
 
8246
8413
  exports.LightningElement = LightningElement;
8247
8414
  exports.__unstable__ProfilerControl = profilerControl;