@staylift-tech/conv-widget 0.0.1
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/README.md +220 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/index-BDscJkkF.js +1464 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/staylift-orb.cjs.entry.js +117 -0
- package/dist/cjs/staylift-widget.cjs.entry.js +26479 -0
- package/dist/cjs/staylift-widget.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/staylift-orb/staylift-orb.css +15 -0
- package/dist/collection/components/staylift-orb/staylift-orb.js +229 -0
- package/dist/collection/components/staylift-widget/staylift-widget.css +578 -0
- package/dist/collection/components/staylift-widget/staylift-widget.js +898 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/types.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-DnOZjbwA.js +1 -0
- package/dist/components/staylift-orb.d.ts +11 -0
- package/dist/components/staylift-orb.js +1 -0
- package/dist/components/staylift-widget.d.ts +11 -0
- package/dist/components/staylift-widget.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/index-DAtfDq5B.js +1456 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/staylift-orb.entry.js +115 -0
- package/dist/esm/staylift-widget.entry.js +26477 -0
- package/dist/esm/staylift-widget.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/staylift-widget/index.esm.js +1 -0
- package/dist/staylift-widget/p-37510f2e.entry.js +1 -0
- package/dist/staylift-widget/p-94923740.entry.js +1 -0
- package/dist/staylift-widget/p-DAtfDq5B.js +2 -0
- package/dist/staylift-widget/p-DQuL1Twl.js +1 -0
- package/dist/staylift-widget/staylift-widget.esm.js +1 -0
- package/dist/types/components/staylift-orb/staylift-orb.d.ts +19 -0
- package/dist/types/components/staylift-widget/staylift-widget.d.ts +80 -0
- package/dist/types/components.d.ts +212 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +1839 -0
- package/dist/types/types.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +58 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e,t=(e,t)=>{var n;Object.entries(null!=(n=t.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=e[n],l=function(e,t){for(;e;){const n=Object.getOwnPropertyDescriptor(e,t);if(null==n?void 0:n.get)return n;e=Object.getPrototypeOf(e)}}(Object.getPrototypeOf(e),n)||Object.getOwnPropertyDescriptor(e,n);l&&Object.defineProperty(e,n,{get(){return l.get.call(this)},set(e){l.set.call(this,e)},configurable:!0,enumerable:!0}),e[n]=t.l.has(n)?t.l.get(n):o}}))},n=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},o=(e,n)=>{n&&(e.__stencil__getHostRef=()=>n,n.i=e,512&n.o.u&&t(e,n))},l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="undefined"!=typeof window?window:{},u={u:0,h:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),a=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(e){}return!1})(),d=!!a&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),h=!1,p=[],m=[],v=(e,t)=>n=>{e.push(n),h||(h=!0,t&&4&u.u?w(y):u.raf(y))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},y=()=>{b(p),b(m),(h=p.length>0)&&u.raf(y)},w=e=>f().then(e),$=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(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var O,S=new WeakMap,k=e=>"sc-"+e.p,C=e=>"object"==(e=typeof e)||"function"===e,E=(e,t,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof e&&!C(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?M(null,o):o),i=s)};if(c(n),t){t.key&&(l=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=M(e,null);return u.v=t,r.length>0&&(u.$=r),u.j=l,u},M=(e,t)=>({u:0,O:e,m:null!=t?t:null,S:null,$:null,v:null,j:null}),x={},N=(e,t)=>null==e||C(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?e+"":e,P=e=>{var t;return null==(t=n(e))?void 0:t.$hostElement$},R=(e,t)=>{const n=P(e);return{emit:e=>D(n,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},D=(e,t,n)=>{const o=u.ce(t,n);return e.dispatchEvent(o),o},L=(e,t,n,o,s,i)=>{if(n===o)return;let r=l(e,t),f=t.toLowerCase();if("class"===t){const t=e.classList,l=A(n);let s=A(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(r||"o"!==t[0]||"n"!==t[1]){const l=C(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&1===e.nodeType&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(c,f)?f.slice(2):f[2]+t.slice(3),n||o){const l=t.endsWith(T);t=t.replace(W,""),n&&u.rel(e,t,n,l),o&&u.ael(e,t,o,l)}},U=/\s/,A=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(U):[]),T="Capture",W=RegExp(T+"$"),F=(e,t,n)=>{const o=11===t.S.nodeType&&t.S.host?t.S.host:t.S,l=e&&e.v||{},s=t.v||{};for(const e of H(Object.keys(l)))e in s||L(o,e,l[e],void 0,n,t.u);for(const e of H(Object.keys(s)))L(o,e,l[e],s[e],n,t.u)};function H(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var V=!1,q=(e,t,n)=>{const o=t.$[n];let l,s,i=0;if(null!=o.m)l=o.S=c.document.createTextNode(o.m);else{if(V||(V="svg"===o.O),!c.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=c.document.createElementNS(V?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),V&&"foreignObject"===o.O&&(V=!1),F(null,o,V),o.$){const t="template"===o.O?l.content:l;for(i=0;i<o.$.length;++i)s=q(e,o,i),s&&t.appendChild(s)}"svg"===o.O?V=!1:"foreignObject"===l.tagName&&(V=!0)}return l["s-hn"]=O,l},z=(e,t,n,o,l,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=s;++l)o[l]&&(i=q(null,n,l),i&&(o[l].S=i,I(r,i,t)))},G=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.S;B(t),e&&e.remove()}}},Y=(e,t,n=!1)=>e.O===t.O&&(n?(n&&!e.j&&t.j&&(e.j=t.j),!0):e.j===t.j),_=(e,t,n=!1)=>{const o=t.S=e.S,l=e.$,s=t.$,i=t.O,r=t.m;null==r?(F(e,t,V="svg"===i||"foreignObject"!==i&&V),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=t.length-1,d=t[0],h=t[a],p=o.length-1,m=o[0],v=o[p];const b="template"===n.O?e.content:e;for(;r<=a&&c<=p;)if(null==d)d=t[++r];else if(null==h)h=t[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Y(d,m,l))_(d,m,l),d=t[++r],m=o[++c];else if(Y(h,v,l))_(h,v,l),h=t[--a],v=o[--p];else if(Y(d,v,l))_(d,v,l),I(b,d.S,h.S.nextSibling),d=t[++r],v=o[--p];else if(Y(h,m,l))_(h,m,l),I(b,h.S,d.S),h=t[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(t[f]&&null!==t[f].j&&t[f].j===m.j){u=f;break}u>=0?(i=t[u],i.O!==m.O?s=q(t&&t[c],n,u):(_(i,m,l),t[u]=void 0,s=i.S),m=o[++c]):(s=q(t&&t[c],n,c),m=o[++c]),s&&I(d.S.parentNode,s,d.S)}r>a?z(e,null==o[p+1]?null:o[p+1].S,n,o,c,p):c>p&&G(t,r,a)})(o,l,t,s,n):null!==s?(null!==e.m&&(o.textContent=""),z(o,null,t,s,0,s.length-1)):!n&&null!==l&&G(l,0,l.length-1),V&&"svg"===i&&(V=!1)):e.m!==r&&(o.data=r)},B=e=>{e.v&&e.v.ref&&e.v.ref(null),e.$&&e.$.map(B)},I=(e,t,n)=>e.__insertBefore?e.__insertBefore(t,n):null==e?void 0:e.insertBefore(t,n),J=(e,t)=>{if(t&&!e.k&&t["s-p"]){const n=t["s-p"].push(new Promise((o=>e.k=()=>{t["s-p"].splice(n-1,1),o()})))}},K=(e,t)=>{if(e.u|=16,4&e.u)return void(e.u|=512);J(e,e.C);const n=()=>Q(e,t);if(!t)return $(n);queueMicrotask((()=>{n()}))},Q=(e,t)=>{const n=e.$hostElement$,o=e.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 t?(e.M.length&&e.M.forEach((e=>e(n))),l=le(o,"componentWillLoad",void 0,n)):l=le(o,"componentWillUpdate",void 0,n),l=X(l,(()=>le(o,"componentWillRender",void 0,n))),X(l,(()=>ee(e,o,t)))},X=(e,t)=>Z(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),Z=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ee=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.o,n=e.$hostElement$,o=t.u,l=((e,t)=>{var n,o,l;const s=k(t),i=r.get(s);if(!c.document)return s;if(e=11===e.nodeType?e:c.document,i)if("string"==typeof i){let l,r=S.get(e=e.head||e);if(r||S.set(e,r=new Set),!r.has(s)){l=c.document.createElement("style"),l.textContent=i;const f=null!=(n=u.N)?n:j(c.document);if(null!=f&&l.setAttribute("nonce",f),!(1&t.u))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(l,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(a){const t=new(null!=(o=e.defaultView)?o:e.ownerDocument.defaultView).CSSStyleSheet;t.replaceSync(i),d?e.adoptedStyleSheets.unshift(t):e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.textContent=i+t.textContent:e.prepend(l)}else e.append(l);1&t.u&&e.insertBefore(l,null),4&t.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let t=S.get(e);if(t||S.set(e,t=new Set),!t.has(s)){const n=null!=(l=e.defaultView)?l:e.ownerDocument.defaultView;let o;if(i.constructor===n.CSSStyleSheet)o=i;else{o=new n.CSSStyleSheet;for(let e=0;e<i.cssRules.length;e++)o.insertRule(i.cssRules[e].cssText,e)}d?e.adoptedStyleSheets.push(o):e.adoptedStyleSheets=[...e.adoptedStyleSheets,o],t.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);te(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>ne(e);0===t.length?n():(Promise.all(t).then(n),e.u|=4,t.length=0)}},te=(e,t,n,o)=>{try{t=t.render(),e.u&=-17,e.u|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.P||M(null,null),s=(e=>e&&e.O===x)(t)?t:E(null,null,t);if(O=o.tagName,n&&s.v)for(const e of Object.keys(s.v))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.v[e]=o[e]);s.O=null,s.u|=4,e.P=s,s.S=l.S=o.shadowRoot||o,_(l,s,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},ne=e=>{const t=e.$hostElement$,n=e.i,o=e.C;le(n,"componentDidRender",void 0,t),64&e.u?le(n,"componentDidUpdate",void 0,t):(e.u|=64,se(t),le(n,"componentDidLoad",void 0,t),e.R(t),o||oe()),e.D(t),e.k&&(e.k(),e.k=void 0),512&e.u&&w((()=>K(e,!1))),e.u&=-517},oe=()=>{w((()=>D(c,"appload",{detail:{namespace:"staylift-widget"}})))},le=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,o)}},se=e=>e.classList.add("hydrated"),ie=(e,t,o,l)=>{const s=n(e);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 i=s.l.get(t),r=s.u,c=s.i;if(o=N(o,l.t[t][0]),!(8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.l.set(t,o),2!=(18&r)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,i,t))return;K(s,!1)}},re=(e,t,o)=>{var l,s;const i=e.prototype;if(t.t){const r=Object.entries(null!=(l=t.t)?l:{});if(r.map((([e,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.t[e][0]|=2048),r&&(t.t[e][0]|=4096),(1&o||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.t[e][0]))return((e,t)=>n(this).l.get(t))(0,e);const o=n(this),l=o?o.i:i;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(i){if(r)return void 0===(32&l?this[e]:i.$hostElement$[e])&&i.l.get(e)&&(s=i.l.get(e)),r.call(this,N(s,l)),void ie(this,e,s=32&l?this[e]:i.$hostElement$[e],t);{if(!(1&o&&4096&t.t[e][0]))return ie(this,e,s,t),void(1&o&&!i.i&&i.M.push((()=>{4096&t.t[e][0]&&i.i[e]!==i.l.get(e)&&(i.i[e]=s)})));const n=()=>{const n=i.i[e];!i.l.get(e)&&n&&i.l.set(e,n),i.i[e]=N(s,l),ie(this,e,i.i[e],t)};i.i?n():i.M.push((()=>{n()}))}}}})}else 1&o&&64&l&&Object.defineProperty(i,e,{value(...t){var o;const l=n(this);return null==(o=null==l?void 0:l.L)?void 0:o.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){u.jmp((()=>{var c;const u=o.get(e),f=n(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const n=null==f?void 0:f.u;if(f&&n&&!(8&n)&&s!==l){const o=f.i,i=null==(c=t.U)?void 0:c[e];null==i||i.forEach((t=>{const[[i,r]]=Object.entries(t);null!=o[i]&&(128&n||1&r)&&o[i].call(o,s,l,e)}))}return}const a=r.find((([e])=>e===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.U)?s:{}),...r.filter((([e,t])=>31&t[0])).map((([e,t])=>{const n=t[1]||e;return o.set(n,e),n}))]))}}return e},ce=(e,t)=>{le(e,"connectedCallback",void 0,t)},ue=(e,t)=>{le(e,"disconnectedCallback",void 0,t||e)},fe=(e,t={})=>{var o;if(!c.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],f=t.exclude||[],d=c.customElements,h=c.document.head,p=h.querySelector("meta[charset]"),m=c.document.createElement("style"),v=[];let b,y=!0;if(Object.assign(u,t),u.h=new URL(t.resourcesUrl||"./",c.document.baseURI).href,e.map((e=>{e[1].map((t=>{const o={u:t[0],p:t[1],t:t[2],A:t[3]};o.t=t[2];const c=o.p,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(e){if(super(e),((e,t)=>{const n={u:0,$hostElement$:e,o:t,l:new Map,T:new Map};n.L=new Promise((e=>n.D=e)),n.W=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],n.M=[];const o=n;e.__stencil__getHostRef=()=>o})(e=this,o),1&o.u)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(e,o)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),y?v.push(this):u.jmp((()=>(e=>{if(!(1&u.u)){const t=n(e);if(!t)return;const o=t.o,l=()=>{};if(1&t.u)(null==t?void 0:t.i)?ce(t.i,e):(null==t?void 0:t.W)&&t.W.then((()=>ce(t.i,e)));else{t.u|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){J(t,t.C=n);break}}o.t&&Object.entries(o.t).map((([t,[n]])=>{if(31&n&&t in e&&e[t]!==Object.prototype[t]){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.u)){if(t.u|=32,n.F){const l=((e,t)=>{const n=e.p.replace(/-/g,"_"),o=e.F;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((e=>(i.set(o,e),e[n])),(e=>{s(e,t.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(l&&"then"in l){const e=()=>{};o=await l,e()}else o=l;if(!o)throw Error(`Constructor for "${n.p}#${t.H}" was not found`);o.isProxied||(re(o,n,2),o.isProxied=!0);const r=()=>{};t.u|=8;try{new o(t)}catch(t){s(t,e)}t.u&=-9,r(),ce(t.i,e)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.u|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=k(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.u)),o()}}}const l=t.C,c=()=>K(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this))))}disconnectedCallback(){u.jmp((()=>(async e=>{if(!(1&u.u)){const t=n(e);(null==t?void 0:t.i)?ue(t.i,e):(null==t?void 0:t.W)&&t.W.then((()=>ue(t.i,e)))}S.has(e)&&S.delete(e),e.shadowRoot&&S.has(e.shadowRoot)&&S.delete(e.shadowRoot)})(this))),u.raf((()=>{var e;const t=n(this);if(!t)return;const o=v.findIndex((e=>e===this));o>-1&&v.splice(o,1),(null==(e=null==t?void 0:t.P)?void 0:e.S)instanceof Node&&!t.P.S.isConnected&&delete t.P.S}))}componentOnReady(){var e;return null==(e=n(this))?void 0:e.W}};o.F=e[0],f.includes(c)||d.get(c)||(l.push(c),d.define(c,re(h,o,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const e=null!=(o=u.N)?o:j(c.document);null!=e&&m.setAttribute("nonce",e),h.insertBefore(m,p?p.nextSibling:h.firstChild)}y=!1,v.length?v.map((e=>e.connectedCallback())):u.jmp((()=>b=setTimeout(oe,30)))},ae=e=>u.N=e;export{fe as b,R as c,P as g,E as h,f as p,o as r,ae as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,b as a}from"./p-DAtfDq5B.js";export{s as setNonce}from"./p-DAtfDq5B.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,o={};return""!==a&&(o.resourcesUrl=new URL(".",a).href),t(o)})().then((async t=>(await o(),a([["p-37510f2e",[[1,"staylift-orb",{inputVolume:[2,"input-volume"],outputVolume:[2,"output-volume"],isActive:[4,"is-active"],primaryColor:[1,"primary-color"],size:[8],animationFrame:[32]}]]],["p-94923740",[[1,"staylift-widget",{agentId:[1,"agent-id"],positionX:[1,"position-x"],positionY:[1,"position-y"],variant:[1],mode:[1],primaryColor:[1,"primary-color"],brandName:[1,"brand-name"],language:[1],autoExpand:[4,"auto-expand"],showBranding:[4,"show-branding"],avatarUrl:[1,"avatar-url"],fabPrompt:[1,"fab-prompt"],fabButtonText:[1,"fab-button-text"],status:[32],isExpanded:[32],termsAccepted:[32],errorMessage:[32],inputVolume:[32],outputVolume:[32],messages:[32],inputText:[32],copiedIndex:[32],startConversation:[64],endConversation:[64],getStatus:[64],sendMessage:[64]}]]]],t))));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class StayliftOrb {
|
|
2
|
+
el: HTMLElement;
|
|
3
|
+
inputVolume: number;
|
|
4
|
+
outputVolume: number;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
primaryColor?: string;
|
|
7
|
+
size?: 'small' | 'medium' | 'large' | number;
|
|
8
|
+
animationFrame: number;
|
|
9
|
+
private canvasRef?;
|
|
10
|
+
private rafId;
|
|
11
|
+
private ctx;
|
|
12
|
+
componentDidLoad(): void;
|
|
13
|
+
disconnectedCallback(): void;
|
|
14
|
+
private setupCanvas;
|
|
15
|
+
private startAnimation;
|
|
16
|
+
private drawOrb;
|
|
17
|
+
private hexToRgb;
|
|
18
|
+
render(): any;
|
|
19
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export type WidgetStatus = 'disconnected' | 'connecting' | 'connected' | 'disconnecting';
|
|
3
|
+
export type WidgetPositionX = 'left' | 'center' | 'right';
|
|
4
|
+
export type WidgetPositionY = 'top' | 'bottom';
|
|
5
|
+
export type WidgetVariant = 'floating' | 'inline';
|
|
6
|
+
export type WidgetMode = 'light' | 'dark';
|
|
7
|
+
interface ChatMessage {
|
|
8
|
+
role: 'user' | 'assistant';
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class StayliftWidget {
|
|
12
|
+
el: HTMLElement;
|
|
13
|
+
agentId: string;
|
|
14
|
+
positionX: WidgetPositionX;
|
|
15
|
+
positionY: WidgetPositionY;
|
|
16
|
+
variant: WidgetVariant;
|
|
17
|
+
mode: WidgetMode;
|
|
18
|
+
primaryColor: string;
|
|
19
|
+
brandName: string;
|
|
20
|
+
language: string;
|
|
21
|
+
autoExpand: boolean;
|
|
22
|
+
showBranding: boolean;
|
|
23
|
+
avatarUrl?: string;
|
|
24
|
+
fabPrompt: string;
|
|
25
|
+
fabButtonText: string;
|
|
26
|
+
status: WidgetStatus;
|
|
27
|
+
isExpanded: boolean;
|
|
28
|
+
termsAccepted: boolean;
|
|
29
|
+
errorMessage: string | null;
|
|
30
|
+
inputVolume: number;
|
|
31
|
+
outputVolume: number;
|
|
32
|
+
messages: ChatMessage[];
|
|
33
|
+
inputText: string;
|
|
34
|
+
copiedIndex: number | null;
|
|
35
|
+
conversationStarted: EventEmitter<void>;
|
|
36
|
+
conversationEnded: EventEmitter<void>;
|
|
37
|
+
widgetError: EventEmitter<{
|
|
38
|
+
message: string;
|
|
39
|
+
code?: string;
|
|
40
|
+
}>;
|
|
41
|
+
statusChanged: EventEmitter<WidgetStatus>;
|
|
42
|
+
messageReceived: EventEmitter<ChatMessage>;
|
|
43
|
+
private conversation;
|
|
44
|
+
private volumeInterval;
|
|
45
|
+
private messagesContainer;
|
|
46
|
+
private mediaStream;
|
|
47
|
+
private isTextOnlyMode;
|
|
48
|
+
componentWillLoad(): void;
|
|
49
|
+
disconnectedCallback(): void;
|
|
50
|
+
startConversation(textOnly?: boolean): Promise<void>;
|
|
51
|
+
endConversation(): Promise<void>;
|
|
52
|
+
getStatus(): Promise<WidgetStatus>;
|
|
53
|
+
sendMessage(text: string): Promise<void>;
|
|
54
|
+
private scrollToBottom;
|
|
55
|
+
private getMicStream;
|
|
56
|
+
private handleStartConversation;
|
|
57
|
+
private handleEndConversation;
|
|
58
|
+
private pendingMessage;
|
|
59
|
+
private handleSendText;
|
|
60
|
+
private handleVoiceButton;
|
|
61
|
+
private handleInputKeyDown;
|
|
62
|
+
private handleInputChange;
|
|
63
|
+
private startVolumeMonitoring;
|
|
64
|
+
private stopVolumeMonitoring;
|
|
65
|
+
private cleanup;
|
|
66
|
+
private handleToggleExpand;
|
|
67
|
+
private copyToClipboard;
|
|
68
|
+
private t;
|
|
69
|
+
private handleAcceptTerms;
|
|
70
|
+
private handleDeclineTerms;
|
|
71
|
+
private getPositionClasses;
|
|
72
|
+
private getThemeColors;
|
|
73
|
+
render(): any;
|
|
74
|
+
private renderCard;
|
|
75
|
+
private renderTerms;
|
|
76
|
+
private renderHeader;
|
|
77
|
+
private renderContent;
|
|
78
|
+
private renderFooter;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { WidgetMode, WidgetPositionX, WidgetPositionY, WidgetStatus, WidgetVariant } from "./components/staylift-widget/staylift-widget";
|
|
9
|
+
export { WidgetMode, WidgetPositionX, WidgetPositionY, WidgetStatus, WidgetVariant } from "./components/staylift-widget/staylift-widget";
|
|
10
|
+
export namespace Components {
|
|
11
|
+
interface StayliftOrb {
|
|
12
|
+
/**
|
|
13
|
+
* @default 0
|
|
14
|
+
*/
|
|
15
|
+
"inputVolume": number;
|
|
16
|
+
/**
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
"isActive": boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
"outputVolume": number;
|
|
24
|
+
/**
|
|
25
|
+
* @default '#6366f1'
|
|
26
|
+
*/
|
|
27
|
+
"primaryColor"?: string;
|
|
28
|
+
/**
|
|
29
|
+
* @default 'medium'
|
|
30
|
+
*/
|
|
31
|
+
"size"?: 'small' | 'medium' | 'large' | number;
|
|
32
|
+
}
|
|
33
|
+
interface StayliftWidget {
|
|
34
|
+
"agentId": string;
|
|
35
|
+
/**
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
"autoExpand": boolean;
|
|
39
|
+
"avatarUrl"?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @default 'Customer Support'
|
|
42
|
+
*/
|
|
43
|
+
"brandName": string;
|
|
44
|
+
"endConversation": () => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* @default 'Start'
|
|
47
|
+
*/
|
|
48
|
+
"fabButtonText": string;
|
|
49
|
+
/**
|
|
50
|
+
* @default 'Do you need help?'
|
|
51
|
+
*/
|
|
52
|
+
"fabPrompt": string;
|
|
53
|
+
"getStatus": () => Promise<WidgetStatus>;
|
|
54
|
+
/**
|
|
55
|
+
* @default 'en'
|
|
56
|
+
*/
|
|
57
|
+
"language": string;
|
|
58
|
+
/**
|
|
59
|
+
* @default 'dark'
|
|
60
|
+
*/
|
|
61
|
+
"mode": WidgetMode;
|
|
62
|
+
/**
|
|
63
|
+
* @default 'right'
|
|
64
|
+
*/
|
|
65
|
+
"positionX": WidgetPositionX;
|
|
66
|
+
/**
|
|
67
|
+
* @default 'bottom'
|
|
68
|
+
*/
|
|
69
|
+
"positionY": WidgetPositionY;
|
|
70
|
+
/**
|
|
71
|
+
* @default '#6366f1'
|
|
72
|
+
*/
|
|
73
|
+
"primaryColor": string;
|
|
74
|
+
"sendMessage": (text: string) => Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
"showBranding": boolean;
|
|
79
|
+
"startConversation": (textOnly?: boolean) => Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* @default 'floating'
|
|
82
|
+
*/
|
|
83
|
+
"variant": WidgetVariant;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export interface StayliftWidgetCustomEvent<T> extends CustomEvent<T> {
|
|
87
|
+
detail: T;
|
|
88
|
+
target: HTMLStayliftWidgetElement;
|
|
89
|
+
}
|
|
90
|
+
declare global {
|
|
91
|
+
interface HTMLStayliftOrbElement extends Components.StayliftOrb, HTMLStencilElement {
|
|
92
|
+
}
|
|
93
|
+
var HTMLStayliftOrbElement: {
|
|
94
|
+
prototype: HTMLStayliftOrbElement;
|
|
95
|
+
new (): HTMLStayliftOrbElement;
|
|
96
|
+
};
|
|
97
|
+
interface HTMLStayliftWidgetElementEventMap {
|
|
98
|
+
"conversationStarted": void;
|
|
99
|
+
"conversationEnded": void;
|
|
100
|
+
"widgetError": { message: string; code?: string };
|
|
101
|
+
"statusChanged": WidgetStatus;
|
|
102
|
+
"messageReceived": ChatMessage;
|
|
103
|
+
}
|
|
104
|
+
interface HTMLStayliftWidgetElement extends Components.StayliftWidget, HTMLStencilElement {
|
|
105
|
+
addEventListener<K extends keyof HTMLStayliftWidgetElementEventMap>(type: K, listener: (this: HTMLStayliftWidgetElement, ev: StayliftWidgetCustomEvent<HTMLStayliftWidgetElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
106
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
107
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
108
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
109
|
+
removeEventListener<K extends keyof HTMLStayliftWidgetElementEventMap>(type: K, listener: (this: HTMLStayliftWidgetElement, ev: StayliftWidgetCustomEvent<HTMLStayliftWidgetElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
110
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
111
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
112
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
113
|
+
}
|
|
114
|
+
var HTMLStayliftWidgetElement: {
|
|
115
|
+
prototype: HTMLStayliftWidgetElement;
|
|
116
|
+
new (): HTMLStayliftWidgetElement;
|
|
117
|
+
};
|
|
118
|
+
interface HTMLElementTagNameMap {
|
|
119
|
+
"staylift-orb": HTMLStayliftOrbElement;
|
|
120
|
+
"staylift-widget": HTMLStayliftWidgetElement;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
declare namespace LocalJSX {
|
|
124
|
+
interface StayliftOrb {
|
|
125
|
+
/**
|
|
126
|
+
* @default 0
|
|
127
|
+
*/
|
|
128
|
+
"inputVolume"?: number;
|
|
129
|
+
/**
|
|
130
|
+
* @default false
|
|
131
|
+
*/
|
|
132
|
+
"isActive"?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* @default 0
|
|
135
|
+
*/
|
|
136
|
+
"outputVolume"?: number;
|
|
137
|
+
/**
|
|
138
|
+
* @default '#6366f1'
|
|
139
|
+
*/
|
|
140
|
+
"primaryColor"?: string;
|
|
141
|
+
/**
|
|
142
|
+
* @default 'medium'
|
|
143
|
+
*/
|
|
144
|
+
"size"?: 'small' | 'medium' | 'large' | number;
|
|
145
|
+
}
|
|
146
|
+
interface StayliftWidget {
|
|
147
|
+
"agentId": string;
|
|
148
|
+
/**
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
"autoExpand"?: boolean;
|
|
152
|
+
"avatarUrl"?: string;
|
|
153
|
+
/**
|
|
154
|
+
* @default 'Customer Support'
|
|
155
|
+
*/
|
|
156
|
+
"brandName"?: string;
|
|
157
|
+
/**
|
|
158
|
+
* @default 'Start'
|
|
159
|
+
*/
|
|
160
|
+
"fabButtonText"?: string;
|
|
161
|
+
/**
|
|
162
|
+
* @default 'Do you need help?'
|
|
163
|
+
*/
|
|
164
|
+
"fabPrompt"?: string;
|
|
165
|
+
/**
|
|
166
|
+
* @default 'en'
|
|
167
|
+
*/
|
|
168
|
+
"language"?: string;
|
|
169
|
+
/**
|
|
170
|
+
* @default 'dark'
|
|
171
|
+
*/
|
|
172
|
+
"mode"?: WidgetMode;
|
|
173
|
+
"onConversationEnded"?: (event: StayliftWidgetCustomEvent<void>) => void;
|
|
174
|
+
"onConversationStarted"?: (event: StayliftWidgetCustomEvent<void>) => void;
|
|
175
|
+
"onMessageReceived"?: (event: StayliftWidgetCustomEvent<ChatMessage>) => void;
|
|
176
|
+
"onStatusChanged"?: (event: StayliftWidgetCustomEvent<WidgetStatus>) => void;
|
|
177
|
+
"onWidgetError"?: (event: StayliftWidgetCustomEvent<{ message: string; code?: string }>) => void;
|
|
178
|
+
/**
|
|
179
|
+
* @default 'right'
|
|
180
|
+
*/
|
|
181
|
+
"positionX"?: WidgetPositionX;
|
|
182
|
+
/**
|
|
183
|
+
* @default 'bottom'
|
|
184
|
+
*/
|
|
185
|
+
"positionY"?: WidgetPositionY;
|
|
186
|
+
/**
|
|
187
|
+
* @default '#6366f1'
|
|
188
|
+
*/
|
|
189
|
+
"primaryColor"?: string;
|
|
190
|
+
/**
|
|
191
|
+
* @default true
|
|
192
|
+
*/
|
|
193
|
+
"showBranding"?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* @default 'floating'
|
|
196
|
+
*/
|
|
197
|
+
"variant"?: WidgetVariant;
|
|
198
|
+
}
|
|
199
|
+
interface IntrinsicElements {
|
|
200
|
+
"staylift-orb": StayliftOrb;
|
|
201
|
+
"staylift-widget": StayliftWidget;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export { LocalJSX as JSX };
|
|
205
|
+
declare module "@stencil/core" {
|
|
206
|
+
export namespace JSX {
|
|
207
|
+
interface IntrinsicElements {
|
|
208
|
+
"staylift-orb": LocalJSX.StayliftOrb & JSXBase.HTMLAttributes<HTMLStayliftOrbElement>;
|
|
209
|
+
"staylift-widget": LocalJSX.StayliftWidget & JSXBase.HTMLAttributes<HTMLStayliftWidgetElement>;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|