govuk_publishing_components 41.1.2 → 42.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +0 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +0 -1
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +0 -1
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +0 -1
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +0 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +0 -2
  8. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +0 -4
  9. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +0 -1
  10. data/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js +0 -1
  11. data/app/assets/javascripts/govuk_publishing_components/lib.js +0 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-guidance.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +1 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +2 -2
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +1 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +2 -2
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +6 -6
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +1 -1
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +5 -5
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +3 -3
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -2
  25. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_grid-helper.scss +1 -1
  26. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +6 -1
  27. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +2 -5
  28. data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +9 -0
  29. data/config/initializers/assets.rb +1 -8
  30. data/lib/govuk_publishing_components/version.rb +1 -1
  31. metadata +2 -29
  32. data/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js +0 -90
  33. data/app/assets/javascripts/govuk_publishing_components/ie.js +0 -2
  34. data/app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js +0 -4
  35. data/app/assets/javascripts/govuk_publishing_components/vendor/json2.js +0 -487
  36. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/all.js +0 -1
  37. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/closest.js +0 -23
  38. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/common.js +0 -8
  39. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/indexOf.js +0 -9
  40. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/DOMTokenList.js +0 -273
  41. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Date/now.js +0 -21
  42. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Document.js +0 -34
  43. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/classList.js +0 -592
  44. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/closest.js +0 -57
  45. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/dataset.js +0 -303
  46. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/matches.js +0 -32
  47. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/nextElementSibling.js +0 -257
  48. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/previousElementSibling.js +0 -257
  49. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element.js +0 -148
  50. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Event.js +0 -506
  51. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Function/prototype/bind.js +0 -253
  52. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Object/defineProperty.js +0 -94
  53. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/String/prototype/trim.js +0 -22
  54. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Window.js +0 -28
@@ -1,303 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
10
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
11
- var detect = (
12
- // In IE8, defineProperty could only act on DOM elements, so full support
13
- // for the feature requires the ability to set a property on an arbitrary object
14
- 'defineProperty' in Object && (function() {
15
- try {
16
- var a = {};
17
- Object.defineProperty(a, 'test', {value:42});
18
- return true;
19
- } catch(e) {
20
- return false
21
- }
22
- }())
23
- );
24
-
25
- if (detect) return
26
-
27
- (function (nativeDefineProperty) {
28
-
29
- var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
30
- var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
31
- var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
32
-
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
-
35
- // Where native support exists, assume it
36
- if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
37
- return nativeDefineProperty(object, property, descriptor);
38
- }
39
-
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
43
-
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
47
-
48
- var propertyString = String(property);
49
- var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
50
- var getterType = 'get' in descriptor && typeof descriptor.get;
51
- var setterType = 'set' in descriptor && typeof descriptor.set;
52
-
53
- // handle descriptor.get
54
- if (getterType) {
55
- if (getterType !== 'function') {
56
- throw new TypeError('Getter must be a function');
57
- }
58
- if (!supportsAccessors) {
59
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
60
- }
61
- if (hasValueOrWritable) {
62
- throw new TypeError(ERR_VALUE_ACCESSORS);
63
- }
64
- Object.__defineGetter__.call(object, propertyString, descriptor.get);
65
- } else {
66
- object[propertyString] = descriptor.value;
67
- }
68
-
69
- // handle descriptor.set
70
- if (setterType) {
71
- if (setterType !== 'function') {
72
- throw new TypeError('Setter must be a function');
73
- }
74
- if (!supportsAccessors) {
75
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
76
- }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
79
- }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
-
83
- // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
84
- if ('value' in descriptor) {
85
- object[propertyString] = descriptor.value;
86
- }
87
-
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
-
94
- // @ts-nocheck
95
- (function (undefined) {
96
-
97
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
98
- var detect = ("Document" in this);
99
-
100
- if (detect) return
101
-
102
- if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
103
-
104
- if (this.HTMLDocument) { // IE8
105
-
106
- // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.
107
- this.Document = this.HTMLDocument;
108
-
109
- } else {
110
-
111
- // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.
112
- this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());
113
- this.Document.prototype = document;
114
- }
115
- }
116
-
117
-
118
- })
119
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
120
-
121
- // @ts-nocheck
122
-
123
- (function(undefined) {
124
-
125
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js
126
- var detect = ('Element' in this && 'HTMLElement' in this);
127
-
128
- if (detect) return
129
-
130
- (function () {
131
-
132
- // IE8
133
- if (window.Element && !window.HTMLElement) {
134
- window.HTMLElement = window.Element;
135
- return;
136
- }
137
-
138
- // create Element constructor
139
- window.Element = window.HTMLElement = new Function('return function Element() {}')();
140
-
141
- // generate sandboxed iframe
142
- var vbody = document.appendChild(document.createElement('body'));
143
- var frame = vbody.appendChild(document.createElement('iframe'));
144
-
145
- // use sandboxed iframe to replicate Element functionality
146
- var frameDocument = frame.contentWindow.document;
147
- var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));
148
- var cache = {};
149
-
150
- // polyfill Element.prototype on an element
151
- var shiv = function (element, deep) {
152
- var
153
- childNodes = element.childNodes || [],
154
- index = -1,
155
- key, value, childNode;
156
-
157
- if (element.nodeType === 1 && element.constructor !== Element) {
158
- element.constructor = Element;
159
-
160
- for (key in cache) {
161
- value = cache[key];
162
- element[key] = value;
163
- }
164
- }
165
-
166
- while (childNode = deep && childNodes[++index]) {
167
- shiv(childNode, deep);
168
- }
169
-
170
- return element;
171
- };
172
-
173
- var elements = document.getElementsByTagName('*');
174
- var nativeCreateElement = document.createElement;
175
- var interval;
176
- var loopLimit = 100;
177
-
178
- prototype.attachEvent('onpropertychange', function (event) {
179
- var
180
- propertyName = event.propertyName,
181
- nonValue = !cache.hasOwnProperty(propertyName),
182
- newValue = prototype[propertyName],
183
- oldValue = cache[propertyName],
184
- index = -1,
185
- element;
186
-
187
- while (element = elements[++index]) {
188
- if (element.nodeType === 1) {
189
- if (nonValue || element[propertyName] === oldValue) {
190
- element[propertyName] = newValue;
191
- }
192
- }
193
- }
194
-
195
- cache[propertyName] = newValue;
196
- });
197
-
198
- prototype.constructor = Element;
199
-
200
- if (!prototype.hasAttribute) {
201
- // <Element>.hasAttribute
202
- prototype.hasAttribute = function hasAttribute(name) {
203
- return this.getAttribute(name) !== null;
204
- };
205
- }
206
-
207
- // Apply Element prototype to the pre-existing DOM as soon as the body element appears.
208
- function bodyCheck() {
209
- if (!(loopLimit--)) clearTimeout(interval);
210
- if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {
211
- shiv(document, true);
212
- if (interval && document.body.prototype) clearTimeout(interval);
213
- return (!!document.body.prototype);
214
- }
215
- return false;
216
- }
217
- if (!bodyCheck()) {
218
- document.onreadystatechange = bodyCheck;
219
- interval = setInterval(bodyCheck, 25);
220
- }
221
-
222
- // Apply to any new elements created after load
223
- document.createElement = function createElement(nodeName) {
224
- var element = nativeCreateElement(String(nodeName).toLowerCase());
225
- return shiv(element);
226
- };
227
-
228
- // remove sandboxed iframe
229
- document.removeChild(vbody);
230
- }());
231
-
232
- })
233
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
234
-
235
- // @ts-nocheck
236
-
237
- (function(undefined) {
238
-
239
- // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/13cf7c340974d128d557580b5e2dafcd1b1192d1/polyfills/Element/prototype/dataset/detect.js
240
- var detect = (function(){
241
- if (!document.documentElement.dataset) {
242
- return false;
243
- }
244
- var el = document.createElement('div');
245
- el.setAttribute("data-a-b", "c");
246
- return el.dataset && el.dataset.aB == "c";
247
- }());
248
-
249
- if (detect) return
250
-
251
- // Polyfill derived from https://raw.githubusercontent.com/Financial-Times/polyfill-library/13cf7c340974d128d557580b5e2dafcd1b1192d1/polyfills/Element/prototype/dataset/polyfill.js
252
- Object.defineProperty(Element.prototype, 'dataset', {
253
- get: function() {
254
- var element = this;
255
- var attributes = this.attributes;
256
- var map = {};
257
-
258
- for (var i = 0; i < attributes.length; i++) {
259
- var attribute = attributes[i];
260
-
261
- // This regex has been edited from the original polyfill, to add
262
- // support for period (.) separators in data-* attribute names. These
263
- // are allowed in the HTML spec, but were not covered by the original
264
- // polyfill's regex. We use periods in our i18n implementation.
265
- if (attribute && attribute.name && (/^data-\w[.\w-]*$/).test(attribute.name)) {
266
- var name = attribute.name;
267
- var value = attribute.value;
268
-
269
- var propName = name.substr(5).replace(/-./g, function (prop) {
270
- return prop.charAt(1).toUpperCase();
271
- });
272
-
273
- // If this browser supports __defineGetter__ and __defineSetter__,
274
- // continue using defineProperty. If not (like IE 8 and below), we use
275
- // a hacky fallback which at least gives an object in the right format
276
- if ('__defineGetter__' in Object.prototype && '__defineSetter__' in Object.prototype) {
277
- Object.defineProperty(map, propName, {
278
- enumerable: true,
279
- get: function() {
280
- return this.value;
281
- }.bind({value: value || ''}),
282
- set: function setter(name, value) {
283
- if (typeof value !== 'undefined') {
284
- this.setAttribute(name, value);
285
- } else {
286
- this.removeAttribute(name);
287
- }
288
- }.bind(element, name)
289
- });
290
- } else {
291
- map[propName] = value;
292
- }
293
-
294
- }
295
- }
296
-
297
- return map;
298
- }
299
- });
300
-
301
- }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
302
-
303
- })));
@@ -1,32 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
10
- // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js
11
- var detect = (
12
- 'document' in this && "matches" in document.documentElement
13
- );
14
-
15
- if (detect) return
16
-
17
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/polyfill.js
18
- Element.prototype.matches = Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || function matches(selector) {
19
- var element = this;
20
- var elements = (element.document || element.ownerDocument).querySelectorAll(selector);
21
- var index = 0;
22
-
23
- while (elements[index] && elements[index] !== element) {
24
- ++index;
25
- }
26
-
27
- return !!elements[index];
28
- };
29
-
30
- }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
31
-
32
- })));
@@ -1,257 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
10
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
11
- var detect = (
12
- // In IE8, defineProperty could only act on DOM elements, so full support
13
- // for the feature requires the ability to set a property on an arbitrary object
14
- 'defineProperty' in Object && (function() {
15
- try {
16
- var a = {};
17
- Object.defineProperty(a, 'test', {value:42});
18
- return true;
19
- } catch(e) {
20
- return false
21
- }
22
- }())
23
- );
24
-
25
- if (detect) return
26
-
27
- (function (nativeDefineProperty) {
28
-
29
- var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
30
- var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
31
- var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
32
-
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
-
35
- // Where native support exists, assume it
36
- if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
37
- return nativeDefineProperty(object, property, descriptor);
38
- }
39
-
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
43
-
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
47
-
48
- var propertyString = String(property);
49
- var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
50
- var getterType = 'get' in descriptor && typeof descriptor.get;
51
- var setterType = 'set' in descriptor && typeof descriptor.set;
52
-
53
- // handle descriptor.get
54
- if (getterType) {
55
- if (getterType !== 'function') {
56
- throw new TypeError('Getter must be a function');
57
- }
58
- if (!supportsAccessors) {
59
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
60
- }
61
- if (hasValueOrWritable) {
62
- throw new TypeError(ERR_VALUE_ACCESSORS);
63
- }
64
- Object.__defineGetter__.call(object, propertyString, descriptor.get);
65
- } else {
66
- object[propertyString] = descriptor.value;
67
- }
68
-
69
- // handle descriptor.set
70
- if (setterType) {
71
- if (setterType !== 'function') {
72
- throw new TypeError('Setter must be a function');
73
- }
74
- if (!supportsAccessors) {
75
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
76
- }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
79
- }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
-
83
- // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
84
- if ('value' in descriptor) {
85
- object[propertyString] = descriptor.value;
86
- }
87
-
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
-
94
- // @ts-nocheck
95
- (function (undefined) {
96
-
97
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
98
- var detect = ("Document" in this);
99
-
100
- if (detect) return
101
-
102
- if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
103
-
104
- if (this.HTMLDocument) { // IE8
105
-
106
- // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.
107
- this.Document = this.HTMLDocument;
108
-
109
- } else {
110
-
111
- // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.
112
- this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());
113
- this.Document.prototype = document;
114
- }
115
- }
116
-
117
-
118
- })
119
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
120
-
121
- // @ts-nocheck
122
-
123
- (function(undefined) {
124
-
125
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js
126
- var detect = ('Element' in this && 'HTMLElement' in this);
127
-
128
- if (detect) return
129
-
130
- (function () {
131
-
132
- // IE8
133
- if (window.Element && !window.HTMLElement) {
134
- window.HTMLElement = window.Element;
135
- return;
136
- }
137
-
138
- // create Element constructor
139
- window.Element = window.HTMLElement = new Function('return function Element() {}')();
140
-
141
- // generate sandboxed iframe
142
- var vbody = document.appendChild(document.createElement('body'));
143
- var frame = vbody.appendChild(document.createElement('iframe'));
144
-
145
- // use sandboxed iframe to replicate Element functionality
146
- var frameDocument = frame.contentWindow.document;
147
- var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));
148
- var cache = {};
149
-
150
- // polyfill Element.prototype on an element
151
- var shiv = function (element, deep) {
152
- var
153
- childNodes = element.childNodes || [],
154
- index = -1,
155
- key, value, childNode;
156
-
157
- if (element.nodeType === 1 && element.constructor !== Element) {
158
- element.constructor = Element;
159
-
160
- for (key in cache) {
161
- value = cache[key];
162
- element[key] = value;
163
- }
164
- }
165
-
166
- while (childNode = deep && childNodes[++index]) {
167
- shiv(childNode, deep);
168
- }
169
-
170
- return element;
171
- };
172
-
173
- var elements = document.getElementsByTagName('*');
174
- var nativeCreateElement = document.createElement;
175
- var interval;
176
- var loopLimit = 100;
177
-
178
- prototype.attachEvent('onpropertychange', function (event) {
179
- var
180
- propertyName = event.propertyName,
181
- nonValue = !cache.hasOwnProperty(propertyName),
182
- newValue = prototype[propertyName],
183
- oldValue = cache[propertyName],
184
- index = -1,
185
- element;
186
-
187
- while (element = elements[++index]) {
188
- if (element.nodeType === 1) {
189
- if (nonValue || element[propertyName] === oldValue) {
190
- element[propertyName] = newValue;
191
- }
192
- }
193
- }
194
-
195
- cache[propertyName] = newValue;
196
- });
197
-
198
- prototype.constructor = Element;
199
-
200
- if (!prototype.hasAttribute) {
201
- // <Element>.hasAttribute
202
- prototype.hasAttribute = function hasAttribute(name) {
203
- return this.getAttribute(name) !== null;
204
- };
205
- }
206
-
207
- // Apply Element prototype to the pre-existing DOM as soon as the body element appears.
208
- function bodyCheck() {
209
- if (!(loopLimit--)) clearTimeout(interval);
210
- if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {
211
- shiv(document, true);
212
- if (interval && document.body.prototype) clearTimeout(interval);
213
- return (!!document.body.prototype);
214
- }
215
- return false;
216
- }
217
- if (!bodyCheck()) {
218
- document.onreadystatechange = bodyCheck;
219
- interval = setInterval(bodyCheck, 25);
220
- }
221
-
222
- // Apply to any new elements created after load
223
- document.createElement = function createElement(nodeName) {
224
- var element = nativeCreateElement(String(nodeName).toLowerCase());
225
- return shiv(element);
226
- };
227
-
228
- // remove sandboxed iframe
229
- document.removeChild(vbody);
230
- }());
231
-
232
- })
233
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
234
-
235
- // @ts-nocheck
236
-
237
- (function(undefined) {
238
-
239
- // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
240
- var detect = (
241
- 'document' in this && "nextElementSibling" in document.documentElement
242
- );
243
-
244
- if (detect) return
245
-
246
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/polyfill.js
247
- Object.defineProperty(Element.prototype, "nextElementSibling", {
248
- get: function(){
249
- var el = this.nextSibling;
250
- while (el && el.nodeType !== 1) { el = el.nextSibling; }
251
- return el;
252
- }
253
- });
254
-
255
- }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
256
-
257
- })));