proto-sudoku-wc 0.0.480 → 0.0.482
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-02cc516d.js → index-0f8ed4ca.js} +160 -142
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/proto-sudoku-wc.cjs.js +2 -2
- package/dist/cjs/proto-sudoku.cjs.entry.js +1767 -848
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/{index-f468fcee.js → index-aa4026b4.js} +160 -142
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/proto-sudoku-wc.js +2 -2
- package/dist/esm/proto-sudoku.entry.js +1767 -848
- package/dist/proto-sudoku-wc/p-5fac1fa8.entry.js +1 -0
- package/dist/proto-sudoku-wc/p-68909a5a.js +2 -0
- package/dist/proto-sudoku-wc/proto-sudoku-wc.esm.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/package.json +3 -3
- package/dist/proto-sudoku-wc/p-3561d2f7.js +0 -2
- package/dist/proto-sudoku-wc/p-e3accc5e.entry.js +0 -1
@@ -1,32 +1,18 @@
|
|
1
1
|
const NAMESPACE = 'proto-sudoku-wc';
|
2
2
|
|
3
|
+
/**
|
4
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
5
|
+
* Simon Friis Vindum (@paldepind)
|
6
|
+
* Licensed under the MIT License
|
7
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
8
|
+
*
|
9
|
+
* Modified for Stencil's renderer and slot projection
|
10
|
+
*/
|
3
11
|
let scopeId;
|
4
12
|
let hostTagName;
|
5
13
|
let isSvgMode = false;
|
6
14
|
let renderingRef = null;
|
7
15
|
let queuePending = false;
|
8
|
-
const win = typeof window !== 'undefined' ? window : {};
|
9
|
-
const doc = win.document || { head: {} };
|
10
|
-
const plt = {
|
11
|
-
$flags$: 0,
|
12
|
-
$resourcesUrl$: '',
|
13
|
-
jmp: (h) => h(),
|
14
|
-
raf: (h) => requestAnimationFrame(h),
|
15
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
16
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
17
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
18
|
-
};
|
19
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
20
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
21
|
-
try {
|
22
|
-
new CSSStyleSheet();
|
23
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
24
|
-
}
|
25
|
-
catch (e) { }
|
26
|
-
return false;
|
27
|
-
})()
|
28
|
-
;
|
29
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
30
16
|
const createTime = (fnName, tagName = '') => {
|
31
17
|
{
|
32
18
|
return () => {
|
@@ -41,76 +27,7 @@ const uniqueTime = (key, measureText) => {
|
|
41
27
|
};
|
42
28
|
}
|
43
29
|
};
|
44
|
-
const
|
45
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
46
|
-
let style = styles.get(scopeId);
|
47
|
-
if (supportsConstructableStylesheets && allowCS) {
|
48
|
-
style = (style || new CSSStyleSheet());
|
49
|
-
if (typeof style === 'string') {
|
50
|
-
style = cssText;
|
51
|
-
}
|
52
|
-
else {
|
53
|
-
style.replaceSync(cssText);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
else {
|
57
|
-
style = cssText;
|
58
|
-
}
|
59
|
-
styles.set(scopeId, style);
|
60
|
-
};
|
61
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
62
|
-
let scopeId = getScopeId(cmpMeta);
|
63
|
-
const style = styles.get(scopeId);
|
64
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
65
|
-
// so the fallback is to always use the document for the root node in those cases
|
66
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
67
|
-
if (style) {
|
68
|
-
if (typeof style === 'string') {
|
69
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
70
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
71
|
-
let styleElm;
|
72
|
-
if (!appliedStyles) {
|
73
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
74
|
-
}
|
75
|
-
if (!appliedStyles.has(scopeId)) {
|
76
|
-
{
|
77
|
-
{
|
78
|
-
styleElm = doc.createElement('style');
|
79
|
-
styleElm.innerHTML = style;
|
80
|
-
}
|
81
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
82
|
-
}
|
83
|
-
if (appliedStyles) {
|
84
|
-
appliedStyles.add(scopeId);
|
85
|
-
}
|
86
|
-
}
|
87
|
-
}
|
88
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
89
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
90
|
-
}
|
91
|
-
}
|
92
|
-
return scopeId;
|
93
|
-
};
|
94
|
-
const attachStyles = (hostRef) => {
|
95
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
96
|
-
const elm = hostRef.$hostElement$;
|
97
|
-
const flags = cmpMeta.$flags$;
|
98
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
99
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
100
|
-
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
101
|
-
// only required when we're NOT using native shadow dom (slot)
|
102
|
-
// or this browser doesn't support native shadow dom
|
103
|
-
// and this host element was NOT created with SSR
|
104
|
-
// let's pick out the inner content for slot projection
|
105
|
-
// create a node to represent where the original
|
106
|
-
// content was first placed, which is useful later on
|
107
|
-
// DOM WRITE!!
|
108
|
-
elm['s-sc'] = scopeId;
|
109
|
-
elm.classList.add(scopeId + '-h');
|
110
|
-
}
|
111
|
-
endAttachStyles();
|
112
|
-
};
|
113
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
30
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
114
31
|
/**
|
115
32
|
* Default style mode id
|
116
33
|
*/
|
@@ -238,6 +155,126 @@ const convertToPrivate = (node) => {
|
|
238
155
|
vnode.$name$ = node.vname;
|
239
156
|
return vnode;
|
240
157
|
};
|
158
|
+
/**
|
159
|
+
* Parse a new property value for a given property type.
|
160
|
+
*
|
161
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
162
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
163
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
164
|
+
* 2. the type stored from `propType`.
|
165
|
+
*
|
166
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
167
|
+
*
|
168
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
169
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
170
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
171
|
+
* ```tsx
|
172
|
+
* <my-cmp prop-val={0}></my-cmp>
|
173
|
+
* ```
|
174
|
+
*
|
175
|
+
* HTML prop values on the other hand, will always a string
|
176
|
+
*
|
177
|
+
* @param propValue the new value to coerce to some type
|
178
|
+
* @param propType the type of the prop, expressed as a binary number
|
179
|
+
* @returns the parsed/coerced value
|
180
|
+
*/
|
181
|
+
const parsePropertyValue = (propValue, propType) => {
|
182
|
+
// ensure this value is of the correct prop type
|
183
|
+
if (propValue != null && !isComplexType(propValue)) {
|
184
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
185
|
+
// could have been passed as a number or boolean
|
186
|
+
// but we still want it as a string
|
187
|
+
return String(propValue);
|
188
|
+
}
|
189
|
+
// redundant return here for better minification
|
190
|
+
return propValue;
|
191
|
+
}
|
192
|
+
// not sure exactly what type we want
|
193
|
+
// so no need to change to a different type
|
194
|
+
return propValue;
|
195
|
+
};
|
196
|
+
/**
|
197
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
198
|
+
* @param elm the target of the Event
|
199
|
+
* @param name the name to give the custom Event
|
200
|
+
* @param opts options for configuring a custom Event
|
201
|
+
* @returns the custom Event
|
202
|
+
*/
|
203
|
+
const emitEvent = (elm, name, opts) => {
|
204
|
+
const ev = plt.ce(name, opts);
|
205
|
+
elm.dispatchEvent(ev);
|
206
|
+
return ev;
|
207
|
+
};
|
208
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
209
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
210
|
+
let style = styles.get(scopeId);
|
211
|
+
if (supportsConstructableStylesheets && allowCS) {
|
212
|
+
style = (style || new CSSStyleSheet());
|
213
|
+
if (typeof style === 'string') {
|
214
|
+
style = cssText;
|
215
|
+
}
|
216
|
+
else {
|
217
|
+
style.replaceSync(cssText);
|
218
|
+
}
|
219
|
+
}
|
220
|
+
else {
|
221
|
+
style = cssText;
|
222
|
+
}
|
223
|
+
styles.set(scopeId, style);
|
224
|
+
};
|
225
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
226
|
+
let scopeId = getScopeId(cmpMeta);
|
227
|
+
const style = styles.get(scopeId);
|
228
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
229
|
+
// so the fallback is to always use the document for the root node in those cases
|
230
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
231
|
+
if (style) {
|
232
|
+
if (typeof style === 'string') {
|
233
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
234
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
235
|
+
let styleElm;
|
236
|
+
if (!appliedStyles) {
|
237
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
238
|
+
}
|
239
|
+
if (!appliedStyles.has(scopeId)) {
|
240
|
+
{
|
241
|
+
{
|
242
|
+
styleElm = doc.createElement('style');
|
243
|
+
styleElm.innerHTML = style;
|
244
|
+
}
|
245
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
246
|
+
}
|
247
|
+
if (appliedStyles) {
|
248
|
+
appliedStyles.add(scopeId);
|
249
|
+
}
|
250
|
+
}
|
251
|
+
}
|
252
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
253
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
254
|
+
}
|
255
|
+
}
|
256
|
+
return scopeId;
|
257
|
+
};
|
258
|
+
const attachStyles = (hostRef) => {
|
259
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
260
|
+
const elm = hostRef.$hostElement$;
|
261
|
+
const flags = cmpMeta.$flags$;
|
262
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
263
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
264
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
265
|
+
// only required when we're NOT using native shadow dom (slot)
|
266
|
+
// or this browser doesn't support native shadow dom
|
267
|
+
// and this host element was NOT created with SSR
|
268
|
+
// let's pick out the inner content for slot projection
|
269
|
+
// create a node to represent where the original
|
270
|
+
// content was first placed, which is useful later on
|
271
|
+
// DOM WRITE!!
|
272
|
+
elm['s-sc'] = scopeId;
|
273
|
+
elm.classList.add(scopeId + '-h');
|
274
|
+
}
|
275
|
+
endAttachStyles();
|
276
|
+
};
|
277
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
241
278
|
/**
|
242
279
|
* Production setAccessor() function based on Preact by
|
243
280
|
* Jason Miller (@developit)
|
@@ -725,18 +762,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
725
762
|
// synchronous patch
|
726
763
|
patch(oldVNode, rootVnode);
|
727
764
|
};
|
728
|
-
/**
|
729
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
730
|
-
* @param elm the target of the Event
|
731
|
-
* @param name the name to give the custom Event
|
732
|
-
* @param opts options for configuring a custom Event
|
733
|
-
* @returns the custom Event
|
734
|
-
*/
|
735
|
-
const emitEvent = (elm, name, opts) => {
|
736
|
-
const ev = plt.ce(name, opts);
|
737
|
-
elm.dispatchEvent(ev);
|
738
|
-
return ev;
|
739
|
-
};
|
740
765
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
741
766
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
742
767
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
@@ -905,44 +930,6 @@ const then = (promise, thenFn) => {
|
|
905
930
|
};
|
906
931
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
907
932
|
;
|
908
|
-
/**
|
909
|
-
* Parse a new property value for a given property type.
|
910
|
-
*
|
911
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
912
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
913
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
914
|
-
* 2. the type stored from `propType`.
|
915
|
-
*
|
916
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
917
|
-
*
|
918
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
919
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
920
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
921
|
-
* ```tsx
|
922
|
-
* <my-cmp prop-val={0}></my-cmp>
|
923
|
-
* ```
|
924
|
-
*
|
925
|
-
* HTML prop values on the other hand, will always a string
|
926
|
-
*
|
927
|
-
* @param propValue the new value to coerce to some type
|
928
|
-
* @param propType the type of the prop, expressed as a binary number
|
929
|
-
* @returns the parsed/coerced value
|
930
|
-
*/
|
931
|
-
const parsePropertyValue = (propValue, propType) => {
|
932
|
-
// ensure this value is of the correct prop type
|
933
|
-
if (propValue != null && !isComplexType(propValue)) {
|
934
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
935
|
-
// could have been passed as a number or boolean
|
936
|
-
// but we still want it as a string
|
937
|
-
return String(propValue);
|
938
|
-
}
|
939
|
-
// redundant return here for better minification
|
940
|
-
return propValue;
|
941
|
-
}
|
942
|
-
// not sure exactly what type we want
|
943
|
-
// so no need to change to a different type
|
944
|
-
return propValue;
|
945
|
-
};
|
946
933
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
947
934
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
948
935
|
// check our new property value against our internal value
|
@@ -969,6 +956,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
969
956
|
}
|
970
957
|
}
|
971
958
|
};
|
959
|
+
/**
|
960
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
961
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
962
|
+
* decorators, callbacks for when attributes change, and so on.
|
963
|
+
*
|
964
|
+
* @param Cstr the constructor for a component that we need to process
|
965
|
+
* @param cmpMeta metadata collected previously about the component
|
966
|
+
* @param flags a number used to store a series of bit flags
|
967
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
968
|
+
*/
|
972
969
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
973
970
|
if (cmpMeta.$members$) {
|
974
971
|
// It's better to have a const than two Object.entries()
|
@@ -1304,6 +1301,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
1304
1301
|
}, consoleError);
|
1305
1302
|
};
|
1306
1303
|
const styles = /*@__PURE__*/ new Map();
|
1304
|
+
const win = typeof window !== 'undefined' ? window : {};
|
1305
|
+
const doc = win.document || { head: {} };
|
1306
|
+
const plt = {
|
1307
|
+
$flags$: 0,
|
1308
|
+
$resourcesUrl$: '',
|
1309
|
+
jmp: (h) => h(),
|
1310
|
+
raf: (h) => requestAnimationFrame(h),
|
1311
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
1312
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
1313
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
1314
|
+
};
|
1315
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
1316
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
1317
|
+
try {
|
1318
|
+
new CSSStyleSheet();
|
1319
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
1320
|
+
}
|
1321
|
+
catch (e) { }
|
1322
|
+
return false;
|
1323
|
+
})()
|
1324
|
+
;
|
1307
1325
|
const queueDomReads = [];
|
1308
1326
|
const queueDomWrites = [];
|
1309
1327
|
const queueTask = (queue, write) => (cb) => {
|
package/dist/esm/loader.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-aa4026b4.js';
|
2
2
|
|
3
3
|
/*
|
4
|
-
Stencil Client Patch Esm v2.18.
|
4
|
+
Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
|
5
5
|
*/
|
6
6
|
const patchEsm = () => {
|
7
7
|
return promiseResolve();
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
1
|
+
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-aa4026b4.js';
|
2
2
|
|
3
3
|
/*
|
4
|
-
Stencil Client Patch Browser v2.18.
|
4
|
+
Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
|
5
5
|
*/
|
6
6
|
const patchBrowser = () => {
|
7
7
|
const importMeta = import.meta.url;
|