deep-chat-dev 9.0.319 → 9.0.320
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +21574 -21545
- package/dist/deepChat.bundle.js +1 -1
- package/dist/deepChat.d.ts.map +1 -1
- package/dist/deepChat.js +9 -9
- package/dist/views/chat/input/textInput/textInput.d.ts +1 -0
- package/dist/views/chat/input/textInput/textInput.d.ts.map +1 -1
- package/dist/views/chat/input/validation/validationHandler.d.ts +1 -1
- package/dist/views/chat/input/validation/validationHandler.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/deepChat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepChat.d.ts","sourceRoot":"","sources":["../src/deepChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,wBAAwB,EAAE,kBAAkB,EAAE,4BAA4B,EAAC,MAAM,4BAA4B,CAAC;AACtH,OAAO,EAAC,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAInH,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAC,kBAAkB,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAI7E,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAI/D,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAC,iBAAiB,E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C,EAAE,mBAAmB,CAAC;;IAe3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAE1C,OAAO,CAAC,gBAAgB;IAMf,QAAQ;IA2BjB,oBAAoB;CAGrB;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
package/dist/deepChat.js
CHANGED
|
@@ -6,8 +6,8 @@ function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,
|
|
|
6
6
|
overflow:"hidden"};var Kn=rn;var Pt=/*#__PURE__*/function(){function Pt(){_classCallCheck(this,Pt);}return _createClass(Pt,null,[{key:"buildElement",value:function buildElement(){var e=S();e[m].add("tooltip");var t=S("span");return t[m].add("tooltip-text"),e.appendChild(t),e;}},{key:"tryCreateConfig",value:function tryCreateConfig(e,t){if(t)return typeof t=="boolean"?_defineProperty({},h,e):_defineProperty(_defineProperty(_defineProperty({},h,t[h]||e),"timeout",t.timeout||0),"style",t[_]);}},{key:"traverseParentUntilContainer",value:function traverseParentUntilContainer(e){var t=e;for(;t.parentElement;)t=t.parentElement;return t;}},{key:"setPosition",value:function setPosition(e,t){var s=t.getRootNode().host.getBoundingClientRect(),r=e.getBoundingClientRect(),a=t.getBoundingClientRect().width/2,c=r.left+r.width/2;t[_].left="".concat(c-a-s.left,"px"),t[_].top="".concat(r.top-36-s.top,"px");var l=t.getBoundingClientRect();l.left<s.left?t[_].left="".concat(Pt.OVERFLOW_NEW_POSITION_PX,"px"):l.right>s.right&&(t[_].left="".concat(s.width-l.width-Pt.OVERFLOW_NEW_POSITION_PX,"px"));}},{key:"display",value:function display(e,t,n){return n||(n=Pt.traverseParentUntilContainer(e).nextSibling),t[h]&&(n.children[0].textContent=t[h]),{timeout:setTimeout(function(){n[_].visibility="visible",Pt.setPosition(e,n),t[_]&&Object.assign(n[_],t[_]);},t.timeout||0),element:n};}},{key:"hide",value:function hide(e,t){clearTimeout(e.timeout),e.element[_].visibility="hidden",t[_]&&Q.unsetStyle(e.element,t[_]),e.element[_].left="",e.element[_].top="";}}]);}();Pt.OVERFLOW_NEW_POSITION_PX=4;var tt=Pt;var es=/*#__PURE__*/_createClass(function es(){_classCallCheck(this,es);});es.IS_SAFARI=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),es.IS_CHROMIUM=window.chrome,es.IS_MOBILE=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);var Oe=es;var ge=/* @__PURE__ */function(i){return i.ESCAPE="Escape",i.ENTER="Enter",i.TAB="Tab",i.ARROW_UP="ArrowUp",i.ARROW_DOWN="ArrowDown",i.ARROW_RIGHT="ArrowRight",i.ARROW_LEFT="ArrowLeft",i.BACKSPACE="Backspace",i.DELETE="Delete",i.META="Meta",i.CONTROL="Control",i;}(ge||{});var Bt=/*#__PURE__*/function(){function Bt(){_classCallCheck(this,Bt);}return _createClass(Bt,null,[{key:"add",value:// prettier-ignore
|
|
7
7
|
function add(e,t,n,s){n!==void 0&&e.addEventListener("keydown",Bt.onKeyDown.bind(this,n)),e.oninput=Bt.onInput.bind(this,n,s),e.addEventListener("paste",function(r){var o;r.preventDefault(),(o=r.clipboardData)!=null&&o[y].length&&t.addFilesToAnyType(Array.from(r.clipboardData[y]));});}// preventing insertion early for a nicer UX
|
|
8
8
|
// prettier-ignore
|
|
9
|
-
},{key:"onKeyDown",value:function onKeyDown(e,t){var s=t.target.textContent;s&&s.length>=e&&!Bt.PERMITTED_KEYS.has(t.key)&&!Bt.isKeyCombinationPermitted(t)&&t.preventDefault();}},{key:"isKeyCombinationPermitted",value:function isKeyCombinationPermitted(e){return e.key==="a"?e.ctrlKey||e.metaKey:!1;}},{key:"onInput",value:function onInput(e,t,n){var s=n.target,r=s.textContent||"";e!==void 0&&r.length>e&&(s.textContent=r.substring(0,e),zt.focusEndOfInput(s)),t==null||t();}}]);}();Bt.PERMITTED_KEYS=/* @__PURE__ */new Set([ge.BACKSPACE,ge.DELETE,ge.ARROW_RIGHT,ge.ARROW_LEFT,ge.ARROW_DOWN,ge.ARROW_UP,ge.META,ge.CONTROL,ge.ENTER]);var gi=Bt;var ra=/*#__PURE__*/function(){function ra(){_classCallCheck(this,ra);}return _createClass(ra,null,[{key:"sanitizePastedTextContent",value:function sanitizePastedTextContent(e){var n,s;e.preventDefault();var t=(n=e.clipboardData)==null?void 0:n.getData("text/plain");t&&((s=document.execCommand)==null||s.call(document,"insertText",!1,t));}}]);}();var xt=/*#__PURE__*/function(){function xt(e,t,n,s){var _this=this;_classCallCheck(this,xt);var o,a,c,l;this._isComposing=!1;var r=xt.processConfig(t,e.textInput);this.elementRef=xt.createContainerElement((o=r==null?void 0:r.styles)==null?void 0:o.container),this._config=r,this.inputElementRef=this.createInputElement((a=e.defaultInput)==null?void 0:a[h],s),xt.addFilesToAnyType(n,(c=e.defaultInput)==null?void 0:c[y]),this.elementRef.appendChild(this.inputElementRef),e.setPlaceholderText=this.setPlaceholderText.bind(this),e.setPlaceholderText(((l=this._config.placeholder)==null?void 0:l[h])||"Ask me anything!"),setTimeout(function(){gi.add(_this.inputElementRef,n,_this._config.characterLimit,e._validationHandler),_this._onInput=t.onInput;});}return _createClass(xt,[{key:"clear",value:// this also similarly prevents scroll up
|
|
10
|
-
function clear(){var t,n;var e=window.scrollY;this.inputElementRef[m].contains("text-input-disabled")||(Object.assign(this.inputElementRef[_],(t=this._config.placeholder)==null?void 0:t[_]),this.inputElementRef.textContent="",zt.focusEndOfInput(this.inputElementRef),(n=this._onInput)==null||n.call(this,!1)),Oe.IS_CHROMIUM&&window.scrollTo({top:e});}},{key:"createInputElement",value:function createInputElement(e,t){var s,r,o,a;var n=S();return n.id=xt.TEXT_INPUT_ID,n[m].add("text-input-styling"),n.role="textbox",typeof e=="string"?n.innerText=e:t!=null&&t.trackInputText&&(n.innerText=t.get().inputText||""),Oe.IS_MOBILE&&n.setAttribute("tabindex","0"),Oe.IS_CHROMIUM&&xt.preventAutomaticScrollUpOnNewLine(n),typeof this._config.disabled=="boolean"&&this._config.disabled===!0?(n.contentEditable="false",n[m].add("text-input-disabled"),n.setAttribute("aria-disabled","true")):(n.contentEditable="true",n.removeAttribute("aria-disabled"),this.addEventListeners(n)),Object.assign(n[_],(s=this._config.styles)==null?void 0:s[h]),Object.assign(n[_],(r=this._config.placeholder)==null?void 0:r[_]),(a=(o=this._config.placeholder)==null?void 0:o[_])!=null&&a.color||n.setAttribute("textcolor",""),n;}},{key:"removePlaceholderStyle",value:function removePlaceholderStyle(){var e,t,n,s;!this.inputElementRef[m].contains("text-input-disabled")&&(e=this._config.placeholder)!=null&&e[_]&&(Q.unsetStyle(this.inputElementRef,(t=this._config.placeholder)==null?void 0:t[_]),Object.assign(this.inputElementRef[_],(s=(n=this._config)==null?void 0:n.styles)==null?void 0:s[h]));}},{key:"addEventListeners",value:function addEventListeners(e){var _this2=this;var t,n;(t=this._config.styles)!=null&&t.focus&&(e.onfocus=function(){var s;return Object.assign(_this2.elementRef[_],(s=_this2._config.styles)==null?void 0:s.focus);},e.onblur=this.onBlur.bind(this,this._config.styles.focus,(n=this._config.styles)==null?void 0:n.container)),e.addEventListener("keydown",this.onKeydown.bind(this)),e.addEventListener("input",this.onInput.bind(this)),e.addEventListener("paste",ra.sanitizePastedTextContent),e.addEventListener("compositionstart",function(){return _this2._isComposing=!0;}),e.addEventListener("compositionend",function(){return _this2._isComposing=!1;});}},{key:"onBlur",value:function onBlur(e,t){Q.unsetStyle(this.elementRef,e),t&&Object.assign(this.elementRef[_],t);}},{key:"onKeydown",value:function onKeydown(e){var t;e.key===ge.ENTER&&!Oe.IS_MOBILE&&!this._isComposing&&!e.ctrlKey&&!e.shiftKey&&(e.preventDefault(),(t=this.submit)==null||t.call(this));}},{key:"onInput",value:function onInput(){var e,t;this.isTextInputEmpty()?Object.assign(this.inputElementRef[_],(e=this._config.placeholder)==null?void 0:e[_]):this.removePlaceholderStyle(),(t=this._onInput)==null||t.call(this,!0);}},{key:"setPlaceholderText",value:function setPlaceholderText(e){this.inputElementRef.setAttribute("deep-chat-placeholder-text",e),this.inputElementRef.setAttribute("aria-label",e);}},{key:"isTextInputEmpty",value:function isTextInputEmpty(){return this.inputElementRef.textContent==="";}}],[{key:"processConfig",value:function processConfig(e,t){var _t$disabled,_t$placeholder,_n$h;var n;return t!==null&&t!==void 0?t:t={},(_t$disabled=t.disabled)!==null&&_t$disabled!==void 0?_t$disabled:t.disabled=e.isTextInputDisabled,(_t$placeholder=t.placeholder)!==null&&_t$placeholder!==void 0?_t$placeholder:t.placeholder={},(_n$h=(n=t.placeholder)[h])!==null&&_n$h!==void 0?_n$h:n[h]=e.textInputPlaceholderText,t;}},{key:"createContainerElement",value:function createContainerElement(e){var t=S();return t.id="text-input-container",Object.assign(t[_],e),t;}// this is is a bug fix where if the browser is scrolled down and the user types in text that creates new line
|
|
9
|
+
},{key:"onKeyDown",value:function onKeyDown(e,t){var s=t.target.textContent;s&&s.length>=e&&!Bt.PERMITTED_KEYS.has(t.key)&&!Bt.isKeyCombinationPermitted(t)&&t.preventDefault();}},{key:"isKeyCombinationPermitted",value:function isKeyCombinationPermitted(e){return e.key==="a"?e.ctrlKey||e.metaKey:!1;}},{key:"onInput",value:function onInput(e,t,n){var s=n.target,r=s.textContent||"";e!==void 0&&r.length>e&&(s.textContent=r.substring(0,e),zt.focusEndOfInput(s)),t==null||t();}}]);}();Bt.PERMITTED_KEYS=/* @__PURE__ */new Set([ge.BACKSPACE,ge.DELETE,ge.ARROW_RIGHT,ge.ARROW_LEFT,ge.ARROW_DOWN,ge.ARROW_UP,ge.META,ge.CONTROL,ge.ENTER]);var gi=Bt;var ra=/*#__PURE__*/function(){function ra(){_classCallCheck(this,ra);}return _createClass(ra,null,[{key:"sanitizePastedTextContent",value:function sanitizePastedTextContent(e){var n,s;e.preventDefault();var t=(n=e.clipboardData)==null?void 0:n.getData("text/plain");t&&((s=document.execCommand)==null||s.call(document,"insertText",!1,t));}}]);}();var xt=/*#__PURE__*/function(){function xt(e,t,n,s){var _this=this;_classCallCheck(this,xt);var o,a,c,l;this._isComposing=!1;var r=xt.processConfig(t,e.textInput);this.elementRef=xt.createContainerElement((o=r==null?void 0:r.styles)==null?void 0:o.container),this._config=r,this.inputElementRef=this.createInputElement((a=e.defaultInput)==null?void 0:a[h],s),xt.addFilesToAnyType(n,(c=e.defaultInput)==null?void 0:c[y]),this.elementRef.appendChild(this.inputElementRef),e.setPlaceholderText=this.setPlaceholderText.bind(this),e.setPlaceholderText(((l=this._config.placeholder)==null?void 0:l[h])||"Ask me anything!"),this._browserStorage=s,setTimeout(function(){gi.add(_this.inputElementRef,n,_this._config.characterLimit,e._validationHandler),_this._onInput=t.onInput;});}return _createClass(xt,[{key:"clear",value:// this also similarly prevents scroll up
|
|
10
|
+
function clear(){var t,n,s;var e=window.scrollY;this.inputElementRef[m].contains("text-input-disabled")||(Object.assign(this.inputElementRef[_],(t=this._config.placeholder)==null?void 0:t[_]),this.inputElementRef.textContent="",zt.focusEndOfInput(this.inputElementRef),(n=this._onInput)==null||n.call(this,!1),(s=this._browserStorage)==null||s.addInputText("")),Oe.IS_CHROMIUM&&window.scrollTo({top:e});}},{key:"createInputElement",value:function createInputElement(e,t){var s,r,o,a;var n=S();return n.id=xt.TEXT_INPUT_ID,n[m].add("text-input-styling"),n.role="textbox",typeof e=="string"?n.innerText=e:t!=null&&t.trackInputText&&(n.innerText=t.get().inputText||""),Oe.IS_MOBILE&&n.setAttribute("tabindex","0"),Oe.IS_CHROMIUM&&xt.preventAutomaticScrollUpOnNewLine(n),typeof this._config.disabled=="boolean"&&this._config.disabled===!0?(n.contentEditable="false",n[m].add("text-input-disabled"),n.setAttribute("aria-disabled","true")):(n.contentEditable="true",n.removeAttribute("aria-disabled"),this.addEventListeners(n)),Object.assign(n[_],(s=this._config.styles)==null?void 0:s[h]),Object.assign(n[_],(r=this._config.placeholder)==null?void 0:r[_]),(a=(o=this._config.placeholder)==null?void 0:o[_])!=null&&a.color||n.setAttribute("textcolor",""),n;}},{key:"removePlaceholderStyle",value:function removePlaceholderStyle(){var e,t,n,s;!this.inputElementRef[m].contains("text-input-disabled")&&(e=this._config.placeholder)!=null&&e[_]&&(Q.unsetStyle(this.inputElementRef,(t=this._config.placeholder)==null?void 0:t[_]),Object.assign(this.inputElementRef[_],(s=(n=this._config)==null?void 0:n.styles)==null?void 0:s[h]));}},{key:"addEventListeners",value:function addEventListeners(e){var _this2=this;var t,n;(t=this._config.styles)!=null&&t.focus&&(e.onfocus=function(){var s;return Object.assign(_this2.elementRef[_],(s=_this2._config.styles)==null?void 0:s.focus);},e.onblur=this.onBlur.bind(this,this._config.styles.focus,(n=this._config.styles)==null?void 0:n.container)),e.addEventListener("keydown",this.onKeydown.bind(this)),e.addEventListener("input",this.onInput.bind(this)),e.addEventListener("paste",ra.sanitizePastedTextContent),e.addEventListener("compositionstart",function(){return _this2._isComposing=!0;}),e.addEventListener("compositionend",function(){return _this2._isComposing=!1;});}},{key:"onBlur",value:function onBlur(e,t){Q.unsetStyle(this.elementRef,e),t&&Object.assign(this.elementRef[_],t);}},{key:"onKeydown",value:function onKeydown(e){var t;e.key===ge.ENTER&&!Oe.IS_MOBILE&&!this._isComposing&&!e.ctrlKey&&!e.shiftKey&&(e.preventDefault(),(t=this.submit)==null||t.call(this));}},{key:"onInput",value:function onInput(){var e,t;this.isTextInputEmpty()?Object.assign(this.inputElementRef[_],(e=this._config.placeholder)==null?void 0:e[_]):this.removePlaceholderStyle(),(t=this._onInput)==null||t.call(this,!0);}},{key:"setPlaceholderText",value:function setPlaceholderText(e){this.inputElementRef.setAttribute("deep-chat-placeholder-text",e),this.inputElementRef.setAttribute("aria-label",e);}},{key:"isTextInputEmpty",value:function isTextInputEmpty(){return this.inputElementRef.textContent==="";}}],[{key:"processConfig",value:function processConfig(e,t){var _t$disabled,_t$placeholder,_n$h;var n;return t!==null&&t!==void 0?t:t={},(_t$disabled=t.disabled)!==null&&_t$disabled!==void 0?_t$disabled:t.disabled=e.isTextInputDisabled,(_t$placeholder=t.placeholder)!==null&&_t$placeholder!==void 0?_t$placeholder:t.placeholder={},(_n$h=(n=t.placeholder)[h])!==null&&_n$h!==void 0?_n$h:n[h]=e.textInputPlaceholderText,t;}},{key:"createContainerElement",value:function createContainerElement(e){var t=S();return t.id="text-input-container",Object.assign(t[_],e),t;}// this is is a bug fix where if the browser is scrolled down and the user types in text that creates new line
|
|
11
11
|
// the browser scrollbar will move up which leads to undesirable UX.
|
|
12
12
|
// More details in this Stack Overflow question:
|
|
13
13
|
// https://stackoverflow.com/questions/76285135/prevent-automatic-scroll-when-text-is-inserted-into-contenteditable-div
|
|
@@ -262,14 +262,14 @@ function pt(e,t,n,s,r){_classCallCheck(this,pt);return _callSuper(this,pt,[e,t,n
|
|
|
262
262
|
function create(e,t,n,s,r,o){return o===P?new ps(e,t,n,s,r):new mt(e,t,n,s,r);}}]);}();var gs=/*#__PURE__*/function(){function gs(e,t,n){_classCallCheck(this,gs);this._fileAttachmentsTypes=[],this.elementRef=this.createAttachmentContainer();var s=_typeof(n)=="object"&&!!n.displayFileAttachmentContainer;this.toggleContainerDisplay(s),e.appendChild(this.elementRef),t&&Object.assign(this.elementRef[_],t);}// prettier-ignore
|
|
263
263
|
return _createClass(gs,[{key:"addType",value:function addType(e,t,n,s){var r=th.create(e,t,n,this.toggleContainerDisplay.bind(this),this.elementRef,s);return this._fileAttachmentsTypes.push(r),r;}},{key:"createAttachmentContainer",value:function createAttachmentContainer(){var e=S();return e.id="file-attachment-container",e;}},{key:"toggleContainerDisplay",value:function toggleContainerDisplay(e){e?this.elementRef[_].display="block":this.elementRef.children.length===0&&(this.elementRef[_].display="none");}},{key:"getAllFileData",value:function getAllFileData(){var e=this._fileAttachmentsTypes.map(function(t){return t.getFiles();}).flat();return e.length>0?e:void 0;}},{key:"completePlaceholders",value:function(){var _completePlaceholders=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee181(){return _regenerator().w(function(_context181){while(1)switch(_context181.n){case 0:_context181.n=1;return Promise.all(this._fileAttachmentsTypes.map(/*#__PURE__*/function(){var _ref222=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee180(e){var t;return _regenerator().w(function(_context180){while(1)switch(_context180.n){case 0:return _context180.a(2,(t=e.stopPlaceholderCallback)==null?void 0:t.call(e));}},_callee180);}));return function(_x333){return _ref222.apply(this,arguments);};}()));case 1:return _context181.a(2);}},_callee181,this);}));function completePlaceholders(){return _completePlaceholders.apply(this,arguments);}return completePlaceholders;}()},{key:"addFilesToAnyType",value:function addFilesToAnyType(e){gs.addFilesToType(e,this._fileAttachmentsTypes);}},{key:"hideFiles",value:function hideFiles(){this._fileAttachmentsTypes.forEach(function(e){return e.hideAttachments();}),this.elementRef.replaceChildren(),this.toggleContainerDisplay(!1);}},{key:"removeHiddenFiles",value:function removeHiddenFiles(){this._fileAttachmentsTypes.forEach(function(e){return e.removeAttachments();});}},{key:"readdHiddenFiles",value:function readdHiddenFiles(){this._fileAttachmentsTypes.forEach(function(e){return e.readdAttachments();}),this.toggleContainerDisplay(!0);}},{key:"getNumberOfTypes",value:function getNumberOfTypes(){return this._fileAttachmentsTypes.length;}}],[{key:"addFilesToType",value:function addFilesToType(e,t){e.forEach(function(n){var s=new FileReader();s.readAsDataURL(n),s.onload=function(r){for(var o=0;o<t.length&&!t[o].attemptAddFile(n,r.target.result);o+=1);};});}}]);}();var Ze=/*#__PURE__*/function(){function Ze(e,t,n){_classCallCheck(this,Ze);this._isOpen=!1,this._contentRef=Ze.createModalContent(t,n==null?void 0:n.backgroundColor),this._buttonPanel=Ze.createButtonPanel(n==null?void 0:n.backgroundColor),this._elementRef=Ze.createContainer(this._contentRef,n),this._elementRef.appendChild(this._buttonPanel),e.appendChild(this._elementRef),this._backgroundPanelRef=Ze.createDarkBackgroundPanel(),e.appendChild(this._backgroundPanelRef),this.addWindowEvents(e);}return _createClass(Ze,[{key:"isOpen",value:function isOpen(){return this._isOpen;}},{key:"addButtons",value:function addButtons(){var _this103=this;for(var _len2=arguments.length,e=new Array(_len2),_key2=0;_key2<_len2;_key2++){e[_key2]=arguments[_key2];}e.forEach(function(t){se.addAttributes(t),_this103._buttonPanel.appendChild(t);});}},{key:"close",value:function close(){var _this104=this;this._elementRef[m].remove("show-modal"),this._elementRef[m].add("hide-modal"),this._backgroundPanelRef[m].remove("show-modal-background"),this._backgroundPanelRef[m].add("hide-modal-background"),this._isOpen=!1,setTimeout(function(){_this104._elementRef[_].display="none",_this104._backgroundPanelRef[_].display="none";},Ze.MODAL_CLOSE_TIMEOUT_MS);}},{key:"displayModalElements",value:function displayModalElements(){this._elementRef[_].display="flex",this._elementRef[m].remove("hide-modal"),this._elementRef[m].add("show-modal"),this._backgroundPanelRef[_].display="block",this._backgroundPanelRef[m].remove("hide-modal-background"),this._backgroundPanelRef[m].add("show-modal-background"),this._isOpen=!0;}},{key:"openTextModal",value:function openTextModal(e){this._contentRef.innerHTML=e,this.displayModalElements();}},{key:"addCloseButton",value:function addCloseButton(e,t,n){var _this105=this;var s=t?Ze.createSVGButton(e):Ze.createTextButton(e);return this.addButtons(s),s.onclick=function(){_this105.close(),setTimeout(function(){n==null||n();},140);},s;}},{key:"addWindowEvents",value:function addWindowEvents(e){this.keyDownEvent=this.windowKeyDown.bind(this,e),window.addEventListener("keydown",this.keyDownEvent);}},{key:"windowKeyDown",value:function windowKeyDown(e,t){var n,s;!e.isConnected&&this.keyDownEvent?window.removeEventListener("keydown",this.keyDownEvent):this._isOpen&&(t.key===ge.ESCAPE?(this.close(),(n=this.extensionCloseCallback)==null||n.call(this)):t.key===ge.ENTER&&(this.close(),(s=this.extensionCloseCallback)==null||s.call(this)));}}],[{key:"createContainer",value:function createContainer(e,t){var n=S();return n[m].add("modal"),n.appendChild(e),t&&delete t.backgroundColor,Object.assign(n[_],t),n;}},{key:"createModalContent",value:function createModalContent(e,t){var _n$m;var n=S();return(_n$m=n[m]).add.apply(_n$m,_toConsumableArray(e)),t&&(n[_].backgroundColor=t),S().appendChild(n),n;}},{key:"createButtonPanel",value:function createButtonPanel(e){var t=S();return t[m].add("modal-button-panel"),e&&(t[_].backgroundColor=e),t;}},{key:"createDarkBackgroundPanel",value:function createDarkBackgroundPanel(){var e=S();return e.id="modal-background-panel",e;}},{key:"createTextButton",value:function createTextButton(e){var t=S();return t[m].add("modal-button"),t.textContent=e,t;}},{key:"createSVGButton",value:function createSVGButton(e){var t=S();t[m].add("modal-button","modal-svg-button");var n=vt.createSVGElement(e);return n[m].add("modal-svg-button-icon"),t.appendChild(n),t;}},{key:"createTextModalFunc",value:function createTextModalFunc(e,t,n){var s;if(_typeof(t)=="object"&&(s=t[y])!=null&&s.infoModal){var r=new Ze(e,["modal-content"],t[y].infoModal.containerStyle);return r.addCloseButton("OK",!1,n),r.openTextModal.bind(r,t.infoModalTextMarkUp||"");}}}]);}();Ze.MODAL_CLOSE_TIMEOUT_MS=190;var Ht=Ze;var Js=/*#__PURE__*/function(_Qt5){// prettier-ignore
|
|
264
264
|
function Js(e,t,n,s,r,o){var _this106;_classCallCheck(this,Js);var p,u,g,v,b,E,C,U,W,X;var a=ee.processPosition((p=n==null?void 0:n.button)==null?void 0:p.position),c=((v=(g=(u=n==null?void 0:n.button)==null?void 0:u.styles)==null?void 0:g[h])==null?void 0:v.content)||o,l=tt.tryCreateConfig("Upload File",(b=n==null?void 0:n.button)==null?void 0:b.tooltip);_this106=_callSuper(this,Js,[Js.createButtonElement(),r,a,l,n.button,c]);var d=_this106.createInnerElementsForStates(s,_this106.customStyles);_this106._inputElement=Js.createInputElement((E=n==null?void 0:n[y])==null?void 0:E.acceptedFormats),_this106.addClickEvent(e,n),_this106.changeElementsByState(d.styles),_this106.reapplyStateStyle("styles"),_this106._fileAttachmentsType=t,_this106._openModalOnce=((U=(C=n[y])==null?void 0:C.infoModal)==null?void 0:U.openModalOnce)===!1||(X=(W=n[y])==null?void 0:W.infoModal)==null?void 0:X.openModalOnce;return _this106;}_inherits(Js,_Qt5);return _createClass(Js,[{key:"createInnerElementsForStates",value:function createInnerElementsForStates(e,t){return{styles:this.createInnerElements(e,"styles",t)};}},{key:"triggerImportPrompt",value:function triggerImportPrompt(e){e.onchange=this["import"].bind(this,e),e[q]();}},{key:"import",value:function _import(e){gs.addFilesToType(Array.from(e[y]||[]),[this._fileAttachmentsType]),e.value="";}},{key:"addClickEvent",value:function addClickEvent(e,t){var n=this.triggerImportPrompt.bind(this,this._inputElement),s=Ht.createTextModalFunc(e,t,n);this.elementRef.onclick=this[q].bind(this,s);}},{key:"click",value:function click(e){e&&(this._openModalOnce===void 0||this._openModalOnce===!0)?(e(),this._openModalOnce===!0&&(this._openModalOnce=!1)):this.triggerImportPrompt(this._inputElement);}}],[{key:"createInputElement",value:function createInputElement(e){var t=S("input");return t.type=Y,t.accept=e||"",t.hidden=!0,t.multiple=!0,t;}},{key:"createButtonElement",value:function createButtonElement(){var e=S();return e[m].add("input-button"),e;}}]);}(Qt);var ft=/*#__PURE__*/function(){function ft(){_classCallCheck(this,ft);}return _createClass(ft,null,[{key:"create",value:function create(e,t,n){var s=ft.createElement(n);ft.addEvents(s,e,t),e.appendChild(s);}},{key:"createElement",value:function createElement(e){var t=S();return t.id="drag-and-drop",_typeof(e)===B&&Object.assign(t[_],e),t;}},{key:"addEvents",value:function addEvents(e,t,n){t.ondragenter=function(s){s.preventDefault(),ft.display(e);},e.ondragleave=function(s){s.preventDefault(),ft.hide(e);},e.ondragover=function(s){s.preventDefault();},e.ondrop=function(s){s.preventDefault(),ft.uploadFile(n,s),ft.hide(e);};}},{key:"uploadFile",value:function uploadFile(e,t){var s;var n=(s=t.dataTransfer)==null?void 0:s[y];n&&e.addFilesToAnyType(Array.from(n));}},{key:"display",value:function display(e){e[_].display="block";}},{key:"hide",value:function hide(e){e[_].display="none";}},{key:"isEnabled",value:function isEnabled(e,t){return t!==void 0&&t===!1?!1:!!t||e.getNumberOfTypes()>0;}}]);}();var Nt=/*#__PURE__*/function(){function Nt(){_classCallCheck(this,Nt);}return _createClass(Nt,null,[{key:"validate",value:// prettier-ignore
|
|
265
|
-
function validate(e,t,n,s,r,o){var
|
|
266
|
-
},{key:"useValidationFunc",value:function(){var _useValidationFunc=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee182(e,t,n,s,r){var
|
|
267
|
-
},{key:"useValidationFuncProgrammatic",value:function(){var _useValidationFuncProgrammatic=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee183(e,t,n,s){var o
|
|
268
|
-
},{key:"attach",value:function attach(e,t,n,s,r,o){var a=e.validateInput||ee.processValidateInput(e);e._validationHandler=/*#__PURE__*/function(){var _ref223=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee184(c){var l;return _regenerator().w(function(_context184){while(1)switch(_context184.n){case 0:if(!(r.status.loadingActive||r.status.requestInProgress
|
|
265
|
+
function validate(e,t,n,s,r,o,a){var c=n.isSubmitProgrammaticallyDisabled?!1:e(s,r,a);return c?t.changeToSubmitIcon():t.changeToDisabledIcon(),o==null||o.addInputText(s||""),c;}// prettier-ignore
|
|
266
|
+
},{key:"useValidationFunc",value:function(){var _useValidationFunc=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee182(e,t,n,s,r,o){var a,c,l;return _regenerator().w(function(_context182){while(1)switch(_context182.n){case 0:a=t.isTextInputEmpty()?"":t.inputElementRef.textContent;_context182.n=1;return n.completePlaceholders();case 1:c=n.getAllFileData(),l=c==null?void 0:c.map(function(d){return d[Y];});return _context182.a(2,Nt.validate(e,s,r,a,l,o));}},_callee182);}));function useValidationFunc(_x334,_x335,_x336,_x337,_x338,_x339){return _useValidationFunc.apply(this,arguments);}return useValidationFunc;}()// prettier-ignore
|
|
267
|
+
},{key:"useValidationFuncProgrammatic",value:function(){var _useValidationFuncProgrammatic=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee183(e,t,n,s,r){var a,o;return _regenerator().w(function(_context183){while(1)switch(_context183.n){case 0:o=(a=t[y])==null?void 0:a.map(function(c){return c[Y];});return _context183.a(2,Nt.validate(e,n,s,t[h],o,r,!0));}},_callee183);}));function useValidationFuncProgrammatic(_x340,_x341,_x342,_x343,_x344){return _useValidationFuncProgrammatic.apply(this,arguments);}return useValidationFuncProgrammatic;}()},{key:"validateWebsocket",value:function validateWebsocket(e,t){var n=e.websocket,s=e.connectSettings;return n&&s.url!==nt.URL&&!Ee.canSendMessage(n)?(t.changeToDisabledIcon(),!1):!0;}// prettier-ignore
|
|
268
|
+
},{key:"attach",value:function attach(e,t,n,s,r,o){var a=e.validateInput||ee.processValidateInput(e);e._validationHandler=/*#__PURE__*/function(){var _ref223=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee184(c){var l;return _regenerator().w(function(_context184){while(1)switch(_context184.n){case 0:if(!(r.status.loadingActive||r.status.requestInProgress||!Nt.validateWebsocket(t,r))){_context184.n=1;break;}return _context184.a(2,!1);case 1:l=a||t.canSendMessage;return _context184.a(2,l?c?Nt.useValidationFuncProgrammatic(l,c,r,t,o):Nt.useValidationFunc(l,n,s,r,t,o):null);}},_callee184);}));return function(_x345){return _ref223.apply(this,arguments);};}();}}]);}();var Vo=/*#__PURE__*/function(){function Vo(){_classCallCheck(this,Vo);}return _createClass(Vo,null,[{key:"getFileName",value:function getFileName(e,t){var n=/* @__PURE__ */new Date(),s=String(n.getHours()).padStart(2,"0"),r=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0");return"".concat(e,"-").concat(s,"-").concat(r,"-").concat(o,".").concat(t);}}]);}();var nh=/*#__PURE__*/function(_si2){function nh(e,t){var _this107;_classCallCheck(this,nh);var n,s;_this107=_callSuper(this,nh,[t.button]),_this107._waitingForBrowserApproval=!1,_this107._audioType=e,_this107._extension=((n=t[y])==null?void 0:n.format)||"mp3",_this107._maxDurationSeconds=(s=t[y])==null?void 0:s.maxDurationSeconds,_this107.elementRef.onclick=_this107.buttonClick.bind(_assertThisInitialized(_this107));return _this107;}_inherits(nh,_si2);return _createClass(nh,[{key:"buttonClick",value:function buttonClick(){this._waitingForBrowserApproval||(this.isActive?this.stop():(this._waitingForBrowserApproval=!0,this.record()));}},{key:"stop",value:function stop(){var _this108=this;return new Promise(function(e){var t,n;_this108.changeToDefault(),(t=_this108._mediaRecorder)==null||t.stop(),(n=_this108._mediaStream)==null||n.getTracks().forEach(function(s){return s.stop();}),setTimeout(function(){e();},10);});}},{key:"record",value:function record(){var _this109=this;navigator.mediaDevices.getUserMedia({audio:!0}).then(function(e){_this109.changeToActive(),_this109._mediaRecorder=new MediaRecorder(e),_this109._audioType.addPlaceholderAttachment(_this109.stop.bind(_this109),_this109._maxDurationSeconds),_this109._mediaStream=e,_this109._mediaRecorder.addEventListener("dataavailable",function(t){_this109.createFile(t);}),_this109._mediaRecorder[Mt]();})["catch"](function(e){console[f](e),_this109.stop();})["finally"](function(){_this109._waitingForBrowserApproval=!1;});}},{key:"createFile",value:function createFile(e){var _this110=this;var t=new Blob([e.data],{type:"audio/".concat(this._extension)}),n=Vo.getFileName(this._newFilePrefix||P,this._extension),s=new File([t],n,{type:t.type}),r=new FileReader();r.readAsDataURL(s),r.onload=function(o){_this110._audioType.completePlaceholderAttachment(s,o.target.result);};}}]);}(si);var sh="<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n";var jt=/*#__PURE__*/function(){function jt(){_classCallCheck(this,jt);}return _createClass(jt,null,[{key:"resetSubmit",value:function resetSubmit(e,t){t?e.unsetCustomStateStyles(["loading","submit"]):e.unsetCustomStateStyles(["stop","loading","submit"]),e.reapplyStateStyle("submit");}},{key:"overwriteDefaultStyleWithSubmit",value:function overwriteDefaultStyleWithSubmit(e,t){if(!e.submit)return;var n=JSON.parse(JSON.stringify(e[t]||{}));Se.overwritePropertyObjectFromAnother(n,e.submit,["container",x]),Se.overwritePropertyObjectFromAnother(n,e.submit,[h,"styles",x]),Se.overwritePropertyObjectFromAnother(n,e.submit,["svg","styles",x]),e[t]=n;}// prettier-ignore
|
|
269
269
|
},{key:"setUpDisabledButton",value:function setUpDisabledButton(e){Se.setPropertyValueIfDoesNotExist(e,["submit","container",x,"backgroundColor"],""),Se.setPropertyValueIfDoesNotExist(e,["disabled","container",x,"backgroundColor"],"unset"),Se.setPropertyValueIfDoesNotExist(e.submit,["svg","styles",x,"filter"],""),Se.setPropertyValueIfDoesNotExist(e.disabled,["svg","styles",x,"filter"],"brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"),Se.setPropertyValueIfDoesNotExist(e.disabled,[h,"styles",x,"color"],"grey"),jt.overwriteDefaultStyleWithSubmit(e,"disabled");}},{key:"process",value:function process(e){var t=JSON.parse(JSON.stringify(e||{}));return jt.overwriteDefaultStyleWithSubmit(t,"loading"),jt.overwriteDefaultStyleWithSubmit(t,"stop"),e!=null&&e.alwaysEnabled||jt.setUpDisabledButton(t),t;}}]);}();var Qn=/*#__PURE__*/function(_Qt6){// prettier-ignore
|
|
270
270
|
function Qn(e,t,n,s,r,o){var _this111;_classCallCheck(this,Qn);var a=jt.process(e.submitButtonStyles),c=sh,l=tt.tryCreateConfig("Submit",a==null?void 0:a.tooltip);_this111=_callSuper(this,Qn,[Qn.createButtonContainerElement(),c,a==null?void 0:a.position,l,a]),_this111._isSVGLoadingIconOverriden=!1,_this111.status={requestInProgress:!1,loadingActive:!1},_this111._messages=n,_this111._textInput=t,_this111._fileAttachments=r,_this111._innerElements=_this111.createInnerElementsForStates(),_this111._stopClicked={listener:function listener(){}},_this111._serviceIO=s,_this111._alwaysEnabled=!!(a!=null&&a.alwaysEnabled),e.disableSubmitButton=_this111.disableSubmitButton.bind(_assertThisInitialized(_this111),s),_this111.attemptOverwriteLoadingStyle(e),o.microphone&&_this111.setUpSpeechToText(o.microphone.button,e.speechToText),setTimeout(function(){var d;_this111._validationHandler=e._validationHandler,_this111.assignHandlers(_this111._validationHandler),(d=_this111._validationHandler)==null||d.call(_assertThisInitialized(_this111));});return _this111;}_inherits(Qn,_Qt6);return _createClass(Qn,[{key:"createInnerElementsForStates",value:function createInnerElementsForStates(){var _this$createCustomEle=this.createCustomElements(),e=_this$createCustomEle.submit,t=_this$createCustomEle.loading,n=_this$createCustomEle.stop;return{submit:e,loading:t||[Qn.createLoadingIconElement()],stop:n||[Qn.createStopIconElement()],disabled:this.createDisabledIconElement(e)};}},{key:"createCustomElements",value:function createCustomElements(){var _this112=this;var e=ct.createCustomElements("submit",this.svg,this.customStyles),t={loading:void 0,stop:void 0};return Object.keys(t).forEach(function(n){var s=n,r=ct.createCustomElements(s,_this112.svg,_this112.customStyles);r&&(t[s]=r);}),t.submit=e||this.buildDefaultIconElement("submit-icon"),t;}},{key:"createDisabledIconElement",value:function createDisabledIconElement(e){return ct.createCustomElements("disabled",this.svg,this.customStyles)||[e[0].cloneNode(!0)];}// prettier-ignore
|
|
271
|
-
},{key:"attemptOverwriteLoadingStyle",value:function attemptOverwriteLoadingStyle(e){var t,n,s,r,o,a,c,l,d;if(!((n=(t=this.customStyles)==null?void 0:t.submit)!=null&&n.svg||(o=(r=(s=this.customStyles)==null?void 0:s.loading)==null?void 0:r.svg)!=null&&o.content||(l=(c=(a=this.customStyles)==null?void 0:a.loading)==null?void 0:c[h])!=null&&l.content)&&(e.displayLoadingBubble===void 0||e.displayLoadingBubble===!0)){var p=S("style");p.textContent="\n .loading-button > * {\n filter: brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%)\n contrast(96%) !important;\n }",(d=e.shadowRoot)==null||d.appendChild(p),this._isSVGLoadingIconOverriden=!0;}}},{key:"assignHandlers",value:function assignHandlers(e){this._serviceIO.completionsHandlers={onFinish:this.resetSubmit.bind(this,e)},this._serviceIO.streamHandlers={onOpen:this.changeToStopIcon.bind(this),onClose:this.resetSubmit.bind(this,e),stopClicked:this._stopClicked};var t=this._serviceIO.stream;_typeof(t)=="object"&&typeof t.simulation=="number"&&(this._serviceIO.streamHandlers.simulationInterim=t.simulation);}},{key:"setUpSpeechToText",value:function setUpSpeechToText(e,t){this._microphoneButton=e,this._stopSTTAfterSubmit=_typeof(t)=="object"?t.stopAfterSubmit:!1;}},{key:"resetSubmit",value:function resetSubmit(e){this.status.requestInProgress=!1,this.status.loadingActive=!1,e();}},{key:"submitFromInput",value:function(){var _submitFromInput=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee185(){var _this113=this;var e,t;return _regenerator().w(function(_context185){while(1)switch(_context185.n){case 0:_context185.n=1;return this._fileAttachments.completePlaceholders();case 1:e=this._fileAttachments.getAllFileData();if(this._textInput.isTextInputEmpty())this.attemptSubmit(_defineProperty(_defineProperty({},h,""),y,e));else{t=this._textInput.inputElementRef.innerText.trim();this.attemptSubmit(_defineProperty(_defineProperty({},h,t),y,e));}(Oe.IS_SAFARI||Oe.IS_MOBILE)&&setTimeout(function(){return zt.focusEndOfInput(_this113._textInput.inputElementRef);});case 2:return _context185.a(2);}},_callee185,this);}));function submitFromInput(){return _submitFromInput.apply(this,arguments);}return submitFromInput;}()},{key:"programmaticSubmit",value:function(){var _programmaticSubmit=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee186(e){var _this114=this;var t;return _regenerator().w(function(_context186){while(1)switch(_context186.n){case 0:typeof e=="string"&&(e=ee.processSubmitUserMessage(e));t=_defineProperty({},h,e[h]);e[y]&&(t[y]=Array.from(e[y]).map(function(n){return{file:n,type:mt.getTypeFromBlob(n)};})),e.custom&&(t.custom=e.custom),setTimeout(function(){return _this114.attemptSubmit(t,!0);});case 1:return _context186.a(2);}},_callee186);}));function programmaticSubmit(
|
|
272
|
-
},{key:"attemptSubmit",value:function(){var _attemptSubmit=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee187(e){var _this115=this;var t,r,o,a,c,n,s,_args187=arguments,_t60,_t61,_t62;return _regenerator().w(function(_context187){while(1)switch(_context187.n){case 0:t=_args187.length>1&&_args187[1]!==undefined?_args187[1]:!1;_context187.n=1;return(r=this._validationHandler)==null?void 0:r.call(this,t?e:void 0);case 1:_t60=_context187.v;_t61=!1;if(!(_t60===_t61)){_context187.n=2;break;}return _context187.a(2);case 2:this.changeToLoadingIcon();this._textInput.clear();Oe.IS_MOBILE&&setTimeout(function(){return _this115._textInput.inputElementRef.focus();});_t62=typeof this._messages.focusMode!="boolean"&&(o=this._messages.focusMode)!=null&&o.fade;if(!_t62){_context187.n=3;break;}_context187.n=3;return Is.fadeAnimation(this._messages.elementRef,this._messages.focusMode.fade);case 3:_context187.n=4;return this.addNewMessage(e);case 4:this._serviceIO.isWebModel()||this._messages.addLoadingMessage();n=(a=e[y])==null?void 0:a.map(function(l){return l[Y];}),s=_defineProperty(_defineProperty({},h,e[h]===""?void 0:e[h]),y,n);_context187.n=5;return this._serviceIO.callAPI(s,this._messages);case 5:(c=this._fileAttachments)==null||c.hideFiles();case 6:return _context187.a(2);}},_callee187,this);}));function attemptSubmit(
|
|
271
|
+
},{key:"attemptOverwriteLoadingStyle",value:function attemptOverwriteLoadingStyle(e){var t,n,s,r,o,a,c,l,d;if(!((n=(t=this.customStyles)==null?void 0:t.submit)!=null&&n.svg||(o=(r=(s=this.customStyles)==null?void 0:s.loading)==null?void 0:r.svg)!=null&&o.content||(l=(c=(a=this.customStyles)==null?void 0:a.loading)==null?void 0:c[h])!=null&&l.content)&&(e.displayLoadingBubble===void 0||e.displayLoadingBubble===!0)){var p=S("style");p.textContent="\n .loading-button > * {\n filter: brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(3044%) hue-rotate(322deg) brightness(100%)\n contrast(96%) !important;\n }",(d=e.shadowRoot)==null||d.appendChild(p),this._isSVGLoadingIconOverriden=!0;}}},{key:"assignHandlers",value:function assignHandlers(e){this._serviceIO.completionsHandlers={onFinish:this.resetSubmit.bind(this,e)},this._serviceIO.streamHandlers={onOpen:this.changeToStopIcon.bind(this),onClose:this.resetSubmit.bind(this,e),stopClicked:this._stopClicked};var t=this._serviceIO.stream;_typeof(t)=="object"&&typeof t.simulation=="number"&&(this._serviceIO.streamHandlers.simulationInterim=t.simulation);}},{key:"setUpSpeechToText",value:function setUpSpeechToText(e,t){this._microphoneButton=e,this._stopSTTAfterSubmit=_typeof(t)=="object"?t.stopAfterSubmit:!1;}},{key:"resetSubmit",value:function resetSubmit(e){this.status.requestInProgress=!1,this.status.loadingActive=!1,e();}},{key:"submitFromInput",value:function(){var _submitFromInput=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee185(){var _this113=this;var e,t;return _regenerator().w(function(_context185){while(1)switch(_context185.n){case 0:_context185.n=1;return this._fileAttachments.completePlaceholders();case 1:e=this._fileAttachments.getAllFileData();if(this._textInput.isTextInputEmpty())this.attemptSubmit(_defineProperty(_defineProperty({},h,""),y,e));else{t=this._textInput.inputElementRef.innerText.trim();this.attemptSubmit(_defineProperty(_defineProperty({},h,t),y,e));}(Oe.IS_SAFARI||Oe.IS_MOBILE)&&setTimeout(function(){return zt.focusEndOfInput(_this113._textInput.inputElementRef);});case 2:return _context185.a(2);}},_callee185,this);}));function submitFromInput(){return _submitFromInput.apply(this,arguments);}return submitFromInput;}()},{key:"programmaticSubmit",value:function(){var _programmaticSubmit=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee186(e){var _this114=this;var t;return _regenerator().w(function(_context186){while(1)switch(_context186.n){case 0:typeof e=="string"&&(e=ee.processSubmitUserMessage(e));t=_defineProperty({},h,e[h]);e[y]&&(t[y]=Array.from(e[y]).map(function(n){return{file:n,type:mt.getTypeFromBlob(n)};})),e.custom&&(t.custom=e.custom),setTimeout(function(){return _this114.attemptSubmit(t,!0);});case 1:return _context186.a(2);}},_callee186);}));function programmaticSubmit(_x346){return _programmaticSubmit.apply(this,arguments);}return programmaticSubmit;}()// TO-DO - should be disabled when loading history
|
|
272
|
+
},{key:"attemptSubmit",value:function(){var _attemptSubmit=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee187(e){var _this115=this;var t,r,o,a,c,n,s,_args187=arguments,_t60,_t61,_t62;return _regenerator().w(function(_context187){while(1)switch(_context187.n){case 0:t=_args187.length>1&&_args187[1]!==undefined?_args187[1]:!1;_context187.n=1;return(r=this._validationHandler)==null?void 0:r.call(this,t?e:void 0);case 1:_t60=_context187.v;_t61=!1;if(!(_t60===_t61)){_context187.n=2;break;}return _context187.a(2);case 2:this.changeToLoadingIcon();this._textInput.clear();Oe.IS_MOBILE&&setTimeout(function(){return _this115._textInput.inputElementRef.focus();});_t62=typeof this._messages.focusMode!="boolean"&&(o=this._messages.focusMode)!=null&&o.fade;if(!_t62){_context187.n=3;break;}_context187.n=3;return Is.fadeAnimation(this._messages.elementRef,this._messages.focusMode.fade);case 3:_context187.n=4;return this.addNewMessage(e);case 4:this._serviceIO.isWebModel()||this._messages.addLoadingMessage();n=(a=e[y])==null?void 0:a.map(function(l){return l[Y];}),s=_defineProperty(_defineProperty({},h,e[h]===""?void 0:e[h]),y,n);_context187.n=5;return this._serviceIO.callAPI(s,this._messages);case 5:(c=this._fileAttachments)==null||c.hideFiles();case 6:return _context187.a(2);}},_callee187,this);}));function attemptSubmit(_x347){return _attemptSubmit.apply(this,arguments);}return attemptSubmit;}()},{key:"addNewMessage",value:function(){var _addNewMessage=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee188(_ref224){var e,t,n,s,_t63;return _regenerator().w(function(_context188){while(1)switch(_context188.n){case 0:e=_ref224.text,t=_ref224.files,n=_ref224.custom;s={role:H,custom:n};e&&(s[h]=e);_t63=t;if(!_t63){_context188.n=2;break;}_context188.n=1;return this._messages.addMultipleFiles(t,this._fileAttachments);case 1:s[y]=_context188.v;case 2:this._serviceIO.sessionId&&(s._sessionId=this._serviceIO.sessionId);Object.keys(s).length>0&&this._messages.addNewMessage(s);case 3:return _context188.a(2);}},_callee188,this);}));function addNewMessage(_x348){return _addNewMessage.apply(this,arguments);}return addNewMessage;}()},{key:"stopStream",value:function stopStream(){var e,t,n;(t=(e=this._serviceIO.streamHandlers).onAbort)==null||t.call(e),(n=this._stopClicked)==null||n.listener(),this._validationHandler&&this.resetSubmit(this._validationHandler);}},{key:"changeToStopIcon",value:function changeToStopIcon(){this._serviceIO.websocket||(this.elementRef[m].remove(en,An,en),se.removeAriaAttributes(this.elementRef),this.changeElementsByState(this._innerElements.stop),this.reapplyStateStyle("stop",["loading","submit"]),this.elementRef.onclick=this.stopStream.bind(this),this.status.loadingActive=!1);}},{key:"changeToLoadingIcon",value:function changeToLoadingIcon(){this._serviceIO.websocket||(this._isSVGLoadingIconOverriden||this.changeElementsByState(this._innerElements.loading),this.elementRef[m].remove(en,An),se.removeAriaDisabled(this.elementRef),this.elementRef[m].add(di),se.addAriaBusy(this.elementRef),this.reapplyStateStyle("loading",["submit"]),this.elementRef.onclick=function(){},this.status.requestInProgress=!0,this.status.loadingActive=!0);}// called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
|
|
273
273
|
},{key:"changeToSubmitIcon",value:function changeToSubmitIcon(){var _this116=this;this.elementRef[m].contains(en)||(this.elementRef[m].remove(di,An),se.removeAriaAttributes(this.elementRef),this.elementRef[m].add(en),this.changeElementsByState(this._innerElements.submit),jt.resetSubmit(this,this.status.loadingActive),this.elementRef.onclick=function(){var e;_this116.submitFromInput(),(e=_this116._microphoneButton)!=null&&e.isActive&&us.toggleSpeechAfterSubmit(_this116._microphoneButton.elementRef,!!_this116._stopSTTAfterSubmit),setTimeout(function(){return zt.focusEndOfInput(_this116._textInput.inputElementRef);});});}// called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
|
|
274
274
|
},{key:"changeToDisabledIcon",value:function changeToDisabledIcon(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;this._alwaysEnabled&&!e?this.changeToSubmitIcon():this.elementRef[m].contains(An)||(this.elementRef[m].remove(di,en),se.removeAriaBusy(this.elementRef),this.elementRef[m].add(An),se.addAriaDisabled(this.elementRef),this.changeElementsByState(this._innerElements.disabled),this.reapplyStateStyle("disabled",["submit"]),this.elementRef.onclick=function(){});}},{key:"disableSubmitButton",value:function disableSubmitButton(e,t){var n;e.isSubmitProgrammaticallyDisabled=t!==!1,!(this.status.requestInProgress||this.status.loadingActive)&&(t===!1?(n=this._validationHandler)==null||n.call(this):this.changeToDisabledIcon(!0));}}],[{key:"createButtonContainerElement",value:function createButtonContainerElement(){var e=S();return e[m].add("input-button"),e;}},{key:"createLoadingIconElement",value:function createLoadingIconElement(){var e=S();return e[m].add("loading-submit-button"),e;}},{key:"createStopIconElement",value:function createStopIconElement(){var e=S();return e.id="stop-icon",e;}}]);}(Qt);var ih="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z\"/>\n</svg>\n",rh="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n",oh="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z\"/>\n</svg>",ah="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.89163 13.2687L9.16582 17.5427L18.7085 8\" stroke=\"#000000\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";var ar=/*#__PURE__*/function(_Ht){// prettier-ignore
|
|
275
275
|
function ar(e,t,n,s){var _this117;_classCallCheck(this,ar);_this117=_callSuper(this,ar,[e,["modal-content","modal-camera-content"],n]),_this117._stopped=!1,_this117._format="image/png",_this117._canvas=S("canvas"),_this117._canvas[m].add("camera-modal-canvas");var _this117$addButtonsAn=_this117.addButtonsAndTheirEvents(t),r=_this117$addButtonsAn.captureButton,o=_this117$addButtonsAn.submitButton;_this117._captureButton=r,_this117._submitButton=o,_this117._captureIcon=_this117._captureButton.children[0],_this117._refreshIcon=vt.createSVGElement(ih),_this117._refreshIcon[m].add("modal-svg-button-icon","modal-svg-refresh-icon"),(s==null?void 0:s.format)==="jpeg"&&(_this117._format="image/jpeg"),s!=null&&s.dimensions&&(_this117._dimensions=s.dimensions),_this117._contentRef.appendChild(_this117._canvas),_this117.extensionCloseCallback=_this117.stop;return _this117;}_inherits(ar,_Ht);return _createClass(ar,[{key:"addButtonsAndTheirEvents",value:function addButtonsAndTheirEvents(e){var t=Ht.createSVGButton(rh);t[m].add("modal-svg-camera-button"),t.children[0][m].add("modal-svg-camera-icon");var n=this.addCloseButton(oh,!0);n[m].add("modal-svg-close-button"),n.children[0][m].add("modal-svg-close-icon");var s=Ht.createSVGButton(ah);return s[m].add("modal-svg-submit-button"),this.addButtons(t,s),this.addButtonEvents(t,n,s,e),{captureButton:t,submitButton:s};}// prettier-ignore
|
|
@@ -278,5 +278,5 @@ function ar(e,t,n,s){var _this117;_classCallCheck(this,ar);_this117=_callSuper(t
|
|
|
278
278
|
function addClickEvent(e,t,n,s){var r=ar.createCameraModalFunc(e,t,n,s);this.elementRef.onclick=r;}}],[{key:"createButtonElement",value:function createButtonElement(){var e=S();return e[m].add("input-button"),e;}}]);}(Qt);var sn=/*#__PURE__*/function(){function sn(e,t,n,s){_classCallCheck(this,sn);this.elementRef=sn.createPanelElement(e.inputAreaStyle);var r={},o=this.createFileUploadComponents(e,n,s,r),a=new Rs(e,n,o,t.browserStorage);e.speechToText&&!r.microphone&&(r.microphone={button:new us(e,a,t.addNewErrorMessage.bind(t))});var c=new Qn(e,a,t,n,o,r);a.submit=c.submitFromInput.bind(c),Nt.attach(e,n,a,o,c,t.browserStorage),e.submitUserMessage=c.programmaticSubmit.bind(c),r.submit={button:c},e.customButtons&&$t.add(e,r),sn.addElements(this.elementRef,a,r,s,o,e.dropupStyles),sn.assignOnInput(e,n,o,a);}return _createClass(sn,[{key:"createFileUploadComponents",value:// prettier-ignore
|
|
279
279
|
function createFileUploadComponents(e,t,n,s){var o,a,c,l;var r=new gs(this.elementRef,e.attachmentContainerStyle,t.demo);if(sn.createUploadButtons(e,t,t.fileTypes||{},r,n,s),(o=t[Re])!=null&&o[y]){var d=((a=s[V])==null?void 0:a.fileType)||r.addType(e,t,t[Re][y],V);s[Re]={button:new cr(n,d,t[Re])};}if((c=t.recordAudio)!=null&&c[y]){var _d3=((l=s[P])==null?void 0:l.fileType)||r.addType(e,t,t.recordAudio[y],P);s.microphone={button:new nh(_d3,t.recordAudio)};}return ft.isEnabled(r,e.dragAndDrop)&&ft.create(n,r,e.dragAndDrop),r;}// prettier-ignore
|
|
280
280
|
}],[{key:"createPanelElement",value:function createPanelElement(e){var t=S();return t.id="input",Object.assign(t[_],e),t;}},{key:"createUploadButtons",value:function createUploadButtons(e,t,n,s,r,o){Object.keys(n).forEach(function(a){var c=a,l=n[c];if(l[y]){var d=s.addType(e,t,l[y],c),_Bd$c=Bd[c],p=_Bd$c.id,u=_Bd$c.svgString,g=_Bd$c.dropupText,v=new Js(r,d,l,p,u,g);o[c]={button:v,fileType:d};}});}// prettier-ignore
|
|
281
|
-
},{key:"addElements",value:function addElements(e,t,n,s,r,o){pe.addElements(e,t.elementRef);var a=bn.create(),c=we.addButtons(a,n,s,o);Yn.set(t.inputElementRef,a,r.elementRef,c),bn.add(e,a);}},{key:"assignOnInput",value:function assignOnInput(e,t,n,s){t.onInput=function(r){setTimeout(function(){var o=n.getAllFileData(),a=s.inputElementRef.innerText.trim(),c=_defineProperty({},h,a);o&&(c[y]=o.map(function(l){return l[Y];})),Jt.onInput(e,c,r);});};}}]);}();var lr=/*#__PURE__*/function(){function lr(){_classCallCheck(this,lr);}return _createClass(lr,null,[{key:"createElements",value:function createElements(e,t,n){var s=S();s.id="chat-view",s.classList.add(!e.focusMode&&e.upwardsMode?yo:ca);var r=new Ve(e,t,n);t.websocket&&Ee.createConnection(t,r);var o=new sn(e,r,t,s);return pe.addElements(s,r.elementRef,o.elementRef),s;}},{key:"render",value:function render(e,t,n,s){var r=lr.createElements(e,n,s);t.replaceChildren(r),n.isCustomView()&&n.setUpView(r,t);}}]);}();var lh="#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-inline-start:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);inset-inline-start:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;inset-block-start:44%;inset-inline-start:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-inline-end:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:inline-end;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;inset-inline-end:-1.7em;inset-block-start:-1.43em}#visible-icon{inset-block-start:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-inline:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages,.deep-chat-upwards-mode #messages>div{overflow:auto;overflow-anchor:none}.deep-chat-upwards-mode #messages{height:100%;display:flex;flex-direction:column;justify-content:flex-end}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-inline:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-inline-end:0px;margin-inline-start:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-inline-start:0px;margin-inline-end:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin-inline:auto;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%;margin-top:14px;margin-bottom:10px}.deep-chat-loading-message-dots-container{width:1em;padding-top:.6em;padding-bottom:.6em;padding-inline-start:1.3em;padding-inline-end:.75em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{inset-inline-start:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{inset-inline-start:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.html-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.html-wrapper>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-start{float:inline-start}.audio-player-safari-end{float:inline-end}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-inline-start:6px;margin-inline-end:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-inline-end:7px}.message-bubble>a{color:inherit}.start-item-position{margin-inline-end:10px}.end-item-position{margin-inline-start:10px}.role-hidden{display:none}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:start;background-color:#d7d7d73b;padding-inline-start:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-inline-end:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{inset-inline:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-inline-start:.26rem}.audio-placeholder-text-4-digits{padding-inline-start:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-inline-start:.13em;margin-inline:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;inset-inline-end:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:3}.modal-content{border-top:1px solid rgb(217,217,217);border-inline:1px solid rgb(217,217,217);border-start-start-radius:inherit;border-start-end-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-inline:1em}.modal-content>ul{margin-inline-end:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-end-start-radius:inherit;border-end-end-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;inset-block:0;margin-top:auto;margin-bottom:auto;cursor:pointer;-webkit-user-select:none;user-select:none;margin-inline:.31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:2;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-end{position:absolute;inset-inline-end:calc(10% + .35em);inset-block-end:.85em}.inside-start{position:absolute;inset-inline-start:calc(10% + .35em);inset-block-end:.85em}.outside-start{position:absolute;inset-inline-end:calc(11px - .55em);inset-block-end:.88em}.outside-end{position:absolute;inset-inline-start:calc(11px - .55em);inset-block-end:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;inset-inline-start:.11em;inset-block-end:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;inset-inline-start:.07em;inset-block-end:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.17em;inset-block-end:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.23em;inset-block-end:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.25em;inset-block-end:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.25em;inset-block-end:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;inset-inline-start:.35em;inset-block-end:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-inline:.3em}.loading-submit-button{position:relative;inset-inline-start:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;inset-block-end:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.tooltip{position:absolute;visibility:hidden;z-index:1;pointer-events:none;padding:5px;padding-inline:7px;background-color:#333;border-radius:5px;width:max-content}.tooltip-text{color:#fff;font-size:13px}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-inline-start:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-inline:4px;height:1.6em;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;inset-inline-start:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-start-adjustment{margin-inline-start:1.5em}.text-input-container-end-adjustment{margin-inline-end:1.5em}.text-input-container-start-small-adjustment{margin-inline-start:1.1em}.text-input-container-start-small-adjustment>.outside-start{inset-inline-end:calc(14px - .55em)}.text-input-container-end-small-adjustment{margin-inline-end:1.1em}.text-input-container-end-small-adjustment>.outside-end{inset-inline-start:calc(14px - .55em)}#text-input{text-align:start;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-start-adjustment{padding-inline-start:2.2em}.text-input-inner-end-adjustment{padding-inline-end:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-end>#dropup-menu,.inside-end>#dropup-menu{inset-inline-end:0px}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;inset-inline-start:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}.dropup-button>*{pointer-events:none}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding-inline-start:.35em;padding-inline-end:.84em;padding-top:.28em;padding-bottom:.28em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-start-start-radius:inherit;border-start-end-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-end-start-radius:inherit;border-end-end-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-inline-start:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-inline:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;grid-template-columns:100%}.deep-chat-downwards-mode{display:grid}.deep-chat-upwards-mode{display:flex;flex-direction:column}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-inline-start:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";var dh=Object.defineProperty,O=function O(i,e,t,n){for(var s=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=o(e,t,s)||s);return s&&dh(e,t,s),s;};var M=/*#__PURE__*/function(_Si){function M(){var _this122;_classCallCheck(this,M);var e;_this122=_callSuper(this,M),_this122.getMessages=function(){return[];},_this122.submitUserMessage=function(){return console.warn(gr("submitUserMessage"));},_this122.addMessage=function(){return console.warn(gr("addMessage"));},_this122.updateMessage=function(){},_this122.clearMessages=function(){},_this122.focusInput=function(){return zt.focusFromParentElement(_this122._elementRef);},_this122.refreshMessages=function(){},_this122.scrollToBottom=function(){},_this122.disableSubmitButton=function(){},_this122.setPlaceholderText=function(){},_this122._hasBeenRendered=!1,_this122._auxiliaryStyleApplied=!1,_this122._elementRef=S(),_this122._elementRef.id="container",_this122.attachShadow({mode:"open"}).appendChild(_this122._elementRef),(e=_this122.shadowRoot)==null||e.appendChild(tt.buildElement()),Kn.apply(lh,_this122.shadowRoot),setTimeout(function(){_this122._hasBeenRendered||_this122.onRender();},20);return _this122;}_inherits(M,_Si);return _createClass(M,[{key:"changeToChatView",value:function changeToChatView(){this._activeService&&(this._activeService.validateKeyProperty=!1),this.onRender();}// prettier-ignore
|
|
281
|
+
},{key:"addElements",value:function addElements(e,t,n,s,r,o){pe.addElements(e,t.elementRef);var a=bn.create(),c=we.addButtons(a,n,s,o);Yn.set(t.inputElementRef,a,r.elementRef,c),bn.add(e,a);}},{key:"assignOnInput",value:function assignOnInput(e,t,n,s){t.onInput=function(r){setTimeout(function(){var o=n.getAllFileData(),a=s.inputElementRef.innerText.trim(),c=_defineProperty({},h,a);o&&(c[y]=o.map(function(l){return l[Y];})),Jt.onInput(e,c,r);});};}}]);}();var lr=/*#__PURE__*/function(){function lr(){_classCallCheck(this,lr);}return _createClass(lr,null,[{key:"createElements",value:function createElements(e,t,n){var s=S();s.id="chat-view",s.classList.add(!e.focusMode&&e.upwardsMode?yo:ca);var r=new Ve(e,t,n);t.websocket&&Ee.createConnection(t,r);var o=new sn(e,r,t,s);return pe.addElements(s,r.elementRef,o.elementRef),s;}},{key:"render",value:function render(e,t,n,s){var r=lr.createElements(e,n,s);t.replaceChildren(r),n.isCustomView()&&n.setUpView(r,t);}}]);}();var lh="#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-inline-start:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);inset-inline-start:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;inset-block-start:44%;inset-inline-start:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-inline-end:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:inline-end;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;inset-inline-end:-1.7em;inset-block-start:-1.43em}#visible-icon{inset-block-start:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-inline:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages,.deep-chat-upwards-mode #messages>div{overflow:auto;overflow-anchor:none}.deep-chat-upwards-mode #messages{height:100%;display:flex;flex-direction:column;justify-content:flex-end}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-inline:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-inline-end:0px;margin-inline-start:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-inline-start:0px;margin-inline-end:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin-inline:auto;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%;margin-top:14px;margin-bottom:10px}.deep-chat-loading-message-dots-container{width:1em;padding-top:.6em;padding-bottom:.6em;padding-inline-start:1.3em;padding-inline-end:.75em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{inset-inline-start:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{inset-inline-start:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.html-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.html-wrapper>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-start{float:inline-start}.audio-player-safari-end{float:inline-end}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-inline-start:6px;margin-inline-end:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-inline-end:7px}.message-bubble>a{color:inherit}.start-item-position{margin-inline-end:10px}.end-item-position{margin-inline-start:10px}.role-hidden{display:none}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:start;background-color:#d7d7d73b;padding-inline-start:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-inline-end:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{inset-inline:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-inline-start:.26rem}.audio-placeholder-text-4-digits{padding-inline-start:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-inline-start:.13em;margin-inline:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;inset-inline-end:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:3}.modal-content{border-top:1px solid rgb(217,217,217);border-inline:1px solid rgb(217,217,217);border-start-start-radius:inherit;border-start-end-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-inline:1em}.modal-content>ul{margin-inline-end:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-end-start-radius:inherit;border-end-end-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;inset-block:0;margin-top:auto;margin-bottom:auto;cursor:pointer;-webkit-user-select:none;user-select:none;margin-inline:.31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:2;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-end{position:absolute;inset-inline-end:calc(10% + .35em);inset-block-end:.85em}.inside-start{position:absolute;inset-inline-start:calc(10% + .35em);inset-block-end:.85em}.outside-start{position:absolute;inset-inline-end:calc(11px - .55em);inset-block-end:.88em}.outside-end{position:absolute;inset-inline-start:calc(11px - .55em);inset-block-end:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;inset-inline-start:.11em;inset-block-end:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;inset-inline-start:.07em;inset-block-end:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.17em;inset-block-end:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.23em;inset-block-end:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.25em;inset-block-end:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.25em;inset-block-end:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;inset-inline-start:.35em;inset-block-end:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-inline:.3em}.loading-submit-button{position:relative;inset-inline-start:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;inset-block-end:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.tooltip{position:absolute;visibility:hidden;z-index:1;pointer-events:none;padding:5px;padding-inline:7px;background-color:#333;border-radius:5px;width:max-content}.tooltip-text{color:#fff;font-size:13px}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-inline-start:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-inline:4px;height:1.6em;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;inset-inline-start:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-start-adjustment{margin-inline-start:1.5em}.text-input-container-end-adjustment{margin-inline-end:1.5em}.text-input-container-start-small-adjustment{margin-inline-start:1.1em}.text-input-container-start-small-adjustment>.outside-start{inset-inline-end:calc(14px - .55em)}.text-input-container-end-small-adjustment{margin-inline-end:1.1em}.text-input-container-end-small-adjustment>.outside-end{inset-inline-start:calc(14px - .55em)}#text-input{text-align:start;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-start-adjustment{padding-inline-start:2.2em}.text-input-inner-end-adjustment{padding-inline-end:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-end>#dropup-menu,.inside-end>#dropup-menu{inset-inline-end:0px}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;inset-inline-start:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}.dropup-button>*{pointer-events:none}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding-inline-start:.35em;padding-inline-end:.84em;padding-top:.28em;padding-bottom:.28em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-start-start-radius:inherit;border-start-end-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-end-start-radius:inherit;border-end-end-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;inset-inline-start:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-inline-start:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-inline:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;grid-template-columns:100%}.deep-chat-downwards-mode{display:grid}.deep-chat-upwards-mode{display:flex;flex-direction:column}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-inline-start:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";var dh=Object.defineProperty,O=function O(i,e,t,n){for(var s=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=o(e,t,s)||s);return s&&dh(e,t,s),s;};var M=/*#__PURE__*/function(_Si){function M(){var _this122;_classCallCheck(this,M);var e;_this122=_callSuper(this,M),_this122.hiddenMessages=!0,_this122.getMessages=function(){return[];},_this122.submitUserMessage=function(){return console.warn(gr("submitUserMessage"));},_this122.addMessage=function(){return console.warn(gr("addMessage"));},_this122.updateMessage=function(){},_this122.clearMessages=function(){},_this122.focusInput=function(){return zt.focusFromParentElement(_this122._elementRef);},_this122.refreshMessages=function(){},_this122.scrollToBottom=function(){},_this122.disableSubmitButton=function(){},_this122.setPlaceholderText=function(){},_this122._hasBeenRendered=!1,_this122._auxiliaryStyleApplied=!1,_this122._elementRef=S(),_this122._elementRef.id="container",_this122.attachShadow({mode:"open"}).appendChild(_this122._elementRef),(e=_this122.shadowRoot)==null||e.appendChild(tt.buildElement()),Kn.apply(lh,_this122.shadowRoot),setTimeout(function(){_this122._hasBeenRendered||_this122.onRender();},20);return _this122;}_inherits(M,_Si);return _createClass(M,[{key:"changeToChatView",value:function changeToChatView(){this._activeService&&(this._activeService.validateKeyProperty=!1),this.onRender();}// prettier-ignore
|
|
282
282
|
},{key:"onRender",value:function onRender(){var _this$_childElement;Ts.attemptAppendStyleSheetToHead(this.style),ee.processConnect(this),(!this._activeService||this._activeService.demo)&&(this._activeService=Td.create(this)),this.auxiliaryStyle&&!this._auxiliaryStyleApplied&&(Kn.apply(this.auxiliaryStyle,this.shadowRoot),this._auxiliaryStyleApplied=!0),Kn.applyDefaultStyleToComponent(this.style,this.chatStyle),ee.checkForContainerStyles(this,this._elementRef),this._activeService.key&&this._activeService.validateKeyProperty?ws.render(this._elementRef,this.changeToChatView.bind(this),this._activeService):!(this._activeService instanceof R)||this._activeService.key?((_this$_childElement=this._childElement)!==null&&_this$_childElement!==void 0?_this$_childElement:this._childElement=this.children[0],lr.render(this,this._elementRef,this._activeService,this._childElement)):this._activeService instanceof R&&Ae.render(this._elementRef,this.changeToChatView.bind(this),this._activeService),this._hasBeenRendered||Jt.onRender(this),this._hasBeenRendered=!0;}},{key:"disconnectedCallback",value:function disconnectedCallback(){ds.chat=void 0;}}]);}(Si);O([k("object")],M.prototype,"connect");O([k("object")],M.prototype,"directConnection");O([k("object")],M.prototype,"webModel");O([k("object")],M.prototype,"requestBodyLimits");O([k("function")],M.prototype,"requestInterceptor");O([k("function")],M.prototype,"responseInterceptor");O([k("function")],M.prototype,"validateInput");O([k("function")],M.prototype,"loadHistory");O([k("object")],M.prototype,"chatStyle");O([k("object")],M.prototype,"attachmentContainerStyle");O([k("object")],M.prototype,"dropupStyles");O([k("object")],M.prototype,"inputAreaStyle");O([k("object")],M.prototype,"textInput");O([k("object")],M.prototype,"defaultInput");O([k("object")],M.prototype,"submitButtonStyles");O([k("object")],M.prototype,"customButtons");O([k("string")],M.prototype,"auxiliaryStyle");O([k("array")],M.prototype,"history");O([k("object")],M.prototype,"browserStorage");O([k("object")],M.prototype,"introMessage");O([k("object")],M.prototype,"avatars");O([k("object")],M.prototype,"names");O([k("object")],M.prototype,"displayLoadingBubble");O([k("object")],M.prototype,"errorMessages");O([k("object")],M.prototype,"messageStyles");O([k("object")],M.prototype,"textToSpeech");O([k("object")],M.prototype,"speechToText");O([k("object")],M.prototype,"images");O([k("object")],M.prototype,"gifs");O([k("object")],M.prototype,"camera");O([k("object")],M.prototype,"audio");O([k("object")],M.prototype,"microphone");O([k("object")],M.prototype,"mixedFiles");O([k("object")],M.prototype,"dragAndDrop");O([k("object")],M.prototype,"htmlWrappers");O([k("object")],M.prototype,"htmlClassUtilities");O([k("object")],M.prototype,"remarkable");O([k("object")],M.prototype,"focusMode");O([k("boolean")],M.prototype,"upwardsMode");O([k("object")],M.prototype,"hiddenMessages");O([k("function")],M.prototype,"onMessage");O([k("function")],M.prototype,"onClearMessages");O([k("function")],M.prototype,"onComponentRender");O([k("function")],M.prototype,"onInput");O([k("function")],M.prototype,"onError");O([k("object")],M.prototype,"demo");O([k("object")],M.prototype,"_insertKeyViewStyles");customElements.define("deep-chat",M);export{M as DeepChat};
|
|
@@ -9,6 +9,7 @@ export declare class TextInputEl {
|
|
|
9
9
|
private readonly _config;
|
|
10
10
|
private _isComposing;
|
|
11
11
|
private _onInput;
|
|
12
|
+
private readonly _browserStorage?;
|
|
12
13
|
submit?: () => void;
|
|
13
14
|
constructor(deepChat: DeepChat, serviceIO: ServiceIO, fileAttachments: FileAttachments, storage?: BrowserStorage);
|
|
14
15
|
private static processConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../../../../src/views/chat/input/textInput/text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AAE,MAAM,IAAI,CAAC;gBAER,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc;IAiBhH,OAAO,CAAC,MAAM,CAAC,aAAa;IAQ5B,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAYrC,OAAO,CAAC,MAAM,CAAC,iCAAiC;IAOzC,KAAK;IAYZ,OAAO,CAAC,kBAAkB;IA6B1B,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAIzB,sBAAsB;IAO7B,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,kBAAkB;IAKnB,gBAAgB;CAGxB"}
|
|
@@ -9,6 +9,6 @@ export declare class ValidationHandler {
|
|
|
9
9
|
private static useValidationFunc;
|
|
10
10
|
private static useValidationFuncProgrammatic;
|
|
11
11
|
private static validateWebsocket;
|
|
12
|
-
static attach(deepChat: DeepChat,
|
|
12
|
+
static attach(deepChat: DeepChat, io: ServiceIO, textInput: TextInputEl, fileAttachments: FileAttachments, submitButton: SubmitButton, storage?: BrowserStorage): void;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=validationHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationHandler.d.ts","sourceRoot":"","sources":["../../../../../src/views/chat/input/validation/validationHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAI9C,qBAAa,iBAAiB;IAE5B,OAAO,CAAC,MAAM,CAAC,QAAQ;mBAaF,iBAAiB;mBAUjB,6BAA6B;IAMlD,OAAO,CAAC,MAAM,CAAC,iBAAiB;WAUlB,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"validationHandler.d.ts","sourceRoot":"","sources":["../../../../../src/views/chat/input/validation/validationHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAI9C,qBAAa,iBAAiB;IAE5B,OAAO,CAAC,MAAM,CAAC,QAAQ;mBAaF,iBAAiB;mBAUjB,6BAA6B;IAMlD,OAAO,CAAC,MAAM,CAAC,iBAAiB;WAUlB,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAC1E,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,cAAc;CAe3F"}
|