proto-daisy-db 0.0.98 → 0.0.99

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.
@@ -63,6 +63,18 @@ const isComplexType = (o) => {
63
63
  o = typeof o;
64
64
  return o === 'object' || o === 'function';
65
65
  };
66
+ /**
67
+ * Helper method for querying a `meta` tag that contains a nonce value
68
+ * out of a DOM's head.
69
+ *
70
+ * @param doc The DOM containing the `head` to query against
71
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
72
+ * exists or the tag has no content.
73
+ */
74
+ function queryNonceMetaTagContent(doc) {
75
+ var _a, _b, _c;
76
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
77
+ }
66
78
  /**
67
79
  * Production h() function based on Preact by
68
80
  * Jason Miller (@developit)
@@ -204,6 +216,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
204
216
  styles.set(scopeId, style);
205
217
  };
206
218
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
219
+ var _a;
207
220
  let scopeId = getScopeId(cmpMeta);
208
221
  const style = styles.get(scopeId);
209
222
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -223,6 +236,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
223
236
  styleElm = doc.createElement('style');
224
237
  styleElm.innerHTML = style;
225
238
  }
239
+ // Apply CSP nonce to the style tag if it exists
240
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
241
+ if (nonce != null) {
242
+ styleElm.setAttribute('nonce', nonce);
243
+ }
226
244
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
227
245
  }
228
246
  if (appliedStyles) {
@@ -1098,6 +1116,7 @@ const disconnectedCallback = (elm) => {
1098
1116
  }
1099
1117
  };
1100
1118
  const bootstrapLazy = (lazyBundles, options = {}) => {
1119
+ var _a;
1101
1120
  const endBootstrap = createTime();
1102
1121
  const cmpTags = [];
1103
1122
  const exclude = options.exclude || [];
@@ -1171,6 +1190,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1171
1190
  {
1172
1191
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1173
1192
  visibilityStyle.setAttribute('data-styles', '');
1193
+ // Apply CSP nonce to the style tag if it exists
1194
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1195
+ if (nonce != null) {
1196
+ visibilityStyle.setAttribute('nonce', nonce);
1197
+ }
1174
1198
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1175
1199
  }
1176
1200
  // Process deferred connectedCallbacks now all components have been registered
@@ -1186,6 +1210,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1186
1210
  // Fallback appLoad event
1187
1211
  endBootstrap();
1188
1212
  };
1213
+ /**
1214
+ * Assigns the given value to the nonce property on the runtime platform object.
1215
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1216
+ * @param nonce The value to be assigned to the platform nonce property.
1217
+ * @returns void
1218
+ */
1219
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1189
1220
  const hostRefs = /*@__PURE__*/ new WeakMap();
1190
1221
  const getHostRef = (ref) => hostRefs.get(ref);
1191
1222
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1296,3 +1327,4 @@ exports.bootstrapLazy = bootstrapLazy;
1296
1327
  exports.h = h;
1297
1328
  exports.promiseResolve = promiseResolve;
1298
1329
  exports.registerInstance = registerInstance;
1330
+ exports.setNonce = setNonce;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-4345a1d6.js');
5
+ const index = require('./index-a49ead8b.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.21.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -18,4 +18,5 @@ const defineCustomElements = (win, options) => {
18
18
  });
19
19
  };
20
20
 
21
+ exports.setNonce = index.setNonce;
21
22
  exports.defineCustomElements = defineCustomElements;
@@ -1,9 +1,11 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-4345a1d6.js');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a49ead8b.js');
4
6
 
5
7
  /*
6
- Stencil Client Patch Browser v2.21.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
7
9
  */
8
10
  const patchBrowser = () => {
9
11
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-daisy-db.cjs.js', document.baseURI).href));
@@ -17,3 +19,5 @@ const patchBrowser = () => {
17
19
  patchBrowser().then(options => {
18
20
  return index.bootstrapLazy([["proto-daisy-db_5.cjs",[[0,"proto-faux-trigger",{"emitter":[1],"data":[1040]}],[1,"proto-daisy-db",{"emitter":[1]}],[0,"proto-faux-keys",{"data":[16]}],[0,"proto-faux-stamp",{"data":[16]}],[0,"proto-faux-type",{"emitter":[1],"eventType":[1025,"event-type"]}]]]], options);
19
21
  });
22
+
23
+ exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-4345a1d6.js');
5
+ const index = require('./index-a49ead8b.js');
6
6
 
7
7
  const KEY = 'proto-daisy-db:app-data';
8
8
  const promisedParseJSON = (json) => {
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "compiler": {
10
10
  "name": "@stencil/core",
11
- "version": "2.21.0",
11
+ "version": "2.22.1",
12
12
  "typescriptVersion": "4.9.4"
13
13
  },
14
14
  "collections": [],
@@ -17,6 +17,15 @@ export { ProtoFauxType as ProtoFauxType } from '../types/components/proto-faux-t
17
17
  */
18
18
  export declare const setAssetPath: (path: string) => void;
19
19
 
20
+ /**
21
+ * Used to specify a nonce value that corresponds with an application's CSP.
22
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
23
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
24
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
25
+ * will result in the same behavior.
26
+ */
27
+ export declare const setNonce: (nonce: string) => void
28
+
20
29
  export interface SetPlatformOptions {
21
30
  raf?: (c: FrameRequestCallback) => number;
22
31
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
@@ -1,4 +1,4 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
1
+ export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
2
  export { ProtoDaisyDb, defineCustomElement as defineCustomElementProtoDaisyDb } from './proto-daisy-db.js';
3
3
  export { ProtoFauxKeys, defineCustomElement as defineCustomElementProtoFauxKeys } from './proto-faux-keys.js';
4
4
  export { ProtoFauxStamp, defineCustomElement as defineCustomElementProtoFauxStamp } from './proto-faux-stamp.js';
@@ -41,6 +41,18 @@ const isComplexType = (o) => {
41
41
  o = typeof o;
42
42
  return o === 'object' || o === 'function';
43
43
  };
44
+ /**
45
+ * Helper method for querying a `meta` tag that contains a nonce value
46
+ * out of a DOM's head.
47
+ *
48
+ * @param doc The DOM containing the `head` to query against
49
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
50
+ * exists or the tag has no content.
51
+ */
52
+ function queryNonceMetaTagContent(doc) {
53
+ var _a, _b, _c;
54
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
55
+ }
44
56
  /**
45
57
  * Production h() function based on Preact by
46
58
  * Jason Miller (@developit)
@@ -182,6 +194,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
182
194
  styles.set(scopeId, style);
183
195
  };
184
196
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
197
+ var _a;
185
198
  let scopeId = getScopeId(cmpMeta);
186
199
  const style = styles.get(scopeId);
187
200
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -201,6 +214,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
201
214
  styleElm = doc.createElement('style');
202
215
  styleElm.innerHTML = style;
203
216
  }
217
+ // Apply CSP nonce to the style tag if it exists
218
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
219
+ if (nonce != null) {
220
+ styleElm.setAttribute('nonce', nonce);
221
+ }
204
222
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
205
223
  }
206
224
  if (appliedStyles) {
@@ -1076,6 +1094,7 @@ const disconnectedCallback = (elm) => {
1076
1094
  }
1077
1095
  };
1078
1096
  const bootstrapLazy = (lazyBundles, options = {}) => {
1097
+ var _a;
1079
1098
  const endBootstrap = createTime();
1080
1099
  const cmpTags = [];
1081
1100
  const exclude = options.exclude || [];
@@ -1149,6 +1168,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1149
1168
  {
1150
1169
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1151
1170
  visibilityStyle.setAttribute('data-styles', '');
1171
+ // Apply CSP nonce to the style tag if it exists
1172
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1173
+ if (nonce != null) {
1174
+ visibilityStyle.setAttribute('nonce', nonce);
1175
+ }
1152
1176
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1153
1177
  }
1154
1178
  // Process deferred connectedCallbacks now all components have been registered
@@ -1164,6 +1188,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1164
1188
  // Fallback appLoad event
1165
1189
  endBootstrap();
1166
1190
  };
1191
+ /**
1192
+ * Assigns the given value to the nonce property on the runtime platform object.
1193
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1194
+ * @param nonce The value to be assigned to the platform nonce property.
1195
+ * @returns void
1196
+ */
1197
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1167
1198
  const hostRefs = /*@__PURE__*/ new WeakMap();
1168
1199
  const getHostRef = (ref) => hostRefs.get(ref);
1169
1200
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1270,4 +1301,4 @@ const flush = () => {
1270
1301
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1271
1302
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1272
1303
 
1273
- export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
1304
+ export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
@@ -1,7 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-252b4cce.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-f2c3d9ea.js';
2
+ export { s as setNonce } from './index-f2c3d9ea.js';
2
3
 
3
4
  /*
4
- Stencil Client Patch Esm v2.21.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
5
6
  */
6
7
  const patchEsm = () => {
7
8
  return promiseResolve();
@@ -1,7 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-252b4cce.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-f2c3d9ea.js';
2
+ export { s as setNonce } from './index-f2c3d9ea.js';
2
3
 
3
4
  /*
4
- Stencil Client Patch Browser v2.21.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
5
6
  */
6
7
  const patchBrowser = () => {
7
8
  const importMeta = import.meta.url;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-252b4cce.js';
1
+ import { r as registerInstance, h } from './index-f2c3d9ea.js';
2
2
 
3
3
  const KEY = 'proto-daisy-db:app-data';
4
4
  const promisedParseJSON = (json) => {
@@ -0,0 +1,2 @@
1
+ let n,t,e=!1;const l={},o=n=>"object"==(n=typeof n)||"function"===n;function s(n){var t,e,l;return null!==(l=null===(e=null===(t=n.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===e?void 0:e.getAttribute("content"))&&void 0!==l?l:void 0}const i=(n,t,...e)=>{let l=null,s=!1,i=!1;const c=[],u=t=>{for(let e=0;e<t.length;e++)l=t[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof n&&!o(l))&&(l+=""),s&&i?c[c.length-1].t+=l:c.push(s?r(null,l):l),i=s)};if(u(e),t){const n=t.className||t.class;n&&(t.class="object"!=typeof n?n:Object.keys(n).filter((t=>n[t])).join(" "))}const a=r(n,null);return a.l=t,c.length>0&&(a.o=c),a},r=(n,t)=>({i:0,u:n,t,$:null,o:null,l:null}),c={},u=new WeakMap,a=n=>"sc-"+n.h,f=(n,t,e,l,s,i)=>{if(e!==l){let r=W(n,t),c=t.toLowerCase();if("class"===t){const t=n.classList,o=$(e),s=$(l);t.remove(...o.filter((n=>n&&!s.includes(n)))),t.add(...s.filter((n=>n&&!o.includes(n))))}else if(r||"o"!==t[0]||"n"!==t[1]){const c=o(l);if((r||c&&null!==l)&&!s)try{if(n.tagName.includes("-"))n[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=e&&n[t]==o||(n[t]=o)}}catch(n){}null==l||!1===l?!1===l&&""!==n.getAttribute(t)||n.removeAttribute(t):(!r||4&i||s)&&!c&&n.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):W(V,c)?c.slice(2):c[2]+t.slice(3),e&&z.rel(n,t,e,!1),l&&z.ael(n,t,l,!1)}},d=/\s/,$=n=>n?n.split(d):[],y=(n,t,e,o)=>{const s=11===t.$.nodeType&&t.$.host?t.$.host:t.$,i=n&&n.l||l,r=t.l||l;for(o in i)o in r||f(s,o,i[o],void 0,e,t.i);for(o in r)f(s,o,i[o],r[o],e,t.i)},h=(t,e,l)=>{const o=e.o[l];let s,i,r=0;if(null!==o.t)s=o.$=_.createTextNode(o.t);else if(s=o.$=_.createElement(o.u),y(null,o,!1),null!=n&&s["s-si"]!==n&&s.classList.add(s["s-si"]=n),o.o)for(r=0;r<o.o.length;++r)i=h(t,o,r),i&&s.appendChild(i);return s},p=(n,e,l,o,s,i)=>{let r,c=n;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=h(null,l,s),r&&(o[s].$=r,c.insertBefore(r,e)))},m=(n,t,e,l)=>{for(;t<=e;++t)(l=n[t])&&l.$.remove()},b=(n,t)=>n.u===t.u,w=(n,t)=>{const e=t.$=n.$,l=n.o,o=t.o,s=t.t;null===s?(y(n,t,!1),null!==l&&null!==o?((n,t,e,l)=>{let o,s=0,i=0,r=t.length-1,c=t[0],u=t[r],a=l.length-1,f=l[0],d=l[a];for(;s<=r&&i<=a;)null==c?c=t[++s]:null==u?u=t[--r]:null==f?f=l[++i]:null==d?d=l[--a]:b(c,f)?(w(c,f),c=t[++s],f=l[++i]):b(u,d)?(w(u,d),u=t[--r],d=l[--a]):b(c,d)?(w(c,d),n.insertBefore(c.$,u.$.nextSibling),c=t[++s],d=l[--a]):b(u,f)?(w(u,f),n.insertBefore(u.$,c.$),u=t[--r],f=l[++i]):(o=h(t&&t[i],e,i),f=l[++i],o&&c.$.parentNode.insertBefore(o,c.$));s>r?p(n,null==l[a+1]?null:l[a+1].$,e,l,i,a):i>a&&m(t,s,r)})(e,l,t,o):null!==o?(null!==n.t&&(e.textContent=""),p(e,null,t,o,0,o.length-1)):null!==l&&m(l,0,l.length-1)):n.t!==s&&(e.data=s)},v=(n,t)=>{t&&!n.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>n.p=t)))},S=(n,t)=>{if(n.i|=16,!(4&n.i))return v(n,n.m),Z((()=>g(n,t)));n.i|=512},g=(n,t)=>{const e=n.v;return P(void 0,(()=>j(n,e,t)))},j=async(n,t,e)=>{const l=n.S,o=l["s-rc"];e&&(n=>{const t=n.g,e=n.S,l=t.i,o=((n,t)=>{var e;let l=a(t);const o=H.get(l);if(n=11===n.nodeType?n:_,o)if("string"==typeof o){let t,i=u.get(n=n.head||n);if(i||u.set(n,i=new Set),!i.has(l)){{t=_.createElement("style"),t.innerHTML=o;const l=null!==(e=z.j)&&void 0!==e?e:s(_);null!=l&&t.setAttribute("nonce",l),n.insertBefore(t,n.querySelector("link"))}i&&i.add(l)}}else n.adoptedStyleSheets.includes(o)||(n.adoptedStyleSheets=[...n.adoptedStyleSheets,o]);return l})(e.shadowRoot?e.shadowRoot:e.getRootNode(),t);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(n);M(n,t),o&&(o.map((n=>n())),l["s-rc"]=void 0);{const t=l["s-p"],e=()=>k(n);0===t.length?e():(Promise.all(t).then(e),n.i|=4,t.length=0)}},M=(e,l)=>{try{l=l.render(),e.i&=-17,e.i|=2,((e,l)=>{const o=e.S,s=e.M||r(null,null),u=(n=>n&&n.u===c)(l)?l:i(null,null,l);t=o.tagName,u.u=null,u.i|=4,e.M=u,u.$=s.$=o.shadowRoot||o,n=o["s-sc"],w(s,u)})(e,l)}catch(n){q(n,e.S)}return null},k=n=>{const t=n.S,e=n.v,l=n.m;64&n.i||(n.i|=64,x(t),O(e,"componentDidLoad"),n.k(t),l||C()),n.p&&(n.p(),n.p=void 0),512&n.i&&Y((()=>S(n,!1))),n.i&=-517},C=()=>{x(_.documentElement),Y((()=>(n=>{const t=z.ce("appload",{detail:{namespace:"proto-daisy-db"}});return n.dispatchEvent(t),t})(V)))},O=(n,t,e)=>{if(n&&n[t])try{return n[t](e)}catch(n){q(n)}},P=(n,t)=>n&&n.then?n.then(t):t(),x=n=>n.classList.add("hydrated"),E=(n,t,e)=>{if(t.C){const l=Object.entries(t.C),s=n.prototype;if(l.map((([n,[l]])=>{(31&l||2&e&&32&l)&&Object.defineProperty(s,n,{get(){return((n,t)=>A(this).O.get(t))(0,n)},set(e){((n,t,e,l)=>{const s=A(n),i=s.O.get(t),r=s.i,c=s.v;e=((n,t)=>null==n||o(n)?n:1&t?n+"":n)(e,l.C[t][0]),8&r&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e)||(s.O.set(t,e),c&&2==(18&r)&&S(s,!1))})(this,n,e,t)},configurable:!0,enumerable:!0})})),1&e){const t=new Map;s.attributeChangedCallback=function(n,e,l){z.jmp((()=>{const e=t.get(n);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(s.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},n.observedAttributes=l.filter((([n,t])=>15&t[0])).map((([n,e])=>{const l=e[1]||n;return t.set(l,n),l}))}}return n},L=(n,t={})=>{var e;const l=[],o=t.exclude||[],i=V.customElements,r=_.head,c=r.querySelector("meta[charset]"),u=_.createElement("style"),f=[];let d,$=!0;Object.assign(z,t),z.P=new URL(t.resourcesUrl||"./",_.baseURI).href,n.map((n=>{n[1].map((t=>{const e={i:t[0],h:t[1],C:t[2],L:t[3]};e.C=t[2];const s=e.h,r=class extends HTMLElement{constructor(n){super(n),U(n=this,e),1&e.i&&n.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),$?f.push(this):z.jmp((()=>(n=>{if(0==(1&z.i)){const t=A(n),e=t.g,l=()=>{};if(!(1&t.i)){t.i|=1;{let e=n;for(;e=e.parentNode||e.host;)if(e["s-p"]){v(t,t.m=e);break}}e.C&&Object.entries(e.C).map((([t,[e]])=>{if(31&e&&n.hasOwnProperty(t)){const e=n[t];delete n[t],n[t]=e}})),(async(n,t,e,l,o)=>{if(0==(32&t.i)){{if(t.i|=32,(o=F(e)).then){const n=()=>{};o=await o,n()}o.isProxied||(E(o,e,2),o.isProxied=!0);const n=()=>{};t.i|=8;try{new o(t)}catch(n){q(n)}t.i&=-9,n()}if(o.style){let n=o.style;const t=a(e);if(!H.has(t)){const l=()=>{};((n,t,e)=>{let l=H.get(n);G&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,H.set(n,l)})(t,n,!!(1&e.i)),l()}}}const s=t.m,i=()=>S(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,e)}l()}})(this)))}disconnectedCallback(){z.jmp((()=>{}))}componentOnReady(){return A(this).N}};e.T=n[0],o.includes(s)||i.get(s)||(l.push(s),i.define(s,E(r,e,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const n=null!==(e=z.j)&&void 0!==e?e:s(_);null!=n&&u.setAttribute("nonce",n),r.insertBefore(u,c?c.nextSibling:r.firstChild)}$=!1,f.length?f.map((n=>n.connectedCallback())):z.jmp((()=>d=setTimeout(C,30)))},N=n=>z.j=n,T=new WeakMap,A=n=>T.get(n),R=(n,t)=>T.set(t.v=n,t),U=(n,t)=>{const e={i:0,S:n,g:t,O:new Map};return e.N=new Promise((n=>e.k=n)),n["s-p"]=[],n["s-rc"]=[],T.set(n,e)},W=(n,t)=>t in n,q=(n,t)=>(0,console.error)(n,t),D=new Map,F=n=>{const t=n.h.replace(/-/g,"_"),e=n.T,l=D.get(e);return l?l[t]:import(`./${e}.entry.js`).then((n=>(D.set(e,n),n[t])),q)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},H=new Map,V="undefined"!=typeof window?window:{},_=V.document||{head:{}},z={i:0,P:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,t,e,l)=>n.addEventListener(t,e,l),rel:(n,t,e,l)=>n.removeEventListener(t,e,l),ce:(n,t)=>new CustomEvent(n,t)},B=n=>Promise.resolve(n),G=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(n){}return!1})(),I=[],J=[],K=(n,t)=>l=>{n.push(l),e||(e=!0,t&&4&z.i?Y(X):z.raf(X))},Q=n=>{for(let t=0;t<n.length;t++)try{n[t](performance.now())}catch(n){q(n)}n.length=0},X=()=>{Q(I),Q(J),(e=I.length>0)&&z.raf(X)},Y=n=>B().then(n),Z=K(J,!0);export{L as b,i as h,B as p,R as r,N as s}
@@ -1 +1 @@
1
- import{r as t,h as o}from"./p-d142a076.js";const s="proto-daisy-db:app-data",a=class{constructor(o){t(this,o),this.emitter=void 0}componentDidLoad(){if(this.emitter&&window[this.emitter]){const t=window[this.emitter];t.on("app-data:get",(()=>{var o;console.log("app-data:get"),(o=localStorage.getItem(s),new Promise(((t,s)=>{try{t(JSON.parse(o))}catch(t){s(t)}}))).then((o=>{t.emit("app-data:value",o)})).catch((t=>{console.log(t)}))})),t.on("app-data:store",(t=>{console.log("app-data:store",t),(t=>{const o=JSON.stringify(t);localStorage.setItem(s,o)})(t)})),t.emit("proto-daisy-db",{ready:!0})}}render(){return o("div",null)}};a.style="";const r=class{constructor(o){t(this,o),this.data=void 0}render(){const t=this.data?Object.keys(this.data):[];return o("div",{class:"flex flex-col"},t.map((t=>o("span",null,t))))}};r.style="";const e=class{constructor(o){t(this,o),this.data=void 0}render(){return o("div",{class:"flex"},o("span",null,this.data?this.data.stamp:""))}};e.style="";const i=class{constructor(o){t(this,o),this.emitter=void 0,this.data=void 0}componentDidLoad(){this.emitter&&window[this.emitter]&&window[this.emitter].on("app-data:value",(t=>{this.data=t}))}emitData(){if(this.emitter&&window[this.emitter]){const t=window[this.emitter],o={login:!0,stamp:Date.now(),theme:"dark",dealers:[]};this.data=void 0,t.emit("app-data:store",o)}}fetchData(){this.emitter&&window[this.emitter]&&window[this.emitter].emit("app-data:get",42)}render(){return o("div",{class:"flex flex-col font-sans"},o("div",{class:"flex flex-row content-center gap-2"},o("button",{class:"btn bg-clrs-navy text-clrs-white",onClick:()=>this.emitData()},"Save"),o("button",{class:"btn bg-clrs-blue text-clrs-white",onClick:()=>this.fetchData()},"Fetch")),o("proto-faux-type",{class:"mt-4",emitter:this.emitter}),o("proto-faux-stamp",{class:"mt-2 text-xs",data:this.data}),o("proto-faux-keys",{class:"mt-2",data:this.data}))}};i.style="*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.btn{border-radius:0.375rem;border-width:1px;border-style:solid;border-color:var(--clrs-aqua, #7fdbff);padding:0.5rem}.mt-4{margin-top:1rem}.mt-2{margin-top:0.5rem}.flex{display:flex}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.content-center{align-content:center}.gap-2{gap:0.5rem}.bg-clrs-navy{background-color:var(--clrs-navy, #001f3f)}.bg-clrs-blue{background-color:var(--clrs-blue, #0074d9)}.font-sans{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}.text-xs{font-size:0.75rem;line-height:1rem}.italic{font-style:italic}.text-clrs-white{color:var(--clrs-white, #ffffff)}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),\n 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";const n=class{constructor(o){t(this,o),this.emitter=void 0,this.eventType=void 0}componentDidLoad(){this.emitter&&window[this.emitter]&&window[this.emitter].on("*",(t=>{this.eventType=t}))}render(){return o("div",null,o("span",{class:"text-xs italic"},this.eventType))}};n.style="proto-faux-type{}";export{a as proto_daisy_db,r as proto_faux_keys,e as proto_faux_stamp,i as proto_faux_trigger,n as proto_faux_type}
1
+ import{r as t,h as o}from"./p-a6607014.js";const s="proto-daisy-db:app-data",a=class{constructor(o){t(this,o),this.emitter=void 0}componentDidLoad(){if(this.emitter&&window[this.emitter]){const t=window[this.emitter];t.on("app-data:get",(()=>{var o;console.log("app-data:get"),(o=localStorage.getItem(s),new Promise(((t,s)=>{try{t(JSON.parse(o))}catch(t){s(t)}}))).then((o=>{t.emit("app-data:value",o)})).catch((t=>{console.log(t)}))})),t.on("app-data:store",(t=>{console.log("app-data:store",t),(t=>{const o=JSON.stringify(t);localStorage.setItem(s,o)})(t)})),t.emit("proto-daisy-db",{ready:!0})}}render(){return o("div",null)}};a.style="";const r=class{constructor(o){t(this,o),this.data=void 0}render(){const t=this.data?Object.keys(this.data):[];return o("div",{class:"flex flex-col"},t.map((t=>o("span",null,t))))}};r.style="";const e=class{constructor(o){t(this,o),this.data=void 0}render(){return o("div",{class:"flex"},o("span",null,this.data?this.data.stamp:""))}};e.style="";const i=class{constructor(o){t(this,o),this.emitter=void 0,this.data=void 0}componentDidLoad(){this.emitter&&window[this.emitter]&&window[this.emitter].on("app-data:value",(t=>{this.data=t}))}emitData(){if(this.emitter&&window[this.emitter]){const t=window[this.emitter],o={login:!0,stamp:Date.now(),theme:"dark",dealers:[]};this.data=void 0,t.emit("app-data:store",o)}}fetchData(){this.emitter&&window[this.emitter]&&window[this.emitter].emit("app-data:get",42)}render(){return o("div",{class:"flex flex-col font-sans"},o("div",{class:"flex flex-row content-center gap-2"},o("button",{class:"btn bg-clrs-navy text-clrs-white",onClick:()=>this.emitData()},"Save"),o("button",{class:"btn bg-clrs-blue text-clrs-white",onClick:()=>this.fetchData()},"Fetch")),o("proto-faux-type",{class:"mt-4",emitter:this.emitter}),o("proto-faux-stamp",{class:"mt-2 text-xs",data:this.data}),o("proto-faux-keys",{class:"mt-2",data:this.data}))}};i.style="*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.btn{border-radius:0.375rem;border-width:1px;border-style:solid;border-color:var(--clrs-aqua, #7fdbff);padding:0.5rem}.mt-4{margin-top:1rem}.mt-2{margin-top:0.5rem}.flex{display:flex}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.content-center{align-content:center}.gap-2{gap:0.5rem}.bg-clrs-navy{background-color:var(--clrs-navy, #001f3f)}.bg-clrs-blue{background-color:var(--clrs-blue, #0074d9)}.font-sans{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}.text-xs{font-size:0.75rem;line-height:1rem}.italic{font-style:italic}.text-clrs-white{color:var(--clrs-white, #ffffff)}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),\n 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";const n=class{constructor(o){t(this,o),this.emitter=void 0,this.eventType=void 0}componentDidLoad(){this.emitter&&window[this.emitter]&&window[this.emitter].on("*",(t=>{this.eventType=t}))}render(){return o("div",null,o("span",{class:"text-xs italic"},this.eventType))}};n.style="proto-faux-type{}";export{a as proto_daisy_db,r as proto_faux_keys,e as proto_faux_stamp,i as proto_faux_trigger,n as proto_faux_type}
@@ -1 +1 @@
1
- import{p as t,b as e}from"./p-d142a076.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((t=>e([["p-3c619660",[[0,"proto-faux-trigger",{emitter:[1],data:[1040]}],[1,"proto-daisy-db",{emitter:[1]}],[0,"proto-faux-keys",{data:[16]}],[0,"proto-faux-stamp",{data:[16]}],[0,"proto-faux-type",{emitter:[1],eventType:[1025,"event-type"]}]]]],t)));
1
+ import{p as t,b as e}from"./p-a6607014.js";export{s as setNonce}from"./p-a6607014.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((t=>e([["p-fe2cacfb",[[0,"proto-faux-trigger",{emitter:[1],data:[1040]}],[1,"proto-daisy-db",{emitter:[1]}],[0,"proto-faux-keys",{data:[16]}],[0,"proto-faux-stamp",{data:[16]}],[0,"proto-faux-type",{emitter:[1],eventType:[1025,"event-type"]}]]]],t)));
@@ -257,6 +257,15 @@ export declare function getAssetPath(path: string): string;
257
257
  * @returns the set path
258
258
  */
259
259
  export declare function setAssetPath(path: string): string;
260
+ /**
261
+ * Used to specify a nonce value that corresponds with an application's
262
+ * [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
263
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
264
+ * Alternatively, the nonce value can be set on a `meta` tag in the DOM head
265
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
266
+ * @param nonce The value to be used for the nonce attribute.
267
+ */
268
+ export declare function setNonce(nonce: string): void;
260
269
  /**
261
270
  * Retrieve a Stencil element for a given reference
262
271
  * @param ref the ref to get the Stencil element for
package/loader/index.d.ts CHANGED
@@ -10,3 +10,12 @@ export interface CustomElementsDefineOptions {
10
10
  }
11
11
  export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
12
12
  export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proto-daisy-db",
3
- "version": "0.0.98",
3
+ "version": "0.0.99",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "format": "prettier --write src"
28
28
  },
29
29
  "dependencies": {
30
- "@stencil/core": "2.21.0",
30
+ "@stencil/core": "2.22.1",
31
31
  "mitt": "3.0.0"
32
32
  },
33
33
  "devDependencies": {
@@ -1,2 +0,0 @@
1
- let e,t,n=!1;const l={},s=e=>"object"==(e=typeof e)||"function"===e,o=(e,t,...n)=>{let l=null,o=!1,i=!1;const c=[],u=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!s(l))&&(l+=""),o&&i?c[c.length-1].t+=l:c.push(o?r(null,l):l),i=o)};if(u(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const a=r(e,null);return a.l=t,c.length>0&&(a.o=c),a},r=(e,t)=>({i:0,u:e,t,$:null,o:null,l:null}),i={},c=new WeakMap,u=e=>"sc-"+e.h,a=(e,t,n,l,o,r)=>{if(n!==l){let i=R(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,s=$(n),o=$(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const c=s(l);if((i||c&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||o)&&!c&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):R(F,c)?c.slice(2):c[2]+t.slice(3),n&&V.rel(e,t,n,!1),l&&V.ael(e,t,l,!1)}},f=/\s/,$=e=>e?e.split(f):[],d=(e,t,n,s)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,r=e&&e.l||l,i=t.l||l;for(s in r)s in i||a(o,s,r[s],void 0,n,t.i);for(s in i)a(o,s,r[s],i[s],n,t.i)},y=(t,n,l)=>{const s=n.o[l];let o,r,i=0;if(null!==s.t)o=s.$=H.createTextNode(s.t);else if(o=s.$=H.createElement(s.u),d(null,s,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(i=0;i<s.o.length;++i)r=y(t,s,i),r&&o.appendChild(r);return o},h=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=y(null,l,o),i&&(s[o].$=i,c.insertBefore(i,n)))},p=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.$.remove()},m=(e,t)=>e.u===t.u,b=(e,t)=>{const n=t.$=e.$,l=e.o,s=t.o,o=t.t;null===o?(d(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:m(c,f)?(b(c,f),c=t[++o],f=l[++r]):m(u,$)?(b(u,$),u=t[--i],$=l[--a]):m(c,$)?(b(c,$),e.insertBefore(c.$,u.$.nextSibling),c=t[++o],$=l[--a]):m(u,f)?(b(u,f),e.insertBefore(u.$,c.$),u=t[--i],f=l[++r]):(s=y(t&&t[r],n,r),f=l[++r],s&&c.$.parentNode.insertBefore(s,c.$));o>i?h(e,null==l[a+1]?null:l[a+1].$,n,l,r,a):r>a&&p(t,o,i)})(n,l,t,s):null!==s?(null!==e.t&&(n.textContent=""),h(n,null,t,s,0,s.length-1)):null!==l&&p(l,0,l.length-1)):e.t!==o&&(n.data=o)},w=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},S=(e,t)=>{if(e.i|=16,!(4&e.i))return w(e,e.m),X((()=>g(e,t)));e.i|=512},g=(e,t)=>{const n=e.S;return O(void 0,(()=>j(e,n,t)))},j=async(e,t,n)=>{const l=e.g,s=l["s-rc"];n&&(e=>{const t=e.j,n=e.g,l=t.i,s=((e,t)=>{let n=u(t);const l=D.get(n);if(e=11===e.nodeType?e:H,l)if("string"==typeof l){let t,s=c.get(e=e.head||e);s||c.set(e,s=new Set),s.has(n)||(t=H.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);v(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>M(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},v=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.g,c=n.v||r(null,null),u=(e=>e&&e.u===i)(l)?l:o(null,null,l);t=s.tagName,u.u=null,u.i|=4,n.v=u,u.$=c.$=s.shadowRoot||s,e=s["s-sc"],b(c,u)})(n,l)}catch(e){U(e,n.g)}return null},M=e=>{const t=e.g,n=e.S,l=e.m;64&e.i||(e.i|=64,P(t),C(n,"componentDidLoad"),e.M(t),l||k()),e.p&&(e.p(),e.p=void 0),512&e.i&&Q((()=>S(e,!1))),e.i&=-517},k=()=>{P(H.documentElement),Q((()=>(e=>{const t=V.ce("appload",{detail:{namespace:"proto-daisy-db"}});return e.dispatchEvent(t),t})(F)))},C=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){U(e)}},O=(e,t)=>e&&e.then?e.then(t):t(),P=e=>e.classList.add("hydrated"),x=(e,t,n)=>{if(t.k){const l=Object.entries(t.k),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>N(this).C.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=N(e),r=o.C.get(t),i=o.i,c=o.S;n=((e,t)=>null==e||s(e)?e:1&t?e+"":e)(n,l.k[t][0]),8&i&&void 0!==r||n===r||Number.isNaN(r)&&Number.isNaN(n)||(o.C.set(t,n),c&&2==(18&i)&&S(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){V.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},E=(e,t={})=>{const n=[],l=t.exclude||[],s=F.customElements,o=H.head,r=o.querySelector("meta[charset]"),i=H.createElement("style"),c=[];let a,f=!0;Object.assign(V,t),V.O=new URL(t.resourcesUrl||"./",H.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],h:t[1],k:t[2],P:t[3]};o.k=t[2];const r=o.h,i=class extends HTMLElement{constructor(e){super(e),A(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),f?c.push(this):V.jmp((()=>(e=>{if(0==(1&V.i)){const t=N(e),n=t.j,l=()=>{};if(!(1&t.i)){t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){w(t,t.m=n);break}}n.k&&Object.entries(n.k).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(x(s,n,2),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){U(e)}t.i&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!D.has(t)){const l=()=>{};((e,t,n)=>{let l=D.get(e);z&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,D.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.m,r=()=>S(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){V.jmp((()=>{}))}componentOnReady(){return N(this).L}};o.N=e[0],l.includes(r)||s.get(r)||(n.push(r),s.define(r,x(i,o,1)))}))})),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),o.insertBefore(i,r?r.nextSibling:o.firstChild),f=!1,c.length?c.map((e=>e.connectedCallback())):V.jmp((()=>a=setTimeout(k,30)))},L=new WeakMap,N=e=>L.get(e),T=(e,t)=>L.set(t.S=e,t),A=(e,t)=>{const n={i:0,g:e,j:t,C:new Map};return n.L=new Promise((e=>n.M=e)),e["s-p"]=[],e["s-rc"]=[],L.set(e,n)},R=(e,t)=>t in e,U=(e,t)=>(0,console.error)(e,t),W=new Map,q=e=>{const t=e.h.replace(/-/g,"_"),n=e.N,l=W.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(W.set(n,e),e[t])),U)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},D=new Map,F="undefined"!=typeof window?window:{},H=F.document||{head:{}},V={i:0,O:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},_=e=>Promise.resolve(e),z=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),B=[],G=[],I=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&V.i?Q(K):V.raf(K))},J=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){U(e)}e.length=0},K=()=>{J(B),J(G),(n=B.length>0)&&V.raf(K)},Q=e=>_().then(e),X=I(G,!0);export{E as b,o as h,_ as p,T as r}