rio-assist-widget 0.1.0 → 0.1.2

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.
@@ -1,1087 +1,1087 @@
1
- (function(){"use strict";var ve;var l=typeof document<"u"?document.currentScript:null;/**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const O=globalThis,j=O.ShadowRoot&&(O.ShadyCSS===void 0||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),q=new WeakMap;let W=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(j&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=q.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&q.set(t,e))}return e}toString(){return this.cssText}};const xe=n=>new W(typeof n=="string"?n:n+"",void 0,D),$=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new W(t,n,D)},we=(n,e)=>{if(j)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=O.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)}},Z=j?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return xe(t)})(n):n;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:ye,defineProperty:Ce,getOwnPropertyDescriptor:Se,getOwnPropertyNames:Ee,getOwnPropertySymbols:Ue,getPrototypeOf:$e}=Object,b=globalThis,J=b.trustedTypes,Ie=J?J.emptyScript:"",V=b.reactiveElementPolyfillSupport,I=(n,e)=>n,H={toAttribute(n,e){switch(e){case Boolean:n=n?Ie:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},ee=(n,e)=>!ye(n,e),te={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:ee};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),b.litPropertyMetadata??(b.litPropertyMetadata=new WeakMap);let E=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=te){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Ce(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:r}=Se(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const c=i==null?void 0:i.call(this);r==null||r.call(this,o),this.requestUpdate(e,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??te}static _$Ei(){if(this.hasOwnProperty(I("elementProperties")))return;const e=$e(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(I("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(I("properties"))){const t=this.properties,s=[...Ee(t),...Ue(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Z(i))}else e!==void 0&&t.push(Z(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return we(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var r;const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:H).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var r,o;const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const c=s.getPropertyOptions(i),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((r=c.converter)==null?void 0:r.fromAttribute)!==void 0?c.converter:H;this._$Em=i;const d=a.fromAttribute(t,c.type);this[i]=d??((o=this._$Ej)==null?void 0:o.get(i))??d,this._$Em=null}}requestUpdate(e,t,s){var i;if(e!==void 0){const r=this.constructor,o=this[e];if(s??(s=r.getPropertyOptions(e)),!((s.hasChanged??ee)(o,t)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i){const{wrapped:c}=o,a=this[r];c!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,o,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[I("elementProperties")]=new Map,E[I("finalized")]=new Map,V==null||V({ReactiveElement:E}),(b.reactiveElementVersions??(b.reactiveElementVersions=[])).push("2.1.1");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const R=globalThis,Q=R.trustedTypes,se=Q?Q.createPolicy("lit-html",{createHTML:n=>n}):void 0,ie="$lit$",m=`lit$${Math.random().toFixed(9).slice(2)}$`,ne="?"+m,Re=`<${ne}>`,w=document,_=()=>w.createComment(""),B=n=>n===null||typeof n!="object"&&typeof n!="function",F=Array.isArray,_e=n=>F(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",z=`[
14
- \f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,re=/-->/g,oe=/>/g,y=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ae=/'/g,le=/"/g,ce=/^(?:script|style|textarea|title)$/i,Be=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),p=Be(1),v=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),he=new WeakMap,C=w.createTreeWalker(w,129);function de(n,e){if(!F(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return se!==void 0?se.createHTML(e):e}const ke=(n,e)=>{const t=n.length-1,s=[];let i,r=e===2?"<svg>":e===3?"<math>":"",o=k;for(let c=0;c<t;c++){const a=n[c];let d,A,h=-1,f=0;for(;f<a.length&&(o.lastIndex=f,A=o.exec(a),A!==null);)f=o.lastIndex,o===k?A[1]==="!--"?o=re:A[1]!==void 0?o=oe:A[2]!==void 0?(ce.test(A[2])&&(i=RegExp("</"+A[2],"g")),o=y):A[3]!==void 0&&(o=y):o===y?A[0]===">"?(o=i??k,h=-1):A[1]===void 0?h=-2:(h=o.lastIndex-A[2].length,d=A[1],o=A[3]===void 0?y:A[3]==='"'?le:ae):o===le||o===ae?o=y:o===re||o===oe?o=k:(o=y,i=void 0);const x=o===y&&n[c+1].startsWith("/>")?" ":"";r+=o===k?a+Re:h>=0?(s.push(d),a.slice(0,h)+ie+a.slice(h)+m+x):a+m+(h===-2?c:x)}return[de(n,r+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class M{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let r=0,o=0;const c=e.length-1,a=this.parts,[d,A]=ke(e,t);if(this.el=M.createElement(d,s),C.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=C.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(ie)){const f=A[o++],x=i.getAttribute(h).split(m),Y=/([.?@])?(.*)/.exec(f);a.push({type:1,index:r,name:Y[2],strings:x,ctor:Y[1]==="."?Pe:Y[1]==="?"?Te:Y[1]==="@"?Oe:N}),i.removeAttribute(h)}else h.startsWith(m)&&(a.push({type:6,index:r}),i.removeAttribute(h));if(ce.test(i.tagName)){const h=i.textContent.split(m),f=h.length-1;if(f>0){i.textContent=Q?Q.emptyScript:"";for(let x=0;x<f;x++)i.append(h[x],_()),C.nextNode(),a.push({type:2,index:++r});i.append(h[f],_())}}}else if(i.nodeType===8)if(i.data===ne)a.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(m,h+1))!==-1;)a.push({type:7,index:r}),h+=m.length-1}r++}}static createElement(e,t){const s=w.createElement("template");return s.innerHTML=e,s}}function U(n,e,t=n,s){var o,c;if(e===v)return e;let i=s!==void 0?(o=t._$Co)==null?void 0:o[s]:t._$Cl;const r=B(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),r===void 0?i=void 0:(i=new r(n),i._$AT(n,t,s)),s!==void 0?(t._$Co??(t._$Co=[]))[s]=i:t._$Cl=i),i!==void 0&&(e=U(n,i._$AS(n,e.values),i,s)),e}class Me{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=((e==null?void 0:e.creationScope)??w).importNode(t,!0);C.currentNode=i;let r=C.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new P(r,r.nextSibling,this,e):a.type===1?d=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(d=new Qe(r,this,e)),this._$AV.push(d),a=s[++c]}o!==(a==null?void 0:a.index)&&(r=C.nextNode(),o++)}return C.currentNode=w,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class P{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=U(this,e,t),B(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==v&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):_e(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==u&&B(this._$AH)?this._$AA.nextSibling.data=e:this.T(w.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=M.createElement(de(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(t);else{const o=new Me(i,this),c=o.u(this.options);o.p(t),this.T(c),this._$AH=o}}_$AC(e){let t=he.get(e.strings);return t===void 0&&he.set(e.strings,t=new M(e)),t}k(e){F(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const r of e)i===t.length?t.push(s=new P(this.O(_()),this.O(_()),this,this.options)):s=t[i],s._$AI(r),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,t);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(e,t=this,s,i){const r=this.strings;let o=!1;if(r===void 0)e=U(this,e,t,0),o=!B(e)||e!==this._$AH&&e!==v,o&&(this._$AH=e);else{const c=e;let a,d;for(e=r[0],a=0;a<r.length-1;a++)d=U(this,c[s+a],t,a),d===v&&(d=this._$AH[a]),o||(o=!B(d)||d!==this._$AH[a]),d===u?e=u:e!==u&&(e+=(d??"")+r[a+1]),this._$AH[a]=d}o&&!i&&this.j(e)}j(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Pe extends N{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class Te extends N{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class Oe extends N{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){if((e=U(this,e,t,0)??u)===v)return;const s=this._$AH,i=e===u&&s!==u||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class Qe{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}}const X=R.litHtmlPolyfillSupport;X==null||X(M,P),(R.litHtmlVersions??(R.litHtmlVersions=[])).push("3.3.1");const Ne=(n,e,t)=>{const s=(t==null?void 0:t.renderBefore)??e;let i=s._$litPart$;if(i===void 0){const r=(t==null?void 0:t.renderBefore)??null;s._$litPart$=i=new P(e.insertBefore(_(),r),r,void 0,t??{})}return i._$AI(n),i};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */const S=globalThis;let T=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ne(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return v}};T._$litElement$=!0,T.finalized=!0,(ve=S.litElementHydrateSupport)==null||ve.call(S,{LitElement:T});const G=S.litElementPolyfillSupport;G==null||G({LitElement:T}),(S.litElementVersions??(S.litElementVersions=[])).push("4.2.1");const Le=$`
20
- .floating-button {
21
- position: absolute;
22
- pointer-events: auto;
23
- right: 0;
24
- bottom: 32px;
25
- width: 160px;
26
- height: 64px;
27
- padding: 0 26px 0 10px;
28
- box-sizing: border-box;
29
- display: inline-flex;
30
- align-items: center;
31
- gap: 8px;
32
- color: #fff;
33
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
34
- font-weight: 700;
35
- font-size: 18px;
36
- letter-spacing: -0.2px;
37
- border-radius: 32px 0 0 32px;
38
- box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
39
- }
40
-
41
- .floating-button img {
42
- width: 40px;
43
- height: 40px;
44
- flex-shrink: 0;
45
- display: block;
46
- }
47
-
48
- .floating-button span {
49
- white-space: nowrap;
50
- line-height: 1;
51
- display: inline-block;
52
- flex: 1;
53
- text-align: left;
54
- }
55
-
56
- .floating-button:hover {
57
- box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3);
58
- }
59
-
60
- .canvas--fullscreen .floating-button {
61
- opacity: 0;
62
- pointer-events: none;
63
- }
64
- `,Ye=$`
65
- .canvas {
66
- position: absolute;
67
- inset: 0;
68
- pointer-events: none;
69
- }
70
-
71
- .panel {
72
- --header-height: 120px;
73
- pointer-events: auto;
74
- position: fixed;
75
- top: 0;
76
- right: 0;
77
- height: 100vh;
78
- width: min(600px, 100vw);
79
- max-width: 90vw;
80
- background: #fff;
81
- box-shadow: -24px 0 48px rgba(0, 0, 0, 0.15);
82
- transform: translateX(100%);
83
- transition: transform 0.35s ease;
84
- display: flex;
85
- flex-direction: column;
86
- overflow: hidden;
87
- }
88
-
89
- .panel.open {
90
- transform: translateX(0);
91
- }
92
-
93
- .panel-header {
94
- display: flex;
95
- flex-direction: column;
96
- gap: 16px;
97
- padding: 20px 8px 15px 28px;
98
- border-bottom: 1px solid #e4eaee;
99
- }
100
-
101
- .panel-header__top {
102
- display: flex;
103
- justify-content: space-between;
104
- align-items: center;
105
- width: 100%;
106
- }
107
-
108
- .panel-title {
109
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
110
- font-size: 16px;
111
- font-weight: 600;
112
- letter-spacing: 0;
113
- color: #1c2a33;
114
- padding-left: 0px;
115
- }
116
-
117
- .panel-header__actions {
118
- display: flex;
119
- justify-content: space-between;
120
- align-items: center;
121
- width: 100%;
122
- }
123
-
124
- .conversations-button {
125
- display: inline-flex;
126
- align-items: center;
127
- gap: 12px;
128
- padding: 8px 0;
129
- padding-left: 0px;
130
- border: none;
131
- background: transparent;
132
- color: #008b9a;
133
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
134
- font-weight: 600;
135
- font-size: 16px;
136
- }
137
-
138
- .conversations-button img {
139
- width: 24px;
140
- height: 24px;
141
- }
142
-
143
- .panel-header__icons {
144
- display: inline-flex;
145
- gap: 16px;
146
- align-items: center;
147
- padding-right: 12px;
148
- }
149
-
150
- .panel-header__icon-button {
151
- width: 32px;
152
- height: 32px;
153
- border-radius: 50%;
154
- border: none;
155
- background: transparent;
156
- display: grid;
157
- place-items: center;
158
- }
159
-
160
- .conversations-plus-button {
161
- margin-right: 4px;
162
- }
163
-
164
- .panel-header__icon-button img {
165
- width: 28px;
166
- height: 28px;
167
- }
168
-
169
- .panel-body {
170
- flex: 1;
171
- padding: 48px 32px 12px;
172
- display: flex;
173
- flex-direction: column;
174
- align-items: center;
175
- gap: 16px;
176
- max-width: 520px;
177
- margin: 0 auto;
178
- width: 100%;
179
- min-height: 0;
180
- overflow: hidden;
181
- }
182
-
183
- .panel-content {
184
- flex: 1;
185
- width: 100%;
186
- overflow-y: auto;
187
- }
188
-
189
- .panel-content--empty {
190
- display: flex;
191
- align-items: center;
192
- justify-content: center;
193
- }
194
-
195
- .hero-card {
196
- flex: 1;
197
- display: flex;
198
- align-items: center;
199
- justify-content: center;
200
- flex-direction: column;
201
- gap: 24px;
202
- color: #25323d;
203
- text-align: center;
204
- width: 100%;
205
- max-width: 360px;
206
- min-height: 280px;
207
- }
208
-
209
- .hero-card__icon {
210
- width: 120px;
211
- height: 120px;
212
- display: block;
213
- margin-bottom: 8px;
214
- }
215
-
216
- .hero-card h3 {
217
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
218
- font-weight: 400;
219
- font-size: 32px;
220
- line-height: 1;
221
- white-space: nowrap;
222
- color: #2a3740;
223
- margin: 0;
224
- }
225
-
226
- .conversation {
227
- width: 100%;
228
- display: flex;
229
- flex-direction: column;
230
- gap: 16px;
231
- }
232
-
233
- .message {
234
- border-radius: 16px;
235
- border: 1px solid #e4eaee;
236
- padding: 12px 16px;
237
- max-width: 90%;
238
- background: #fff;
239
- color: #1f2f36;
240
- font-size: 15px;
241
- }
242
-
243
- .message--user {
244
- align-self: flex-end;
245
- background: #e3f3f6;
246
- border-color: #cde6ea;
247
- color: #00596b;
248
- }
249
-
250
- .message time {
251
- display: block;
252
- font-size: 11px;
253
- margin-top: 6px;
254
- color: #8a98a4;
255
- text-align: right;
256
- }
257
-
258
- .typing {
259
- font-style: italic;
260
- opacity: 0.75;
261
- }
262
-
263
- .panel-footer {
264
- width: 100%;
265
- display: flex;
266
- flex-direction: column;
267
- align-items: center;
268
- gap: 12px;
269
- padding-top: 8px;
270
- margin-top: auto;
271
- }
272
-
273
- .suggestions {
274
- display: inline-flex;
275
- gap: 12px;
276
- justify-content: center;
277
- }
278
-
279
- .suggestions-wrapper {
280
- width: 100%;
281
- text-align: center;
282
- margin-bottom: 6px;
283
- }
284
-
285
- .suggestions-label {
286
- text-align: center;
287
- font-size: 14px;
288
- color: #a7afbb;
289
- margin-bottom: 12px;
290
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
291
- font-weight: 500;
292
- letter-spacing: 0;
293
- }
294
-
295
- .suggestion {
296
- border-radius: 999px;
297
- border: 1px solid #d6e2e6;
298
- padding: 0 16px;
299
- background: #fff;
300
- font-size: 14px;
301
- line-height: 24px;
302
- min-height: 24px;
303
- color: #a7afbb;
304
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
305
- font-weight: 500;
306
- white-space: nowrap;
307
- }
308
-
309
- form {
310
- display: flex;
311
- align-items: center;
312
- gap: 12px;
313
- border: 1px solid #a4afbb;
314
- border-radius: 80px;
315
- padding: 10px 20px;
316
- background: #fff;
317
- width: 100%;
318
- max-width: 520px;
319
- margin-bottom: 0;
320
- max-height: 56px;
321
- }
322
-
323
- form input {
324
- border: none;
325
- flex: 1;
326
- font: inherit;
327
- outline: none;
328
- font-size: 16px;
329
- font-style: normal;
330
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
331
- font-weight: 400;
332
- }
333
-
334
- form input::placeholder {
335
- font-style: italic;
336
- font-size: 16px;
337
- color: #a7afbb;
338
- }
339
-
340
- .input-button {
341
- width: 32px;
342
- height: 32px;
343
- border-radius: 50%;
344
- border: none;
345
- background: transparent;
346
- display: flex;
347
- align-items: center;
348
- justify-content: center;
349
- }
350
-
351
- .input-button img {
352
- width: 32px;
353
- height: 32px;
354
- }
355
-
356
- .input-button:disabled {
357
- opacity: 0.5;
358
- cursor: not-allowed;
359
- }
360
-
361
- .footnote {
362
- margin-top: 0;
363
- padding-top: 0;
364
- padding-bottom: 0;
365
- font-size: 12px;
366
- color: #8a98a4;
367
- text-align: center;
368
- max-width: 520px;
369
- margin-left: auto;
370
- margin-right: auto;
371
- }
372
-
373
- .error-banner {
374
- width: 100%;
375
- padding: 10px 14px;
376
- border-radius: 12px;
377
- background: #fff4f2;
378
- color: #a33c3c;
379
- font-size: 13px;
380
- text-align: center;
381
- }
382
-
383
- .close-button {
384
- background: transparent;
385
- display: grid;
386
- place-items: center;
387
- color: #9ba5b2;
388
- font-size: 28px;
389
- font-weight: 600;
390
- line-height: 1;
391
- }
392
- `,je=$`
393
- .fullscreen-shell {
394
- position: fixed;
395
- inset: 0;
396
- background: #f5f7fa;
397
- display: flex;
398
- flex-direction: row;
399
- pointer-events: auto;
400
- z-index: 3;
401
- height: 100vh;
402
- }
403
-
404
- .fullscreen-shell__rail {
405
- width: 50px;
406
- background: #0d1117;
407
- display: flex;
408
- flex-direction: column;
409
- justify-content: space-between;
410
- align-items: center;
411
- padding: 6px 0 12px;
412
- }
413
-
414
- .fullscreen-shell__content {
415
- flex: 1;
416
- display: flex;
417
- flex-direction: column;
418
- overflow: hidden;
419
- }
420
-
421
- .rail-button {
422
- width: 38px;
423
- height: 38px;
424
- border: none;
425
- background: transparent;
426
- display: grid;
427
- place-items: center;
428
- cursor: pointer;
429
- color: #fff;
430
- padding: 0;
431
- }
432
-
433
- .rail-button img {
434
- width: 22px;
435
- height: 22px;
436
- }
437
-
438
- .rail-button svg {
439
- width: 18px;
440
- height: 18px;
441
- }
442
-
443
- .fullscreen-header {
444
- padding: 0 12px 0 4px;
445
- display: grid;
446
- grid-template-columns: 300px 1fr 138px;
447
- align-items: center;
448
- background: #fff;
449
- border-bottom: 1px solid #e0e6eb;
450
- height: 50px;
451
- column-gap: 8px;
452
- }
453
-
454
- .fullscreen-header__title {
455
- display: flex;
456
- flex-direction: column;
457
- gap: 2px;
458
- padding-left: 16px;
459
- align-self: stretch;
460
- justify-content: center;
461
- }
462
-
463
- .fullscreen-header__tabs {
464
- display: flex;
465
- align-items: stretch;
466
- height: 100%;
467
- position: relative;
468
- padding-left: 8px;
469
- }
470
-
471
- .fullscreen-header__brand {
472
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
473
- font-weight: 600;
474
- font-size: 18px;
475
- letter-spacing: 0;
476
- }
477
-
478
- .fullscreen-header__tab {
479
- font-size: 13px;
480
- font-weight: 600;
481
- letter-spacing: 1px;
482
- color: #1f2f36;
483
- text-transform: uppercase;
484
- border-bottom: 3px solid #000;
485
- padding: 0 0 0px;
486
- display: inline-flex;
487
- align-items: center;
488
- height: 100%;
489
- box-sizing: border-box;
490
- line-height: 1;
491
- }
492
-
493
- .fullscreen-header__actions {
494
- display: inline-flex;
495
- align-items: center;
496
- gap: 12px;
497
- justify-self: end;
498
- height: 100%;
499
- justify-content: flex-end;
500
- padding-right: 4px;
501
- }
502
-
503
- .fullscreen-header__icon {
504
- width: 24px;
505
- height: 24px;
506
- border: none;
507
- background: transparent;
508
- display: flex;
509
- align-items: center;
510
- justify-content: center;
511
- padding: 0;
512
- }
513
-
514
- .fullscreen-header__icon img {
515
- width: 24px;
516
- height: 24px;
517
- }
518
-
519
- .fullscreen-grid {
520
- flex: 1;
521
- display: grid;
522
- grid-template-columns: 300px minmax(0, 1fr);
523
- min-height: 0;
524
- background: linear-gradient(180deg, #eef3f6 0%, #fff 100%);
525
- }
526
-
527
- .fullscreen-chat {
528
- background: #fff;
529
- display: flex;
530
- flex-direction: column;
531
- align-items: center;
532
- padding: 36px 64px 18px;
533
- }
534
-
535
- .fullscreen-chat .panel-body {
536
- max-width: 920px;
537
- width: 100%;
538
- padding: 12px 48px 12px;
539
- }
540
-
541
- .fullscreen-chat .panel-footer {
542
- max-width: 640px;
543
- }
544
-
545
- .fullscreen-chat form {
546
- max-width: none;
547
- }
548
- `,De=$`
549
- .conversations-panel {
550
- position: absolute;
551
- top: var(--header-height, 128px);
552
- left: 0;
553
- right: 0;
554
- bottom: 0;
555
- pointer-events: none;
556
- display: flex;
557
- flex-direction: column;
558
- }
559
-
560
- .conversations-panel--sidebar {
561
- position: relative;
562
- top: auto;
563
- left: auto;
564
- right: auto;
565
- bottom: auto;
566
- height: 100%;
567
- width: 300px;
568
- background: #eef2f6;
569
- border-right: 1px solid #d4dee6;
570
- box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.02);
571
- display: flex;
572
- flex-direction: column;
573
- min-height: 0;
574
- }
575
-
576
- .conversations-panel--open {
577
- pointer-events: auto;
578
- }
579
-
580
- .conversations-panel__surface {
581
- width: 100%;
582
- height: 100%;
583
- background: #d0d8de;
584
- padding: 12px 32px 24px;
585
- display: flex;
586
- flex-direction: column;
587
- gap: 16px;
588
- transform: translateX(100%);
589
- transition: transform 0.35s ease;
590
- }
591
-
592
- .conversations-panel--open .conversations-panel__surface {
593
- transform: translateX(0);
594
- }
595
-
596
- .conversations-panel__surface--sidebar {
597
- transform: none;
598
- transition: none;
599
- background: transparent;
600
- padding: 12px 0 32px;
601
- height: 100%;
602
- display: flex;
603
- flex-direction: column;
604
- gap: 12px;
605
- min-height: 0;
606
- overflow: hidden;
607
- }
608
-
609
- .conversation-search {
610
- display: flex;
611
- align-items: center;
612
- border-radius: 4px;
613
- border: 1px solid #b7c3cd;
614
- padding: 0 14px;
615
- background: rgba(255, 255, 255, 0.8);
616
- gap: 10px;
617
- width: 530px;
618
- height: 34px;
619
- box-sizing: border-box;
620
- }
621
-
622
- .conversations-panel--sidebar .conversation-search {
623
- width: calc(100% - 32px);
624
- height: 34px;
625
- background: #fff;
626
- border-radius: 6px;
627
- border-color: #c8d4dc;
628
- box-sizing: border-box;
629
- margin: 0 16px;
630
- }
631
-
632
- .conversation-search input {
633
- border: none;
634
- background: transparent;
635
- flex: 1;
636
- height: 100%;
637
- font-size: 14px;
638
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
639
- font-style: italic;
640
- color: #a4afbb;
641
- outline: none;
642
- }
643
-
644
- .search-icon {
645
- width: 16px;
646
- height: 16px;
647
- }
648
-
649
- .conversation-list {
650
- flex: 1;
651
- overflow-y: auto;
652
- display: flex;
653
- flex-direction: column;
654
- gap: 8px;
655
- min-height: 0;
656
- }
657
-
658
- .conversation-list-wrapper {
659
- position: relative;
660
- display: flex;
661
- flex-direction: column;
662
- flex: 1;
663
- min-height: 0;
664
- }
665
-
666
- .conversation-list-wrapper--sidebar {
667
- padding: 8px 0 0 0;
668
- }
669
-
670
- .conversations-panel--sidebar .conversation-list {
671
- width: 100%;
672
- padding-left: 16px;
673
- padding-right: 20px;
674
- overflow-y: auto;
675
- min-height: 0;
676
- }
677
-
678
- .conversation-scrollbar {
679
- position: absolute;
680
- top: 8px;
681
- right: 6px;
682
- width: 6px;
683
- height: calc(100% - 8px);
684
- border-radius: 999px;
685
- background: rgba(125, 143, 162, 0.15);
686
- opacity: 0;
687
- transition: opacity 0.2s ease;
688
- pointer-events: none;
689
- }
690
-
691
- .conversation-scrollbar--visible {
692
- opacity: 1;
693
- }
694
-
695
- .conversation-list-wrapper--sidebar:hover .conversation-scrollbar {
696
- opacity: 1;
697
- }
698
-
699
- .conversation-scrollbar__thumb {
700
- position: absolute;
701
- width: 100%;
702
- border-radius: 999px;
703
- background: #7d8fa2;
704
- min-height: 12px;
705
- display: block;
706
- }
707
-
708
- .conversation-item {
709
- display: flex;
710
- align-items: center;
711
- justify-content: space-between;
712
- padding: 0 20px 0 6px;
713
- border-radius: 8px;
714
- color: #1f2f36;
715
- font-size: 15px;
716
- position: relative;
717
- height: 40px;
718
- }
719
-
720
- .conversations-panel--sidebar .conversation-item {
721
- border-radius: 8px;
722
- background: transparent;
723
- padding-right: 8px;
724
- }
725
-
726
- .conversations-panel--sidebar .conversation-item__text {
727
- width: 236px;
728
- min-height: 18px;
729
- font-family: 'Source Sans Pro', 'Inter', sans-serif;
730
- font-size: 14px;
731
- font-weight: 400;
732
- line-height: 18px;
733
- }
734
-
735
- .conversation-item__text {
736
- flex: 1;
737
- padding-right: 16px;
738
- }
739
-
740
- .conversation-menu-button {
741
- width: 32px;
742
- height: 32px;
743
- border-radius: 50%;
744
- border: none;
745
- background: transparent;
746
- display: flex;
747
- align-items: center;
748
- justify-content: center;
749
- }
750
-
751
- .conversation-menu {
752
- position: absolute;
753
- top: calc(100% + 8px);
754
- right: 12px;
755
- background: #fff;
756
- box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
757
- border-radius: 12px;
758
- min-width: 140px;
759
- padding: 8px 0;
760
- display: flex;
761
- flex-direction: column;
762
- gap: 4px;
763
- z-index: 3;
764
- }
765
-
766
- .conversation-menu--above {
767
- top: auto;
768
- bottom: calc(100% + 8px);
769
- }
770
-
771
- .conversation-menu button {
772
- background: transparent;
773
- border: none;
774
- padding: 8px 14px;
775
- display: flex;
776
- align-items: center;
777
- gap: 10px;
778
- font-size: 13px;
779
- color: #1f2f36;
780
- text-align: left;
781
- width: 100%;
782
- }
783
-
784
- .conversation-menu img {
785
- width: 16px;
786
- height: 16px;
787
- }
788
- `,Ve=[$`
789
- @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@700&display=swap');
790
-
791
- :host {
792
- position: fixed;
793
- inset: 0;
794
- font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
795
- color: #1c2a33;
796
- z-index: 2147483000;
797
- }
798
-
799
- button {
800
- font: inherit;
801
- border: none;
802
- cursor: pointer;
803
- border-radius: 999px;
804
- transition: transform 0.2s ease, box-shadow 0.2s ease;
805
- }
806
- `,Le,Ye,je,De];/**
807
- * @license
808
- * Copyright 2017 Google LLC
809
- * SPDX-License-Identifier: BSD-3-Clause
810
- */const pe={ATTRIBUTE:1},ue=n=>(...e)=>({_$litDirective$:n,values:e});let Ae=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
811
- * @license
812
- * Copyright 2018 Google LLC
813
- * SPDX-License-Identifier: BSD-3-Clause
814
- */const g=ue(class extends Ae{constructor(n){var e;if(super(n),n.type!==pe.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){var s,i;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(e)}const t=n.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(i=this.nt)!=null&&i.has(r)||(o?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return v}}),He=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIRSURBVHgB7Ze/T8JAFMcfxMVFq5OaGBsTJxccXEn/AAdGNvE/8C9QjP+AOybippuDDrpQdCT+ijpIRJowwICCMZFBk/O99iANob+urS73SV5ee717/XL37l0BkEgkklhJQAQwxhR0isPjbiKR6IIggQSiEA1dBm0BLcVFKT6HG9xIbBntBIUbEBUobptFSwctA1GAgTZZPJBIFcKCQeosPg7c3j3mQ5yG7gPtkDcZDl37+aiClaMq+EOD/4B+mN+Zd4vjuYuZVUIomVWwZmjSoSvNMu1QA02nHcqs/CqBx2xiX7FyRy9gYvlHyb/OY2henUEUFm5zkEiFxym5dXTTkHQRp8HQ0jROK/BcOB/cv93UzPtW+XFUCBKX49f3IEgySOfGWQWq+xeDexL3enwFd7tHTkP6p4zwURdIoJ1es2PO4Ex6Gb4/e+Z1HAgLbF+/mH5+bdX0Lf0B4kBYYD/vqgVryVuXTyCI6/KLz+BtDcZnp9CmYWJpDr6a76YJ4LqBhAS2Md9+MO8Ws2lY2cqannDYzV4UQQRmFemwZHisPYfneQiDV4H1oG6LU7e1UwHXmVVnw4FBFLQiCw4JUHmMnK09B3HAhY5apjwXkGHWmZtitg9Q3tYJI9Dze5CgPz0YfLgcbGB70WkMX8IShES0zLiKI/C5jm4H/gpbLuUCjsvHnoNh4SIpF1MgkUgkkkD8AgAi3WKqFnrYAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,Fe=n=>p`
815
- <button
816
- class="floating-button"
817
- style="background:${n.accentColor}"
818
- @click=${()=>n.togglePanel()}
819
- aria-expanded=${n.open}
820
- >
821
- <img src=${He} alt="" aria-hidden="true" />
822
- <span>${n.buttonLabel}</span>
823
- </button>
824
- `;/**
825
- * @license
826
- * Copyright 2018 Google LLC
827
- * SPDX-License-Identifier: BSD-3-Clause
828
- */const ge="important",ze=" !"+ge,Xe=ue(class extends Ae{constructor(n){var e;if(super(n),n.type!==pe.ATTRIBUTE||n.name!=="style"||((e=n.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{const s=n[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(n,[e]){const{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const i=e[s];if(i!=null){this.ft.add(s);const r=typeof i=="string"&&i.endsWith(ze);s.includes("-")||r?t.setProperty(s,r?i.slice(0,-11):i,r?ge:""):t[s]=i}}return v}}),Ge=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADdSURBVHgB5ZQxCsJAEEX/rsbaI3gEvYE22ppO7DyCJ1BvoCdIFSNBGFOIaBBzg1whR0gpqLsuSWHnBBKI4G+mefyB+Z8B6pBD1C7KCg7wgusCSi0Bndxh9Wb2IP3GS84wN8t2d1rqMeZw3hCIMjuIVEorQhXyKOw7dCt8x98Wm7JPl+4TYiGho4k93HA8G8oLILN1rCHW2/25fMom3U8YDbCSPKAH0CrQwHxqjw74D7n+sevRqVOEZW+4o5Ck1Yo1mrFrKlTa0ISRVcVUpw2F8oZGq3yIpLLnUOtjeAMX/z7Yit+o3QAAAABJRU5ErkJggg==",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,Ke=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADJSURBVHgBvZPdCcIwFIVPqvjcETpCnUDzrA86ghOIG+gGbqIv4mPjBhmhI/goFhNv2qpNQfIjeCCQhHu++0MC/CgWEpwfihQjLHCHkEteBgHyc5FBsQIaGR2vqPTYQBJfAG5k0rQapRhgajZOgMmcny5rymaycrqStEo8IJwtWGUztpWzya6eA1XgnEGv51Z6I+d8341L/M1UdoVjP5b5mzV/lf0VEGq2ADHmNyDWbNQMUdGjiDB/ALa8zUbDFiOg9Kredz7KX/QESDR2d7Kg6IcAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,qe=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADoSURBVHgBpZLfDYIwEMavqImPjOAIdQP6bIw6AhM4giMYR3ACEhOegQ3qBh2hvplIOItG6NXKn/glbY6745e7DwD+FPMl+SXbwgRCkqxAybXI3d6pDwAB2wNCRJNYmCvyTsCTLIQZS+whzAmdXm2ObJ4eGMudUO8J5qa5RHudK/jFHCD1gKfFARAX0CeGJ7kSr2moB1gtTXXTC6jg/AkDp6RbGApz519xrRKUH4BtoUu1eX5AMAig6SvjpboAEvqEePsNCKzxmPUz0ZisQD/j3RRnDeHYFqzYMZoAjLuap1kMXWID1hyjJ+SZQp3ORCa/AAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,We=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF+SURBVHgBxZNNTsMwEIVnnBAqVuEG6Q16A8INeoOSFXRFkEpFVqRCaquqi7CA0hXhBNATUE4ANyBHyA4aKg+OU0QgxgKExNvkx8+fx89jgD8S6gb98NK2rKcdALZFCLacwOkuYxBHQTv5FqhzMnGZCdfCYqvGOWA4DnZ7b99MZTocnTWYibcFhHoMqD4K9jBbrG8SkCcsifgXdvrnvrai7uDiUTwcYd4eBu355/GjwcThAPdEAC9ZrR6FXlqpqNufNnOIWCFWQXIN83w4nCKiba09+8qtEZJblEpXoFG2UYukH6ChBCFREe4CEh0oOvBS6V+dZjVsKgDcooYO5Iucyt8VEGcwlzxk+6CRCawlfQSxEjSWAeODCNvtDKbHKojsMXH84jUxVgtXjj+fvDJJiTBjvsQZY8uEc9NBgzcZYquo4r09UAcRmPSLzs4b0iu3B2ogvVHQDkXzuZyDK5wOEaYGoxtVf6EOAj+QDBuN5azYxu8gH5Rf1PIl/De9AhTgnL0rAocOAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,fe=(n,e={})=>{const t=e.variant??"drawer",s=t==="sidebar",i=s||n.showConversations;return p`
829
- <div
830
- class=${g({"conversations-panel":!0,"conversations-panel--open":i,"conversations-panel--sidebar":s})}
831
- aria-hidden=${!i}
832
- @pointerdown=${r=>n.handleConversationsPanelPointer(r)}
833
- >
834
- <div
835
- class=${g({"conversations-panel__surface":!0,"conversations-panel__surface--sidebar":s})}
836
- >
837
- ${Ze(n,t)}
838
- </div>
839
- </div>
840
- `},Ze=(n,e)=>{const t=e==="sidebar",s=p`
841
- <div
842
- class=${g({"conversation-list":!0,"conversation-list--sidebar":t})}
843
- @scroll=${t?i=>n.handleConversationListScroll(i):null}
844
- >
845
- ${n.filteredConversations.map(i=>{const r=n.conversationMenuId===i.id;return p`
846
- <div class="conversation-item">
847
- <div class="conversation-item__text">
848
- ${i.title}
849
- </div>
850
- <button
851
- class="conversation-menu-button"
852
- type="button"
853
- @click=${o=>n.handleConversationMenuToggle(o,i.id)}
854
- >
855
- <img src=${Ge} alt="" aria-hidden="true" />
856
- </button>
857
- ${r?p`
858
- <div
859
- class=${g({"conversation-menu":!0,"conversation-menu--above":n.conversationMenuPlacement==="above"})}
860
- @click=${o=>o.stopPropagation()}
861
- >
862
- <button
863
- type="button"
864
- @click=${()=>n.handleConversationAction("rename",i.id)}
865
- >
866
- <img src=${Ke} alt="" aria-hidden="true" />
867
- Renomear
868
- </button>
869
- <button
870
- type="button"
871
- @click=${()=>n.handleConversationAction("delete",i.id)}
872
- >
873
- <img src=${qe} alt="" aria-hidden="true" />
874
- Excluir
875
- </button>
876
- </div>
877
- `:null}
878
- </div>
879
- `})}
880
- </div>
881
- `;return p`
882
- <div class="conversation-search">
883
- <img class="search-icon" src=${We} alt="" aria-hidden="true" />
884
- <input
885
- type="text"
886
- placeholder="Buscar nas conversas"
887
- .value=${n.conversationSearch}
888
- @input=${i=>n.handleConversationSearch(i)}
889
- />
890
- </div>
891
-
892
- <div
893
- class=${g({"conversation-list-wrapper":!0,"conversation-list-wrapper--sidebar":t})}
894
- >
895
- ${s}
896
- ${t?p`
897
- <div
898
- class=${g({"conversation-scrollbar":!0,"conversation-scrollbar--visible":n.conversationScrollbar.visible})}
899
- >
900
- <span
901
- class="conversation-scrollbar__thumb"
902
- style=${Xe({height:`${n.conversationScrollbar.height}%`,top:`${n.conversationScrollbar.top}%`})}
903
- ></span>
904
- </div>
905
- `:null}
906
- </div>
907
- `},Je=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACLSURBVHgB7dSxDYAgEAXQf8ZF3MAN1F53cAVHcBKH0F5HYATcwN7ipEShOoMkhpdAwg/kCg6AJDZ6BuWyMeS0auvCDjIEFrxA7iQnF0gsvi6aIEaHaqvBTnLPrh5irM10KxChi5hHSBEO/I7bRfNa4wXVNZu9du+AaIWcNuPbz87zDniHFEN+NgnmAsF0G91pmpecAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,et=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEpSURBVHgB5ZbBDYIwFIZfjd4dwRHqCD0aY4ybuIE6gpPghXhEJ7AbyAgMYKyPApZAkUIfMdH/QHr4838p7722AL8uBp7iYcThCdOPpgdIuRFJuhwDhRgL8NsMHSuB30u6HIGn5FJIYDowcfF7A7tCSYB51BqgpZZUQB5ed6DU3sXrDewC8wY2wpQ6YE3nYKlpbyA/RzMM3tpgciX2TY3UGygXIq4F5rC3p4COjIfmpFEsQtixDBtUPIhax+FroU411N04YXf9+zzFTGgWpgtdhZnWT9ImqHq6yOwwvWKw+OVdWOYs8wQ4Ej1VvZ4KqNBno32oj3i3xUAELKA3TAYL7ODb+u6DTwBzBxLBXIEJuk5AJBdgrXuHBpJCTZfiUy5/XTXL+6j/B70AdWmQ/S7ON+YAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,tt=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAavSURBVHgB7Z1PTxtHFMDf2Cb9o6ZBoSq0ShRQK1XKpRs1Uo/Yx4pAk0+QcOg5ILVn4F4Jeu4h9BOQEqMevdx6SIWRKlVUquRWUQRVqJyStqiAJ+/N7prFWYu1PbP71p6fZO1igzHz23kz82ZmEU7ZlWBhQw4srLBCmGGFMKPQ+kT1VlGAJTFa23BbQ5hhhTDDCmGGFcIMK4QZVggzrBBmWCHMsEKYYYUwwwphhhXCDCuEGVYIMwqQEZy1yrg6KYB3lDAMeXzEoQG15nkO6vA/PgDq1TulOjAjdSGqoPPgqMJtYGELcQ0Enks6949R0KxN3NUA4Rke+pkh/3eXXXqths8pQfjAc/k7PlfH56okrzpVqkKCpCLE2ajcAynu0ik+vKucCiooONlyNEmrcOF/CF+4kgbgQkN+ByfgYq2qgUESFeKsV25DXiy3ver5UoScKFKNcTY2V6pTk0tgiMQadae8uYx/1FoGZYTBECoXsdZsNds0zSQixNlwH2D9n4P+wYEhUTEhxbgQrOILWCvuQf8xjlLWQDNGhWDj7VAVh/7FcR5VFkEjhmuI/iuIHULcx9AVbzwUA2NC8MopZrwBj8sw9lW1tY/maojoy3YjGqHGVFowGLLExzA4jOvqcZkcGNIovO6nImqYFqmrlAT4R+/cI5xrOo9cKJcl1SjfOwr/eaEuBG0xPTZ59ffWoEeMCFGNnJSl6nTJhRRwfsCrtYGjaxALCbZjWi4CI0L8LKoLKVH9TOWbVumh8mbJiumJvp8PwWztanWqOIE19hvIACzmQ+I2iL1kWjF8zmFXHNsurC2MMSZEtSMX4DbGcgcL4RKAChnDao6D6CKE+Klwj/A8hjd/gedyG8/ddnMYKGURpQBnKdqFeCJy9zFEzPm9n7PomuMIC22+pwjmMGiiaTaqU6GklN1JoJQ6Q7S2Iap3c0Fs+fmr5Luep9DMY0UlNqPIy1lgijYhXldTVFj1ZmjuIkKK6oUxbeT11ZAG05lAkkJ5tVZyqlvMDi1CvDlybMC5EtGI+w1/ogsY4qCnhnCW4VGMrCVSbgIzNIUs8TlwR6hc01ly/GpIz91e1ZifQMfcvDwM773xGhwcH4O7tx/5PcXREbhY8D7iT389h6f/HUL3RGSfKanJbFd+7+OQY7WgrWOmr47CzJUxePrvYVshX13/EN5/83V1vv5kFxa2d6BrpJyADMA2l/XJ5UtKBtUgojT6DgwCbIVQ7SHW/9hVUi4OFeDmSJpjzWRgKyQofPfPfajsPlPnxXdHoN9hKSQIV8TO8xew8/cLdT5zdQz6HZZCgnD1eL+uwtWjJ3vq60EIWyyFBIVOPSvi4OhYySH6PWyxExIOVzT2CAiE9HvYYreDqjR22r399tPTsRyFq+BINSgQ1G/wExIabwQ1pRUKW+yEiN6XABGshHz09ltNCfOPf4ZfD/458/qX1z9Qwihsff3Lb8CKYz15MVZtyPSVUXWkRpzSKZRWCT/cXS/Fwq63hVljXRtIWQkJwlW7cFTZe9Y8Z9Xbkvomu9gICYercMGHCXd/w41/ytSqM6VV0ETvbUgBG7Mu0u+UuQ1nb2k0fmPj/PmiL37chq4IryXWSUNq3QDaew05hGz0P2VEL0j2uDJGyiWdtYPoWUja63hjIyM+Y9QsYuz3QxnTpUXQjKY2RH4PvKE4//CVZ4WYhK6Q8yZkEHqEHGEvQ9PAyAgRcV5NPXe6epEWRRzJieqt0goYQsvAkMKWs1G5g5fcFnBDwMPION84VwatFaZkGg34XLrokrhZjbaROq1zQimzIMUypLuM9BR1RcMry0b9VZYLbX5mCUfdK2ndKUjrOIT2YkBe3mAQvup+o1uMLNgTWgzeZpUl9sbSvG2T9lyWv3tpQi1Mo524krYjUI0R18AcscOLU67Mcb7Nh7Hkor8VwA2+xoKodSSFFkOHF7KdhDaKnt6ErKNNPN6dJQZ0w05PGOjjO+XNu/i+1DtiPQfMT4hmGWoD0VBuISt3I+I1hWti9DtEd5TIzq2h+AgxlIpQgzipNwFoEh5CDMkIUO+dESnpCzEsIyArUtIVkpCMAO93yXlgTHJCWqc5E5YRoNoUMQC7cM9DFT4VBN3/tqH2kC9CSqgUD1MpiY5DVEEAj92v9Flw5I41VTw480LKebiBvhl/s6Z4Eur+xJMLKZKZm/GbglOtJey/q2CGFcIMK4QZVggzrBBmWCHMsEKYYYUwwwphhhXCDCuEGVYIM6wQZlghzLBCmCGcspvEPzi1xMTWEGZYIcywQpjxEna5gwxqk9eHAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,st=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgB7ZbdCYNAEIRnJb6nBEu4ErSAEK0gLaSUdJAS8gt5vKQDO4gd6HtAc0YhEm4NOQUJ7AcnuHMrI7cMBwjCP6N2el4vDMCDI+qoY/h0NytXJx3CEWcDpjM2z+bviVZwxN3ASIgBMTC5gRkntAHTFzJvjVAHUsBtTJMo4zSyFV8h49EW/QZ+o6qidBFdP8v2I+iGzFgwYWU3UGKPsSmrg61M3P6vM+BjY9qXzYv5+ANr8BRmDgqbwA5h21BwujrrjkZ5moQZHJAcEANiwN1AN6zK6oYpUBcdDL0VC8ITASg13Rg8meYAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,be=n=>{const e=n.messages.length>0,t=p`
908
- <div class="hero-card">
909
- <img src=${tt} alt="IA assistente" class="hero-card__icon" />
910
- <h3>Como posso te ajudar hoje?</h3>
911
- </div>
912
- `,s=p`
913
- <div class="conversation">
914
- ${n.messages.map(i=>p`
915
- <div
916
- class=${g({message:!0,"message--user":i.role==="user","message--assistant":i.role==="assistant"})}
917
- >
918
- <p>${i.text}</p>
919
- <time>
920
- ${new Date(i.timestamp).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}
921
- </time>
922
- </div>
923
- `)}
924
- ${n.isLoading?p`
925
- <div class="message message--assistant typing">
926
- <span>IA está respondendo...</span>
927
- </div>
928
- `:null}
929
- </div>
930
- `;return p`
931
- <div class="panel-body">
932
- <div
933
- class=${g({"panel-content":!0,"panel-content--empty":!e})}
934
- >
935
- ${e?s:t}
936
- </div>
937
-
938
- ${n.errorMessage?p`<p class="error-banner">${n.errorMessage}</p>`:null}
939
-
940
- <div class="panel-footer">
941
- ${n.suggestions.length>0?p`
942
- <div class="suggestions-wrapper">
943
- <p class="suggestions-label">Sugestoes de perguntas:</p>
944
- <div class="suggestions">
945
- ${n.suggestions.map(i=>p`
946
- <button
947
- class="suggestion"
948
- type="button"
949
- @click=${()=>n.onSuggestionClick(i)}
950
- >
951
- ${i}
952
- </button>
953
- `)}
954
- </div>
955
- </div>
956
- `:null}
957
-
958
- <form
959
- @submit=${i=>n.handleSubmit(i)}
960
- aria-busy=${n.isLoading}
961
- >
962
- <input
963
- type="text"
964
- placeholder=${n.placeholder}
965
- .value=${n.message}
966
- @input=${i=>{n.message=i.target.value}}
967
- ?disabled=${n.isLoading}
968
- />
969
- </form>
970
-
971
- <p class="footnote">
972
- IA pode cometer erros. Por isso lembre-se de conferir informacoes importantes.
973
- </p>
974
- </div>
975
- </div>
976
- `},it=n=>{const e=be(n);return p`
977
- <aside class=${g({panel:!0,open:n.open})} role="dialog">
978
- <header class="panel-header">
979
- <div class="panel-header__top">
980
- <span class="panel-title">${n.titleText}</span>
981
- <button
982
- class="close-button"
983
- @click=${()=>n.handleCloseAction()}
984
- aria-label="Fechar RIO Assist"
985
- >
986
- x
987
- </button>
988
- </div>
989
- <div class="panel-header__actions">
990
- <button
991
- class="conversations-button"
992
- type="button"
993
- @click=${()=>n.toggleConversationsPanel()}
994
- >
995
- <img src=${Je} alt="" aria-hidden="true" />
996
- Minhas Conversas
997
- </button>
998
- <div class="panel-header__icons">
999
- ${n.showConversations?p`
1000
- <button
1001
- class="panel-header__icon-button conversations-plus-button"
1002
- type="button"
1003
- aria-label="Nova conversa"
1004
- @click=${()=>n.handleCreateConversation()}
1005
- >
1006
- <img src=${st} alt="" aria-hidden="true" />
1007
- </button>
1008
- `:null}
1009
- <button
1010
- class="panel-header__icon-button"
1011
- type="button"
1012
- aria-label="Expandir painel"
1013
- @click=${()=>n.enterFullscreen()}
1014
- >
1015
- <img src=${et} alt="" aria-hidden="true" />
1016
- </button>
1017
- </div>
1018
- </div>
1019
- </header>
1020
-
1021
- ${e}
1022
-
1023
- ${fe(n,{variant:"drawer"})}
1024
- </aside>
1025
- `},nt=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAClSURBVHgB7ZXtCYAgEIbPaIBGsA1arU3aoJFqgxqhDa6LFPogO/UEoR44ENHn/eGpADmBiHorSIGRT6Y0SELCyogt27gCCYx8wDtDdIhDHh/CkIeHeMj9QwLk/JAI+XuIgNwdQpMdytFbb3HIkLk4FwpITDYBLVV9qZazsQQei1JqPk7QQS6cjd85gz8gHcoOqO0aeH4uRmrTU1vi/vHrh/WzbesVLQQBC6E6gyQAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,rt=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIQSURBVHgB5ZZLTuQwEIbLjqWRRizCDcIJpvsGnQ1MNBvYoe5G5AYzV+EGRoGIXe8mYjb0nGAyJyA3ICsQUtqmKiTpPPrhZAm1ieOU63NV/bYC8NGMmTqeLk7tgy8HE8aYTe8adJJBltx5d4nJ+r2gaTT1OeOXOJxscYmVVlehF0oYAjqPzh2LWQsGbAQGRhmu9MrdluFG0PTPdMQ1f8DVNvSzVK2UG/4I470gykRw8W8ApIJlOhu3M+NtLyzXkEwARZIWQ1swsWh/b4Co8dgTB/oCNLjBSXCIz+tiekSxtoI45z+hJwQr4N54N0t610xXvSmUuvYtB3lvmHiEnhB5LONyPZW9XhHxIg7lmUwbGQkQjiGjAyGVtiFk2ddsso5fLkYnPAswBJIfBegKSClVzfGdUbHJiqsxbiLZCTFQaQXSXKfNrUNMTQ6Pw9jSlosz//tCOPBkHa4w/8G3s9fsqe6IKvJvT26v2wFMMxFaHElPJu/QwqSbq2NZd2Saydn97HIIhCpSQhqgInBn9zns9+wXjefRfGLaE6bYVZPbsvn9nO650YYdpqZXE4kn+B4c1ec6qhNKnOVB22YKIWW+iwd2gqiuiil3I8wEQsqs9WYriIwkjZlV58fQYktZ41L+nU3sW30RXfgocxLDt40OGv7ihmTgBXJXHOOfEz/yHfwZccr7jA64eBbL8tL8fPYGlj3l1qpxcVgAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,ot=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIVSURBVHgB5VVBctNAEOxZiQpwEi+IfoD9A+uAKI4yVamycyC8gPwAeAGVF+AcEldR5VpuQHKweQHmBYgf+AhUvMMsthVZWkm2wynpizS7O9M7O7O9wG0DbbrwvdbB3vxhh4kCaxszT30faS95lm7i30h0Nro4UopeyG/HNc/AlA2fHD6PB9iFaKg/hQxPE6iFjcApMI+qMnQSfdAXLQMay24DbAFZP2NwdJjE00YimwnB/1ZJwvzdBiRS+2KELjLCVbuYmSpH8moz6XXjVr8bd6QZTl3zsvOA4evi+BqRLbwsDXFDCFlrEesaft7wFL3ihiDn+lIahKUWqG2SZacOcuQL2NoI7486Z2b8zBwJ+2jAL/iPXibRzP5nGV3BD/06Eilyv/skXNlnoy9vlFKva1ywhz8d+Xy0/1mNlCl3UB72uLAl2FDWVGpjJ1BwPvp8jB2RERGr2h3btiXlvcM2wUUPS0QPPG+C/w3/floiShbdManzYzbZJb2nSIpMaeVaEdteEpWJltOnqKZJ+92nRyvrQPTMGPO2arU0z0neXiPqJfFAajHFjUGpjZUfKV0d0alERNEhqhQO9eV4bUTUoagk8qyIangRSuMO7PpMWBIlJAdJVDoV5z2y5y+ZteuKXcS/lxZe20Wy2EQDhlpUmHEs4vbYScD8VXRvUKzJ1kTXhONQFDHEUqpYqdlveJOVaN49/AWuVb4JKaLcJgAAAABJRU5ErkJggg==",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,at=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGYSURBVHgBzZZPTsJAFMbfG8A/0USO0BvQI9AFJu5sjEbiptwATgCcQG5QN1ATNeOOBEioN8Ab9Ai4MHFR5jmjxiilzNSi8dt00vfN+01m5r0W4I+EWcw+5+VivGOrcVx8mTVcd2461wikALuw3yaA5lKoU3drXZMczMS0DXvTFZA30DUfX4KBtKD+3chDQDstrhYQ3AyrkBfEkI51HmLpCzEGAbIDnYWQWTqPFkREj9okCDOtR2dAxHuNIwIohZAXJK9vKB+pV5hg0aq7TgQaGRdswEceEXgMWUUQPSGIWQG3Omeuo922/yXVFQI+tNbFwUBrt27Ax015iKr1qGShEOLh/fDVTGEzLFTkqCpPKhICuhcnh1eZQQGf+DKBBxkkk/XO3VorJbYZiA6WAKnexhj6kEdx7NRPj8KvrxJ1xBi0Ia+KxUSOb6DB7UQ2ULQgv6p9PrJTQYQLbRc2loB0kOxrFmxMZKWCflPLIOOfDW1i9lHYq0CIpd5n5edS8tORqCOfT8s7EP/4UhSA5s9Qihqus7HdyaRXhOV61M1m9WYAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,lt=n=>{const e=be(n);return p`
1026
- <section class="fullscreen-shell" role="dialog" aria-modal="true">
1027
- <div class="fullscreen-shell__rail">
1028
- <button type="button" class="rail-button" aria-label="Ir para home">
1029
- <img src=${nt} alt="" aria-hidden="true" />
1030
- </button>
1031
- <button
1032
- type="button"
1033
- class="rail-button rail-button--close"
1034
- aria-label="Fechar tela cheia"
1035
- @click=${()=>n.exitFullscreen(!0)}
1036
- >
1037
- <svg viewBox="0 0 16 16" aria-hidden="true">
1038
- <path
1039
- d="M10.5 3l-5 5 5 5"
1040
- fill="none"
1041
- stroke="currentColor"
1042
- stroke-width="2"
1043
- stroke-linecap="round"
1044
- stroke-linejoin="round"
1045
- />
1046
- </svg>
1047
- </button>
1048
- </div>
1049
-
1050
- <div class="fullscreen-shell__content">
1051
- <header class="fullscreen-header">
1052
- <div class="fullscreen-header__title">
1053
- <span class="fullscreen-header__brand">RIO ASSIST</span>
1054
- </div>
1055
-
1056
- <div class="fullscreen-header__tabs">
1057
- <span class="fullscreen-header__tab">CONVERSA</span>
1058
- </div>
1059
-
1060
- <div class="fullscreen-header__actions">
1061
- <button type="button" class="fullscreen-header__icon" aria-label="Status">
1062
- <img src=${rt} alt="" aria-hidden="true" />
1063
- </button>
1064
- <button type="button" class="fullscreen-header__icon" aria-label="Informacoes">
1065
- <img src=${ot} alt="" aria-hidden="true" />
1066
- </button>
1067
- <button type="button" class="fullscreen-header__icon" aria-label="Perfil de usuario">
1068
- <img src=${at} alt="" aria-hidden="true" />
1069
- </button>
1070
- </div>
1071
- </header>
1072
-
1073
- <div class="fullscreen-grid">
1074
- ${fe(n,{variant:"sidebar"})}
1075
- <div class="fullscreen-chat">
1076
- ${e}
1077
- </div>
1078
- </div>
1079
- </div>
1080
- </section>
1081
- `},ct=n=>{const e=g({canvas:!0,"canvas--fullscreen":n.isFullscreen});return p`
1082
- <div class=${e}>
1083
- ${Fe(n)}
1084
- ${it(n)}
1085
- ${n.isFullscreen?lt(n):null}
1086
- </div>
1087
- `},ht="wss://ws.volkswagen.latam-sandbox.rio.cloud",dt="claude-3-sonnet";class pt{constructor(e){this.socket=null,this.connectPromise=null,this.listeners=new Set,this.token=e}matchesToken(e){return this.token===e}async sendMessage(e){const t=await this.ensureConnection(),s={action:"sendMessage",message:e,agentModel:dt};t.send(JSON.stringify(s))}onMessage(e){return this.listeners.add(e),()=>this.listeners.delete(e)}close(){this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.close(),this.connectPromise=null,this.socket=null,this.listeners.clear()}async ensureConnection(){if(this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING))return await this.connectPromise,this.socket;if(this.socket=new WebSocket(`${ht}?token=${encodeURIComponent(this.token)}`),this.socket.addEventListener("message",e=>this.handleMessage(e)),this.socket.addEventListener("close",()=>{this.connectPromise=null,this.socket=null}),this.connectPromise=new Promise((e,t)=>{if(!this.socket){t(new Error("Falha ao criar conexão WebSocket."));return}const s=()=>{r(),e()},i=()=>{var o;r(),(o=this.socket)==null||o.close(),this.socket=null,this.connectPromise=null,t(new Error("Não foi possível abrir conexão com o websocket do RIO Assist."))},r=()=>{var o,c;(o=this.socket)==null||o.removeEventListener("open",s),(c=this.socket)==null||c.removeEventListener("error",i)};this.socket.addEventListener("open",s,{once:!0}),this.socket.addEventListener("error",i,{once:!0})}),await this.connectPromise,!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new Error("Conexão WebSocket do RIO Assist não está pronta.");return this.socket}async handleMessage(e){const t=await this.readMessage(e.data);let s=null,i=t;try{if(s=JSON.parse(t),typeof s=="object"&&s!==null){const r=s.message??s.response??s.text??s.content;typeof r=="string"&&(i=r)}}catch{s=null}this.listeners.forEach(r=>r({text:i,raw:t,data:s}))}async readMessage(e){return typeof e=="string"?e:e instanceof Blob?e.text():e instanceof ArrayBuffer?new TextDecoder().decode(new Uint8Array(e)):ArrayBuffer.isView(e)?new TextDecoder().decode(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):String(e??"")}}const L=class L extends T{constructor(){super(...arguments),this.open=!1,this.message="",this.titleText="RIO Assist",this.buttonLabel="RIO Assist",this.placeholder="Pergunte alguma coisa",this.accentColor="#008B9A",this.apiBaseUrl="",this.rioToken="",this.suggestionsSource="",this.messages=[],this.isLoading=!1,this.errorMessage="",this.showConversations=!1,this.conversationSearch="",this.conversationMenuId=null,this.conversationMenuPlacement="below",this.isFullscreen=!1,this.conversationScrollbar={height:0,top:0,visible:!1},this.conversationScrollbarRaf=null,this.rioClient=null,this.rioUnsubscribe=null,this.loadingTimer=null,this.conversations=Array.from({length:20}).map((e,t)=>({id:`${t+1}`,title:["Caminhões com problema na frota de veículos.","Próximas manutenções periódicas preventivas.","Quais revisões meu plano inclui?","Como automatizar preenchimento de odômetro.","Valor das peças da próxima revisão.","O que é revisão de assentamento?","Alertas críticos ativos.","Veículo superaquecendo, causas e recomendações.","Calibragem recomendada nos pneus do e-Delivery.","Quantos mil km trocar o óleo do motor.","Qual a vida útil da bateria Moura M100HE."][t%11],updatedAt:new Date(Date.now()-t*36e5).toISOString()}))}get suggestions(){return this.suggestionsSource?this.suggestionsSource.split("|").map(e=>e.trim()).filter(Boolean):[]}updated(e){super.updated(e),this.style.setProperty("--accent-color",this.accentColor),(e.has("isFullscreen")||e.has("showConversations")||e.has("conversations"))&&this.enqueueConversationScrollbarMeasure()}firstUpdated(){this.enqueueConversationScrollbarMeasure()}disconnectedCallback(){super.disconnectedCallback(),this.conversationScrollbarRaf!==null&&(cancelAnimationFrame(this.conversationScrollbarRaf),this.conversationScrollbarRaf=null),this.teardownRioClient(),this.clearLoadingGuard()}get filteredConversations(){const e=this.conversationSearch.trim().toLowerCase();return e?this.conversations.filter(t=>t.title.toLowerCase().includes(e)):this.conversations}togglePanel(){if(this.isFullscreen){this.exitFullscreen(!1);return}this.open=!this.open,this.dispatchEvent(new CustomEvent(this.open?"rioassist:open":"rioassist:close",{bubbles:!0,composed:!0}))}closePanel(){this.isFullscreen=!1,this.open&&this.togglePanel()}openConversationsPanel(){this.showConversations=!0}closeConversationsPanel(){this.showConversations=!1,this.conversationMenuId=null}toggleConversationsPanel(){this.showConversations=!this.showConversations,this.showConversations||(this.conversationMenuId=null)}handleConversationSearch(e){this.conversationSearch=e.target.value}handleConversationMenuToggle(e,t){if(e.stopPropagation(),this.conversationMenuId===t){this.conversationMenuId=null;return}const s=e.currentTarget,i=this.renderRoot.querySelector(".conversations-panel__surface");if(s&&i){const r=s.getBoundingClientRect(),c=i.getBoundingClientRect().bottom-r.bottom;this.conversationMenuPlacement=c<140?"above":"below"}else this.conversationMenuPlacement="below";this.conversationMenuId=t}handleConversationsPanelPointer(e){const t=e.target;!t.closest(".conversation-menu")&&!t.closest(".conversation-menu-button")&&(this.conversationMenuId=null)}handleConversationAction(e,t){this.conversationMenuId=null;const s=this.conversations.find(r=>r.id===t);if(!s)return;const i=`${e==="rename"?"Renomear":"Excluir"} "${s.title}"`;console.info(`[Mock] ${i}`)}handleCloseAction(){if(this.isFullscreen){this.exitFullscreen(!0);return}this.showConversations?this.closeConversationsPanel():this.closePanel()}enterFullscreen(){this.isFullscreen||(this.isFullscreen=!0,this.open=!1,this.showConversations=!1)}exitFullscreen(e){this.isFullscreen&&(this.isFullscreen=!1,this.conversationMenuId=null,e&&(this.open=!0))}handleCreateConversation(){console.info("[Mock] Criar nova conversa")}handleConversationListScroll(e){const t=e.currentTarget;t&&this.updateConversationScrollbar(t)}enqueueConversationScrollbarMeasure(){this.conversationScrollbarRaf===null&&(this.conversationScrollbarRaf=requestAnimationFrame(()=>{this.conversationScrollbarRaf=null,this.updateConversationScrollbar()}))}updateConversationScrollbar(e){const t=e??this.renderRoot.querySelector(".conversation-list--sidebar");if(!t){this.conversationScrollbar.visible&&(this.conversationScrollbar={height:0,top:0,visible:!1});return}const{scrollHeight:s,clientHeight:i,scrollTop:r}=t;if(s<=i+1){this.conversationScrollbar.visible&&(this.conversationScrollbar={height:0,top:0,visible:!1});return}const o=i/s,c=Math.max(o*100,8),a=100-c,d=r/(s-i)*(a>0?a:0);this.conversationScrollbar={height:c,top:d,visible:!0}}async onSuggestionClick(e){await this.processMessage(e)}async handleSubmit(e){e.preventDefault(),await this.processMessage(this.message)}createMessage(e,t){return{id:typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random()}`,role:e,text:t,timestamp:Date.now()}}async processMessage(e){const t=e.trim();if(!t||this.isLoading)return;this.dispatchEvent(new CustomEvent("rioassist:send",{detail:{message:t,apiBaseUrl:this.apiBaseUrl,token:this.rioToken},bubbles:!0,composed:!0}));const s=this.createMessage("user",t);this.messages=[...this.messages,s],this.message="",this.errorMessage="",this.isLoading=!0,this.startLoadingGuard();try{await this.ensureRioClient().sendMessage(t)}catch(i){this.clearLoadingGuard(),this.isLoading=!1,this.errorMessage=i instanceof Error?i.message:"Nao foi possivel enviar a mensagem para o agente."}}ensureRioClient(){const e=this.rioToken.trim();if(!e)throw new Error("Informe o token RIO em data-rio-token para conectar no websocket do assistente.");return(!this.rioClient||!this.rioClient.matchesToken(e))&&(this.teardownRioClient(),this.rioClient=new pt(e),this.rioUnsubscribe=this.rioClient.onMessage(t=>{this.handleIncomingMessage(t)})),this.rioClient}handleIncomingMessage(e){const t=this.createMessage("assistant",e.text);this.messages=[...this.messages,t],this.clearLoadingGuard(),this.isLoading=!1}teardownRioClient(){this.rioUnsubscribe&&(this.rioUnsubscribe(),this.rioUnsubscribe=null),this.rioClient&&(this.rioClient.close(),this.rioClient=null)}startLoadingGuard(){this.clearLoadingGuard(),this.loadingTimer=window.setTimeout(()=>{this.loadingTimer=null,this.isLoading=!1},15e3)}clearLoadingGuard(){this.loadingTimer!==null&&(window.clearTimeout(this.loadingTimer),this.loadingTimer=null)}render(){return ct(this)}};L.styles=Ve,L.properties={open:{type:Boolean,state:!0},message:{type:String,state:!0},titleText:{type:String,attribute:"data-title"},buttonLabel:{type:String,attribute:"data-button-label"},placeholder:{type:String,attribute:"data-placeholder"},accentColor:{type:String,attribute:"data-accent-color"},apiBaseUrl:{type:String,attribute:"data-api-base-url"},rioToken:{type:String,attribute:"data-rio-token"},suggestionsSource:{type:String,attribute:"data-suggestions"},messages:{state:!0},isLoading:{type:Boolean,state:!0},errorMessage:{type:String,state:!0},showConversations:{type:Boolean,state:!0},conversationSearch:{type:String,state:!0},conversationMenuId:{state:!0},conversationMenuPlacement:{state:!0},isFullscreen:{type:Boolean,state:!0},conversationScrollbar:{state:!0}};let K=L;customElements.get("rio-assist-widget")||customElements.define("rio-assist-widget",K);const ut={title:"RIO Assist",buttonLabel:"RIO Assist",placeholder:"Pergunte alguma coisa",suggestions:["Veículos com problemas","Valor das peças","Planos de manutenção"],accentColor:"#008B9A",apiBaseUrl:"",rioToken:""},me="rio-assist-widget";function At(n={}){const{target:e=document.body,...t}=n;let s=document.querySelector(me);s||(s=document.createElement(me),e.appendChild(s));const i={...ut,...t};Object.entries(i).forEach(([r,o])=>{o!==void 0&&(s==null||s.setAttribute(`data-${r.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`,Array.isArray(o)?o.join("|"):String(o)))})}typeof window<"u"&&(window.RioAssist=window.RioAssist??{init:At},window.dispatchEvent(new Event("rio-assist-ready")))})();
1
+ (function(){"use strict";var ve;var l=typeof document<"u"?document.currentScript:null;/**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const O=globalThis,j=O.ShadowRoot&&(O.ShadyCSS===void 0||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),q=new WeakMap;let W=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(j&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=q.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&q.set(t,e))}return e}toString(){return this.cssText}};const xe=n=>new W(typeof n=="string"?n:n+"",void 0,D),$=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new W(t,n,D)},we=(n,e)=>{if(j)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=O.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)}},Z=j?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return xe(t)})(n):n;/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const{is:ye,defineProperty:Ce,getOwnPropertyDescriptor:Se,getOwnPropertyNames:Ee,getOwnPropertySymbols:Ue,getPrototypeOf:$e}=Object,b=globalThis,J=b.trustedTypes,Ie=J?J.emptyScript:"",V=b.reactiveElementPolyfillSupport,I=(n,e)=>n,H={toAttribute(n,e){switch(e){case Boolean:n=n?Ie:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},ee=(n,e)=>!ye(n,e),te={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:ee};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),b.litPropertyMetadata??(b.litPropertyMetadata=new WeakMap);let E=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=te){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Ce(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:r}=Se(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const c=i==null?void 0:i.call(this);r==null||r.call(this,o),this.requestUpdate(e,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??te}static _$Ei(){if(this.hasOwnProperty(I("elementProperties")))return;const e=$e(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(I("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(I("properties"))){const t=this.properties,s=[...Ee(t),...Ue(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Z(i))}else e!==void 0&&t.push(Z(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return we(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var r;const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:H).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var r,o;const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const c=s.getPropertyOptions(i),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((r=c.converter)==null?void 0:r.fromAttribute)!==void 0?c.converter:H;this._$Em=i;const d=a.fromAttribute(t,c.type);this[i]=d??((o=this._$Ej)==null?void 0:o.get(i))??d,this._$Em=null}}requestUpdate(e,t,s){var i;if(e!==void 0){const r=this.constructor,o=this[e];if(s??(s=r.getPropertyOptions(e)),!((s.hasChanged??ee)(o,t)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i){const{wrapped:c}=o,a=this[r];c!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,o,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[I("elementProperties")]=new Map,E[I("finalized")]=new Map,V==null||V({ReactiveElement:E}),(b.reactiveElementVersions??(b.reactiveElementVersions=[])).push("2.1.1");/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const R=globalThis,Q=R.trustedTypes,se=Q?Q.createPolicy("lit-html",{createHTML:n=>n}):void 0,ie="$lit$",m=`lit$${Math.random().toFixed(9).slice(2)}$`,ne="?"+m,Re=`<${ne}>`,w=document,_=()=>w.createComment(""),B=n=>n===null||typeof n!="object"&&typeof n!="function",F=Array.isArray,_e=n=>F(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",z=`[
14
+ \f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,re=/-->/g,oe=/>/g,y=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ae=/'/g,le=/"/g,ce=/^(?:script|style|textarea|title)$/i,Be=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),p=Be(1),v=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),he=new WeakMap,C=w.createTreeWalker(w,129);function de(n,e){if(!F(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return se!==void 0?se.createHTML(e):e}const ke=(n,e)=>{const t=n.length-1,s=[];let i,r=e===2?"<svg>":e===3?"<math>":"",o=k;for(let c=0;c<t;c++){const a=n[c];let d,A,h=-1,f=0;for(;f<a.length&&(o.lastIndex=f,A=o.exec(a),A!==null);)f=o.lastIndex,o===k?A[1]==="!--"?o=re:A[1]!==void 0?o=oe:A[2]!==void 0?(ce.test(A[2])&&(i=RegExp("</"+A[2],"g")),o=y):A[3]!==void 0&&(o=y):o===y?A[0]===">"?(o=i??k,h=-1):A[1]===void 0?h=-2:(h=o.lastIndex-A[2].length,d=A[1],o=A[3]===void 0?y:A[3]==='"'?le:ae):o===le||o===ae?o=y:o===re||o===oe?o=k:(o=y,i=void 0);const x=o===y&&n[c+1].startsWith("/>")?" ":"";r+=o===k?a+Re:h>=0?(s.push(d),a.slice(0,h)+ie+a.slice(h)+m+x):a+m+(h===-2?c:x)}return[de(n,r+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class M{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let r=0,o=0;const c=e.length-1,a=this.parts,[d,A]=ke(e,t);if(this.el=M.createElement(d,s),C.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=C.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(ie)){const f=A[o++],x=i.getAttribute(h).split(m),Y=/([.?@])?(.*)/.exec(f);a.push({type:1,index:r,name:Y[2],strings:x,ctor:Y[1]==="."?Pe:Y[1]==="?"?Te:Y[1]==="@"?Oe:N}),i.removeAttribute(h)}else h.startsWith(m)&&(a.push({type:6,index:r}),i.removeAttribute(h));if(ce.test(i.tagName)){const h=i.textContent.split(m),f=h.length-1;if(f>0){i.textContent=Q?Q.emptyScript:"";for(let x=0;x<f;x++)i.append(h[x],_()),C.nextNode(),a.push({type:2,index:++r});i.append(h[f],_())}}}else if(i.nodeType===8)if(i.data===ne)a.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(m,h+1))!==-1;)a.push({type:7,index:r}),h+=m.length-1}r++}}static createElement(e,t){const s=w.createElement("template");return s.innerHTML=e,s}}function U(n,e,t=n,s){var o,c;if(e===v)return e;let i=s!==void 0?(o=t._$Co)==null?void 0:o[s]:t._$Cl;const r=B(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),r===void 0?i=void 0:(i=new r(n),i._$AT(n,t,s)),s!==void 0?(t._$Co??(t._$Co=[]))[s]=i:t._$Cl=i),i!==void 0&&(e=U(n,i._$AS(n,e.values),i,s)),e}class Me{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=((e==null?void 0:e.creationScope)??w).importNode(t,!0);C.currentNode=i;let r=C.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new P(r,r.nextSibling,this,e):a.type===1?d=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(d=new Qe(r,this,e)),this._$AV.push(d),a=s[++c]}o!==(a==null?void 0:a.index)&&(r=C.nextNode(),o++)}return C.currentNode=w,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class P{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=U(this,e,t),B(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==v&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):_e(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==u&&B(this._$AH)?this._$AA.nextSibling.data=e:this.T(w.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=M.createElement(de(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(t);else{const o=new Me(i,this),c=o.u(this.options);o.p(t),this.T(c),this._$AH=o}}_$AC(e){let t=he.get(e.strings);return t===void 0&&he.set(e.strings,t=new M(e)),t}k(e){F(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const r of e)i===t.length?t.push(s=new P(this.O(_()),this.O(_()),this,this.options)):s=t[i],s._$AI(r),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,t);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(e,t=this,s,i){const r=this.strings;let o=!1;if(r===void 0)e=U(this,e,t,0),o=!B(e)||e!==this._$AH&&e!==v,o&&(this._$AH=e);else{const c=e;let a,d;for(e=r[0],a=0;a<r.length-1;a++)d=U(this,c[s+a],t,a),d===v&&(d=this._$AH[a]),o||(o=!B(d)||d!==this._$AH[a]),d===u?e=u:e!==u&&(e+=(d??"")+r[a+1]),this._$AH[a]=d}o&&!i&&this.j(e)}j(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Pe extends N{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class Te extends N{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class Oe extends N{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){if((e=U(this,e,t,0)??u)===v)return;const s=this._$AH,i=e===u&&s!==u||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class Qe{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}}const X=R.litHtmlPolyfillSupport;X==null||X(M,P),(R.litHtmlVersions??(R.litHtmlVersions=[])).push("3.3.1");const Ne=(n,e,t)=>{const s=(t==null?void 0:t.renderBefore)??e;let i=s._$litPart$;if(i===void 0){const r=(t==null?void 0:t.renderBefore)??null;s._$litPart$=i=new P(e.insertBefore(_(),r),r,void 0,t??{})}return i._$AI(n),i};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */const S=globalThis;let T=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ne(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return v}};T._$litElement$=!0,T.finalized=!0,(ve=S.litElementHydrateSupport)==null||ve.call(S,{LitElement:T});const G=S.litElementPolyfillSupport;G==null||G({LitElement:T}),(S.litElementVersions??(S.litElementVersions=[])).push("4.2.1");const Le=$`
20
+ .floating-button {
21
+ position: absolute;
22
+ pointer-events: auto;
23
+ right: 0;
24
+ bottom: 32px;
25
+ width: 160px;
26
+ height: 64px;
27
+ padding: 0 26px 0 10px;
28
+ box-sizing: border-box;
29
+ display: inline-flex;
30
+ align-items: center;
31
+ gap: 8px;
32
+ color: #fff;
33
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
34
+ font-weight: 700;
35
+ font-size: 18px;
36
+ letter-spacing: -0.2px;
37
+ border-radius: 32px 0 0 32px;
38
+ box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
39
+ }
40
+
41
+ .floating-button img {
42
+ width: 40px;
43
+ height: 40px;
44
+ flex-shrink: 0;
45
+ display: block;
46
+ }
47
+
48
+ .floating-button span {
49
+ white-space: nowrap;
50
+ line-height: 1;
51
+ display: inline-block;
52
+ flex: 1;
53
+ text-align: left;
54
+ }
55
+
56
+ .floating-button:hover {
57
+ box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3);
58
+ }
59
+
60
+ .canvas--fullscreen .floating-button {
61
+ opacity: 0;
62
+ pointer-events: none;
63
+ }
64
+ `,Ye=$`
65
+ .canvas {
66
+ position: absolute;
67
+ inset: 0;
68
+ pointer-events: none;
69
+ }
70
+
71
+ .panel {
72
+ --header-height: 120px;
73
+ pointer-events: auto;
74
+ position: fixed;
75
+ top: 0;
76
+ right: 0;
77
+ height: 100vh;
78
+ width: min(600px, 100vw);
79
+ max-width: 90vw;
80
+ background: #fff;
81
+ box-shadow: -24px 0 48px rgba(0, 0, 0, 0.15);
82
+ transform: translateX(100%);
83
+ transition: transform 0.35s ease;
84
+ display: flex;
85
+ flex-direction: column;
86
+ overflow: hidden;
87
+ }
88
+
89
+ .panel.open {
90
+ transform: translateX(0);
91
+ }
92
+
93
+ .panel-header {
94
+ display: flex;
95
+ flex-direction: column;
96
+ gap: 16px;
97
+ padding: 20px 8px 15px 28px;
98
+ border-bottom: 1px solid #e4eaee;
99
+ }
100
+
101
+ .panel-header__top {
102
+ display: flex;
103
+ justify-content: space-between;
104
+ align-items: center;
105
+ width: 100%;
106
+ }
107
+
108
+ .panel-title {
109
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
110
+ font-size: 16px;
111
+ font-weight: 600;
112
+ letter-spacing: 0;
113
+ color: #1c2a33;
114
+ padding-left: 0px;
115
+ }
116
+
117
+ .panel-header__actions {
118
+ display: flex;
119
+ justify-content: space-between;
120
+ align-items: center;
121
+ width: 100%;
122
+ }
123
+
124
+ .conversations-button {
125
+ display: inline-flex;
126
+ align-items: center;
127
+ gap: 12px;
128
+ padding: 8px 0;
129
+ padding-left: 0px;
130
+ border: none;
131
+ background: transparent;
132
+ color: #008b9a;
133
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
134
+ font-weight: 600;
135
+ font-size: 16px;
136
+ }
137
+
138
+ .conversations-button img {
139
+ width: 24px;
140
+ height: 24px;
141
+ }
142
+
143
+ .panel-header__icons {
144
+ display: inline-flex;
145
+ gap: 16px;
146
+ align-items: center;
147
+ padding-right: 12px;
148
+ }
149
+
150
+ .panel-header__icon-button {
151
+ width: 32px;
152
+ height: 32px;
153
+ border-radius: 50%;
154
+ border: none;
155
+ background: transparent;
156
+ display: grid;
157
+ place-items: center;
158
+ }
159
+
160
+ .conversations-plus-button {
161
+ margin-right: 4px;
162
+ }
163
+
164
+ .panel-header__icon-button img {
165
+ width: 28px;
166
+ height: 28px;
167
+ }
168
+
169
+ .panel-body {
170
+ flex: 1;
171
+ padding: 48px 32px 12px;
172
+ display: flex;
173
+ flex-direction: column;
174
+ align-items: center;
175
+ gap: 16px;
176
+ max-width: 520px;
177
+ margin: 0 auto;
178
+ width: 100%;
179
+ min-height: 0;
180
+ overflow: hidden;
181
+ }
182
+
183
+ .panel-content {
184
+ flex: 1;
185
+ width: 100%;
186
+ overflow-y: auto;
187
+ }
188
+
189
+ .panel-content--empty {
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ }
194
+
195
+ .hero-card {
196
+ flex: 1;
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+ flex-direction: column;
201
+ gap: 24px;
202
+ color: #25323d;
203
+ text-align: center;
204
+ width: 100%;
205
+ max-width: 360px;
206
+ min-height: 280px;
207
+ }
208
+
209
+ .hero-card__icon {
210
+ width: 120px;
211
+ height: 120px;
212
+ display: block;
213
+ margin-bottom: 8px;
214
+ }
215
+
216
+ .hero-card h3 {
217
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
218
+ font-weight: 400;
219
+ font-size: 32px;
220
+ line-height: 1;
221
+ white-space: nowrap;
222
+ color: #2a3740;
223
+ margin: 0;
224
+ }
225
+
226
+ .conversation {
227
+ width: 100%;
228
+ display: flex;
229
+ flex-direction: column;
230
+ gap: 16px;
231
+ }
232
+
233
+ .message {
234
+ border-radius: 16px;
235
+ border: 1px solid #e4eaee;
236
+ padding: 12px 16px;
237
+ max-width: 90%;
238
+ background: #fff;
239
+ color: #1f2f36;
240
+ font-size: 15px;
241
+ }
242
+
243
+ .message--user {
244
+ align-self: flex-end;
245
+ background: #e3f3f6;
246
+ border-color: #cde6ea;
247
+ color: #00596b;
248
+ }
249
+
250
+ .message time {
251
+ display: block;
252
+ font-size: 11px;
253
+ margin-top: 6px;
254
+ color: #8a98a4;
255
+ text-align: right;
256
+ }
257
+
258
+ .typing {
259
+ font-style: italic;
260
+ opacity: 0.75;
261
+ }
262
+
263
+ .panel-footer {
264
+ width: 100%;
265
+ display: flex;
266
+ flex-direction: column;
267
+ align-items: center;
268
+ gap: 12px;
269
+ padding-top: 8px;
270
+ margin-top: auto;
271
+ }
272
+
273
+ .suggestions {
274
+ display: inline-flex;
275
+ gap: 12px;
276
+ justify-content: center;
277
+ }
278
+
279
+ .suggestions-wrapper {
280
+ width: 100%;
281
+ text-align: center;
282
+ margin-bottom: 6px;
283
+ }
284
+
285
+ .suggestions-label {
286
+ text-align: center;
287
+ font-size: 14px;
288
+ color: #a7afbb;
289
+ margin-bottom: 12px;
290
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
291
+ font-weight: 500;
292
+ letter-spacing: 0;
293
+ }
294
+
295
+ .suggestion {
296
+ border-radius: 999px;
297
+ border: 1px solid #d6e2e6;
298
+ padding: 0 16px;
299
+ background: #fff;
300
+ font-size: 14px;
301
+ line-height: 24px;
302
+ min-height: 24px;
303
+ color: #a7afbb;
304
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
305
+ font-weight: 500;
306
+ white-space: nowrap;
307
+ }
308
+
309
+ form {
310
+ display: flex;
311
+ align-items: center;
312
+ gap: 12px;
313
+ border: 1px solid #a4afbb;
314
+ border-radius: 80px;
315
+ padding: 10px 20px;
316
+ background: #fff;
317
+ width: 100%;
318
+ max-width: 520px;
319
+ margin-bottom: 0;
320
+ max-height: 56px;
321
+ }
322
+
323
+ form input {
324
+ border: none;
325
+ flex: 1;
326
+ font: inherit;
327
+ outline: none;
328
+ font-size: 16px;
329
+ font-style: normal;
330
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
331
+ font-weight: 400;
332
+ }
333
+
334
+ form input::placeholder {
335
+ font-style: italic;
336
+ font-size: 16px;
337
+ color: #a7afbb;
338
+ }
339
+
340
+ .input-button {
341
+ width: 32px;
342
+ height: 32px;
343
+ border-radius: 50%;
344
+ border: none;
345
+ background: transparent;
346
+ display: flex;
347
+ align-items: center;
348
+ justify-content: center;
349
+ }
350
+
351
+ .input-button img {
352
+ width: 32px;
353
+ height: 32px;
354
+ }
355
+
356
+ .input-button:disabled {
357
+ opacity: 0.5;
358
+ cursor: not-allowed;
359
+ }
360
+
361
+ .footnote {
362
+ margin-top: 0;
363
+ padding-top: 0;
364
+ padding-bottom: 0;
365
+ font-size: 12px;
366
+ color: #8a98a4;
367
+ text-align: center;
368
+ max-width: 520px;
369
+ margin-left: auto;
370
+ margin-right: auto;
371
+ }
372
+
373
+ .error-banner {
374
+ width: 100%;
375
+ padding: 10px 14px;
376
+ border-radius: 12px;
377
+ background: #fff4f2;
378
+ color: #a33c3c;
379
+ font-size: 13px;
380
+ text-align: center;
381
+ }
382
+
383
+ .close-button {
384
+ background: transparent;
385
+ display: grid;
386
+ place-items: center;
387
+ color: #9ba5b2;
388
+ font-size: 28px;
389
+ font-weight: 600;
390
+ line-height: 1;
391
+ }
392
+ `,je=$`
393
+ .fullscreen-shell {
394
+ position: fixed;
395
+ inset: 0;
396
+ background: #f5f7fa;
397
+ display: flex;
398
+ flex-direction: row;
399
+ pointer-events: auto;
400
+ z-index: 3;
401
+ height: 100vh;
402
+ }
403
+
404
+ .fullscreen-shell__rail {
405
+ width: 50px;
406
+ background: #0d1117;
407
+ display: flex;
408
+ flex-direction: column;
409
+ justify-content: space-between;
410
+ align-items: center;
411
+ padding: 6px 0 12px;
412
+ }
413
+
414
+ .fullscreen-shell__content {
415
+ flex: 1;
416
+ display: flex;
417
+ flex-direction: column;
418
+ overflow: hidden;
419
+ }
420
+
421
+ .rail-button {
422
+ width: 38px;
423
+ height: 38px;
424
+ border: none;
425
+ background: transparent;
426
+ display: grid;
427
+ place-items: center;
428
+ cursor: pointer;
429
+ color: #fff;
430
+ padding: 0;
431
+ }
432
+
433
+ .rail-button img {
434
+ width: 22px;
435
+ height: 22px;
436
+ }
437
+
438
+ .rail-button svg {
439
+ width: 18px;
440
+ height: 18px;
441
+ }
442
+
443
+ .fullscreen-header {
444
+ padding: 0 12px 0 4px;
445
+ display: grid;
446
+ grid-template-columns: 300px 1fr 138px;
447
+ align-items: center;
448
+ background: #fff;
449
+ border-bottom: 1px solid #e0e6eb;
450
+ height: 50px;
451
+ column-gap: 8px;
452
+ }
453
+
454
+ .fullscreen-header__title {
455
+ display: flex;
456
+ flex-direction: column;
457
+ gap: 2px;
458
+ padding-left: 16px;
459
+ align-self: stretch;
460
+ justify-content: center;
461
+ }
462
+
463
+ .fullscreen-header__tabs {
464
+ display: flex;
465
+ align-items: stretch;
466
+ height: 100%;
467
+ position: relative;
468
+ padding-left: 8px;
469
+ }
470
+
471
+ .fullscreen-header__brand {
472
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
473
+ font-weight: 600;
474
+ font-size: 18px;
475
+ letter-spacing: 0;
476
+ }
477
+
478
+ .fullscreen-header__tab {
479
+ font-size: 13px;
480
+ font-weight: 600;
481
+ letter-spacing: 1px;
482
+ color: #1f2f36;
483
+ text-transform: uppercase;
484
+ border-bottom: 3px solid #000;
485
+ padding: 0 0 0px;
486
+ display: inline-flex;
487
+ align-items: center;
488
+ height: 100%;
489
+ box-sizing: border-box;
490
+ line-height: 1;
491
+ }
492
+
493
+ .fullscreen-header__actions {
494
+ display: inline-flex;
495
+ align-items: center;
496
+ gap: 12px;
497
+ justify-self: end;
498
+ height: 100%;
499
+ justify-content: flex-end;
500
+ padding-right: 4px;
501
+ }
502
+
503
+ .fullscreen-header__icon {
504
+ width: 24px;
505
+ height: 24px;
506
+ border: none;
507
+ background: transparent;
508
+ display: flex;
509
+ align-items: center;
510
+ justify-content: center;
511
+ padding: 0;
512
+ }
513
+
514
+ .fullscreen-header__icon img {
515
+ width: 24px;
516
+ height: 24px;
517
+ }
518
+
519
+ .fullscreen-grid {
520
+ flex: 1;
521
+ display: grid;
522
+ grid-template-columns: 300px minmax(0, 1fr);
523
+ min-height: 0;
524
+ background: linear-gradient(180deg, #eef3f6 0%, #fff 100%);
525
+ }
526
+
527
+ .fullscreen-chat {
528
+ background: #fff;
529
+ display: flex;
530
+ flex-direction: column;
531
+ align-items: center;
532
+ padding: 36px 64px 18px;
533
+ }
534
+
535
+ .fullscreen-chat .panel-body {
536
+ max-width: 920px;
537
+ width: 100%;
538
+ padding: 12px 48px 12px;
539
+ }
540
+
541
+ .fullscreen-chat .panel-footer {
542
+ max-width: 640px;
543
+ }
544
+
545
+ .fullscreen-chat form {
546
+ max-width: none;
547
+ }
548
+ `,De=$`
549
+ .conversations-panel {
550
+ position: absolute;
551
+ top: var(--header-height, 128px);
552
+ left: 0;
553
+ right: 0;
554
+ bottom: 0;
555
+ pointer-events: none;
556
+ display: flex;
557
+ flex-direction: column;
558
+ }
559
+
560
+ .conversations-panel--sidebar {
561
+ position: relative;
562
+ top: auto;
563
+ left: auto;
564
+ right: auto;
565
+ bottom: auto;
566
+ height: 100%;
567
+ width: 300px;
568
+ background: #eef2f6;
569
+ border-right: 1px solid #d4dee6;
570
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.02);
571
+ display: flex;
572
+ flex-direction: column;
573
+ min-height: 0;
574
+ }
575
+
576
+ .conversations-panel--open {
577
+ pointer-events: auto;
578
+ }
579
+
580
+ .conversations-panel__surface {
581
+ width: 100%;
582
+ height: 100%;
583
+ background: #d0d8de;
584
+ padding: 12px 32px 24px;
585
+ display: flex;
586
+ flex-direction: column;
587
+ gap: 16px;
588
+ transform: translateX(100%);
589
+ transition: transform 0.35s ease;
590
+ }
591
+
592
+ .conversations-panel--open .conversations-panel__surface {
593
+ transform: translateX(0);
594
+ }
595
+
596
+ .conversations-panel__surface--sidebar {
597
+ transform: none;
598
+ transition: none;
599
+ background: transparent;
600
+ padding: 12px 0 32px;
601
+ height: 100%;
602
+ display: flex;
603
+ flex-direction: column;
604
+ gap: 12px;
605
+ min-height: 0;
606
+ overflow: hidden;
607
+ }
608
+
609
+ .conversation-search {
610
+ display: flex;
611
+ align-items: center;
612
+ border-radius: 4px;
613
+ border: 1px solid #b7c3cd;
614
+ padding: 0 14px;
615
+ background: rgba(255, 255, 255, 0.8);
616
+ gap: 10px;
617
+ width: 530px;
618
+ height: 34px;
619
+ box-sizing: border-box;
620
+ }
621
+
622
+ .conversations-panel--sidebar .conversation-search {
623
+ width: calc(100% - 32px);
624
+ height: 34px;
625
+ background: #fff;
626
+ border-radius: 6px;
627
+ border-color: #c8d4dc;
628
+ box-sizing: border-box;
629
+ margin: 0 16px;
630
+ }
631
+
632
+ .conversation-search input {
633
+ border: none;
634
+ background: transparent;
635
+ flex: 1;
636
+ height: 100%;
637
+ font-size: 14px;
638
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
639
+ font-style: italic;
640
+ color: #a4afbb;
641
+ outline: none;
642
+ }
643
+
644
+ .search-icon {
645
+ width: 16px;
646
+ height: 16px;
647
+ }
648
+
649
+ .conversation-list {
650
+ flex: 1;
651
+ overflow-y: auto;
652
+ display: flex;
653
+ flex-direction: column;
654
+ gap: 8px;
655
+ min-height: 0;
656
+ }
657
+
658
+ .conversation-list-wrapper {
659
+ position: relative;
660
+ display: flex;
661
+ flex-direction: column;
662
+ flex: 1;
663
+ min-height: 0;
664
+ }
665
+
666
+ .conversation-list-wrapper--sidebar {
667
+ padding: 8px 0 0 0;
668
+ }
669
+
670
+ .conversations-panel--sidebar .conversation-list {
671
+ width: 100%;
672
+ padding-left: 16px;
673
+ padding-right: 20px;
674
+ overflow-y: auto;
675
+ min-height: 0;
676
+ }
677
+
678
+ .conversation-scrollbar {
679
+ position: absolute;
680
+ top: 8px;
681
+ right: 6px;
682
+ width: 6px;
683
+ height: calc(100% - 8px);
684
+ border-radius: 999px;
685
+ background: rgba(125, 143, 162, 0.15);
686
+ opacity: 0;
687
+ transition: opacity 0.2s ease;
688
+ pointer-events: none;
689
+ }
690
+
691
+ .conversation-scrollbar--visible {
692
+ opacity: 1;
693
+ }
694
+
695
+ .conversation-list-wrapper--sidebar:hover .conversation-scrollbar {
696
+ opacity: 1;
697
+ }
698
+
699
+ .conversation-scrollbar__thumb {
700
+ position: absolute;
701
+ width: 100%;
702
+ border-radius: 999px;
703
+ background: #7d8fa2;
704
+ min-height: 12px;
705
+ display: block;
706
+ }
707
+
708
+ .conversation-item {
709
+ display: flex;
710
+ align-items: center;
711
+ justify-content: space-between;
712
+ padding: 0 20px 0 6px;
713
+ border-radius: 8px;
714
+ color: #1f2f36;
715
+ font-size: 15px;
716
+ position: relative;
717
+ height: 40px;
718
+ }
719
+
720
+ .conversations-panel--sidebar .conversation-item {
721
+ border-radius: 8px;
722
+ background: transparent;
723
+ padding-right: 8px;
724
+ }
725
+
726
+ .conversations-panel--sidebar .conversation-item__text {
727
+ width: 236px;
728
+ min-height: 18px;
729
+ font-family: 'Source Sans Pro', 'Inter', sans-serif;
730
+ font-size: 14px;
731
+ font-weight: 400;
732
+ line-height: 18px;
733
+ }
734
+
735
+ .conversation-item__text {
736
+ flex: 1;
737
+ padding-right: 16px;
738
+ }
739
+
740
+ .conversation-menu-button {
741
+ width: 32px;
742
+ height: 32px;
743
+ border-radius: 50%;
744
+ border: none;
745
+ background: transparent;
746
+ display: flex;
747
+ align-items: center;
748
+ justify-content: center;
749
+ }
750
+
751
+ .conversation-menu {
752
+ position: absolute;
753
+ top: calc(100% + 8px);
754
+ right: 12px;
755
+ background: #fff;
756
+ box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
757
+ border-radius: 12px;
758
+ min-width: 140px;
759
+ padding: 8px 0;
760
+ display: flex;
761
+ flex-direction: column;
762
+ gap: 4px;
763
+ z-index: 3;
764
+ }
765
+
766
+ .conversation-menu--above {
767
+ top: auto;
768
+ bottom: calc(100% + 8px);
769
+ }
770
+
771
+ .conversation-menu button {
772
+ background: transparent;
773
+ border: none;
774
+ padding: 8px 14px;
775
+ display: flex;
776
+ align-items: center;
777
+ gap: 10px;
778
+ font-size: 13px;
779
+ color: #1f2f36;
780
+ text-align: left;
781
+ width: 100%;
782
+ }
783
+
784
+ .conversation-menu img {
785
+ width: 16px;
786
+ height: 16px;
787
+ }
788
+ `,Ve=[$`
789
+ @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@700&display=swap');
790
+
791
+ :host {
792
+ position: fixed;
793
+ inset: 0;
794
+ font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
795
+ color: #1c2a33;
796
+ z-index: 2147483000;
797
+ }
798
+
799
+ button {
800
+ font: inherit;
801
+ border: none;
802
+ cursor: pointer;
803
+ border-radius: 999px;
804
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
805
+ }
806
+ `,Le,Ye,je,De];/**
807
+ * @license
808
+ * Copyright 2017 Google LLC
809
+ * SPDX-License-Identifier: BSD-3-Clause
810
+ */const pe={ATTRIBUTE:1},ue=n=>(...e)=>({_$litDirective$:n,values:e});let Ae=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
811
+ * @license
812
+ * Copyright 2018 Google LLC
813
+ * SPDX-License-Identifier: BSD-3-Clause
814
+ */const g=ue(class extends Ae{constructor(n){var e;if(super(n),n.type!==pe.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){var s,i;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(e)}const t=n.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(i=this.nt)!=null&&i.has(r)||(o?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return v}}),He=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIRSURBVHgB7Ze/T8JAFMcfxMVFq5OaGBsTJxccXEn/AAdGNvE/8C9QjP+AOybippuDDrpQdCT+ijpIRJowwICCMZFBk/O99iANob+urS73SV5ee717/XL37l0BkEgkklhJQAQwxhR0isPjbiKR6IIggQSiEA1dBm0BLcVFKT6HG9xIbBntBIUbEBUobptFSwctA1GAgTZZPJBIFcKCQeosPg7c3j3mQ5yG7gPtkDcZDl37+aiClaMq+EOD/4B+mN+Zd4vjuYuZVUIomVWwZmjSoSvNMu1QA02nHcqs/CqBx2xiX7FyRy9gYvlHyb/OY2henUEUFm5zkEiFxym5dXTTkHQRp8HQ0jROK/BcOB/cv93UzPtW+XFUCBKX49f3IEgySOfGWQWq+xeDexL3enwFd7tHTkP6p4zwURdIoJ1es2PO4Ex6Gb4/e+Z1HAgLbF+/mH5+bdX0Lf0B4kBYYD/vqgVryVuXTyCI6/KLz+BtDcZnp9CmYWJpDr6a76YJ4LqBhAS2Md9+MO8Ws2lY2cqannDYzV4UQQRmFemwZHisPYfneQiDV4H1oG6LU7e1UwHXmVVnw4FBFLQiCw4JUHmMnK09B3HAhY5apjwXkGHWmZtitg9Q3tYJI9Dze5CgPz0YfLgcbGB70WkMX8IShES0zLiKI/C5jm4H/gpbLuUCjsvHnoNh4SIpF1MgkUgkkkD8AgAi3WKqFnrYAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,Fe=n=>p`
815
+ <button
816
+ class="floating-button"
817
+ style="background:${n.accentColor}"
818
+ @click=${()=>n.togglePanel()}
819
+ aria-expanded=${n.open}
820
+ >
821
+ <img src=${He} alt="" aria-hidden="true" />
822
+ <span>${n.buttonLabel}</span>
823
+ </button>
824
+ `;/**
825
+ * @license
826
+ * Copyright 2018 Google LLC
827
+ * SPDX-License-Identifier: BSD-3-Clause
828
+ */const ge="important",ze=" !"+ge,Xe=ue(class extends Ae{constructor(n){var e;if(super(n),n.type!==pe.ATTRIBUTE||n.name!=="style"||((e=n.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{const s=n[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(n,[e]){const{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const i=e[s];if(i!=null){this.ft.add(s);const r=typeof i=="string"&&i.endsWith(ze);s.includes("-")||r?t.setProperty(s,r?i.slice(0,-11):i,r?ge:""):t[s]=i}}return v}}),Ge=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADdSURBVHgB5ZQxCsJAEEX/rsbaI3gEvYE22ppO7DyCJ1BvoCdIFSNBGFOIaBBzg1whR0gpqLsuSWHnBBKI4G+mefyB+Z8B6pBD1C7KCg7wgusCSi0Bndxh9Wb2IP3GS84wN8t2d1rqMeZw3hCIMjuIVEorQhXyKOw7dCt8x98Wm7JPl+4TYiGho4k93HA8G8oLILN1rCHW2/25fMom3U8YDbCSPKAH0CrQwHxqjw74D7n+sevRqVOEZW+4o5Ck1Yo1mrFrKlTa0ISRVcVUpw2F8oZGq3yIpLLnUOtjeAMX/z7Yit+o3QAAAABJRU5ErkJggg==",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,Ke=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADJSURBVHgBvZPdCcIwFIVPqvjcETpCnUDzrA86ghOIG+gGbqIv4mPjBhmhI/goFhNv2qpNQfIjeCCQhHu++0MC/CgWEpwfihQjLHCHkEteBgHyc5FBsQIaGR2vqPTYQBJfAG5k0rQapRhgajZOgMmcny5rymaycrqStEo8IJwtWGUztpWzya6eA1XgnEGv51Z6I+d8341L/M1UdoVjP5b5mzV/lf0VEGq2ADHmNyDWbNQMUdGjiDB/ALa8zUbDFiOg9Kredz7KX/QESDR2d7Kg6IcAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,qe=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADoSURBVHgBpZLfDYIwEMavqImPjOAIdQP6bIw6AhM4giMYR3ACEhOegQ3qBh2hvplIOItG6NXKn/glbY6745e7DwD+FPMl+SXbwgRCkqxAybXI3d6pDwAB2wNCRJNYmCvyTsCTLIQZS+whzAmdXm2ObJ4eGMudUO8J5qa5RHudK/jFHCD1gKfFARAX0CeGJ7kSr2moB1gtTXXTC6jg/AkDp6RbGApz519xrRKUH4BtoUu1eX5AMAig6SvjpboAEvqEePsNCKzxmPUz0ZisQD/j3RRnDeHYFqzYMZoAjLuap1kMXWID1hyjJ+SZQp3ORCa/AAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,We=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF+SURBVHgBxZNNTsMwEIVnnBAqVuEG6Q16A8INeoOSFXRFkEpFVqRCaquqi7CA0hXhBNATUE4ANyBHyA4aKg+OU0QgxgKExNvkx8+fx89jgD8S6gb98NK2rKcdALZFCLacwOkuYxBHQTv5FqhzMnGZCdfCYqvGOWA4DnZ7b99MZTocnTWYibcFhHoMqD4K9jBbrG8SkCcsifgXdvrnvrai7uDiUTwcYd4eBu355/GjwcThAPdEAC9ZrR6FXlqpqNufNnOIWCFWQXIN83w4nCKiba09+8qtEZJblEpXoFG2UYukH6ChBCFREe4CEh0oOvBS6V+dZjVsKgDcooYO5Iucyt8VEGcwlzxk+6CRCawlfQSxEjSWAeODCNvtDKbHKojsMXH84jUxVgtXjj+fvDJJiTBjvsQZY8uEc9NBgzcZYquo4r09UAcRmPSLzs4b0iu3B2ogvVHQDkXzuZyDK5wOEaYGoxtVf6EOAj+QDBuN5azYxu8gH5Rf1PIl/De9AhTgnL0rAocOAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,fe=(n,e={})=>{const t=e.variant??"drawer",s=t==="sidebar",i=s||n.showConversations;return p`
829
+ <div
830
+ class=${g({"conversations-panel":!0,"conversations-panel--open":i,"conversations-panel--sidebar":s})}
831
+ aria-hidden=${!i}
832
+ @pointerdown=${r=>n.handleConversationsPanelPointer(r)}
833
+ >
834
+ <div
835
+ class=${g({"conversations-panel__surface":!0,"conversations-panel__surface--sidebar":s})}
836
+ >
837
+ ${Ze(n,t)}
838
+ </div>
839
+ </div>
840
+ `},Ze=(n,e)=>{const t=e==="sidebar",s=p`
841
+ <div
842
+ class=${g({"conversation-list":!0,"conversation-list--sidebar":t})}
843
+ @scroll=${t?i=>n.handleConversationListScroll(i):null}
844
+ >
845
+ ${n.filteredConversations.map(i=>{const r=n.conversationMenuId===i.id;return p`
846
+ <div class="conversation-item">
847
+ <div class="conversation-item__text">
848
+ ${i.title}
849
+ </div>
850
+ <button
851
+ class="conversation-menu-button"
852
+ type="button"
853
+ @click=${o=>n.handleConversationMenuToggle(o,i.id)}
854
+ >
855
+ <img src=${Ge} alt="" aria-hidden="true" />
856
+ </button>
857
+ ${r?p`
858
+ <div
859
+ class=${g({"conversation-menu":!0,"conversation-menu--above":n.conversationMenuPlacement==="above"})}
860
+ @click=${o=>o.stopPropagation()}
861
+ >
862
+ <button
863
+ type="button"
864
+ @click=${()=>n.handleConversationAction("rename",i.id)}
865
+ >
866
+ <img src=${Ke} alt="" aria-hidden="true" />
867
+ Renomear
868
+ </button>
869
+ <button
870
+ type="button"
871
+ @click=${()=>n.handleConversationAction("delete",i.id)}
872
+ >
873
+ <img src=${qe} alt="" aria-hidden="true" />
874
+ Excluir
875
+ </button>
876
+ </div>
877
+ `:null}
878
+ </div>
879
+ `})}
880
+ </div>
881
+ `;return p`
882
+ <div class="conversation-search">
883
+ <img class="search-icon" src=${We} alt="" aria-hidden="true" />
884
+ <input
885
+ type="text"
886
+ placeholder="Buscar nas conversas"
887
+ .value=${n.conversationSearch}
888
+ @input=${i=>n.handleConversationSearch(i)}
889
+ />
890
+ </div>
891
+
892
+ <div
893
+ class=${g({"conversation-list-wrapper":!0,"conversation-list-wrapper--sidebar":t})}
894
+ >
895
+ ${s}
896
+ ${t?p`
897
+ <div
898
+ class=${g({"conversation-scrollbar":!0,"conversation-scrollbar--visible":n.conversationScrollbar.visible})}
899
+ >
900
+ <span
901
+ class="conversation-scrollbar__thumb"
902
+ style=${Xe({height:`${n.conversationScrollbar.height}%`,top:`${n.conversationScrollbar.top}%`})}
903
+ ></span>
904
+ </div>
905
+ `:null}
906
+ </div>
907
+ `},Je=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACLSURBVHgB7dSxDYAgEAXQf8ZF3MAN1F53cAVHcBKH0F5HYATcwN7ipEShOoMkhpdAwg/kCg6AJDZ6BuWyMeS0auvCDjIEFrxA7iQnF0gsvi6aIEaHaqvBTnLPrh5irM10KxChi5hHSBEO/I7bRfNa4wXVNZu9du+AaIWcNuPbz87zDniHFEN+NgnmAsF0G91pmpecAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,et=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEpSURBVHgB5ZbBDYIwFIZfjd4dwRHqCD0aY4ybuIE6gpPghXhEJ7AbyAgMYKyPApZAkUIfMdH/QHr4838p7722AL8uBp7iYcThCdOPpgdIuRFJuhwDhRgL8NsMHSuB30u6HIGn5FJIYDowcfF7A7tCSYB51BqgpZZUQB5ed6DU3sXrDewC8wY2wpQ6YE3nYKlpbyA/RzMM3tpgciX2TY3UGygXIq4F5rC3p4COjIfmpFEsQtixDBtUPIhax+FroU411N04YXf9+zzFTGgWpgtdhZnWT9ImqHq6yOwwvWKw+OVdWOYs8wQ4Ej1VvZ4KqNBno32oj3i3xUAELKA3TAYL7ODb+u6DTwBzBxLBXIEJuk5AJBdgrXuHBpJCTZfiUy5/XTXL+6j/B70AdWmQ/S7ON+YAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,tt=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAavSURBVHgB7Z1PTxtHFMDf2Cb9o6ZBoSq0ShRQK1XKpRs1Uo/Yx4pAk0+QcOg5ILVn4F4Jeu4h9BOQEqMevdx6SIWRKlVUquRWUQRVqJyStqiAJ+/N7prFWYu1PbP71p6fZO1igzHz23kz82ZmEU7ZlWBhQw4srLBCmGGFMKPQ+kT1VlGAJTFa23BbQ5hhhTDDCmGGFcIMK4QZVggzrBBmWCHMsEKYYYUwwwphhhXCDCuEGVYIMwqQEZy1yrg6KYB3lDAMeXzEoQG15nkO6vA/PgDq1TulOjAjdSGqoPPgqMJtYGELcQ0Enks6949R0KxN3NUA4Rke+pkh/3eXXXqths8pQfjAc/k7PlfH56okrzpVqkKCpCLE2ajcAynu0ik+vKucCiooONlyNEmrcOF/CF+4kgbgQkN+ByfgYq2qgUESFeKsV25DXiy3ver5UoScKFKNcTY2V6pTk0tgiMQadae8uYx/1FoGZYTBECoXsdZsNds0zSQixNlwH2D9n4P+wYEhUTEhxbgQrOILWCvuQf8xjlLWQDNGhWDj7VAVh/7FcR5VFkEjhmuI/iuIHULcx9AVbzwUA2NC8MopZrwBj8sw9lW1tY/maojoy3YjGqHGVFowGLLExzA4jOvqcZkcGNIovO6nImqYFqmrlAT4R+/cI5xrOo9cKJcl1SjfOwr/eaEuBG0xPTZ59ffWoEeMCFGNnJSl6nTJhRRwfsCrtYGjaxALCbZjWi4CI0L8LKoLKVH9TOWbVumh8mbJiumJvp8PwWztanWqOIE19hvIACzmQ+I2iL1kWjF8zmFXHNsurC2MMSZEtSMX4DbGcgcL4RKAChnDao6D6CKE+Klwj/A8hjd/gedyG8/ddnMYKGURpQBnKdqFeCJy9zFEzPm9n7PomuMIC22+pwjmMGiiaTaqU6GklN1JoJQ6Q7S2Iap3c0Fs+fmr5Luep9DMY0UlNqPIy1lgijYhXldTVFj1ZmjuIkKK6oUxbeT11ZAG05lAkkJ5tVZyqlvMDi1CvDlybMC5EtGI+w1/ogsY4qCnhnCW4VGMrCVSbgIzNIUs8TlwR6hc01ly/GpIz91e1ZifQMfcvDwM773xGhwcH4O7tx/5PcXREbhY8D7iT389h6f/HUL3RGSfKanJbFd+7+OQY7WgrWOmr47CzJUxePrvYVshX13/EN5/83V1vv5kFxa2d6BrpJyADMA2l/XJ5UtKBtUgojT6DgwCbIVQ7SHW/9hVUi4OFeDmSJpjzWRgKyQofPfPfajsPlPnxXdHoN9hKSQIV8TO8xew8/cLdT5zdQz6HZZCgnD1eL+uwtWjJ3vq60EIWyyFBIVOPSvi4OhYySH6PWyxExIOVzT2CAiE9HvYYreDqjR22r399tPTsRyFq+BINSgQ1G/wExIabwQ1pRUKW+yEiN6XABGshHz09ltNCfOPf4ZfD/458/qX1z9Qwihsff3Lb8CKYz15MVZtyPSVUXWkRpzSKZRWCT/cXS/Fwq63hVljXRtIWQkJwlW7cFTZe9Y8Z9Xbkvomu9gICYercMGHCXd/w41/ytSqM6VV0ETvbUgBG7Mu0u+UuQ1nb2k0fmPj/PmiL37chq4IryXWSUNq3QDaew05hGz0P2VEL0j2uDJGyiWdtYPoWUja63hjIyM+Y9QsYuz3QxnTpUXQjKY2RH4PvKE4//CVZ4WYhK6Q8yZkEHqEHGEvQ9PAyAgRcV5NPXe6epEWRRzJieqt0goYQsvAkMKWs1G5g5fcFnBDwMPION84VwatFaZkGg34XLrokrhZjbaROq1zQimzIMUypLuM9BR1RcMry0b9VZYLbX5mCUfdK2ndKUjrOIT2YkBe3mAQvup+o1uMLNgTWgzeZpUl9sbSvG2T9lyWv3tpQi1Mo524krYjUI0R18AcscOLU67Mcb7Nh7Hkor8VwA2+xoKodSSFFkOHF7KdhDaKnt6ErKNNPN6dJQZ0w05PGOjjO+XNu/i+1DtiPQfMT4hmGWoD0VBuISt3I+I1hWti9DtEd5TIzq2h+AgxlIpQgzipNwFoEh5CDMkIUO+dESnpCzEsIyArUtIVkpCMAO93yXlgTHJCWqc5E5YRoNoUMQC7cM9DFT4VBN3/tqH2kC9CSqgUD1MpiY5DVEEAj92v9Flw5I41VTw480LKebiBvhl/s6Z4Eur+xJMLKZKZm/GbglOtJey/q2CGFcIMK4QZVggzrBBmWCHMsEKYYYUwwwphhhXCDCuEGVYIM6wQZlghzLBCmCGcspvEPzi1xMTWEGZYIcywQpjxEna5gwxqk9eHAAAAAElFTkSuQmCC",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,st=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgB7ZbdCYNAEIRnJb6nBEu4ErSAEK0gLaSUdJAS8gt5vKQDO4gd6HtAc0YhEm4NOQUJ7AcnuHMrI7cMBwjCP6N2el4vDMCDI+qoY/h0NytXJx3CEWcDpjM2z+bviVZwxN3ASIgBMTC5gRkntAHTFzJvjVAHUsBtTJMo4zSyFV8h49EW/QZ+o6qidBFdP8v2I+iGzFgwYWU3UGKPsSmrg61M3P6vM+BjY9qXzYv5+ANr8BRmDgqbwA5h21BwujrrjkZ5moQZHJAcEANiwN1AN6zK6oYpUBcdDL0VC8ITASg13Rg8meYAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,be=n=>{const e=n.messages.length>0,t=p`
908
+ <div class="hero-card">
909
+ <img src=${tt} alt="IA assistente" class="hero-card__icon" />
910
+ <h3>Como posso te ajudar hoje?</h3>
911
+ </div>
912
+ `,s=p`
913
+ <div class="conversation">
914
+ ${n.messages.map(i=>p`
915
+ <div
916
+ class=${g({message:!0,"message--user":i.role==="user","message--assistant":i.role==="assistant"})}
917
+ >
918
+ <p>${i.text}</p>
919
+ <time>
920
+ ${new Date(i.timestamp).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}
921
+ </time>
922
+ </div>
923
+ `)}
924
+ ${n.isLoading?p`
925
+ <div class="message message--assistant typing">
926
+ <span>IA está respondendo...</span>
927
+ </div>
928
+ `:null}
929
+ </div>
930
+ `;return p`
931
+ <div class="panel-body">
932
+ <div
933
+ class=${g({"panel-content":!0,"panel-content--empty":!e})}
934
+ >
935
+ ${e?s:t}
936
+ </div>
937
+
938
+ ${n.errorMessage?p`<p class="error-banner">${n.errorMessage}</p>`:null}
939
+
940
+ <div class="panel-footer">
941
+ ${n.suggestions.length>0?p`
942
+ <div class="suggestions-wrapper">
943
+ <p class="suggestions-label">Sugestoes de perguntas:</p>
944
+ <div class="suggestions">
945
+ ${n.suggestions.map(i=>p`
946
+ <button
947
+ class="suggestion"
948
+ type="button"
949
+ @click=${()=>n.onSuggestionClick(i)}
950
+ >
951
+ ${i}
952
+ </button>
953
+ `)}
954
+ </div>
955
+ </div>
956
+ `:null}
957
+
958
+ <form
959
+ @submit=${i=>n.handleSubmit(i)}
960
+ aria-busy=${n.isLoading}
961
+ >
962
+ <input
963
+ type="text"
964
+ placeholder=${n.placeholder}
965
+ .value=${n.message}
966
+ @input=${i=>{n.message=i.target.value}}
967
+ ?disabled=${n.isLoading}
968
+ />
969
+ </form>
970
+
971
+ <p class="footnote">
972
+ IA pode cometer erros. Por isso lembre-se de conferir informacoes importantes.
973
+ </p>
974
+ </div>
975
+ </div>
976
+ `},it=n=>{const e=be(n);return p`
977
+ <aside class=${g({panel:!0,open:n.open})} role="dialog">
978
+ <header class="panel-header">
979
+ <div class="panel-header__top">
980
+ <span class="panel-title">${n.titleText}</span>
981
+ <button
982
+ class="close-button"
983
+ @click=${()=>n.handleCloseAction()}
984
+ aria-label="Fechar RIO Assist"
985
+ >
986
+ x
987
+ </button>
988
+ </div>
989
+ <div class="panel-header__actions">
990
+ <button
991
+ class="conversations-button"
992
+ type="button"
993
+ @click=${()=>n.toggleConversationsPanel()}
994
+ >
995
+ <img src=${Je} alt="" aria-hidden="true" />
996
+ Minhas Conversas
997
+ </button>
998
+ <div class="panel-header__icons">
999
+ ${n.showConversations?p`
1000
+ <button
1001
+ class="panel-header__icon-button conversations-plus-button"
1002
+ type="button"
1003
+ aria-label="Nova conversa"
1004
+ @click=${()=>n.handleCreateConversation()}
1005
+ >
1006
+ <img src=${st} alt="" aria-hidden="true" />
1007
+ </button>
1008
+ `:null}
1009
+ <button
1010
+ class="panel-header__icon-button"
1011
+ type="button"
1012
+ aria-label="Expandir painel"
1013
+ @click=${()=>n.enterFullscreen()}
1014
+ >
1015
+ <img src=${et} alt="" aria-hidden="true" />
1016
+ </button>
1017
+ </div>
1018
+ </div>
1019
+ </header>
1020
+
1021
+ ${e}
1022
+
1023
+ ${fe(n,{variant:"drawer"})}
1024
+ </aside>
1025
+ `},nt=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAClSURBVHgB7ZXtCYAgEIbPaIBGsA1arU3aoJFqgxqhDa6LFPogO/UEoR44ENHn/eGpADmBiHorSIGRT6Y0SELCyogt27gCCYx8wDtDdIhDHh/CkIeHeMj9QwLk/JAI+XuIgNwdQpMdytFbb3HIkLk4FwpITDYBLVV9qZazsQQei1JqPk7QQS6cjd85gz8gHcoOqO0aeH4uRmrTU1vi/vHrh/WzbesVLQQBC6E6gyQAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,rt=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIQSURBVHgB5ZZLTuQwEIbLjqWRRizCDcIJpvsGnQ1MNBvYoe5G5AYzV+EGRoGIXe8mYjb0nGAyJyA3ICsQUtqmKiTpPPrhZAm1ieOU63NV/bYC8NGMmTqeLk7tgy8HE8aYTe8adJJBltx5d4nJ+r2gaTT1OeOXOJxscYmVVlehF0oYAjqPzh2LWQsGbAQGRhmu9MrdluFG0PTPdMQ1f8DVNvSzVK2UG/4I470gykRw8W8ApIJlOhu3M+NtLyzXkEwARZIWQ1swsWh/b4Co8dgTB/oCNLjBSXCIz+tiekSxtoI45z+hJwQr4N54N0t610xXvSmUuvYtB3lvmHiEnhB5LONyPZW9XhHxIg7lmUwbGQkQjiGjAyGVtiFk2ddsso5fLkYnPAswBJIfBegKSClVzfGdUbHJiqsxbiLZCTFQaQXSXKfNrUNMTQ6Pw9jSlosz//tCOPBkHa4w/8G3s9fsqe6IKvJvT26v2wFMMxFaHElPJu/QwqSbq2NZd2Saydn97HIIhCpSQhqgInBn9zns9+wXjefRfGLaE6bYVZPbsvn9nO650YYdpqZXE4kn+B4c1ec6qhNKnOVB22YKIWW+iwd2gqiuiil3I8wEQsqs9WYriIwkjZlV58fQYktZ41L+nU3sW30RXfgocxLDt40OGv7ihmTgBXJXHOOfEz/yHfwZccr7jA64eBbL8tL8fPYGlj3l1qpxcVgAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,ot=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIVSURBVHgB5VVBctNAEOxZiQpwEi+IfoD9A+uAKI4yVamycyC8gPwAeAGVF+AcEldR5VpuQHKweQHmBYgf+AhUvMMsthVZWkm2wynpizS7O9M7O7O9wG0DbbrwvdbB3vxhh4kCaxszT30faS95lm7i30h0Nro4UopeyG/HNc/AlA2fHD6PB9iFaKg/hQxPE6iFjcApMI+qMnQSfdAXLQMay24DbAFZP2NwdJjE00YimwnB/1ZJwvzdBiRS+2KELjLCVbuYmSpH8moz6XXjVr8bd6QZTl3zsvOA4evi+BqRLbwsDXFDCFlrEesaft7wFL3ihiDn+lIahKUWqG2SZacOcuQL2NoI7486Z2b8zBwJ+2jAL/iPXibRzP5nGV3BD/06Eilyv/skXNlnoy9vlFKva1ywhz8d+Xy0/1mNlCl3UB72uLAl2FDWVGpjJ1BwPvp8jB2RERGr2h3btiXlvcM2wUUPS0QPPG+C/w3/floiShbdManzYzbZJb2nSIpMaeVaEdteEpWJltOnqKZJ+92nRyvrQPTMGPO2arU0z0neXiPqJfFAajHFjUGpjZUfKV0d0alERNEhqhQO9eV4bUTUoagk8qyIangRSuMO7PpMWBIlJAdJVDoV5z2y5y+ZteuKXcS/lxZe20Wy2EQDhlpUmHEs4vbYScD8VXRvUKzJ1kTXhONQFDHEUqpYqdlveJOVaN49/AWuVb4JKaLcJgAAAABJRU5ErkJggg==",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,at=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGYSURBVHgBzZZPTsJAFMbfG8A/0USO0BvQI9AFJu5sjEbiptwATgCcQG5QN1ATNeOOBEioN8Ab9Ai4MHFR5jmjxiilzNSi8dt00vfN+01m5r0W4I+EWcw+5+VivGOrcVx8mTVcd2461wikALuw3yaA5lKoU3drXZMczMS0DXvTFZA30DUfX4KBtKD+3chDQDstrhYQ3AyrkBfEkI51HmLpCzEGAbIDnYWQWTqPFkREj9okCDOtR2dAxHuNIwIohZAXJK9vKB+pV5hg0aq7TgQaGRdswEceEXgMWUUQPSGIWQG3Omeuo922/yXVFQI+tNbFwUBrt27Ax015iKr1qGShEOLh/fDVTGEzLFTkqCpPKhICuhcnh1eZQQGf+DKBBxkkk/XO3VorJbYZiA6WAKnexhj6kEdx7NRPj8KvrxJ1xBi0Ia+KxUSOb6DB7UQ2ULQgv6p9PrJTQYQLbRc2loB0kOxrFmxMZKWCflPLIOOfDW1i9lHYq0CIpd5n5edS8tORqCOfT8s7EP/4UhSA5s9Qihqus7HdyaRXhOV61M1m9WYAAAAASUVORK5CYII=",l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("rio-assist.js",document.baseURI).href).href,lt=n=>{const e=be(n);return p`
1026
+ <section class="fullscreen-shell" role="dialog" aria-modal="true">
1027
+ <div class="fullscreen-shell__rail">
1028
+ <button type="button" class="rail-button" aria-label="Ir para home">
1029
+ <img src=${nt} alt="" aria-hidden="true" />
1030
+ </button>
1031
+ <button
1032
+ type="button"
1033
+ class="rail-button rail-button--close"
1034
+ aria-label="Fechar tela cheia"
1035
+ @click=${()=>n.exitFullscreen(!0)}
1036
+ >
1037
+ <svg viewBox="0 0 16 16" aria-hidden="true">
1038
+ <path
1039
+ d="M10.5 3l-5 5 5 5"
1040
+ fill="none"
1041
+ stroke="currentColor"
1042
+ stroke-width="2"
1043
+ stroke-linecap="round"
1044
+ stroke-linejoin="round"
1045
+ />
1046
+ </svg>
1047
+ </button>
1048
+ </div>
1049
+
1050
+ <div class="fullscreen-shell__content">
1051
+ <header class="fullscreen-header">
1052
+ <div class="fullscreen-header__title">
1053
+ <span class="fullscreen-header__brand">RIO ASSIST</span>
1054
+ </div>
1055
+
1056
+ <div class="fullscreen-header__tabs">
1057
+ <span class="fullscreen-header__tab">CONVERSA</span>
1058
+ </div>
1059
+
1060
+ <div class="fullscreen-header__actions">
1061
+ <button type="button" class="fullscreen-header__icon" aria-label="Status">
1062
+ <img src=${rt} alt="" aria-hidden="true" />
1063
+ </button>
1064
+ <button type="button" class="fullscreen-header__icon" aria-label="Informacoes">
1065
+ <img src=${ot} alt="" aria-hidden="true" />
1066
+ </button>
1067
+ <button type="button" class="fullscreen-header__icon" aria-label="Perfil de usuario">
1068
+ <img src=${at} alt="" aria-hidden="true" />
1069
+ </button>
1070
+ </div>
1071
+ </header>
1072
+
1073
+ <div class="fullscreen-grid">
1074
+ ${fe(n,{variant:"sidebar"})}
1075
+ <div class="fullscreen-chat">
1076
+ ${e}
1077
+ </div>
1078
+ </div>
1079
+ </div>
1080
+ </section>
1081
+ `},ct=n=>{const e=g({canvas:!0,"canvas--fullscreen":n.isFullscreen});return p`
1082
+ <div class=${e}>
1083
+ ${Fe(n)}
1084
+ ${it(n)}
1085
+ ${n.isFullscreen?lt(n):null}
1086
+ </div>
1087
+ `},ht="wss://ws.volkswagen.latam-sandbox.rio.cloud",dt="eu.amazon.nova-pro-v1:0";class pt{constructor(e){this.socket=null,this.connectPromise=null,this.listeners=new Set,this.token=e}matchesToken(e){return this.token===e}async sendMessage(e){const t=await this.ensureConnection(),s={action:"sendMessage",message:e,agentModel:dt};t.send(JSON.stringify(s))}onMessage(e){return this.listeners.add(e),()=>this.listeners.delete(e)}close(){this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.close(),this.connectPromise=null,this.socket=null,this.listeners.clear()}async ensureConnection(){if(this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING))return await this.connectPromise,this.socket;if(this.socket=new WebSocket(`${ht}?token=${encodeURIComponent(this.token)}`),this.socket.addEventListener("message",e=>this.handleMessage(e)),this.socket.addEventListener("close",()=>{this.connectPromise=null,this.socket=null}),this.connectPromise=new Promise((e,t)=>{if(!this.socket){t(new Error("Falha ao criar conexão WebSocket."));return}const s=()=>{r(),e()},i=()=>{var o;r(),(o=this.socket)==null||o.close(),this.socket=null,this.connectPromise=null,t(new Error("Não foi possível abrir conexão com o websocket do RIO Assist."))},r=()=>{var o,c;(o=this.socket)==null||o.removeEventListener("open",s),(c=this.socket)==null||c.removeEventListener("error",i)};this.socket.addEventListener("open",s,{once:!0}),this.socket.addEventListener("error",i,{once:!0})}),await this.connectPromise,!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new Error("Conexão WebSocket do RIO Assist não está pronta.");return this.socket}async handleMessage(e){const t=await this.readMessage(e.data);let s=null,i=t;try{if(s=JSON.parse(t),typeof s=="object"&&s!==null){const r=s.message??s.response??s.text??s.content;typeof r=="string"&&(i=r)}}catch{s=null}this.listeners.forEach(r=>r({text:i,raw:t,data:s}))}async readMessage(e){return typeof e=="string"?e:e instanceof Blob?e.text():e instanceof ArrayBuffer?new TextDecoder().decode(new Uint8Array(e)):ArrayBuffer.isView(e)?new TextDecoder().decode(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):String(e??"")}}const L=class L extends T{constructor(){super(...arguments),this.open=!1,this.message="",this.titleText="RIO Assist",this.buttonLabel="RIO Assist",this.placeholder="Pergunte alguma coisa",this.accentColor="#008B9A",this.apiBaseUrl="",this.rioToken="",this.suggestionsSource="",this.messages=[],this.isLoading=!1,this.errorMessage="",this.showConversations=!1,this.conversationSearch="",this.conversationMenuId=null,this.conversationMenuPlacement="below",this.isFullscreen=!1,this.conversationScrollbar={height:0,top:0,visible:!1},this.conversationScrollbarRaf=null,this.rioClient=null,this.rioUnsubscribe=null,this.loadingTimer=null,this.conversations=Array.from({length:20}).map((e,t)=>({id:`${t+1}`,title:["Caminhões com problema na frota de veículos.","Próximas manutenções periódicas preventivas.","Quais revisões meu plano inclui?","Como automatizar preenchimento de odômetro.","Valor das peças da próxima revisão.","O que é revisão de assentamento?","Alertas críticos ativos.","Veículo superaquecendo, causas e recomendações.","Calibragem recomendada nos pneus do e-Delivery.","Quantos mil km trocar o óleo do motor.","Qual a vida útil da bateria Moura M100HE."][t%11],updatedAt:new Date(Date.now()-t*36e5).toISOString()}))}get suggestions(){return this.suggestionsSource?this.suggestionsSource.split("|").map(e=>e.trim()).filter(Boolean):[]}updated(e){super.updated(e),this.style.setProperty("--accent-color",this.accentColor),(e.has("isFullscreen")||e.has("showConversations")||e.has("conversations"))&&this.enqueueConversationScrollbarMeasure()}firstUpdated(){this.enqueueConversationScrollbarMeasure()}disconnectedCallback(){super.disconnectedCallback(),this.conversationScrollbarRaf!==null&&(cancelAnimationFrame(this.conversationScrollbarRaf),this.conversationScrollbarRaf=null),this.teardownRioClient(),this.clearLoadingGuard()}get filteredConversations(){const e=this.conversationSearch.trim().toLowerCase();return e?this.conversations.filter(t=>t.title.toLowerCase().includes(e)):this.conversations}togglePanel(){if(this.isFullscreen){this.exitFullscreen(!1);return}this.open=!this.open,this.dispatchEvent(new CustomEvent(this.open?"rioassist:open":"rioassist:close",{bubbles:!0,composed:!0}))}closePanel(){this.isFullscreen=!1,this.open&&this.togglePanel()}openConversationsPanel(){this.showConversations=!0}closeConversationsPanel(){this.showConversations=!1,this.conversationMenuId=null}toggleConversationsPanel(){this.showConversations=!this.showConversations,this.showConversations||(this.conversationMenuId=null)}handleConversationSearch(e){this.conversationSearch=e.target.value}handleConversationMenuToggle(e,t){if(e.stopPropagation(),this.conversationMenuId===t){this.conversationMenuId=null;return}const s=e.currentTarget,i=this.renderRoot.querySelector(".conversations-panel__surface");if(s&&i){const r=s.getBoundingClientRect(),c=i.getBoundingClientRect().bottom-r.bottom;this.conversationMenuPlacement=c<140?"above":"below"}else this.conversationMenuPlacement="below";this.conversationMenuId=t}handleConversationsPanelPointer(e){const t=e.target;!t.closest(".conversation-menu")&&!t.closest(".conversation-menu-button")&&(this.conversationMenuId=null)}handleConversationAction(e,t){this.conversationMenuId=null;const s=this.conversations.find(r=>r.id===t);if(!s)return;const i=`${e==="rename"?"Renomear":"Excluir"} "${s.title}"`;console.info(`[Mock] ${i}`)}handleCloseAction(){if(this.isFullscreen){this.exitFullscreen(!0);return}this.showConversations?this.closeConversationsPanel():this.closePanel()}enterFullscreen(){this.isFullscreen||(this.isFullscreen=!0,this.open=!1,this.showConversations=!1)}exitFullscreen(e){this.isFullscreen&&(this.isFullscreen=!1,this.conversationMenuId=null,e&&(this.open=!0))}handleCreateConversation(){console.info("[Mock] Criar nova conversa")}handleConversationListScroll(e){const t=e.currentTarget;t&&this.updateConversationScrollbar(t)}enqueueConversationScrollbarMeasure(){this.conversationScrollbarRaf===null&&(this.conversationScrollbarRaf=requestAnimationFrame(()=>{this.conversationScrollbarRaf=null,this.updateConversationScrollbar()}))}updateConversationScrollbar(e){const t=e??this.renderRoot.querySelector(".conversation-list--sidebar");if(!t){this.conversationScrollbar.visible&&(this.conversationScrollbar={height:0,top:0,visible:!1});return}const{scrollHeight:s,clientHeight:i,scrollTop:r}=t;if(s<=i+1){this.conversationScrollbar.visible&&(this.conversationScrollbar={height:0,top:0,visible:!1});return}const o=i/s,c=Math.max(o*100,8),a=100-c,d=r/(s-i)*(a>0?a:0);this.conversationScrollbar={height:c,top:d,visible:!0}}async onSuggestionClick(e){await this.processMessage(e)}async handleSubmit(e){e.preventDefault(),await this.processMessage(this.message)}createMessage(e,t){return{id:typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random()}`,role:e,text:t,timestamp:Date.now()}}async processMessage(e){const t=e.trim();if(!t||this.isLoading)return;this.dispatchEvent(new CustomEvent("rioassist:send",{detail:{message:t,apiBaseUrl:this.apiBaseUrl,token:this.rioToken},bubbles:!0,composed:!0}));const s=this.createMessage("user",t);this.messages=[...this.messages,s],this.message="",this.errorMessage="",this.isLoading=!0,this.startLoadingGuard();try{await this.ensureRioClient().sendMessage(t)}catch(i){this.clearLoadingGuard(),this.isLoading=!1,this.errorMessage=i instanceof Error?i.message:"Nao foi possivel enviar a mensagem para o agente."}}ensureRioClient(){const e=this.rioToken.trim();if(!e)throw new Error("Informe o token RIO em data-rio-token para conectar no websocket do assistente.");return(!this.rioClient||!this.rioClient.matchesToken(e))&&(this.teardownRioClient(),this.rioClient=new pt(e),this.rioUnsubscribe=this.rioClient.onMessage(t=>{this.handleIncomingMessage(t)})),this.rioClient}handleIncomingMessage(e){const t=this.createMessage("assistant",e.text);this.messages=[...this.messages,t],this.clearLoadingGuard(),this.isLoading=!1}teardownRioClient(){this.rioUnsubscribe&&(this.rioUnsubscribe(),this.rioUnsubscribe=null),this.rioClient&&(this.rioClient.close(),this.rioClient=null)}startLoadingGuard(){this.clearLoadingGuard(),this.loadingTimer=window.setTimeout(()=>{this.loadingTimer=null,this.isLoading=!1},15e3)}clearLoadingGuard(){this.loadingTimer!==null&&(window.clearTimeout(this.loadingTimer),this.loadingTimer=null)}render(){return ct(this)}};L.styles=Ve,L.properties={open:{type:Boolean,state:!0},message:{type:String,state:!0},titleText:{type:String,attribute:"data-title"},buttonLabel:{type:String,attribute:"data-button-label"},placeholder:{type:String,attribute:"data-placeholder"},accentColor:{type:String,attribute:"data-accent-color"},apiBaseUrl:{type:String,attribute:"data-api-base-url"},rioToken:{type:String,attribute:"data-rio-token"},suggestionsSource:{type:String,attribute:"data-suggestions"},messages:{state:!0},isLoading:{type:Boolean,state:!0},errorMessage:{type:String,state:!0},showConversations:{type:Boolean,state:!0},conversationSearch:{type:String,state:!0},conversationMenuId:{state:!0},conversationMenuPlacement:{state:!0},isFullscreen:{type:Boolean,state:!0},conversationScrollbar:{state:!0}};let K=L;customElements.get("rio-assist-widget")||customElements.define("rio-assist-widget",K);const ut={title:"RIO Assist",buttonLabel:"RIO Assist",placeholder:"Pergunte alguma coisa",suggestions:["Veículos com problemas","Valor das peças","Planos de manutenção"],accentColor:"#008B9A",apiBaseUrl:"",rioToken:""},me="rio-assist-widget";function At(n={}){const{target:e=document.body,...t}=n;let s=document.querySelector(me);s||(s=document.createElement(me),e.appendChild(s));const i={...ut,...t};Object.entries(i).forEach(([r,o])=>{o!==void 0&&(s==null||s.setAttribute(`data-${r.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`,Array.isArray(o)?o.join("|"):String(o)))})}typeof window<"u"&&(window.RioAssist=window.RioAssist??{init:At},window.dispatchEvent(new Event("rio-assist-ready")))})();