UNPKG

4.12 kBJavaScriptView Raw
1!function(i){"function"==typeof define&&define.amd?define(i):i()}((function(){"use strict";var i,n;i=function(){
2/**
3 * @license
4 * Copyright 2017 Google LLC
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7var i,n="__scoped";null!==(i=globalThis.reactiveElementPolyfillSupport)&&void 0!==i||(globalThis.reactiveElementPolyfillSupport=function(i){var o=i.ReactiveElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var t=o.prototype;window.ShadyDOM&&window.ShadyDOM.inUse&&!0===window.ShadyDOM.noPatch&&window.ShadyDOM.patchElementProto(t);var d=t.createRenderRoot;t.createRenderRoot=function(){var i,o,t,e=this.localName;if(window.ShadyCSS.nativeShadow)return d.call(this);if(!this.constructor.hasOwnProperty(n)){this.constructor[n]=!0;var u=this.constructor.elementStyles.map((function(i){return i instanceof CSSStyleSheet?Array.from(i.cssRules).reduce((function(i,n){return i+n.cssText}),""):i.cssText}));null===(o=null===(i=window.ShadyCSS)||void 0===i?void 0:i.ScopingShim)||void 0===o||o.prepareAdoptedCssText(u,e),void 0===this.constructor._$AJ&&window.ShadyCSS.prepareTemplateStyles(document.createElement("template"),e)}return null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions)};var e=t.connectedCallback;t.connectedCallback=function(){e.call(this),this.hasUpdated&&window.ShadyCSS.styleElement(this)};var u=t._$AE;t._$AE=function(i){this.hasUpdated||window.ShadyCSS.styleElement(this),u.call(this,i)}}})},"function"==typeof define&&define.amd?define(i):i(),function(i){"function"==typeof define&&define.amd?define(i):i()}((function(){
8/**
9 * @license
10 * Copyright 2017 Google LLC
11 * SPDX-License-Identifier: BSD-3-Clause
12 */
13var i,n=new Set,o=new Map;null!==(i=globalThis.litHtmlPolyfillSupport)&&void 0!==i||(globalThis.litHtmlPolyfillSupport=function(i,t){if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var d=function(i){return void 0!==i&&!n.has(i)},e=function(i){var n=o.get(i);return void 0===n&&o.set(i,n=[]),n},u=new Map,v=i.createElement;i.createElement=function(n,o){var t=v.call(i,n,o),u=null==o?void 0:o.scope;if(void 0!==u&&(window.ShadyCSS.nativeShadow||window.ShadyCSS.prepareTemplateDom(t,u),d(u))){var w=e(u),r=t.content.querySelectorAll("style");w.push.apply(w,Array.from(r).map((function(i){var n;return null===(n=i.parentNode)||void 0===n||n.removeChild(i),i.textContent})))}return t};var w=document.createDocumentFragment(),r=document.createComment(""),l=t.prototype,s=l._$AI;l._$AI=function(i,t){var u,v,l;void 0===t&&(t=this);var f=this._$AA.parentNode,a=null===(u=this.options)||void 0===u?void 0:u.scope;if(f instanceof ShadowRoot&&d(a)){var h=this._$AA,c=this._$AB;w.appendChild(r),this._$AA=r,this._$AB=null,s.call(this,i,t);var y=(null===(v=i)||void 0===v?void 0:v._$litType$)?this._$AH._$AD.el:document.createElement("template");if(function(i,t){var d,u=e(i),v=0!==u.length;v&&((d=document.createElement("style")).textContent=u.join("\n"),t.content.appendChild(d)),n.add(i),o.delete(i),window.ShadyCSS.prepareTemplateStyles(t,i),v&&window.ShadyCSS.nativeShadow&&null!==(d=t.content.querySelector("style"))&&t.content.appendChild(d)}(a,y),w.removeChild(r),null===(l=window.ShadyCSS)||void 0===l?void 0:l.nativeShadow){var p=y.content.querySelector("style");null!==p&&w.appendChild(p.cloneNode(!0))}f.insertBefore(w,c),this._$AA=h,this._$AB=c}else s.call(this,i,t)},l._$AC=function(n){var o,t=null===(o=this.options)||void 0===o?void 0:o.scope,d=u.get(t);void 0===d&&u.set(t,d=new Map);var e=d.get(n.strings);return void 0===e&&d.set(n.strings,e=new i(n,this.options)),e}}})})),null!==(n=globalThis.litElementPolyfillSupport)&&void 0!==n||(globalThis.litElementPolyfillSupport=function(i){var n=i.LitElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){n._$AJ=!0;var o=n.prototype,t=o.createRenderRoot;o.createRenderRoot=function(){return this.renderOptions.scope=this.localName,t.call(this)}}})}));
14//# sourceMappingURL=polyfill-support.js.map