anything-llm/frontend/public/embed/anythingllm-chat-widget.min.js

38 lines
926 KiB
JavaScript
Raw Normal View History

!function(Jn,Nt){"object"==typeof exports&&typeof module<"u"?Nt(exports):"function"==typeof define&&define.amd?define(["exports"],Nt):Nt((Jn=typeof globalThis<"u"?globalThis:Jn||self).EmbeddedAnythingLLM={})}(this,(function(Jn){"use strict";var I1,Nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ju={exports:{}},Wo={},ec={exports:{}},ee={},zr=Symbol.for("react.element"),K1=Symbol.for("react.portal"),X1=Symbol.for("react.fragment"),Q1=Symbol.for("react.strict_mode"),J1=Symbol.for("react.profiler"),eg=Symbol.for("react.provider"),tg=Symbol.for("react.context"),ng=Symbol.for("react.forward_ref"),rg=Symbol.for("react.suspense"),og=Symbol.for("react.memo"),ag=Symbol.for("react.lazy"),tc=Symbol.iterator;
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var nc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rc=Object.assign,oc={};function er(e,t,n){this.props=e,this.context=t,this.refs=oc,this.updater=n||nc}function ac(){}function Vs(e,t,n){this.props=e,this.context=t,this.refs=oc,this.updater=n||nc}er.prototype.isReactComponent={},er.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},er.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},ac.prototype=er.prototype;var zs=Vs.prototype=new ac;zs.constructor=Vs,rc(zs,er.prototype),zs.isPureReactComponent=!0;var sc=Array.isArray,ic=Object.prototype.hasOwnProperty,Gs={current:null},lc={key:!0,ref:!0,__self:!0,__source:!0};function uc(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)ic.call(t,r)&&!lc.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var l=Array(i),u=0;u<i;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:zr,type:e,key:a,ref:s,props:o,_owner:Gs.current}}function $s(e){return"object"==typeof e&&null!==e&&e.$$typeof===zr}var cc=/\/+/g;function Zs(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(n){return t[n]}))}(""+e.key):t.toString(36)}function Yo(e,t,n,r,o){var a=typeof e;("undefined"===a||"boolean"===a)&&(e=null);var s=!1;if(null===e)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case zr:case K1:s=!0}}if(s)return o=o(s=e),e=""===r?"."+Zs(s,0):r,sc(o)?(n="",null!=e&&(n=e.replace(cc,"$&/")+"/"),Yo(o,t,n,"",(function(u){return u}))):null!=o&&($s(o)&&(o=function(e,t){return{$$typeof:zr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(cc,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",sc(e))for(var i=0;i<e.length;i++){var l=r+Zs(a=e[i],i);s+=Yo(a,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=tc&&e[tc]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),i=0;!(a=e.next()).done;)s+=Yo(a=a.value,t,n,l=r+Zs(a,i++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ko(e,t,n){if(null==e)return e;var r=[],o=0;return Yo(e,r,"","",(function(a){return t.call(n,a,o++)})),r}function ug(e){if(-1===e._status){var t=e._result;(t=t()).then((function(n){(0===e._status||-1===e._status)&&(e._status=1,e._result=n)}),(function(n){(0===e._status||-1===e._status)&&(e._status=2,e._result=n)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var We={current:null},Xo={transition:null},cg={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:Xo,ReactCurrentOwner:Gs};ee.Children={map:Ko,forEach:function(e,t,n){Ko(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return Ko(e,(function(){t++})),t},toArray:function(e){return Ko(e,(function(t){return t}))||[]},only:function(e){if(!$s(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},ee.Component=er,ee.Fragment=X1,ee.Profiler=J1,ee.PureComponent=Vs,ee.StrictMode=Q1,ee.Suspense=rg,ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cg,ee.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=rc({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=Gs.current),void 0!==t.key&&(o=""+t.key),e.
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dg=Z,pg=Symbol.for("react.element"),fg=Symbol.for("react.fragment"),gg=Object.prototype.hasOwnProperty,mg=dg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hg={key:!0,ref:!0,__self:!0,__source:!0};function dc(e,t,n){var r,o={},a=null,s=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(s=t.ref),t)gg.call(t,r)&&!hg.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:pg,type:e,key:a,ref:s,props:o,_owner:mg.current}}Wo.Fragment=fg,Wo.jsx=dc,Wo.jsxs=dc,Ju.exports=Wo;var w=Ju.exports,js={},pc={exports:{}},it={},fc={exports:{}},gc={};
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(T,y){var L=T.length;T.push(y);e:for(;0<L;){var k=L-1>>>1,H=T[k];if(!(0<o(H,y)))break e;T[k]=y,T[L]=H,L=k}}function n(T){return 0===T.length?null:T[0]}function r(T){if(0===T.length)return null;var y=T[0],L=T.pop();if(L!==y){T[0]=L;e:for(var k=0,H=T.length,j=H>>>1;k<j;){var fe=2*(k+1)-1,ce=T[fe],se=fe+1,le=T[se];if(0>o(ce,L))se<H&&0>o(le,ce)?(T[k]=le,T[se]=L,k=se):(T[k]=ce,T[fe]=L,k=fe);else{if(!(se<H&&0>o(le,L)))break e;T[k]=le,T[se]=L,k=se}}}return y}function o(T,y){var L=T.sortIndex-y.sortIndex;return 0!==L?L:T.id-y.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,i=s.now();e.unstable_now=function(){return s.now()-i}}var l=[],u=[],c=1,p=null,d=3,m=!1,A=!1,b=!1,C="function"==typeof setTimeout?setTimeout:null,h="function"==typeof clearTimeout?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function E(T){for(var y=n(u);null!==y;){if(null===y.callback)r(u);else{if(!(y.startTime<=T))break;r(u),y.sortIndex=y.expirationTime,t(l,y)}y=n(u)}}function v(T){if(b=!1,E(T),!A)if(null!==n(l))A=!0,P(N);else{var y=n(u);null!==y&&x(v,y.startTime-T)}}function N(T,y){A=!1,b&&(b=!1,h(R),R=-1),m=!0;var L=d;try{for(E(y),p=n(l);null!==p&&(!(p.expirationTime>y)||T&&!Q());){var k=p.callback;if("function"==typeof k){p.callback=null,d=p.priorityLevel;var H=k(p.expirationTime<=y);y=e.unstable_now(),"function"==typeof H?p.callback=H:p===n(l)&&r(l),E(y)}else r(l);p=n(l)}if(null!==p)var j=!0;else{var fe=n(u);null!==fe&&x(v,fe.startTime-y),j=!1}return j}finally{p=null,d=L,m=!1}}typeof navigator<"u"&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var Y,_=!1,S=null,R=-1,q=5,I=-1;function Q(){return!(e.unstable_now()-I<q)}function ie(){if(null!==S){var T=e.unstable_now();I=T;var y=!0;try{y=S(!0,T)}finally{y?Y():(_=!1,S=null)}}else _=!1}if("function"==typeof g)Y=function(){g(ie)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,G=O.port2;O.port1.onmessage=ie,Y=function(){G.postMessage(null)}}else Y=function(){C(ie,0)};function P(T){S=T,_||(_=!0,Y())}function x(T,y){R=C((function(){T(e.unstable_now())}),y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){A||m||(A=!0,P(N))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(T){switch(d){case 1:case 2:case 3:var y=3;break;default:y=d}var L=d;d=y;try{return T()}finally{d=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,y){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var L=d;d=T;try{return y()}finally{d=L}},e.unstable_scheduleCallback=function(T,y,L){var k=e.unstable_now();switch("object"==typeof L&&null!==L?L="number"==typeof(L=L.delay)&&0<L?k+L:k:L=k,T){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return T={id:c++,callback:y,priorityLevel:T,startTime:L,expirationTime:H=L+H,sortIndex:-1},L>k?(T.sortIndex=L,t(u,T),null===n(l)&&T===n(u)&&(b?(h(R),R=-1):b=!0,x(v,L-k))):(T.sortIndex=H,t(l,T),A||m||(A=!0,P(N))),T},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(T){var y=d;return function(){var L=d;d=y;try{return T.apply(this,arguments)}finally{d=L}}}})(gc),fc.exports=gc;var Eg=fc.exports,mc=Z,lt=Eg;
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
2024-05-23 19:54:07 +02:00
*/function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hc=new Set,Gr={};function xn(e,t){tr(e,t),tr(e+"Capture",t)}function tr(e,t){for(Gr[e]=t,e=0;e<t.length;e++)hc.add(t[e])}var Wt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ws=Object.prototype.hasOwnProperty,Ag=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ec={},Ac={};function Ye(e,t,n,r,o,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Me[e]=new Ye(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Me[t]=new Ye(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Me[e]=new Ye(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Me[e]=new Ye(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Me[e]=new Ye(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Me[e]=new Ye(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Me[e]=new Ye(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Me[e]=new Ye(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Me[e]=new Ye(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Ys=/[\-:]([a-z])/g;function Ks(e){return e[1].toUpperCase()}function Xs(e,t,n,r){var o=Me.hasOwnProperty(t)?Me[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||typeof t>"u"||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!Ws.call(Ac,e)||!Ws.call(Ec,e)&&(Ag.test(e)?Ac[e]=!0:(Ec[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-orde
/*! https://mths.be/cssesc v3.0.0 by @mathias */