@openremote/manager 1.8.0-snapshot.20250725120000 → 1.8.0-snapshot.20250725120001

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 (61) hide show
  1. package/dist/bundle.6bd21fda2e8cb09f.js +3678 -0
  2. package/dist/images/Icon-128.png +0 -0
  3. package/dist/images/Icon-144.png +0 -0
  4. package/dist/images/Icon-196.png +0 -0
  5. package/dist/images/Icon-256.png +0 -0
  6. package/dist/images/Icon-48.png +0 -0
  7. package/dist/images/Icon-512.png +0 -0
  8. package/dist/images/Icon-72.png +0 -0
  9. package/dist/images/favicon.ico +0 -0
  10. package/dist/index.html +19 -0
  11. package/dist/modules/@webcomponents/webcomponentsjs/CHANGELOG.md +76 -0
  12. package/dist/modules/@webcomponents/webcomponentsjs/LICENSE.md +19 -0
  13. package/dist/modules/@webcomponents/webcomponentsjs/README.md +259 -0
  14. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js +1 -0
  15. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -0
  16. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js +1 -0
  17. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -0
  18. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js +1 -0
  19. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -0
  20. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +1 -0
  21. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -0
  22. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js +1 -0
  23. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -0
  24. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js +1 -0
  25. package/dist/modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -0
  26. package/dist/modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js +1 -0
  27. package/dist/modules/@webcomponents/webcomponentsjs/package.json +51 -0
  28. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +1 -0
  29. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +1 -0
  30. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +1 -0
  31. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +1 -0
  32. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_js-index.js +1 -0
  33. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +1 -0
  34. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +1 -0
  35. package/dist/modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +1 -0
  36. package/dist/modules/@webcomponents/webcomponentsjs/src/flag-parser.js +1 -0
  37. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/baseuri.js +1 -0
  38. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/after.js +1 -0
  39. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/before.js +1 -0
  40. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/index.js +1 -0
  41. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/remove.js +1 -0
  42. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/child-node/replace-with.js +1 -0
  43. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/custom-event.js +1 -0
  44. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/es6-misc.js +1 -0
  45. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/event-listener-options.js +1 -0
  46. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/get-attribute-names.js +1 -0
  47. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/matches.js +1 -0
  48. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/append.js +1 -0
  49. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/index.js +1 -0
  50. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/prepend.js +1 -0
  51. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/parent-node/replace-children.js +1 -0
  52. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/promise.js +1 -0
  53. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/svg-element-class-list.js +1 -0
  54. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/symbol.js +1 -0
  55. package/dist/modules/@webcomponents/webcomponentsjs/src/platform/toggle-attribute.js +1 -0
  56. package/dist/modules/@webcomponents/webcomponentsjs/src/unresolved.js +1 -0
  57. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-bundle.d.ts +175 -0
  58. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js +1 -0
  59. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map +1 -0
  60. package/dist/modules/@webcomponents/webcomponentsjs/webcomponents-loader.js +1 -0
  61. package/package.json +3 -3
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,19 @@
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,user-scalable=yes"><title></title><meta name="application-name" content="OpenRemote"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="apple-mobile-web-app-title" content="OpenRemote"><meta name="msapplication-TileImage" content="images/Icon-144.png"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-tap-highlight" content="no"><link rel="icon" href="images/favicon.ico"><meta name="theme-color" content="#ffffff"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><link rel="apple-touch-icon" href="images/Icon-48.png"><link rel="apple-touch-icon" sizes="72x72" href="images/Icon-72.png"><link rel="apple-touch-icon" sizes="144x144" href="images/Icon-144.png"><link rel="apple-touch-icon" sizes="192x192" href="images/Icon-196.png"><meta name="msapplication-TileImage" content="images/Icon-144.png"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-tap-highlight" content="no"><meta name="twitter:card" content="summary"><meta name="twitter:site" content="@username"><meta property="og:type" content="website"><meta property="og:site_name" content="my-app"><meta property="og:image" content="images/Icon-144.png"/><script>if (!window.customElements) { document.write('<!--'); }</script><script src="./modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script><!--! DO NOT REMOVE THIS COMMENT, WE NEED ITS CLOSING MARKER --><style>html {
2
+ height: 100%;
3
+ }
4
+ body {
5
+ margin: 0;
6
+ font-family: "Segoe UI", Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
7
+ line-height: 1.5;
8
+ height: 100%;
9
+ -webkit-font-smoothing: antialiased;
10
+ overflow: hidden;
11
+ }</style></head><body><script>(function () {
12
+ document.addEventListener('WebComponentsReady', function componentsReady() {
13
+ document.removeEventListener('WebComponentsReady', componentsReady, false);
14
+ var script = document.createElement('script');
15
+ script.src = './bundle.6bd21fda2e8cb09f.js';
16
+ var refScript = document.getElementsByTagName('script')[0];
17
+ refScript.parentNode.insertBefore(script, refScript);
18
+ }, false);
19
+ })();</script><script src="modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script></body></html>
@@ -0,0 +1,76 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic
7
+ Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ <!-- ## [Unreleased] -->
10
+
11
+ ## [2.8.0] - 2023-03-30
12
+
13
+ - Update dependencies ([#542](https://github.com/webcomponents/polyfills/pull/542))
14
+ - Polyfill `Element.toggleAttribute()`. ([#541](https://github.com/webcomponents/polyfills/pull/541))
15
+
16
+ ## [2.7.0] - 2022-10-20
17
+
18
+ - Polyfill `addEventListener/removeEventListener` event listener options,
19
+ including `{capture: boolean, once: boolean}`.
20
+ ([#469](https://github.com/webcomponents/polyfills/pull/469))
21
+ - Make `webcomponents-loader.js` compatible with the Trusted Types API
22
+ ([#501](https://github.com/webcomponents/polyfills/pull/501))
23
+ - Remove an arrow function in `webcomponents-loader.js`.
24
+ ([#507](https://github.com/webcomponents/polyfills/pull/507))
25
+
26
+ ## [2.6.0] - 2021-08-02
27
+
28
+ - Add TS externs. ([#457](https://github.com/webcomponents/polyfills/pull/457))
29
+
30
+ ## [2.5.0] - 2020-10-21
31
+
32
+ - Polyfill `Element#matches`.
33
+ ([#400](https://github.com/webcomponents/polyfills/pull/400))
34
+ - Remove function declarations from platform polyfills to sastisfy internal lint
35
+ after import transforms.
36
+ ([#396](https://github.com/webcomponents/polyfills/pull/396))
37
+ - Polyfill `Element#getAttributeNames`.
38
+ ([#393](https://github.com/webcomponents/polyfills/pull/393))
39
+ - Add polyfills for ChildNode APIs.
40
+ ([#390](https://github.com/webcomponents/polyfills/pull/390))
41
+ - Add polyfills for select ParentNode APIs.
42
+ ([#389](https://github.com/webcomponents/polyfills/pull/389))
43
+ - Add `classList` support to `SVGElement`.
44
+ ([#391](https://github.com/webcomponents/polyfills/pull/391))
45
+ - Add new entrypoints to webcomponentsjs for the 'platform' polyfills.
46
+ ([#385](https://github.com/webcomponents/polyfills/pull/385))
47
+
48
+ ## [2.4.4] - 2020-07-20
49
+
50
+ - Fixed bug where Object.assign polyfill would copy non-enumerable properties.
51
+ - Convert platform (`Array.from`, `CustomEvent`, `Promise` etc.) polyfills to
52
+ TypeScript ([#292](https://github.com/webcomponents/polyfills/pull/292))
53
+ - Improve types for JSCompiler compatibility
54
+ ([#307](https://github.com/webcomponents/polyfills/pull/307))
55
+ - README improvements
56
+ ([#128](https://github.com/webcomponents/polyfills/pull/128),
57
+ [#212](https://github.com/webcomponents/polyfills/pull/212),
58
+ [#214](https://github.com/webcomponents/polyfills/pull/214))
59
+
60
+ ## [2.4.3] - 2020-03-16
61
+
62
+ - Maintenance release (no user-facing changes)
63
+
64
+ ## [2.4.2] - 2020-02-26
65
+
66
+ - Remove unnecessary externs
67
+ ([#272](https://github.com/webcomponents/polyfills/pull/272))
68
+
69
+ ## [2.4.1] - 2020-01-09
70
+
71
+ - Maintenance release (no user-facing changes)
72
+
73
+ ## [2.4.0] - 2019-11-12
74
+
75
+ - Add on-demand patching mode
76
+ ([#189](https://github.com/webcomponents/polyfills/pull/189))
@@ -0,0 +1,19 @@
1
+ # License
2
+
3
+ Everything in this repo is BSD style license unless otherwise specified.
4
+
5
+ Copyright (c) 2015 The Polymer Authors. All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright
10
+ notice, this list of conditions and the following disclaimer.
11
+ * Redistributions in binary form must reproduce the above
12
+ copyright notice, this list of conditions and the following disclaimer
13
+ in the documentation and/or other materials provided with the
14
+ distribution.
15
+ * Neither the name of Google Inc. nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,259 @@
1
+ [![Build Status](https://travis-ci.org/webcomponents/webcomponentsjs.svg?branch=master)](https://travis-ci.org/webcomponents/webcomponentsjs)
2
+
3
+ # webcomponents.js (v1 spec polyfills)
4
+
5
+ > **Note**. For polyfills that work with the older Custom Elements and Shadow DOM v0 specs,
6
+ > see the [v0 branch](https://github.com/webcomponents/webcomponentsjs/tree/v0).
7
+
8
+ > **Note**. For polyfills that include HTML Imports,
9
+ > see the [v1 branch](https://github.com/webcomponents/webcomponentsjs/tree/v1).
10
+
11
+ A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
12
+
13
+ - **Custom Elements v1**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/customelements), [polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements)).
14
+ - **Shadow DOM v1**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/shadowdom),
15
+ [shadydom polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/shadydom), [shadycss polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/shadycss)).
16
+
17
+ For browsers that need it, there are also some minor polyfills included:
18
+
19
+ - [`HTMLTemplateElement`](https://github.com/webcomponents/polyfills/tree/master/packages/template)
20
+ - [`Promise`](https://github.com/taylorhakes/promise-polyfill)
21
+ - `Event`, `CustomEvent`, `MouseEvent` constructors and `Object.assign`, `Array.from`
22
+ (see [webcomponents-platform](https://github.com/webcomponents/webcomponents-platform))
23
+ - [`URL constructor`](https://github.com/webcomponents/polyfills/tree/master/packages/url)
24
+
25
+ ## How to use
26
+
27
+ ### Install polyfills
28
+
29
+ ```bash
30
+ npm install @webcomponents/webcomponentsjs
31
+ ```
32
+
33
+ You can also load the code from a CDN such as unpkg: https://unpkg.com/@webcomponents/webcomponentsjs@^2/
34
+
35
+ ### Using `webcomponents-bundle.js`
36
+
37
+ The `webcomponents-bundle.js` contains all of the web components polyfills and is
38
+ suitable for use on any supported browser. All of the polyfill code will be loaded
39
+ but each polyfill will only be used based on feature detection.
40
+ The bundle includes Custom Elements, Shady DOM/CSS and generic platform polyfills
41
+ (such as ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11),
42
+ and Template (needed by IE 11 and Edge).
43
+
44
+ The `webcomponents-bundle.js` is very simple to use but it does load code
45
+ that is not needed on most modern browsers, slowing page load. For best performance,
46
+ use the `webcomponents-loader.js`.
47
+
48
+ Here's an example:
49
+
50
+ ```html
51
+ <!-- load webcomponents bundle, which includes all the necessary polyfills -->
52
+ <script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
53
+
54
+ <!-- load the element -->
55
+ <script type="module" src="my-element.js"></script>
56
+
57
+ <!-- use the element -->
58
+ <my-element></my-element>
59
+ ```
60
+
61
+ ### Using `webcomponents-loader.js`
62
+
63
+ The `webcomponents-loader.js` is a client-side loader that dynamically loads the
64
+ minimum polyfill bundle, using feature detection.
65
+
66
+ `webcomponents-loader.js` can be loaded synchronously, or asynchronously depending on your needs.
67
+
68
+ #### Inlining
69
+
70
+ If you have inlined the source of `webcomponent-loader.js`, then you should specify `window.WebComponents.root` as the root from which to load the polyfills.
71
+ For example:
72
+
73
+ ```html
74
+ <script>
75
+ window.WebComponents = window.WebComponents || {};
76
+ window.WebComponents.root = 'node_modules/@webcomponents/webcomponentsjs/';
77
+ </script>
78
+ ```
79
+
80
+ This property is used to build the URL to the selected bundle, so you should
81
+ only set it to values that are unable to be influenced by user-controlled data.
82
+ If trusted types are enforced, this property should be a `TrustedScriptURL`.
83
+
84
+ #### Synchronous
85
+
86
+ When loaded synchronously, `webcomponents-loader.js` behaves similarly to `webcomponents-bundle.js`.
87
+
88
+ The appropriate bundle will be loaded with `document.write()` to ensure that WebComponent polyfills are available for subsequent scripts and modules.
89
+
90
+ Here's an example:
91
+
92
+ ```html
93
+ <!-- load the webcomponents loader, which injects the necessary polyfill bundle -->
94
+ <script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
95
+
96
+ <!-- load the element -->
97
+ <script type="module" src="my-element.js"></script>
98
+
99
+ <!-- use the element -->
100
+ <my-element></my-element>
101
+ ```
102
+
103
+ #### Asynchronous
104
+
105
+ When loaded asychronously with the `defer` attribute, polyfill bundles will be loaded asynchronously,
106
+ which means that scripts and modules that depend on webcomponents APIs _must_ be loaded
107
+ using `WebComponents.waitFor` function.
108
+
109
+ The `WebComponents.waitFor` function takes a callback function as an argument, and will evaluate that callback after the polyfill bundle has been loaded.
110
+
111
+ The callback function should load scripts that need the polyfills (typically via `import('my-script.js')`) and
112
+ should return a promise that resolves when all scripts have loaded.
113
+
114
+ Here's an example:
115
+
116
+ ```html
117
+ <!-- Load polyfills; note that "loader" will load these async -->
118
+ <script
119
+ src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"
120
+ defer
121
+ ></script>
122
+
123
+ <!-- Load a custom element definitions in `waitFor` and return a promise -->
124
+ <script type="module">
125
+ WebComponents.waitFor(() => {
126
+ // At this point we are guaranteed that all required polyfills have
127
+ // loaded, and can use web components API's.
128
+ // The standard pattern is to load element definitions that call
129
+ // `customElements.define` here.
130
+ // Note: returning the import's promise causes the custom elements
131
+ // polyfill to wait until all definitions are loaded and then upgrade
132
+ // the document in one batch, for better performance.
133
+ return import('my-element.js');
134
+ });
135
+ </script>
136
+
137
+ <!-- Use the custom element -->
138
+ <my-element></my-element>
139
+ ```
140
+
141
+ The `WebComponents.waitFor` function may be called multiple times, and the callback functions will be processed in order.
142
+
143
+ Here's a more complicated example:
144
+
145
+ ```html
146
+ <!-- Load polyfills; note that "loader" will load these async -->
147
+ <script
148
+ src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"
149
+ defer
150
+ ></script>
151
+
152
+ <script type="module">
153
+ WebComponents.waitFor(async () => {
154
+ if (!window.fetch) {
155
+ await import('node_modules/fetch-polyfill/fetch.js');
156
+ }
157
+ return import('my-element.js');
158
+ });
159
+ </script>
160
+
161
+ <script type="module"></script>
162
+ ```
163
+
164
+ #### Trusted Types
165
+
166
+ If you're using the loader on a page that enforces the `trusted-types` Content
167
+ Security Policy, you'll need to allow the `webcomponents-loader` policy name so
168
+ that the loader can dynamically create and insert a `<script>` for the polyfill
169
+ bundle it selects based on feature detection. If you set `WebComponents.root`
170
+ (which is rare), it should be set to a `TrustedScriptURL` for Trusted Types
171
+ compatibility.
172
+
173
+ ### WebComponentsReady event
174
+
175
+ The `WebComponentsReady` event is fired when polyfills and user scripts have loaded and custom elements have been upgraded. This event is generally not needed; however, it may be useful in some cases like testing. If imperative code should wait until a specific custom element definition has loaded, it can use the platform `customElements.whenDefined` API.
176
+
177
+ ### `custom-elements-es5-adapter.js`
178
+
179
+ According to the spec, only ES6 classes (https://html.spec.whatwg.org/multipage/scripting.html#custom-element-conformance) may be passed to the _native_ `customElements.define` API. For best performance, ES6 should be served to browsers that support it, and ES5 code should be serve to those that don't. Since this may not always be possible, it may make sense to compile and serve ES5 to all browsers. However, if you do so, ES5-style custom element classes will now **not** work on browsers with native Custom Elements because ES5-style classes cannot properly extend ES6 classes, like `HTMLElement`.
180
+
181
+ As a workaround, if your project has been compiled to ES5, load `custom-elements-es5-adapter.js` before defining Custom Elements. This adapter will automatically wrap ES5.
182
+
183
+ **The adapter must NOT be compiled.**
184
+
185
+ ## Browser Support
186
+
187
+ The polyfills are intended to work in the latest versions of evergreen browsers. See below
188
+ for our complete browser support matrix:
189
+
190
+ | Polyfill | Edge | IE11+ | Chrome\* | Firefox\* | Safari 9+\* | Chrome Android\* | Mobile Safari\* |
191
+ | --------------- | :--: | :---: | :------: | :-------: | :---------: | :--------------: | :-------------: |
192
+ | Custom Elements | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
193
+ | Shady CSS/DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
194
+
195
+ \*Indicates the current version of the browser
196
+
197
+ The polyfills may work in older browsers, however require additional polyfills (such as classList, or other [platform](https://github.com/webcomponents/webcomponents-platform)
198
+ polyfills) to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
199
+
200
+ ## Known Issues
201
+
202
+ - [Style encapsulation (inline styling in components) does not work out of the box](#shadycss)
203
+ - [Custom element's constructor property is unreliable](#constructor)
204
+ - [ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
205
+
206
+ ### Style encapsulation (inline styling in components) does not work out of the box. <a id="shadycss"></a>
207
+
208
+ The ShadowDOM polyfill does not properly support CSS in ShadowDoM out of the box:
209
+
210
+ - Any styles inside components have an effect on the whole document (instead of on the component only - the encapsulation is broken).
211
+ - Any shadow-dom specific selectors (like `:host`) do not work.
212
+
213
+ You can fix those issues by manually calling the `ShadyCSS` APIs. See [ShadyCSS usage](https://github.com/webcomponents/shadycss#usage).
214
+
215
+ ### Custom element's constructor property is unreliable <a id="constructor"></a>
216
+
217
+ See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
218
+
219
+ In Edge and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.
220
+
221
+ It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)
222
+
223
+ ### ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
224
+
225
+ ShadyCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadyCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.
226
+
227
+ ### Manually Building
228
+
229
+ If you wish to build the bundles yourself, you'll need `node` and `npm` on your system:
230
+
231
+ - install [node.js](http://nodejs.org/) using the instructions on their website
232
+ - use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
233
+ - make sure you have Java installed per https://www.npmjs.com/package/google-closure-compiler#java-version
234
+
235
+ Now you are ready to build the polyfills with:
236
+
237
+ # install dependencies
238
+ npm install
239
+ # build
240
+ npm run build
241
+
242
+ The builds will be placed into the root directory.
243
+
244
+ ## Contribute
245
+
246
+ See the [contributing guide](CONTRIBUTING.md)
247
+
248
+ ## License
249
+
250
+ Everything in this repository is BSD style license unless otherwise specified.
251
+
252
+ Copyright (c) 2015 The Polymer Authors. All rights reserved.
253
+
254
+ ## Changes in version 2.x
255
+
256
+ - The HTML Imports polyfill has been removed. Given that ES modules have shipped in
257
+ most browsers, the expectation is that web components code will be loaded via
258
+ ES modules.
259
+ - When using `webcomponents-loader.js` with the `defer` attribute, scripts that rely on the polyfills _must_ be loaded using `WebComponents.waitFor(loadCallback)`.
@@ -0,0 +1 @@
1
+ (function(){"use strict";var t=window.Document.prototype.createElement,e=window.Document.prototype.createElementNS,n=window.Document.prototype.importNode,o=window.Document.prototype.prepend,r=window.Document.prototype.append,i=window.DocumentFragment.prototype.prepend,l=window.DocumentFragment.prototype.append,a=window.Node.prototype.cloneNode,c=window.Node.prototype.appendChild,s=window.Node.prototype.insertBefore,u=window.Node.prototype.removeChild,h=window.Node.prototype.replaceChild,d=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),f=window.Element.prototype.attachShadow,p=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),m=window.Element.prototype.getAttribute,y=window.Element.prototype.setAttribute,g=window.Element.prototype.removeAttribute,v=window.Element.prototype.toggleAttribute,E=window.Element.prototype.getAttributeNS,w=window.Element.prototype.setAttributeNS,b=window.Element.prototype.removeAttributeNS,_=window.Element.prototype.insertAdjacentElement,C=window.Element.prototype.insertAdjacentHTML,N=window.Element.prototype.prepend,D=window.Element.prototype.append,T=window.Element.prototype.before,k=window.Element.prototype.after,S=window.Element.prototype.replaceWith,A=window.Element.prototype.remove,F=window.HTMLElement,M=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),L=window.HTMLElement.prototype.insertAdjacentElement,O=window.HTMLElement.prototype.insertAdjacentHTML,j=new Set;function H(t){var e=j.has(t);return t=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(t),!e&&t}"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(t){return j.add(t)});var x=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function P(t){var e=t.isConnected;if(void 0!==e)return e;if(x(t))return!0;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function I(t){var e=t.children;if(e)return Array.prototype.slice.call(e);for(e=[],t=t.firstChild;t;t=t.nextSibling)t.nodeType===Node.ELEMENT_NODE&&e.push(t);return e}function R(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function W(){var t=!(null==tl||!tl.noDocumentConstructionObserver),e=!(null==tl||!tl.shadyDomFastWalk);this.m=[],this.g=[],this.j=!1,this.shadyDomFastWalk=e,this.I=!t}function B(t,e,n,o){var r=window.ShadyDOM;if(t.shadyDomFastWalk&&r&&r.inUse){if(e.nodeType===Node.ELEMENT_NODE&&n(e),e.querySelectorAll)for(t=r.nativeMethods.querySelectorAll.call(e,"*"),e=0;e<t.length;e++)n(t[e])}else!function t(e,n,o){for(var r=e;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;n(i);var l=i.localName;if("link"===l&&"import"===i.getAttribute("rel")){if(r=i.import,void 0===o&&(o=new Set),r instanceof Node&&!o.has(r))for(o.add(r),r=r.firstChild;r;r=r.nextSibling)t(r,n,o);r=R(e,i);continue}if("template"===l){r=R(e,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)t(i,n,o)}r=r.firstChild?r.firstChild:R(e,r)}}(e,n,o)}function U(t,e){t.j&&B(t,e,function(e){return z(t,e)})}function z(t,e){if(t.j&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.m.length;n++)t.m[n](e);for(n=0;n<t.g.length;n++)t.g[n](e)}}function q(t,e){var n=[];for(B(t,e,function(t){return n.push(t)}),e=0;e<n.length;e++){var o=n[e];1===o.__CE_state?t.connectedCallback(o):V(t,o)}}function G(t,e){var n=[];for(B(t,e,function(t){return n.push(t)}),e=0;e<n.length;e++){var o=n[e];1===o.__CE_state&&t.disconnectedCallback(o)}}function J(t,e,n){var o=(n=void 0===n?{}:n).J,r=n.upgrade||function(e){return V(t,e)},i=[];for(B(t,e,function(e){if(t.j&&z(t,e),"link"===e.localName&&"import"===e.getAttribute("rel")){var n=e.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_registry=document.__CE_registry),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:e.addEventListener("load",function(){var n=e.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set;o&&(o.forEach(function(t){return i.add(t)}),i.delete(n)),J(t,n,{J:i,upgrade:r})}})}else i.push(e)},o),e=0;e<i.length;e++)r(i[e])}function V(t,e){try{var n=e.ownerDocument,o=n.__CE_registry,r=o&&(n.defaultView||n.__CE_isImportDocument)?to(o,e.localName):void 0;if(r&&void 0===e.__CE_state){r.constructionStack.push(e);try{try{if(new r.constructorFunction!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{r.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}if(e.__CE_state=1,e.__CE_definition=r,r.attributeChangedCallback&&e.hasAttributes()){var i=r.observedAttributes;for(r=0;r<i.length;r++){var l=i[r],a=e.getAttribute(l);null!==a&&t.attributeChangedCallback(e,l,null,a,null)}}P(e)&&t.connectedCallback(e)}}catch(t){$(t)}}function X(n,o,r,i){var l=o.__CE_registry;if(l&&(null===i||"http://www.w3.org/1999/xhtml"===i)&&(l=to(l,r)))try{var a=new l.constructorFunction;if(void 0===a.__CE_state||void 0===a.__CE_definition)throw Error("Failed to construct '"+r+"': The returned value was not constructed with the HTMLElement constructor.");if("http://www.w3.org/1999/xhtml"!==a.namespaceURI)throw Error("Failed to construct '"+r+"': The constructed element's namespace must be the HTML namespace.");if(a.hasAttributes())throw Error("Failed to construct '"+r+"': The constructed element must not have any attributes.");if(null!==a.firstChild)throw Error("Failed to construct '"+r+"': The constructed element must not have any children.");if(null!==a.parentNode)throw Error("Failed to construct '"+r+"': The constructed element must not have a parent node.");if(a.ownerDocument!==o)throw Error("Failed to construct '"+r+"': The constructed element's owner document is incorrect.");if(a.localName!==r)throw Error("Failed to construct '"+r+"': The constructed element's local name is incorrect.");return a}catch(l){return $(l),Object.setPrototypeOf(o=null===i?t.call(o,r):e.call(o,i,r),HTMLUnknownElement.prototype),o.__CE_state=2,o.__CE_definition=void 0,z(n,o),o}return z(n,o=null===i?t.call(o,r):e.call(o,i,r)),o}function $(t){var e="",n="",o=0,r=0;t instanceof Error?(e=t.message,n=t.sourceURL||t.fileName||"",o=t.line||t.lineNumber||0,r=t.column||t.columnNumber||0):e="Uncaught "+String(t);var i=void 0;void 0===ErrorEvent.prototype.initErrorEvent?i=new ErrorEvent("error",{cancelable:!0,message:e,filename:n,lineno:o,colno:r,error:t}):((i=document.createEvent("ErrorEvent")).initErrorEvent("error",!1,!0,e,n,o),i.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{configurable:!0,get:function(){return!0}})}),void 0===i.error&&Object.defineProperty(i,"error",{configurable:!0,enumerable:!0,get:function(){return t}}),window.dispatchEvent(i),i.defaultPrevented||console.error(t)}function K(){var t=this;this.g=void 0,this.F=new Promise(function(e){t.l=e})}function Q(t){var e=document;this.l=void 0,this.h=t,this.g=e,J(this.h,this.g),"loading"===this.g.readyState&&(this.l=new MutationObserver(this.G.bind(this)),this.l.observe(this.g,{childList:!0,subtree:!0}))}function Y(t){t.l&&t.l.disconnect()}function Z(t){this.s=new Map,this.u=new Map,this.C=new Map,this.A=!1,this.B=new Map,this.o=function(t){return t()},this.i=!1,this.v=[],this.h=t,this.D=t.I?new Q(t):void 0}function tt(t,e){if(!H(e))throw SyntaxError("The element name '"+e+"' is not valid.");if(to(t,e))throw Error("A custom element with name '"+e+"' has already been defined.");if(t.A)throw Error("A custom element is already being defined.")}function te(t,e,n){t.A=!0;try{var o,r=n.prototype;if(!(r instanceof Object))throw TypeError("The custom element constructor's prototype is not an object.");var i=function(t){var e=r[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},l=i("connectedCallback"),a=i("disconnectedCallback"),c=i("adoptedCallback"),s=(o=i("attributeChangedCallback"))&&n.observedAttributes||[]}catch(t){throw t}finally{t.A=!1}return n={localName:e,constructorFunction:n,connectedCallback:l,disconnectedCallback:a,adoptedCallback:c,attributeChangedCallback:o,observedAttributes:s,constructionStack:[]},t.u.set(e,n),t.C.set(n.constructorFunction,n),n}function tn(t){if(!1!==t.i){t.i=!1;for(var e=[],n=t.v,o=new Map,r=0;r<n.length;r++)o.set(n[r],[]);for(J(t.h,document,{upgrade:function(n){if(void 0===n.__CE_state){var r=n.localName,i=o.get(r);i?i.push(n):t.u.has(r)&&e.push(n)}}}),r=0;r<e.length;r++)V(t.h,e[r]);for(r=0;r<n.length;r++){for(var i=n[r],l=o.get(i),a=0;a<l.length;a++)V(t.h,l[a]);(i=t.B.get(i))&&i.resolve(void 0)}n.length=0}}function to(t,e){var n=t.u.get(e);if(n)return n;if(n=t.s.get(e)){t.s.delete(e);try{return te(t,e,n())}catch(t){$(t)}}}function tr(t,e,n){function o(e){return function(n){for(var o=[],r=0;r<arguments.length;++r)o[r]=arguments[r];r=[];for(var i=[],l=0;l<o.length;l++){var a=o[l];if(a instanceof Element&&P(a)&&i.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)r.push(a);else r.push(a)}for(e.apply(this,o),o=0;o<i.length;o++)G(t,i[o]);if(P(this))for(o=0;o<r.length;o++)(i=r[o])instanceof Element&&q(t,i)}}void 0!==n.prepend&&(e.prepend=o(n.prepend)),void 0!==n.append&&(e.append=o(n.append))}W.prototype.connectedCallback=function(t){var e=t.__CE_definition;if(e.connectedCallback)try{e.connectedCallback.call(t)}catch(t){$(t)}},W.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;if(e.disconnectedCallback)try{e.disconnectedCallback.call(t)}catch(t){$(t)}},W.prototype.attributeChangedCallback=function(t,e,n,o,r){var i=t.__CE_definition;if(i.attributeChangedCallback&&-1<i.observedAttributes.indexOf(e))try{i.attributeChangedCallback.call(t,e,n,o,r)}catch(t){$(t)}},K.prototype.resolve=function(t){if(this.g)throw Error("Already resolved.");this.g=t,this.l(t)},Q.prototype.G=function(t){var e=this.g.readyState;for("interactive"!==e&&"complete"!==e||Y(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,o=0;o<n.length;o++)J(this.h,n[o])},Z.prototype.H=function(t,e){var n=this;if(!(e instanceof Function))throw TypeError("Custom element constructor getters must be functions.");tt(this,t),this.s.set(t,e),this.v.push(t),this.i||(this.i=!0,this.o(function(){return tn(n)}))},Z.prototype.define=function(t,e){var n=this;if(!(e instanceof Function))throw TypeError("Custom element constructors must be functions.");tt(this,t),te(this,t,e),this.v.push(t),this.i||(this.i=!0,this.o(function(){return tn(n)}))},Z.prototype.upgrade=function(t){J(this.h,t)},Z.prototype.get=function(t){if(t=to(this,t))return t.constructorFunction},Z.prototype.whenDefined=function(t){if(!H(t))return Promise.reject(SyntaxError("'"+t+"' is not a valid custom element name."));var e=this.B.get(t);if(e)return e.F;e=new K,this.B.set(t,e);var n=this.u.has(t)||this.s.has(t);return t=-1===this.v.indexOf(t),n&&t&&e.resolve(void 0),e.F},Z.prototype.polyfillWrapFlushCallback=function(t){this.D&&Y(this.D);var e=this.o;this.o=function(n){return t(function(){return e(n)})}},Z.prototype.define=Z.prototype.define,Z.prototype.upgrade=Z.prototype.upgrade,Z.prototype.get=Z.prototype.get,Z.prototype.whenDefined=Z.prototype.whenDefined,Z.prototype.polyfillDefineLazy=Z.prototype.H,Z.prototype.polyfillWrapFlushCallback=Z.prototype.polyfillWrapFlushCallback;var ti={},tl=window.customElements;function ta(){var j,H=new W,x=H;function R(){var e=this.constructor,n=document.__CE_registry.C.get(e);if(!n)throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");var o=n.constructionStack;if(0===o.length)return Object.setPrototypeOf(o=t.call(document,n.localName),e.prototype),o.__CE_state=1,o.__CE_definition=n,z(x,o),o;var r=o.length-1,i=o[r];if(i===ti)throw Error("Failed to construct '"+n.localName+"': This element was already constructed.");return o[r]=ti,Object.setPrototypeOf(i,e.prototype),z(x,i),i}R.prototype=F.prototype,Object.defineProperty(HTMLElement.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:R}),window.HTMLElement=R,j=H,Document.prototype.createElement=function(t){return X(j,this,t,null)},Document.prototype.importNode=function(t,e){return t=n.call(this,t,!!e),this.__CE_registry?J(j,t):U(j,t),t},Document.prototype.createElementNS=function(t,e){return X(j,this,e,t)},tr(j,Document.prototype,{prepend:o,append:r}),tr(H,DocumentFragment.prototype,{prepend:i,append:l});var V=H;function $(t,e){Object.defineProperty(t,"textContent",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)e.set.call(this,t);else{var n=void 0;if(this.firstChild){var o=this.childNodes,r=o.length;if(0<r&&P(this)){n=Array(r);for(var i=0;i<r;i++)n[i]=o[i]}}if(e.set.call(this,t),n)for(t=0;t<n.length;t++)G(V,n[t])}}})}Node.prototype.insertBefore=function(t,e){if(t instanceof DocumentFragment){var n=I(t);if(t=s.call(this,t,e),P(this))for(e=0;e<n.length;e++)q(V,n[e]);return t}return n=t instanceof Element&&P(t),e=s.call(this,t,e),n&&G(V,t),P(this)&&q(V,t),e},Node.prototype.appendChild=function(t){if(t instanceof DocumentFragment){var e=I(t);if(t=c.call(this,t),P(this))for(var n=0;n<e.length;n++)q(V,e[n]);return t}return e=t instanceof Element&&P(t),n=c.call(this,t),e&&G(V,t),P(this)&&q(V,t),n},Node.prototype.cloneNode=function(t){return t=a.call(this,!!t),this.ownerDocument.__CE_registry?J(V,t):U(V,t),t},Node.prototype.removeChild=function(t){var e=t instanceof Element&&P(t),n=u.call(this,t);return e&&G(V,t),n},Node.prototype.replaceChild=function(t,e){if(t instanceof DocumentFragment){var n=I(t);if(t=h.call(this,t,e),P(this))for(G(V,e),e=0;e<n.length;e++)q(V,n[e]);return t}n=t instanceof Element&&P(t);var o=h.call(this,t,e),r=P(this);return r&&G(V,e),n&&G(V,t),r&&q(V,t),o},d&&d.get?$(Node.prototype,d):(V.j=!0,V.m.push(function(t){$(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=this.firstChild;e;e=e.nextSibling)e.nodeType!==Node.COMMENT_NODE&&t.push(e.textContent);return t.join("")},set:function(t){for(;this.firstChild;)u.call(this,this.firstChild);null!=t&&""!==t&&c.call(this,document.createTextNode(t))}})})),function(t){function n(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var o=this,r=void 0;if(P(this)&&(r=[],B(t,this,function(t){t!==o&&r.push(t)})),n.set.call(this,e),r)for(var i=0;i<r.length;i++){var l=r[i];1===l.__CE_state&&t.disconnectedCallback(l)}return this.ownerDocument.__CE_registry?J(t,this):U(t,this),e}})}function o(e,n){e.insertAdjacentElement=function(e,o){var r=P(o);return e=n.call(this,e,o),r&&G(t,o),P(e)&&q(t,o),e}}function r(e,n){function o(e,n){for(var o=[];e!==n;e=e.nextSibling)o.push(e);for(n=0;n<o.length;n++)J(t,o[n])}e.insertAdjacentHTML=function(t,e){if("beforebegin"===(t=t.toLowerCase())){var r=this.previousSibling;n.call(this,t,e),o(r||this.parentNode.firstChild,this)}else if("afterbegin"===t)r=this.firstChild,n.call(this,t,e),o(this.firstChild,r);else if("beforeend"===t)r=this.lastChild,n.call(this,t,e),o(r||this.firstChild,null);else if("afterend"===t)r=this.nextSibling,n.call(this,t,e),o(this.nextSibling,r);else throw SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.")}}function i(e){return function(n){for(var o=[],r=0;r<arguments.length;++r)o[r]=arguments[r];r=[];for(var i=[],l=0;l<o.length;l++){var a=o[l];if(a instanceof Element&&P(a)&&i.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)r.push(a);else r.push(a)}for(e.apply(this,o),o=0;o<i.length;o++)G(t,i[o]);if(P(this))for(o=0;o<r.length;o++)(i=r[o])instanceof Element&&q(t,i)}}f&&(Element.prototype.attachShadow=function(e){if(e=f.call(this,e),t.j&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.m.length;n++)t.m[n](e)}return this.__CE_shadowRoot=e}),p&&p.get?n(Element.prototype,p):M&&M.get?n(HTMLElement.prototype,M):(t.j=!0,t.g.push(function(t){n(t,{enumerable:!0,configurable:!0,get:function(){return a.call(this,!0).innerHTML},set:function(t){var n="template"===this.localName,o=n?this.content:this,r=e.call(document,this.namespaceURI,this.localName);for(r.innerHTML=t;0<o.childNodes.length;)u.call(o,o.childNodes[0]);for(t=n?r.content:r;0<t.childNodes.length;)c.call(o,t.childNodes[0])}})})),Element.prototype.setAttribute=function(e,n){if(1!==this.__CE_state)return y.call(this,e,n);var o=m.call(this,e);y.call(this,e,n),n=m.call(this,e),t.attributeChangedCallback(this,e,o,n,null)},Element.prototype.setAttributeNS=function(e,n,o){if(1!==this.__CE_state)return w.call(this,e,n,o);var r=E.call(this,e,n);w.call(this,e,n,o),o=E.call(this,e,n),t.attributeChangedCallback(this,n,r,o,e)},Element.prototype.removeAttribute=function(e){if(1!==this.__CE_state)return g.call(this,e);var n=m.call(this,e);g.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)},v&&(Element.prototype.toggleAttribute=function(e,n){if(1!==this.__CE_state)return v.call(this,e,n);var o=m.call(this,e);return null!==o!==(n=v.call(this,e,n))&&t.attributeChangedCallback(this,e,o,n?"":null,null),n}),Element.prototype.removeAttributeNS=function(e,n){if(1!==this.__CE_state)return b.call(this,e,n);var o=E.call(this,e,n);b.call(this,e,n);var r=E.call(this,e,n);o!==r&&t.attributeChangedCallback(this,n,o,r,e)},L?o(HTMLElement.prototype,L):_&&o(Element.prototype,_),O?r(HTMLElement.prototype,O):C&&r(Element.prototype,C),tr(t,Element.prototype,{prepend:N,append:D});var l=Element.prototype;void 0!==T&&(l.before=i(T)),void 0!==k&&(l.after=i(k)),void 0!==S&&(l.replaceWith=function(e){for(var n=[],o=0;o<arguments.length;++o)n[o]=arguments[o];o=[];for(var r=[],i=0;i<n.length;i++){var l=n[i];if(l instanceof Element&&P(l)&&r.push(l),l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)o.push(l);else o.push(l)}for(i=P(this),S.apply(this,n),n=0;n<r.length;n++)G(t,r[n]);if(i)for(G(t,this),n=0;n<o.length;n++)(r=o[n])instanceof Element&&q(t,r)}),void 0!==A&&(l.remove=function(){var e=P(this);A.call(this),e&&G(t,this)})}(H),window.CustomElementRegistry=Z,H=new Z(H),document.__CE_registry=H,Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:H})}tl&&!tl.forcePolyfill&&"function"==typeof tl.define&&"function"==typeof tl.get||ta(),window.__CE_installPolyfill=ta}).call(this);