phirepass-widgets 0.0.16 → 0.0.18

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.
@@ -444,7 +444,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
444
444
  }
445
445
  let isProp = isMemberInElement(elm, memberName);
446
446
  memberName.toLowerCase();
447
- if (memberName === "key") ; else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
447
+ if (memberName === "key") ; else if (memberName === "ref") {
448
+ if (newValue) {
449
+ queueRefAttachment(newValue, elm);
450
+ }
451
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
448
452
  const propName = memberName.slice(5);
449
453
  let attrName;
450
454
  {
@@ -550,6 +554,8 @@ function sortedAttrNames(attrNames) {
550
554
  var hostTagName;
551
555
  var useNativeShadowDom = false;
552
556
  var isSvgMode = false;
557
+ var refCallbacksToRemove = [];
558
+ var refCallbacksToAttach = [];
553
559
  var createElm = (oldParentVNode, newParentVNode, childIndex) => {
554
560
  const newVNode2 = newParentVNode.$children$[childIndex];
555
561
  let i2 = 0;
@@ -621,6 +627,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
621
627
  const vnode = vnodes[index];
622
628
  if (vnode) {
623
629
  const elm = vnode.$elm$;
630
+ nullifyVNodeRefs(vnode);
624
631
  if (elm) {
625
632
  elm.remove();
626
633
  }
@@ -751,6 +758,27 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
751
758
  } else ;
752
759
  }
753
760
  };
761
+ var nullifyVNodeRefs = (vNode) => {
762
+ {
763
+ if (vNode.$attrs$ && vNode.$attrs$.ref) {
764
+ refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
765
+ }
766
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
767
+ }
768
+ };
769
+ var queueRefAttachment = (refCallback, elm) => {
770
+ {
771
+ refCallbacksToAttach.push(() => refCallback(elm));
772
+ }
773
+ };
774
+ var flushQueuedRefCallbacks = () => {
775
+ {
776
+ refCallbacksToRemove.forEach((cb) => cb());
777
+ refCallbacksToRemove.length = 0;
778
+ refCallbacksToAttach.forEach((cb) => cb());
779
+ refCallbacksToAttach.length = 0;
780
+ }
781
+ };
754
782
  var insertBefore = (parent, newNode, reference, isInitialLoad) => {
755
783
  if (parent.__insertBefore) {
756
784
  return parent.__insertBefore(newNode, reference);
@@ -778,6 +806,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
778
806
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
779
807
  useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
780
808
  patch(oldVNode, rootVnode, isInitialLoad);
809
+ flushQueuedRefCallbacks();
781
810
  };
782
811
 
783
812
  // src/runtime/update-component.ts
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-DUQrkuW3.js';
2
- export { s as setNonce } from './index-DUQrkuW3.js';
1
+ import { b as bootstrapLazy } from './index-BZOTLEeX.js';
2
+ export { s as setNonce } from './index-BZOTLEeX.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-DUQrkuW3.js';
1
+ import { r as registerInstance, h, H as Host } from './index-BZOTLEeX.js';
2
2
 
3
3
  const phirepassSftpClientCss = () => `:host{display:block}`;
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, g as getElement, h as h$1, H as Host } from './index-DUQrkuW3.js';
1
+ import { r as registerInstance, g as getElement, h as h$1, H as Host } from './index-BZOTLEeX.js';
2
2
 
3
3
  /**
4
4
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
@@ -995,6 +995,10 @@ const PhirepassTerminal = class {
995
995
  serializeAddon;
996
996
  imageAddon;
997
997
  channel;
998
+ containerEl;
999
+ domReady = false;
1000
+ runtimeReady = false;
1001
+ connected = false;
998
1002
  inputMode = InputMode.Default;
999
1003
  resizeObserver;
1000
1004
  resizeDebounceHandle;
@@ -1099,19 +1103,36 @@ const PhirepassTerminal = class {
1099
1103
  console.log('Terminal setup complete');
1100
1104
  this.open_comms();
1101
1105
  console.log('Comms opened');
1106
+ this.runtimeReady = true;
1102
1107
  if (!this.nodeId) {
1103
1108
  console.warn('Prop node_id is not set. Cannot connect to terminal.');
1104
1109
  return;
1105
1110
  }
1106
- this.connect();
1111
+ this.try_connect();
1112
+ }
1113
+ componentDidLoad() {
1114
+ this.domReady = true;
1115
+ this.try_connect();
1107
1116
  }
1108
1117
  async disconnectedCallback() {
1109
1118
  if (this.resizeObserver) {
1110
1119
  this.resizeObserver.disconnect();
1111
1120
  }
1121
+ this.connected = false;
1122
+ this.domReady = false;
1123
+ this.runtimeReady = false;
1112
1124
  this.close_comms();
1113
1125
  this.destroy_terminal();
1114
1126
  }
1127
+ try_connect() {
1128
+ if (this.connected || !this.domReady || !this.runtimeReady) {
1129
+ return;
1130
+ }
1131
+ if (!this.containerEl || !this.terminal || !this.channel) {
1132
+ return;
1133
+ }
1134
+ this.connect();
1135
+ }
1115
1136
  setup_terminal() {
1116
1137
  this.terminal = new Dl(this.terminalOptions);
1117
1138
  this.fitAddon = new o();
@@ -1263,14 +1284,17 @@ const PhirepassTerminal = class {
1263
1284
  this.terminal.writeln("Connection closed.");
1264
1285
  }
1265
1286
  connect() {
1266
- const container = this.el.shadowRoot.getElementById('ccc');
1287
+ const container = this.containerEl;
1288
+ console.log('Attempting to connect terminal to container:', container);
1267
1289
  if (container) {
1268
1290
  this.terminal.open(container);
1291
+ console.log('Terminal opened in container');
1269
1292
  this.fitAddon.fit();
1270
1293
  this.terminal.focus();
1271
1294
  this.terminal.onData(this.handleTerminalData.bind(this));
1272
1295
  this.channel.connect();
1273
1296
  this.setupResizeObserver();
1297
+ this.connected = true;
1274
1298
  console.log('Terminal connected and ready');
1275
1299
  }
1276
1300
  }
@@ -1379,7 +1403,7 @@ const PhirepassTerminal = class {
1379
1403
  this.usernameBuffer = "";
1380
1404
  }
1381
1405
  render() {
1382
- return (h$1(Host, { key: '3f923e0cc42c6a8eca61424a7e75960317a5d99c' }, h$1("div", { key: '4a3e2f6d4652b7049c9ec9f535ad32fd6401cc09', id: "ccc" })));
1406
+ return (h$1(Host, { key: '16372280bf650813e7aae4e28fae8b761b87a096' }, h$1("div", { key: '5a387d5d9d0772510ded9b50c764ab4ae4b14abc', id: "ccc", ref: el => (this.containerEl = el) })));
1383
1407
  }
1384
1408
  static get watchers() { return {
1385
1409
  "nodeId": [{
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-DUQrkuW3.js';
2
- export { s as setNonce } from './index-DUQrkuW3.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-BZOTLEeX.js';
2
+ export { s as setNonce } from './index-BZOTLEeX.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  /*
@@ -0,0 +1 @@
1
+ import{r as e,h as s,H as r}from"./p-BZOTLEeX.js";const t=class{constructor(s){e(this,s)}render(){return s(r,{key:"d03ff09e3636f79d699c7462e121abe7d08c6683"},s("slot",{key:"bd7285e70384558e4cbf0600b89a57fa4ec3406d"}))}};t.style=":host{display:block}";export{t as phirepass_sftp_client}
@@ -0,0 +1,2 @@
1
+ function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>(0,console.error)(t,e),s=new Map,r=new Map,c="undefined"!=typeof window?window:{},u={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),f=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),d=!!f&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),h=!1,p=[],m=[],v=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.u?$(b):u.raf(b))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},b=()=>{y(p),y(m),(h=p.length>0)&&u.raf(b)},$=t=>a().then(t),w=v(m,!0);function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(d?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var S,O=new WeakMap,k=t=>"sc-"+t.p,M=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!M(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?C(null,o):o),s=i)};c(n),e&&e.key&&(l=e.key);const u=C(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},C=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),A={},L=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,N=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},x=(t,e,n,l,i,s)=>{if(n===l)return;let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"key"===e);else if("ref"===e)l&&Y(l,t);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((r||o&&null!==l)&&!i)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||i)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}},D=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of H(Object.keys(l)))t in i||x(o,t,l[t],void 0,n,e.u);for(const t of H(Object.keys(i)))x(o,t,l[t],i[t],n,e.u)};function H(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var P=!1,R=!1,T=[],U=[],W=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(!c.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=c.document.createElement(o.S),D(null,o,R),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=W(t,o,s),i&&e.appendChild(i)}return l["s-hn"]=S,l},z=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===S&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=W(null,n,l),s&&(o[l].O=s,Z(r,s,e)))},F=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;G(e),t&&t.remove()}}},q=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),V=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$;"slot"!==e.S||P||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{u.u|=1;const e=t.closest(S.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(Z(e,t,null!=n?n:null),t["s-sh"]=void 0)}u.u&=-2})(e.O.parentElement)),D(t,e,R),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(q(d,m,l))V(d,m,l),d=e[++r],m=o[++c];else if(q(h,v,l))V(h,v,l),h=e[--f],v=o[--p];else if(q(d,v,l))V(d,v,l),Z(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(q(h,m,l))V(h,m,l),Z(y,h.O,d.O),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.S!==m.S?i=W(e&&e[c],n,u):(V(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=W(e&&e[c],n,c),m=o[++c]),i&&Z(d.O.parentNode,i,d.O)}r>f?z(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&F(e,r,f)})(o,l,e,i,n):null!==i?z(o,null,e,i,0,i.length-1):!n&&null!==l&&F(l,0,l.length-1)},G=t=>{t.v&&t.v.ref&&T.push((()=>t.v.ref(null))),t.$&&t.$.map(G)},Y=(t,e)=>{U.push((()=>t(e)))},Z=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),_=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},B=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);_(t,t.C);const n=()=>I(t,e);if(!e)return w(n);queueMicrotask((()=>{n()}))},I=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=nt(o,"componentWillLoad",void 0,n)):l=nt(o,"componentWillUpdate",void 0,n),l=J(l,(()=>nt(o,"componentWillRender",void 0,n))),J(l,(()=>Q(t,o,e)))},J=(t,e)=>K(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),K=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Q=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=k(e),s=r.get(i);if(!c.document)return i;if(t=11===t.nodeType?t:c.document,s)if("string"==typeof s){let l,r=O.get(t=t.head||t);if(r||O.set(t,r=new Set),!r.has(i)){l=c.document.createElement("style"),l.textContent=s;const a=null!=(n=u.L)?n:j(c.document);if(null!=a&&l.setAttribute("nonce",a),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),d?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}d?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);X(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>tt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},X=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.N||C(null,null),s=(t=>t&&t.S===A)(e)?e:E(null,null,e);if(S=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.N=s,s.O=i.O=o.shadowRoot||o,P=!(!(1&l.u)||128&l.u),V(i,s,n),T.forEach((t=>t())),T.length=0,U.forEach((t=>t())),U.length=0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},tt=t=>{const e=t.$hostElement$,n=t.i,o=t.C;nt(n,"componentDidRender",void 0,e),64&t.u?nt(n,"componentDidUpdate",void 0,e):(t.u|=64,ot(e),nt(n,"componentDidLoad",void 0,e),t.D(e),o||et()),t.M&&(t.M(),t.M=void 0),512&t.u&&$((()=>B(t,!1))),t.u&=-517},et=()=>{$((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"phirepass-widgets"}});return t.dispatchEvent(e),e})(c)))},nt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},ot=t=>t.classList.add("hydrated"),lt=(t,e,n,l)=>{const s=o(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,a=s.i;if(n=L(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(s.l.set(e,n),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(a?a[o](n,c,e):s.A.push((()=>{s.i[o](n,c,e)})))}catch(t){i(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||B(s,!1)}}},it=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.H&&(n.H=e.watchers),e.deserializers&&!n.P&&(n.P=e.deserializers),e.serializers&&!n.R&&(n.R=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,L(t,i)),void lt(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return lt(this,e,t,n),void(1&l&&!s.i&&s.A.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const o=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=L(t,i),lt(this,e,s.i[e],n)};s.i?o():s.A.push((()=>{o()}))}}}})}})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){u.jmp((()=>{var s;const u=t.get(e),a=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&i!==l){const o=a.i,r=null==(s=n.H)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(r,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.H)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},st=(t,e)=>{nt(t,"connectedCallback",void 0,e)},rt=(t,e)=>{nt(t,"disconnectedCallback",void 0,e||t)},ct=(t,e={})=>{var n;if(!c.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],a=e.exclude||[],d=c.customElements,h=c.document.head,p=h.querySelector("meta[charset]"),m=c.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(u,e),u.h=new URL(e.resourcesUrl||"./",c.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,c,h;const p={u:e[0],p:e[1],t:e[2],T:e[3]};p.t=e[2],p.H=null!=(n=e[4])?n:{},p.R=null!=(c=e[5])?c:{},p.P=null!=(h=e[6])?h:{};const m=p.p,$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,U:new Map};n.W=new Promise((t=>n.D=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):u.jmp((()=>(t=>{if(!(1&u.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?st(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>st(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){_(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.F){const l=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.F;if(!o)return;const l=s.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.p}#${e.q}" was not found`);o.isProxied||(n.H=o.watchers,n.R=o.serializers,n.P=o.deserializers,it(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,r(),st(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=k(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);f&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,c=()=>B(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(n){i(n,t),e.M&&(e.M(),e.M=void 0),e.D&&e.D(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){u.jmp((()=>(async t=>{if(!(1&u.u)){const e=o(t);(null==e?void 0:e.i)?rt(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>rt(e.i,t)))}O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this))),u.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.N)?void 0:t.O)instanceof Node&&!e.N.O.isConnected&&delete e.N.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.W}};p.F=t[0],a.includes(m)||d.get(m)||(l.push(m),d.define(m,it($,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=u.L)?n:j(c.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):u.jmp((()=>y=setTimeout(et,30)))},ut=t=>u.L=t;export{A as H,ct as b,N as g,E as h,a as p,l as r,ut as s}