@botpress/webchat 3.1.0-beta.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/dist/index.d.ts +26 -28
- package/dist/index.js +8588 -8045
- package/dist/index.umd.cjs +151 -124
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/dist/index.umd.cjs
CHANGED
|
@@ -1,217 +1,244 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ce,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],I):(ce=typeof globalThis<"u"?globalThis:ce||self,I(ce.Webchat={},ce.React,ce.ReactDOM))})(this,function(ce,I,er){"use strict";var MX=Object.defineProperty;var NX=(ce,I,er)=>I in ce?MX(ce,I,{enumerable:!0,configurable:!0,writable:!0,value:er}):ce[I]=er;var $E=(ce,I,er)=>NX(ce,typeof I!="symbol"?I+"":I,er);function bp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=bp(I),xp=bp(er);var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var il={exports:{}},yi={};/**
|
|
2
2
|
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var wp;function TE(){if(wp)return yi;wp=1;var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var c,f={},p=null,d=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(d=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return yi.Fragment=n,yi.jsx=a,yi.jsxs=a,yi}var bi={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
13
|
-
* Copyright (c)
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Sp;function OE(){return Sp||(Sp=1,process.env.NODE_ENV!=="production"&&function(){var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function g(A){if(A===null||typeof A!="object")return null;var te=m&&A[m]||A[h];return typeof te=="function"?te:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(A){{for(var te=arguments.length,ue=new Array(te>1?te-1:0),me=1;me<te;me++)ue[me-1]=arguments[me];x("error",A,ue)}}function x(A,te,ue){{var me=v.ReactDebugCurrentFrame,Ne=me.getStackAddendum();Ne!==""&&(te+="%s",ue=ue.concat([Ne]));var We=ue.map(function(Te){return String(Te)});We.unshift("Warning: "+te),Function.prototype.apply.call(console[A],console,We)}}var $=!1,S=!1,E=!1,O=!1,F=!1,D;D=Symbol.for("react.module.reference");function T(A){return!!(typeof A=="string"||typeof A=="function"||A===r||A===o||F||A===i||A===u||A===c||O||A===d||$||S||E||typeof A=="object"&&A!==null&&(A.$$typeof===p||A.$$typeof===f||A.$$typeof===a||A.$$typeof===s||A.$$typeof===l||A.$$typeof===D||A.getModuleId!==void 0))}function M(A,te,ue){var me=A.displayName;if(me)return me;var Ne=te.displayName||te.name||"";return Ne!==""?ue+"("+Ne+")":ue}function H(A){return A.displayName||"Context"}function B(A){if(A==null)return null;if(typeof A.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case s:var te=A;return H(te)+".Consumer";case a:var ue=A;return H(ue._context)+".Provider";case l:return M(A,A.render,"ForwardRef");case f:var me=A.displayName||null;return me!==null?me:B(A.type)||"Memo";case p:{var Ne=A,We=Ne._payload,Te=Ne._init;try{return B(Te(We))}catch{return null}}}return null}var L=Object.assign,N=0,W,X,V,_,y,R,P;function w(){}w.__reactDisabledLog=!0;function j(){{if(N===0){W=console.log,X=console.info,V=console.warn,_=console.error,y=console.group,R=console.groupCollapsed,P=console.groupEnd;var A={configurable:!0,enumerable:!0,value:w,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}N++}}function G(){{if(N--,N===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},A,{value:W}),info:L({},A,{value:X}),warn:L({},A,{value:V}),error:L({},A,{value:_}),group:L({},A,{value:y}),groupCollapsed:L({},A,{value:R}),groupEnd:L({},A,{value:P})})}N<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=v.ReactCurrentDispatcher,Y;function Q(A,te,ue){{if(Y===void 0)try{throw Error()}catch(Ne){var me=Ne.stack.trim().match(/\n( *(at )?)/);Y=me&&me[1]||""}return`
|
|
18
|
+
`+Y+A}}var ee=!1,J;{var Z=typeof WeakMap=="function"?WeakMap:Map;J=new Z}function q(A,te){if(!A||ee)return"";{var ue=J.get(A);if(ue!==void 0)return ue}var me;ee=!0;var Ne=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var We;We=K.current,K.current=null,j();try{if(te){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(Mt){me=Mt}Reflect.construct(A,[],Te)}else{try{Te.call()}catch(Mt){me=Mt}A.call(Te.prototype)}}else{try{throw Error()}catch(Mt){me=Mt}A()}}catch(Mt){if(Mt&&me&&typeof Mt.stack=="string"){for(var Ee=Mt.stack.split(`
|
|
19
|
+
`),Ot=me.stack.split(`
|
|
20
|
+
`),Qe=Ee.length-1,at=Ot.length-1;Qe>=1&&at>=0&&Ee[Qe]!==Ot[at];)at--;for(;Qe>=1&&at>=0;Qe--,at--)if(Ee[Qe]!==Ot[at]){if(Qe!==1||at!==1)do if(Qe--,at--,at<0||Ee[Qe]!==Ot[at]){var Yt=`
|
|
21
|
+
`+Ee[Qe].replace(" at new "," at ");return A.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",A.displayName)),typeof A=="function"&&J.set(A,Yt),Yt}while(Qe>=1&&at>=0);break}}}finally{ee=!1,K.current=We,G(),Error.prepareStackTrace=Ne}var gi=A?A.displayName||A.name:"",Er=gi?Q(gi):"";return typeof A=="function"&&J.set(A,Er),Er}function ie(A,te,ue){return q(A,!1)}function le(A){var te=A.prototype;return!!(te&&te.isReactComponent)}function pe(A,te,ue){if(A==null)return"";if(typeof A=="function")return q(A,le(A));if(typeof A=="string")return Q(A);switch(A){case u:return Q("Suspense");case c:return Q("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case l:return ie(A.render);case f:return pe(A.type,te,ue);case p:{var me=A,Ne=me._payload,We=me._init;try{return pe(We(Ne),te,ue)}catch{}}}return""}var ae=Object.prototype.hasOwnProperty,ve={},be=v.ReactDebugCurrentFrame;function _e(A){if(A){var te=A._owner,ue=pe(A.type,A._source,te?te.type:null);be.setExtraStackFrame(ue)}else be.setExtraStackFrame(null)}function rt(A,te,ue,me,Ne){{var We=Function.call.bind(ae);for(var Te in A)if(We(A,Te)){var Ee=void 0;try{if(typeof A[Te]!="function"){var Ot=Error((me||"React class")+": "+ue+" type `"+Te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[Te]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ot.name="Invariant Violation",Ot}Ee=A[Te](te,Te,me,ue,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Qe){Ee=Qe}Ee&&!(Ee instanceof Error)&&(_e(Ne),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",ue,Te,typeof Ee),_e(null)),Ee instanceof Error&&!(Ee.message in ve)&&(ve[Ee.message]=!0,_e(Ne),b("Failed %s type: %s",ue,Ee.message),_e(null))}}}var Et=Array.isArray;function kt(A){return Et(A)}function Ct(A){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ue=te&&A[Symbol.toStringTag]||A.constructor.name||"Object";return ue}}function oe(A){try{return fe(A),!1}catch{return!0}}function fe(A){return""+A}function U(A){if(oe(A))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(A)),fe(A)}var z=v.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},se,de,ge;ge={};function Ye(A){if(ae.call(A,"ref")){var te=Object.getOwnPropertyDescriptor(A,"ref").get;if(te&&te.isReactWarning)return!1}return A.ref!==void 0}function Xe(A){if(ae.call(A,"key")){var te=Object.getOwnPropertyDescriptor(A,"key").get;if(te&&te.isReactWarning)return!1}return A.key!==void 0}function gt(A,te){if(typeof A.ref=="string"&&z.current&&te&&z.current.stateNode!==te){var ue=B(z.current.type);ge[ue]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(z.current.type),A.ref),ge[ue]=!0)}}function it(A,te){{var ue=function(){se||(se=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};ue.isReactWarning=!0,Object.defineProperty(A,"key",{get:ue,configurable:!0})}}function Re(A,te){{var ue=function(){de||(de=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};ue.isReactWarning=!0,Object.defineProperty(A,"ref",{get:ue,configurable:!0})}}var ot=function(A,te,ue,me,Ne,We,Te){var Ee={$$typeof:t,type:A,key:te,ref:ue,props:Te,_owner:We};return Ee._store={},Object.defineProperty(Ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ee,"_self",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(Ee,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.freeze&&(Object.freeze(Ee.props),Object.freeze(Ee)),Ee};function Ze(A,te,ue,me,Ne){{var We,Te={},Ee=null,Ot=null;ue!==void 0&&(U(ue),Ee=""+ue),Xe(te)&&(U(te.key),Ee=""+te.key),Ye(te)&&(Ot=te.ref,gt(te,Ne));for(We in te)ae.call(te,We)&&!ne.hasOwnProperty(We)&&(Te[We]=te[We]);if(A&&A.defaultProps){var Qe=A.defaultProps;for(We in Qe)Te[We]===void 0&&(Te[We]=Qe[We])}if(Ee||Ot){var at=typeof A=="function"?A.displayName||A.name||"Unknown":A;Ee&&it(Te,at),Ot&&Re(Te,at)}return ot(A,Ee,Ot,Ne,me,z.current,Te)}}var Gt=v.ReactCurrentOwner,Po=v.ReactDebugCurrentFrame;function Dn(A){if(A){var te=A._owner,ue=pe(A.type,A._source,te?te.type:null);Po.setExtraStackFrame(ue)}else Po.setExtraStackFrame(null)}var xr;xr=!1;function wr(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function Sr(){{if(Gt.current){var A=B(Gt.current.type);if(A)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+A+"`."}return""}}function gp(A){return""}var kn={};function rl(A){{var te=Sr();if(!te){var ue=typeof A=="string"?A:A.displayName||A.name;ue&&(te=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+ue+">.")}return te}}function Ao(A,te){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ue=rl(te);if(kn[ue])return;kn[ue]=!0;var me="";A&&A._owner&&A._owner!==Gt.current&&(me=" It was passed a child from "+B(A._owner.type)+"."),Dn(A),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ue,me),Dn(null)}}function _o(A,te){{if(typeof A!="object")return;if(kt(A))for(var ue=0;ue<A.length;ue++){var me=A[ue];wr(me)&&Ao(me,te)}else if(wr(A))A._store&&(A._store.validated=!0);else if(A){var Ne=g(A);if(typeof Ne=="function"&&Ne!==A.entries)for(var We=Ne.call(A),Te;!(Te=We.next()).done;)wr(Te.value)&&Ao(Te.value,te)}}}function TX(A){{var te=A.type;if(te==null||typeof te=="string")return;var ue;if(typeof te=="function")ue=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===l||te.$$typeof===f))ue=te.propTypes;else return;if(ue){var me=B(te);rt(ue,A.props,"prop",me,A)}else if(te.PropTypes!==void 0&&!xr){xr=!0;var Ne=B(te);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ne||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function OX(A){{for(var te=Object.keys(A.props),ue=0;ue<te.length;ue++){var me=te[ue];if(me!=="children"&&me!=="key"){Dn(A),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",me),Dn(null);break}}A.ref!==null&&(Dn(A),b("Invalid attribute `ref` supplied to `React.Fragment`."),Dn(null))}}var kE={};function CE(A,te,ue,me,Ne,We){{var Te=T(A);if(!Te){var Ee="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(Ee+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ot=gp();Ot?Ee+=Ot:Ee+=Sr();var Qe;A===null?Qe="null":kt(A)?Qe="array":A!==void 0&&A.$$typeof===t?(Qe="<"+(B(A.type)||"Unknown")+" />",Ee=" Did you accidentally export a JSX literal instead of a component?"):Qe=typeof A,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Qe,Ee)}var at=Ze(A,te,ue,Ne,We);if(at==null)return at;if(Te){var Yt=te.children;if(Yt!==void 0)if(me)if(kt(Yt)){for(var gi=0;gi<Yt.length;gi++)_o(Yt[gi],A);Object.freeze&&Object.freeze(Yt)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _o(Yt,A)}if(ae.call(te,"key")){var Er=B(A),Mt=Object.keys(te).filter(function(DX){return DX!=="key"}),yp=Mt.length>0?"{key: someKey, "+Mt.join(": ..., ")+": ...}":"{key: someKey}";if(!kE[Er+yp]){var RX=Mt.length>0?"{"+Mt.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
|
|
18
26
|
let props = %s;
|
|
19
27
|
<%s {...props} />
|
|
20
28
|
React keys must be passed directly to JSX without using spread:
|
|
21
29
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,x,X,Z,X),R[X+x]=!0)}if(X=null,I!==void 0&&(n(I),X=""+I),a(P)&&(n(P.key),X=""+P.key),"key"in P){I={};for(var J in P)J!=="key"&&(I[J]=P[J])}else I=P;return X&&s(I,typeof v=="function"?v.displayName||v.name||"Unknown":v),u(v,X,V,_,i(),I,K,G)}function f(v){typeof v=="object"&&v!==null&&v.$$typeof===d&&v._store&&(v._store.validated=1)}var p=A,d=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),D=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,F=Array.isArray,L=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(v){return v()}};var N,B={},Y=p["react-stack-bottom-frame"].bind(p,o)(),H=L(r(o)),R={};ei.Fragment=h,ei.jsx=function(v,P,I,x,_){var V=1e4>D.recentlyCreatedOwnerStacks++;return c(v,P,I,!1,x,_,V?Error("react-stack-top-frame"):Y,V?L(r(v)):H)},ei.jsxs=function(v,P,I,x,_){var V=1e4>D.recentlyCreatedOwnerStacks++;return c(v,P,I,!0,x,_,V?Error("react-stack-top-frame"):Y,V?L(r(v)):H)}}()),ei}process.env.NODE_ENV==="production"?Ns.exports=rE():Ns.exports=iE();var T=Ns.exports;function oE(e,t=[]){let n=[];function r(o,a){const s=k.createContext(a),l=n.length;n=[...n,a];function u(f){const{scope:p,children:d,...m}=f,h=(p==null?void 0:p[e][l])||s,y=k.useMemo(()=>m,Object.values(m));return T.jsx(h.Provider,{value:y,children:d})}function c(f,p){const d=(p==null?void 0:p[e][l])||s,m=k.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,aE(i,...t)]}function aE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function xn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ar=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function sE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lE(...e){return t=>e.forEach(n=>sE(n,t))}var Qd=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(cE);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return T.jsx(js,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return T.jsx(js,{...r,ref:t,children:n})});Qd.displayName="Slot";var js=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=dE(n);return k.cloneElement(n,{...fE(r,n.props),ref:t?lE(t,i):i})}return k.Children.count(n)>1?k.Children.only(null):null});js.displayName="SlotClone";var uE=({children:e})=>T.jsx(T.Fragment,{children:e});function cE(e){return k.isValidElement(e)&&e.type===uE}function fE(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function dE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ls=pE.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Qd:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Fs="Avatar",[hE,QY]=oE(Fs),[mE,Zd]=hE(Fs),Bs=k.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=k.useState("idle");return T.jsx(mE,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:T.jsx(Ls.span,{...r,ref:t})})});Bs.displayName=Fs;var ep="AvatarImage",zs=k.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=Zd(ep,n),s=vE(r),l=xn(u=>{i(u),a.onImageLoadingStatusChange(u)});return ar(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?T.jsx(Ls.img,{...o,ref:t,src:r}):null});zs.displayName=ep;var tp="AvatarFallback",Ws=k.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=Zd(tp,n),[a,s]=k.useState(r===void 0);return k.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?T.jsx(Ls.span,{...i,ref:t}):null});Ws.displayName=tp;function vE(e){const[t,n]=k.useState("idle");return ar(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}function Us(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function gE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const yE=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function np(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const bE=2.4,xE=.2126729,wE=.7151522,SE=.072175,EE=.56,kE=.57,CE=.62,TE=.65,co=.022,rp=1.414,$E=1.14,OE=1.14,IE=.035991,PE=.035991,AE=27.7847239587675,RE=27.7847239587675,ip=.027,op=.027,ap=.001,DE=5e-4;function sp(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**bE;return xE*i(t)+wE*i(n)+SE*i(r)}function lp(e,t){if(!e||!t)return 0;let n=sp(Us(e)),r=sp(Us(t)),i=0,o=0;return n=n>co?n:n+(co-n)**rp,r=r>co?r:r+(co-r)**rp,Math.abs(r-n)<DE?0:(r>n?(i=(r**EE-n**kE)*$E,o=i<ap?0:i<IE?i-i*AE*ip:i-ip):(i=(r**TE-n**CE)*OE,o=i>-ap?0:i>-PE?i-i*RE*op:i+op),Math.abs(o*100))}function up(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function cp(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var fp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Nt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",f="month",p="quarter",d="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var N=["th","st","nd","rd"],B=L%100;return"["+L+(N[(B-20)%10]||N[B]||N[0])+"]"}},w=function(L,N,B){var Y=String(L);return!Y||Y.length>=N?L:""+Array(N+1-Y.length).join(B)+L},C={s:w,z:function(L){var N=-L.utcOffset(),B=Math.abs(N),Y=Math.floor(B/60),H=B%60;return(N<=0?"+":"-")+w(Y,2,"0")+":"+w(H,2,"0")},m:function L(N,B){if(N.date()<B.date())return-L(B,N);var Y=12*(B.year()-N.year())+(B.month()-N.month()),H=N.clone().add(Y,f),R=B-H<0,v=N.clone().add(Y+(R?-1:1),f);return+(-(Y+(B-H)/(R?H-v:v-H))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:d,w:c,d:u,D:m,h:l,m:s,s:a,ms:o,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},S="en",E={};E[S]=b;var O="$isDayjsObject",j=function(L){return L instanceof U||!(!L||!L[O])},M=function L(N,B,Y){var H;if(!N)return S;if(typeof N=="string"){var R=N.toLowerCase();E[R]&&(H=R),B&&(E[R]=B,H=R);var v=N.split("-");if(!H&&v.length>1)return L(v[0])}else{var P=N.name;E[P]=N,H=P}return!Y&&H&&(S=H),H||!Y&&S},$=function(L,N){if(j(L))return L.clone();var B=typeof N=="object"?N:{};return B.date=L,B.args=arguments,new U(B)},D=C;D.l=M,D.i=j,D.w=function(L,N){return $(L,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var U=function(){function L(B){this.$L=M(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[O]=!0}var N=L.prototype;return N.parse=function(B){this.$d=function(Y){var H=Y.date,R=Y.utc;if(H===null)return new Date(NaN);if(D.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var v=H.match(y);if(v){var P=v[2]-1||0,I=(v[7]||"0").substring(0,3);return R?new Date(Date.UTC(v[1],P,v[3]||1,v[4]||0,v[5]||0,v[6]||0,I)):new Date(v[1],P,v[3]||1,v[4]||0,v[5]||0,v[6]||0,I)}}return new Date(H)}(B),this.init()},N.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},N.$utils=function(){return D},N.isValid=function(){return this.$d.toString()!==h},N.isSame=function(B,Y){var H=$(B);return this.startOf(Y)<=H&&H<=this.endOf(Y)},N.isAfter=function(B,Y){return $(B)<this.startOf(Y)},N.isBefore=function(B,Y){return this.endOf(Y)<$(B)},N.$g=function(B,Y,H){return D.u(B)?this[Y]:this.set(H,B)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(B,Y){var H=this,R=!!D.u(Y)||Y,v=D.p(B),P=function(Z,J){var Q=D.w(H.$u?Date.UTC(H.$y,J,Z):new Date(H.$y,J,Z),H);return R?Q:Q.endOf(u)},I=function(Z,J){return D.w(H.toDate()[Z].apply(H.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(J)),H)},x=this.$W,_=this.$M,V=this.$D,K="set"+(this.$u?"UTC":"");switch(v){case d:return R?P(1,0):P(31,11);case f:return R?P(1,_):P(0,_+1);case c:var G=this.$locale().weekStart||0,X=(x<G?x+7:x)-G;return P(R?V-X:V+(6-X),_);case u:case m:return I(K+"Hours",0);case l:return I(K+"Minutes",1);case s:return I(K+"Seconds",2);case a:return I(K+"Milliseconds",3);default:return this.clone()}},N.endOf=function(B){return this.startOf(B,!1)},N.$set=function(B,Y){var H,R=D.p(B),v="set"+(this.$u?"UTC":""),P=(H={},H[u]=v+"Date",H[m]=v+"Date",H[f]=v+"Month",H[d]=v+"FullYear",H[l]=v+"Hours",H[s]=v+"Minutes",H[a]=v+"Seconds",H[o]=v+"Milliseconds",H)[R],I=R===u?this.$D+(Y-this.$W):Y;if(R===f||R===d){var x=this.clone().set(m,1);x.$d[P](I),x.init(),this.$d=x.set(m,Math.min(this.$D,x.daysInMonth())).$d}else P&&this.$d[P](I);return this.init(),this},N.set=function(B,Y){return this.clone().$set(B,Y)},N.get=function(B){return this[D.p(B)]()},N.add=function(B,Y){var H,R=this;B=Number(B);var v=D.p(Y),P=function(_){var V=$(R);return D.w(V.date(V.date()+Math.round(_*B)),R)};if(v===f)return this.set(f,this.$M+B);if(v===d)return this.set(d,this.$y+B);if(v===u)return P(1);if(v===c)return P(7);var I=(H={},H[s]=r,H[l]=i,H[a]=n,H)[v]||1,x=this.$d.getTime()+B*I;return D.w(x,this)},N.subtract=function(B,Y){return this.add(-1*B,Y)},N.format=function(B){var Y=this,H=this.$locale();if(!this.isValid())return H.invalidDate||h;var R=B||"YYYY-MM-DDTHH:mm:ssZ",v=D.z(this),P=this.$H,I=this.$m,x=this.$M,_=H.weekdays,V=H.months,K=H.meridiem,G=function(J,Q,q,ne){return J&&(J[Q]||J(Y,R))||q[Q].slice(0,ne)},X=function(J){return D.s(P%12||12,J,"0")},Z=K||function(J,Q,q){var ne=J<12?"AM":"PM";return q?ne.toLowerCase():ne};return R.replace(g,function(J,Q){return Q||function(q){switch(q){case"YY":return String(Y.$y).slice(-2);case"YYYY":return D.s(Y.$y,4,"0");case"M":return x+1;case"MM":return D.s(x+1,2,"0");case"MMM":return G(H.monthsShort,x,V,3);case"MMMM":return G(V,x);case"D":return Y.$D;case"DD":return D.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return G(H.weekdaysMin,Y.$W,_,2);case"ddd":return G(H.weekdaysShort,Y.$W,_,3);case"dddd":return _[Y.$W];case"H":return String(P);case"HH":return D.s(P,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Z(P,I,!0);case"A":return Z(P,I,!1);case"m":return String(I);case"mm":return D.s(I,2,"0");case"s":return String(Y.$s);case"ss":return D.s(Y.$s,2,"0");case"SSS":return D.s(Y.$ms,3,"0");case"Z":return v}return null}(J)||v.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(B,Y,H){var R,v=this,P=D.p(Y),I=$(B),x=(I.utcOffset()-this.utcOffset())*r,_=this-I,V=function(){return D.m(v,I)};switch(P){case d:R=V()/12;break;case f:R=V();break;case p:R=V()/3;break;case c:R=(_-x)/6048e5;break;case u:R=(_-x)/864e5;break;case l:R=_/i;break;case s:R=_/r;break;case a:R=_/n;break;default:R=_}return H?R:D.a(R)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return E[this.$L]},N.locale=function(B,Y){if(!B)return this.$L;var H=this.clone(),R=M(B,Y,!0);return R&&(H.$L=R),H},N.clone=function(){return D.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},L}(),F=U.prototype;return $.prototype=F,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",d],["$D",m]].forEach(function(L){F[L[1]]=function(N){return this.$g(N,L[0],L[1])}}),$.extend=function(L,N){return L.$i||(L(N,U,$),L.$i=!0),$},$.locale=M,$.isDayjs=j,$.unix=function(L){return $(1e3*L)},$.en=E[S],$.Ls=E,$.p={},$})})(fp);var _E=fp.exports;const fo=be(_E);var dp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Nt,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(dp);var ME=dp.exports;const NE=be(ME);var pp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Nt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(pp);var jE=pp.exports;const LE=be(jE);fo.extend(NE),fo.extend(LE);function hp(e,t,n,r,i){return e.map(o=>{const{authorId:a}=o,s=a===n?"outgoing":"incoming",l=t.find(c=>c.id===a);let u;return l&&l.id===n?u={name:l.name||"You",avatar:l.pictureUrl}:l?u={name:l.name||"Agent",avatar:l.pictureUrl}:u={name:r||"Bot",avatar:i},{...o,direction:s,sender:u}})}function FE(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(mp(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!fo(s).isSame(l,t)&&l&&n.push(mp(l))}return n}function mp(e){return{id:vp(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:vp(e)}}}function vp(e,t=!1){const n=fo(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function BE(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function zE(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function WE(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function UE(e,t){return e.map(n=>Math.round(n*t))}const ti=e=>t=>WE(t,e),ni=e=>t=>UE(t,e),HE={50:ti(.95),100:ti(.9),200:ti(.75),300:ti(.6),400:ti(.3),500:e=>e,600:ni(.9),700:ni(.6),800:ni(.45),900:ni(.3),950:ni(.2)};function gp(e,t=HE){const n={},r=BE(e);for(const[i,o]of Object.entries(t))n[i]=zE(o(r));return n}function yp(e){const{fontFamily:t,radius:n,themeMode:r,color:i,variant:o,headerVariant:a}=e;let s={},l={};if(i){const d=gp(i),m=r==="dark"?np(d):d,h=gp(gE(yE(Us(i)))),y=r==="dark"?np(h):h,g=r==="dark"?"#101010":"#fdfdfd";l=Object.entries({...m,1:g}).reduce((w,[C,S])=>({...w,[`--bpPrimary-${C}`]:S}),{});const b=Object.entries({...y,1:g}).reduce((w,[C,S])=>({...w,[`--bpGray-${C}`]:S}),{});s={...l,...b}}n&&(s={...s,"--bpRadius-scale":n.toString()});const u=r==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=l?lp(l["--bpPrimary-600"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=o==="solid"?{"--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":l?lp(l["--bpPrimary-500"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},p=a==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)"}:{"--header-bg":u.bg,"--header-bg-hover":u.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return s={...s,...f,...p},up(":root",s)+(t?up(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const VE=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),bp=["audio","file","image","video"],xp=e=>bp.includes(e),wp="The Client ID is required to initialize the webchat.",qE="The API url is required to initialize the webchat.",KE="The Bot ID is required to initialize the webchat.",GE="No config URL provided.",Sp="Invalid API URL. Please use a valid API URL.",Ep="Invalid Client ID. Please use a valid Botpress Client ID.",kp="Invalid URL. Please make sure your client ID and API URL are valid",YE="Invalid config URL. Please make sure your config URL is valid",XE="Invalid webchat configuration, please make sure your config file is valid",JE="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",Cp="This bot is currently blocked or disabled.",Tp="This bot has temporarily paused. Please check back later.",$p="You are not a participant of this conversation, please clear your local storage.",Op="Please check your internet connection and refresh the page.",Ip="You've been disconnected from the conversation. Please refresh the page.",Pp="Unable to process the message. Please start a new conversation.",Hs={ResourceNotFound:{type:"configuration",message:Ep},Forbidden:{type:"bot",message:Cp}},Vs={MethodNotFound:{type:"configuration",message:kp},QuotaExceeded:{type:"bot",message:Tp},Forbidden:{type:"bot",message:$p}};function Ap(e){return e in Hs}function Rp(e){return e in Vs}function Dp(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function _p(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const QE=["networkerror","failedtofetch","errorininputstream"],po=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return Dp(e)?e.message.includes("[Webhook Handler]")&&Ap(e.type)?t=Hs[e.type]:Rp(e.type)?t=Vs[e.type]:t={type:e.type,message:e.message}:_p(e)?Mp(e.message)?t={type:"network",message:Ip}:Np(e.message).includes("invalidcontenttype")?t={type:"bot",message:Pp}:t={type:"event",message:e.message}:e instanceof Error&&Mp(e.message)&&(t={type:"network",message:Op}),t};function Mp(e){return QE.some(t=>Np(e).includes(t))}function Np(e){return e.replaceAll(" ","").toLowerCase()}const ho=A.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=cp(e??"",15);return T.jsxs(Bs,{ref:a,"data-color":s,...n,...o,children:[T.jsx(zs,{src:t,...r}),T.jsx(Ws,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});ho.displayName="Avatar";function ZY(){}function eX(){}function ZE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ek=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nk={};function jp(e,t){return(nk.jsx?tk:ek).test(e)}const rk=/[ \t\n\f\r]/g;function ik(e){return typeof e=="object"?e.type==="text"?Lp(e.value):!1:Lp(e)}function Lp(e){return e.replace(rk,"")===""}class ri{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ri.prototype.property={},ri.prototype.normal={},ri.prototype.space=null;function Fp(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new ri(n,r,t)}function qs(e){return e.toLowerCase()}class It{constructor(t,n){this.property=t,this.attribute=n}}It.prototype.space=null,It.prototype.boolean=!1,It.prototype.booleanish=!1,It.prototype.overloadedBoolean=!1,It.prototype.number=!1,It.prototype.commaSeparated=!1,It.prototype.spaceSeparated=!1,It.prototype.commaOrSpaceSeparated=!1,It.prototype.mustUseProperty=!1,It.prototype.defined=!1;let ok=0;const de=Bn(),He=Bn(),Bp=Bn(),te=Bn(),_e=Bn(),sr=Bn(),Et=Bn();function Bn(){return 2**++ok}const Ks=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:He,commaOrSpaceSeparated:Et,commaSeparated:sr,number:te,overloadedBoolean:Bp,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),Gs=Object.keys(Ks);class Ys extends It{constructor(t,n,r,i){let o=-1;if(super(t,n),zp(this,"space",i),typeof r=="number")for(;++o<Gs.length;){const a=Gs[o];zp(this,Gs[o],(r&Ks[a])===Ks[a])}}}Ys.prototype.defined=!0;function zp(e,t,n){n&&(e[t]=n)}const ak={}.hasOwnProperty;function lr(e){const t={},n={};let r;for(r in e.properties)if(ak.call(e.properties,r)){const i=e.properties[r],o=new Ys(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[qs(r)]=r,n[qs(o.attribute)]=r}return new ri(t,n,e.space)}const Wp=lr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Up=lr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Hp(e,t){return t in e?e[t]:t}function Vp(e,t){return Hp(e,t.toLowerCase())}const qp=lr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Vp,properties:{xmlns:null,xmlnsXLink:null}}),Kp=lr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:He,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:_e,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:te,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:_e,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:He,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null}}),sk=lr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Vp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:sr,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:_e,autoFocus:de,autoPlay:de,blocking:_e,capture:null,charSet:null,checked:de,cite:null,className:_e,cols:te,colSpan:null,content:null,contentEditable:He,controls:de,controlsList:_e,coords:te|sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Bp,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:_e,height:te,hidden:de,high:te,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:_e,itemRef:_e,itemScope:de,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:de,optimum:te,pattern:null,ping:_e,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:_e,required:de,reversed:de,rows:te,rowSpan:te,sandbox:_e,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:te,sizes:null,slot:null,span:te,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:te,step:null,style:null,tabIndex:te,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:He,width:te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:te,borderColor:null,bottomMargin:te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:te,leftMargin:te,link:null,longDesc:null,lowSrc:null,marginHeight:te,marginWidth:te,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:te,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:te,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:te,security:null,unselectable:null}}),lk=lr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Hp,properties:{about:Et,accentHeight:te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:te,amplitude:te,arabicForm:null,ascent:te,attributeName:null,attributeType:null,azimuth:te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:te,by:null,calcMode:null,capHeight:te,className:_e,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:te,diffuseConstant:te,direction:null,display:null,dur:null,divisor:te,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:te,enableBackground:null,end:null,event:null,exponent:te,externalResourcesRequired:null,fill:null,fillOpacity:te,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:sr,g2:sr,glyphName:sr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:te,horizOriginX:te,horizOriginY:te,id:null,ideographic:te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:te,k:te,k1:te,k2:te,k3:te,k4:te,kernelMatrix:Et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:te,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:te,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:te,overlineThickness:te,paintOrder:null,panose1:null,path:null,pathLength:te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:te,pointsAtY:te,pointsAtZ:te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Et,rev:Et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Et,requiredFeatures:Et,requiredFonts:Et,requiredFormats:Et,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:te,specularExponent:te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:te,strikethroughThickness:te,string:null,stroke:null,strokeDashArray:Et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:te,strokeOpacity:te,strokeWidth:null,style:null,surfaceScale:te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Et,tabIndex:te,tableValues:null,target:null,targetX:te,targetY:te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:te,underlineThickness:te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:te,values:null,vAlphabetic:te,vMathematical:te,vectorEffect:null,vHanging:te,vIdeographic:te,version:null,vertAdvY:te,vertOriginX:te,vertOriginY:te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),uk=/^data[-\w.:]+$/i,Gp=/-[a-z]/g,ck=/[A-Z]/g;function fk(e,t){const n=qs(t);let r=t,i=It;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uk.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Gp,pk);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Gp.test(o)){let a=o.replace(ck,dk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Ys}return new i(r,t)}function dk(e){return"-"+e.toLowerCase()}function pk(e){return e.charAt(1).toUpperCase()}const hk={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},mk=Fp([Up,Wp,qp,Kp,sk],"html"),Xs=Fp([Up,Wp,qp,Kp,lk],"svg");function vk(e){return e.join(" ").trim()}var Yp={},Xp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gk=/\n/g,yk=/^\s*/,bk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xk=/^:\s*/,wk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Sk=/^[;\s]*/,Ek=/^\s+|\s+$/g,kk=`
|
|
23
|
-
`,Jp="/",Qp="*",zn="",Ck="comment",Tk="declaration",$k=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(gk);h&&(n+=h.length);var y=m.lastIndexOf(kk);r=~y?m.length-y:r+m.length}function o(){var m={line:n,column:r};return function(h){return h.position=new a(m),u(),h}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function u(){l(yk)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=o();if(!(Jp!=e.charAt(0)||Qp!=e.charAt(1))){for(var h=2;zn!=e.charAt(h)&&(Qp!=e.charAt(h)||Jp!=e.charAt(h+1));)++h;if(h+=2,zn===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:Ck,comment:y})}}function p(){var m=o(),h=l(bk);if(h){if(f(),!l(xk))return s("property missing ':'");var y=l(wk),g=m({type:Tk,property:Zp(h[0].replace(Xp,zn)),value:y?Zp(y[0].replace(Xp,zn)):zn});return l(Sk),g}}function d(){var m=[];c(m);for(var h;h=p();)h!==!1&&(m.push(h),c(m));return m}return u(),d()};function Zp(e){return e?e.replace(Ek,zn):zn}var Ok=Nt&&Nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yp,"__esModule",{value:!0});var eh=Yp.default=Pk,Ik=Ok($k);function Pk(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Ik.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const Ak=eh.default||eh,th=nh("end"),Js=nh("start");function nh(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Rk(e){const t=Js(e),n=th(e);if(t&&n)return{start:t,end:n}}function ii(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rh(e.position):"start"in e||"end"in e?rh(e):"line"in e||"column"in e?Qs(e):""}function Qs(e){return ih(e&&e.line)+":"+ih(e&&e.column)}function rh(e){return Qs(e&&e.start)+"-"+Qs(e&&e.end)}function ih(e){return e&&typeof e=="number"?e:1}class st extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=ii(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}st.prototype.file="",st.prototype.name="",st.prototype.reason="",st.prototype.message="",st.prototype.stack="",st.prototype.column=void 0,st.prototype.line=void 0,st.prototype.ancestors=void 0,st.prototype.cause=void 0,st.prototype.fatal=void 0,st.prototype.place=void 0,st.prototype.ruleId=void 0,st.prototype.source=void 0;const Zs={}.hasOwnProperty,Dk=new Map,_k=/[A-Z]/g,Mk=/-([a-z])/g,Nk=new Set(["table","tbody","thead","tfoot","tr"]),jk=new Set(["td","th"]),oh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Lk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=qk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Vk(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Xs:mk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=ah(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function ah(e,t,n){if(t.type==="element")return Fk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Bk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Wk(e,t,n);if(t.type==="mdxjsEsm")return zk(e,t);if(t.type==="root")return Uk(e,t,n);if(t.type==="text")return Hk(e,t)}function Fk(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Xs,e.schema=i),e.ancestors.push(t);const o=lh(e,t.tagName,!1),a=Kk(e,t);let s=tl(e,t);return Nk.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!ik(l):!0})),sh(e,a,o,t),el(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Bk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}oi(e,t.position)}function zk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oi(e,t.position)}function Wk(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Xs,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:lh(e,t.name,!0),a=Gk(e,t),s=tl(e,t);return sh(e,a,o,t),el(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Uk(e,t,n){const r={};return el(r,tl(e,t)),e.create(t,e.Fragment,r,n)}function Hk(e,t){return t.value}function sh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function el(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Vk(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function qk(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Js(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Kk(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Zs.call(t.properties,i)){const o=Yk(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&jk.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Gk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else oi(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else oi(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function tl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Dk;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=ah(e,o,a);s!==void 0&&n.push(s)}return n}function Yk(e,t,n){const r=fk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ZE(n):vk(n)),r.property==="style"){let i=typeof n=="object"?n:Xk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Jk(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?hk[r.property]||r.property:r.attribute,n]}}function Xk(e,t){const n={};try{Ak(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new st("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=oh+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(Mk,Zk)),n[a]=o}}function lh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=jp(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=jp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Zs.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);oi(e)}function oi(e,t){const n=new st("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=oh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Jk(e){const t={};let n;for(n in e)Zs.call(e,n)&&(t[Qk(n)]=e[n]);return t}function Qk(e){let t=e.replace(_k,eC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Zk(e,t){return t.toUpperCase()}function eC(e){return"-"+e.toLowerCase()}const nl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tC={};function rl(e,t){const n=tC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return uh(e,r,i)}function uh(e,t,n){if(nC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ch(e.children,t,n)}return Array.isArray(e)?ch(e,t,n):""}function ch(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=uh(e[i],t,n);return r.join("")}function nC(e){return!!(e&&typeof e=="object")}const fh=document.createElement("i");function il(e){const t="&"+e+";";fh.innerHTML=t;const n=fh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pt(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function At(e,t){return e.length>0?(Pt(e,e.length,0,t),e):t}const dh={}.hasOwnProperty;function ph(e){const t={};let n=-1;for(;++n<e.length;)rC(t,e[n]);return t}function rC(e,t){let n;for(n in t){const i=(dh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){dh.call(i,a)||(i[a]=[]);const s=o[a];iC(i[a],Array.isArray(s)?s:s?[s]:[])}}}function iC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pt(e,0,0,r)}function hh(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dt=wn(/[A-Za-z]/),lt=wn(/[\dA-Za-z]/),oC=wn(/[#-'*+\--9=?A-Z^-~]/);function mo(e){return e!==null&&(e<32||e===127)}const ol=wn(/\d/),aC=wn(/[\dA-Fa-f]/),sC=wn(/[!-/:-@[-`{-~]/);function ce(e){return e!==null&&e<-2}function Re(e){return e!==null&&(e<0||e===32)}function me(e){return e===-2||e===-1||e===32}const vo=wn(new RegExp("\\p{P}|\\p{S}","u")),Wn=wn(/\s/);function wn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ur(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&<(e.charCodeAt(n+1))&<(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return me(l)?(e.enter(n),s(l)):t(l)}function s(l){return me(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const lC={tokenize:uC};function uC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ce(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const cC={tokenize:fC},mh={tokenize:dC};function fC(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const C=t.events.length;let S=C,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){E=t.events[S][1].end;break}g(r);let O=C;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},E),O++;return Pt(t.events,S+1,0,t.events.slice(C)),t.events.length=O,u(w)}return s(w)}function u(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mh,c,f)(w)}function c(w){return i&&b(),g(r),p(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(w)}function p(w){return t.containerState={},e.attempt(mh,d,m)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function m(w){if(w===null){i&&b(),g(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),h(w)}function h(w){if(w===null){y(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return ce(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function y(w,C){const S=t.sliceStream(w);if(C&&S.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(S),t.parser.lazy[w.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;const O=t.events.length;let j=O,M,$;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(M){$=t.events[j][1].end;break}M=!0}for(g(r),E=O;E<t.events.length;)t.events[E][1].end=Object.assign({},$),E++;Pt(t.events,j+1,0,t.events.slice(O)),t.events.length=E}}function g(w){let C=n.length;for(;C-- >w;){const S=n[C];t.containerState=S[1],S[0].exit.call(t,e)}n.length=w}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dC(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function go(e){if(e===null||Re(e)||Wn(e))return 1;if(vo(e))return 2}function yo(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const al={name:"attention",tokenize:hC,resolveAll:pC};function pC(e,t){let n=-1,r,i,o,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);vh(f,-l),vh(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=At(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=At(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=At(u,yo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=At(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=At(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function hC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=go(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),c=go(l),f=!c||c===2&&i||n.includes(l),p=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!p)),u._close=!!(o===42?p:p&&(c||!f)),t(l)}}function vh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mC={name:"autolink",tokenize:vC};function vC(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return dt(d)?(e.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||lt(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||lt(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||mo(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),c):oC(d)?(e.consume(d),u):n(d)}function c(d){return lt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||lt(d))&&r++<63){const m=d===45?p:f;return e.consume(d),m}return n(d)}}const ai={tokenize:gC,partial:!0};function gC(e,t,n){return r;function r(o){return me(o)?xe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ce(o)?t(o):n(o)}}const gh={name:"blockQuote",tokenize:yC,continuation:{tokenize:bC},exit:xC};function yC(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return me(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function bC(e,t,n){const r=this;return i;function i(a){return me(a)?xe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(gh,t,n)(a)}}function xC(e){e.exit("blockQuote")}const yh={name:"characterEscape",tokenize:wC};function wC(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return sC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const bh={name:"characterReference",tokenize:SC};function SC(e,t,n){const r=this;let i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=lt,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=aC,c):(e.enter("characterReferenceValue"),o=7,a=ol,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return a===lt&&!il(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):n(f)}}const xh={tokenize:kC,partial:!0},wh={name:"codeFenced",tokenize:EC,concrete:!0};function EC(e,t,n){const r=this,i={tokenize:S,partial:!0};let o=0,a=0,s;return l;function l(E){return u(E)}function u(E){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(a++,e.consume(E),c):a<3?n(E):(e.exit("codeFencedFenceSequence"),me(E)?xe(e,f,"whitespace")(E):f(E))}function f(E){return E===null||ce(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(xh,h,C)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||ce(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):me(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||ce(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||ce(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),m)}function h(E){return e.attempt(i,C,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),g}function g(E){return o>0&&me(E)?xe(e,b,"linePrefix",o+1)(E):b(E)}function b(E){return E===null||ce(E)?e.check(xh,h,C)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||ce(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),w)}function C(E){return e.exit("codeFenced"),t(E)}function S(E,O,j){let M=0;return $;function $(N){return E.enter("lineEnding"),E.consume(N),E.exit("lineEnding"),D}function D(N){return E.enter("codeFencedFence"),me(N)?xe(E,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):U(N)}function U(N){return N===s?(E.enter("codeFencedFenceSequence"),F(N)):j(N)}function F(N){return N===s?(M++,E.consume(N),F):M>=a?(E.exit("codeFencedFenceSequence"),me(N)?xe(E,L,"whitespace")(N):L(N)):j(N)}function L(N){return N===null||ce(N)?(E.exit("codeFencedFence"),O(N)):j(N)}}}function kC(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const sl={name:"codeIndented",tokenize:TC},CC={tokenize:$C,partial:!0};function TC(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),xe(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):ce(u)?e.attempt(CC,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||ce(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function $C(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):xe(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ce(a)?i(a):n(a)}}const OC={name:"codeText",tokenize:AC,resolve:IC,previous:PC};function IC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function PC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function AC(e,t,n){let r=0,i,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):ce(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||ce(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class RC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&si(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),si(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),si(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);si(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);si(this.left,n.reverse())}}}function si(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Sh(e){const t={};let n=-1,r,i,o,a,s,l,u;const c=new RC(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,DC(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Pt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function DC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],u={};let c,f,p=-1,d=n,m=0,h=0;const y=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,y.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),p=y.length;p--;){const g=s.slice(y[p],y[p+1]),b=o.pop();l.push([b,b+g.length-1]),e.splice(b,2,g)}for(l.reverse(),p=-1;++p<l.length;)u[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return u}const _C={tokenize:jC,resolve:NC},MC={tokenize:LC,partial:!0};function NC(e){return Sh(e),e}function jC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):ce(s)?e.check(MC,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function LC(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),xe(e,o,"linePrefix")}function o(a){if(a===null||ce(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Eh(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),p):g===null||g===32||g===41||mo(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function p(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||ce(g)?n(g):(e.consume(g),g===92?m:d)}function m(g){return g===60||g===62||g===92?(e.consume(g),d):d(g)}function h(g){return!c&&(g===null||g===41||Re(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,h):g===41?(e.consume(g),c--,h):g===null||g===32||g===40||mo(g)?n(g):(e.consume(g),g===92?y:h)}function y(g){return g===40||g===41||g===92?(e.consume(g),h):h(g)}}function kh(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ce(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||ce(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!me(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Ch(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),l(a)):p===null?n(p):ce(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),xe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||ce(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function li(e,t){let n;return r;function r(i){return ce(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):me(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const FC={name:"definition",tokenize:zC},BC={tokenize:WC,partial:!0};function zC(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return kh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Re(d)?li(e,u)(d):u(d)}function u(d){return Eh(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(BC,f,f)(d)}function f(d){return me(d)?xe(e,p,"whitespace")(d):p(d)}function p(d){return d===null||ce(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function WC(e,t,n){return r;function r(s){return Re(s)?li(e,i)(s):n(s)}function i(s){return Ch(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return me(s)?xe(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ce(s)?t(s):n(s)}}const UC={name:"hardBreakEscape",tokenize:HC};function HC(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ce(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const VC={name:"headingAtx",tokenize:KC,resolve:qC};function qC(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function KC(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Re(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ce(c)?(e.exit("atxHeading"),t(c)):me(c)?xe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Re(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const GC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Th=["pre","script","style","textarea"],YC={name:"htmlFlow",tokenize:ZC,resolveTo:QC,concrete:!0},XC={tokenize:tT,partial:!0},JC={tokenize:eT,partial:!0};function QC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ZC(e,t,n){const r=this;let i,o,a,s,l;return u;function u(x){return c(x)}function c(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),f}function f(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),o=!0,h):x===63?(e.consume(x),i=3,r.interrupt?t:v):dt(x)?(e.consume(x),a=String.fromCharCode(x),y):n(x)}function p(x){return x===45?(e.consume(x),i=2,d):x===91?(e.consume(x),i=5,s=0,m):dt(x)?(e.consume(x),i=4,r.interrupt?t:v):n(x)}function d(x){return x===45?(e.consume(x),r.interrupt?t:v):n(x)}function m(x){const _="CDATA[";return x===_.charCodeAt(s++)?(e.consume(x),s===_.length?r.interrupt?t:U:m):n(x)}function h(x){return dt(x)?(e.consume(x),a=String.fromCharCode(x),y):n(x)}function y(x){if(x===null||x===47||x===62||Re(x)){const _=x===47,V=a.toLowerCase();return!_&&!o&&Th.includes(V)?(i=1,r.interrupt?t(x):U(x)):GC.includes(a.toLowerCase())?(i=6,_?(e.consume(x),g):r.interrupt?t(x):U(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?b(x):w(x))}return x===45||lt(x)?(e.consume(x),a+=String.fromCharCode(x),y):n(x)}function g(x){return x===62?(e.consume(x),r.interrupt?t:U):n(x)}function b(x){return me(x)?(e.consume(x),b):$(x)}function w(x){return x===47?(e.consume(x),$):x===58||x===95||dt(x)?(e.consume(x),C):me(x)?(e.consume(x),w):$(x)}function C(x){return x===45||x===46||x===58||x===95||lt(x)?(e.consume(x),C):S(x)}function S(x){return x===61?(e.consume(x),E):me(x)?(e.consume(x),S):w(x)}function E(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),l=x,O):me(x)?(e.consume(x),E):j(x)}function O(x){return x===l?(e.consume(x),l=null,M):x===null||ce(x)?n(x):(e.consume(x),O)}function j(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Re(x)?S(x):(e.consume(x),j)}function M(x){return x===47||x===62||me(x)?w(x):n(x)}function $(x){return x===62?(e.consume(x),D):n(x)}function D(x){return x===null||ce(x)?U(x):me(x)?(e.consume(x),D):n(x)}function U(x){return x===45&&i===2?(e.consume(x),B):x===60&&i===1?(e.consume(x),Y):x===62&&i===4?(e.consume(x),P):x===63&&i===3?(e.consume(x),v):x===93&&i===5?(e.consume(x),R):ce(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(XC,I,F)(x)):x===null||ce(x)?(e.exit("htmlFlowData"),F(x)):(e.consume(x),U)}function F(x){return e.check(JC,L,I)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),N}function N(x){return x===null||ce(x)?F(x):(e.enter("htmlFlowData"),U(x))}function B(x){return x===45?(e.consume(x),v):U(x)}function Y(x){return x===47?(e.consume(x),a="",H):U(x)}function H(x){if(x===62){const _=a.toLowerCase();return Th.includes(_)?(e.consume(x),P):U(x)}return dt(x)&&a.length<8?(e.consume(x),a+=String.fromCharCode(x),H):U(x)}function R(x){return x===93?(e.consume(x),v):U(x)}function v(x){return x===62?(e.consume(x),P):x===45&&i===2?(e.consume(x),v):U(x)}function P(x){return x===null||ce(x)?(e.exit("htmlFlowData"),I(x)):(e.consume(x),P)}function I(x){return e.exit("htmlFlow"),t(x)}}function eT(e,t,n){const r=this;return i;function i(a){return ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function tT(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ai,t,n)}}const nT={name:"htmlText",tokenize:rT};function rT(e,t,n){const r=this;let i,o,a;return s;function s(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),l}function l(v){return v===33?(e.consume(v),u):v===47?(e.consume(v),S):v===63?(e.consume(v),w):dt(v)?(e.consume(v),j):n(v)}function u(v){return v===45?(e.consume(v),c):v===91?(e.consume(v),o=0,m):dt(v)?(e.consume(v),b):n(v)}function c(v){return v===45?(e.consume(v),d):n(v)}function f(v){return v===null?n(v):v===45?(e.consume(v),p):ce(v)?(a=f,Y(v)):(e.consume(v),f)}function p(v){return v===45?(e.consume(v),d):f(v)}function d(v){return v===62?B(v):v===45?p(v):f(v)}function m(v){const P="CDATA[";return v===P.charCodeAt(o++)?(e.consume(v),o===P.length?h:m):n(v)}function h(v){return v===null?n(v):v===93?(e.consume(v),y):ce(v)?(a=h,Y(v)):(e.consume(v),h)}function y(v){return v===93?(e.consume(v),g):h(v)}function g(v){return v===62?B(v):v===93?(e.consume(v),g):h(v)}function b(v){return v===null||v===62?B(v):ce(v)?(a=b,Y(v)):(e.consume(v),b)}function w(v){return v===null?n(v):v===63?(e.consume(v),C):ce(v)?(a=w,Y(v)):(e.consume(v),w)}function C(v){return v===62?B(v):w(v)}function S(v){return dt(v)?(e.consume(v),E):n(v)}function E(v){return v===45||lt(v)?(e.consume(v),E):O(v)}function O(v){return ce(v)?(a=O,Y(v)):me(v)?(e.consume(v),O):B(v)}function j(v){return v===45||lt(v)?(e.consume(v),j):v===47||v===62||Re(v)?M(v):n(v)}function M(v){return v===47?(e.consume(v),B):v===58||v===95||dt(v)?(e.consume(v),$):ce(v)?(a=M,Y(v)):me(v)?(e.consume(v),M):B(v)}function $(v){return v===45||v===46||v===58||v===95||lt(v)?(e.consume(v),$):D(v)}function D(v){return v===61?(e.consume(v),U):ce(v)?(a=D,Y(v)):me(v)?(e.consume(v),D):M(v)}function U(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),i=v,F):ce(v)?(a=U,Y(v)):me(v)?(e.consume(v),U):(e.consume(v),L)}function F(v){return v===i?(e.consume(v),i=void 0,N):v===null?n(v):ce(v)?(a=F,Y(v)):(e.consume(v),F)}function L(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||Re(v)?M(v):(e.consume(v),L)}function N(v){return v===47||v===62||Re(v)?M(v):n(v)}function B(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function Y(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),H}function H(v){return me(v)?xe(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):R(v)}function R(v){return e.enter("htmlTextData"),a(v)}}const ll={name:"labelEnd",tokenize:uT,resolveTo:lT,resolveAll:sT},iT={tokenize:cT},oT={tokenize:fT},aT={tokenize:dT};function sT(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function lT(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",u,t]],s=At(s,e.slice(o+1,o+r+3)),s=At(s,[["enter",c,t]]),s=At(s,yo(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=At(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=At(s,e.slice(a+1)),s=At(s,[["exit",l,t]]),Pt(e,o,e.length,s),e}function uT(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?f(p):(a=r.parser.defined.includes(jt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(iT,c,a?c:f)(p):p===91?e.attempt(oT,c,a?u:f)(p):a?c(p):f(p)}function u(p){return e.attempt(aT,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,n(p)}}function cT(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Re(f)?li(e,o)(f):o(f)}function o(f){return f===41?c(f):Eh(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Re(f)?li(e,l)(f):c(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?Ch(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Re(f)?li(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function fT(e,t,n){const r=this;return i;function i(s){return kh.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function dT(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const pT={name:"labelStartImage",tokenize:hT,resolveAll:ll.resolveAll};function hT(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const mT={name:"labelStartLink",tokenize:vT,resolveAll:ll.resolveAll};function vT(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ul={name:"lineEnding",tokenize:gT};function gT(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const bo={name:"thematicBreak",tokenize:yT};function yT(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ce(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),me(u)?xe(e,s,"whitespace")(u):s(u))}}const mt={name:"list",tokenize:wT,continuation:{tokenize:ST},exit:kT},bT={tokenize:CT,partial:!0},xT={tokenize:ET,partial:!0};function wT(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:ol(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bo,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return ol(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(ai,r.interrupt?n:c,e.attempt(bT,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return me(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function ST(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ai,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!me(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xT,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ET(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function kT(e){e.exit(this.containerState.type)}function CT(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!me(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const $h={name:"setextUnderline",tokenize:$T,resolveTo:TT};function TT(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function $T(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),me(u)?xe(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ce(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const OT={tokenize:IT};function IT(e){const t=this,n=e.attempt(ai,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(_C,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const PT={resolveAll:Ih()},AT=Oh("string"),RT=Oh("text");function Oh(e){return{tokenize:t,resolveAll:Ih(e==="text"?DT:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Ih(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function DT(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function _T(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:w,exit:C,attempt:O(S),check:O(E),interrupt:O(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:m,defineSkip:h,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function f(D){return a=At(a,D),y(),a[a.length-1]!==null?[]:(j(t,0),u.events=yo(o,u.events,u),u.events)}function p(D,U){return NT(d(D),U)}function d(D){return MT(a,D)}function m(){const{line:D,column:U,offset:F,_index:L,_bufferIndex:N}=r;return{line:D,column:U,offset:F,_index:L,_bufferIndex:N}}function h(D){i[D.line]=D.column,$()}function y(){let D;for(;r._index<a.length;){const U=a[r._index];if(typeof U=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<U.length;)g(U.charCodeAt(r._bufferIndex));else g(U)}}function g(D){c=c(D)}function b(D){ce(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,$()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function w(D,U){const F=U||{};return F.type=D,F.start=m(),u.events.push(["enter",F,u]),s.push(F),F}function C(D){const U=s.pop();return U.end=m(),u.events.push(["exit",U,u]),U}function S(D,U){j(D,U.from)}function E(D,U){U.restore()}function O(D,U){return F;function F(L,N,B){let Y,H,R,v;return Array.isArray(L)?I(L):"tokenize"in L?I([L]):P(L);function P(K){return G;function G(X){const Z=X!==null&&K[X],J=X!==null&&K.null,Q=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(J)?J:J?[J]:[]];return I(Q)(X)}}function I(K){return Y=K,H=0,K.length===0?B:x(K[H])}function x(K){return G;function G(X){return v=M(),R=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?V():K.tokenize.call(U?Object.assign(Object.create(u),U):u,l,_,V)(X)}}function _(K){return D(R,v),N}function V(K){return v.restore(),++H<Y.length?x(Y[H]):B}}}function j(D,U){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&Pt(u.events,U,u.events.length-U,D.resolve(u.events.slice(U),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function M(){const D=m(),U=u.previous,F=u.currentConstruct,L=u.events.length,N=Array.from(s);return{restore:B,from:L};function B(){r=D,u.previous=U,u.currentConstruct=F,u.events.length=L,s=N,$()}}function $(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function MT(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function NT(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
30
|
+
<%s key={someKey} {...props} />`,yp,Er,RX,Er),kE[Er+yp]=!0}}return A===r?OX(at):TX(at),at}}function IX(A,te,ue){return CE(A,te,ue,!0)}function PX(A,te,ue){return CE(A,te,ue,!1)}var AX=PX,_X=IX;bi.Fragment=r,bi.jsx=AX,bi.jsxs=_X}()),bi}process.env.NODE_ENV==="production"?il.exports=TE():il.exports=OE();var C=il.exports;function IE(e,t=[]){let n=[];function r(o,a){const s=k.createContext(a),l=n.length;n=[...n,a];function u(f){const{scope:p,children:d,...m}=f,h=(p==null?void 0:p[e][l])||s,g=k.useMemo(()=>m,Object.values(m));return C.jsx(h.Provider,{value:g,children:d})}function c(f,p){const d=(p==null?void 0:p[e][l])||s,m=k.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,PE(i,...t)]}function PE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Mn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var kr=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function AE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _E(...e){return t=>e.forEach(n=>AE(n,t))}var Ep=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(DE);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(ol,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(ol,{...r,ref:t,children:n})});Ep.displayName="Slot";var ol=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=NE(n);return k.cloneElement(n,{...ME(r,n.props),ref:t?_E(t,i):i})}return k.Children.count(n)>1?k.Children.only(null):null});ol.displayName="SlotClone";var RE=({children:e})=>C.jsx(C.Fragment,{children:e});function DE(e){return k.isValidElement(e)&&e.type===RE}function ME(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function NE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],al=jE.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Ep:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),sl="Avatar",[LE,jX]=IE(sl),[FE,kp]=LE(sl),ll=k.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=k.useState("idle");return C.jsx(FE,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:C.jsx(al.span,{...r,ref:t})})});ll.displayName=sl;var Cp="AvatarImage",ul=k.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=kp(Cp,n),s=BE(r),l=Mn(u=>{i(u),a.onImageLoadingStatusChange(u)});return kr(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.jsx(al.img,{...o,ref:t,src:r}):null});ul.displayName=Cp;var $p="AvatarFallback",cl=k.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=kp($p,n),[a,s]=k.useState(r===void 0);return k.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?C.jsx(al.span,{...i,ref:t}):null});cl.displayName=$p;function BE(e){const[t,n]=k.useState("idle");return kr(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}function fl(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function zE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const WE=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Tp(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const UE=2.4,HE=.2126729,VE=.7151522,qE=.072175,KE=.56,GE=.57,YE=.62,XE=.65,Ro=.022,Op=1.414,JE=1.14,ZE=1.14,QE=.035991,ek=.035991,tk=27.7847239587675,nk=27.7847239587675,Ip=.027,Pp=.027,Ap=.001,rk=5e-4;function _p(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**UE;return HE*i(t)+VE*i(n)+qE*i(r)}function Rp(e,t){if(!e||!t)return 0;let n=_p(fl(e)),r=_p(fl(t)),i=0,o=0;return n=n>Ro?n:n+(Ro-n)**Op,r=r>Ro?r:r+(Ro-r)**Op,Math.abs(r-n)<rk?0:(r>n?(i=(r**KE-n**GE)*JE,o=i<Ap?0:i<QE?i-i*tk*Ip:i-Ip):(i=(r**XE-n**YE)*ZE,o=i>-Ap?0:i>-ek?i-i*nk*Pp:i+Pp),Math.abs(o*100))}function Dp(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Mp(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Np={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",f="month",p="quarter",d="year",m="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var N=["th","st","nd","rd"],W=L%100;return"["+L+(N[(W-20)%10]||N[W]||N[0])+"]"}},x=function(L,N,W){var X=String(L);return!X||X.length>=N?L:""+Array(N+1-X.length).join(W)+L},$={s:x,z:function(L){var N=-L.utcOffset(),W=Math.abs(N),X=Math.floor(W/60),V=W%60;return(N<=0?"+":"-")+x(X,2,"0")+":"+x(V,2,"0")},m:function L(N,W){if(N.date()<W.date())return-L(W,N);var X=12*(W.year()-N.year())+(W.month()-N.month()),V=N.clone().add(X,f),_=W-V<0,y=N.clone().add(X+(_?-1:1),f);return+(-(X+(W-V)/(_?V-y:y-V))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:d,w:c,d:u,D:m,h:l,m:s,s:a,ms:o,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},S="en",E={};E[S]=b;var O="$isDayjsObject",F=function(L){return L instanceof H||!(!L||!L[O])},D=function L(N,W,X){var V;if(!N)return S;if(typeof N=="string"){var _=N.toLowerCase();E[_]&&(V=_),W&&(E[_]=W,V=_);var y=N.split("-");if(!V&&y.length>1)return L(y[0])}else{var R=N.name;E[R]=N,V=R}return!X&&V&&(S=V),V||!X&&S},T=function(L,N){if(F(L))return L.clone();var W=typeof N=="object"?N:{};return W.date=L,W.args=arguments,new H(W)},M=$;M.l=D,M.i=F,M.w=function(L,N){return T(L,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var H=function(){function L(W){this.$L=D(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[O]=!0}var N=L.prototype;return N.parse=function(W){this.$d=function(X){var V=X.date,_=X.utc;if(V===null)return new Date(NaN);if(M.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var y=V.match(g);if(y){var R=y[2]-1||0,P=(y[7]||"0").substring(0,3);return _?new Date(Date.UTC(y[1],R,y[3]||1,y[4]||0,y[5]||0,y[6]||0,P)):new Date(y[1],R,y[3]||1,y[4]||0,y[5]||0,y[6]||0,P)}}return new Date(V)}(W),this.init()},N.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},N.$utils=function(){return M},N.isValid=function(){return this.$d.toString()!==h},N.isSame=function(W,X){var V=T(W);return this.startOf(X)<=V&&V<=this.endOf(X)},N.isAfter=function(W,X){return T(W)<this.startOf(X)},N.isBefore=function(W,X){return this.endOf(X)<T(W)},N.$g=function(W,X,V){return M.u(W)?this[X]:this.set(V,W)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(W,X){var V=this,_=!!M.u(X)||X,y=M.p(W),R=function(ee,J){var Z=M.w(V.$u?Date.UTC(V.$y,J,ee):new Date(V.$y,J,ee),V);return _?Z:Z.endOf(u)},P=function(ee,J){return M.w(V.toDate()[ee].apply(V.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(J)),V)},w=this.$W,j=this.$M,G=this.$D,K="set"+(this.$u?"UTC":"");switch(y){case d:return _?R(1,0):R(31,11);case f:return _?R(1,j):R(0,j+1);case c:var Y=this.$locale().weekStart||0,Q=(w<Y?w+7:w)-Y;return R(_?G-Q:G+(6-Q),j);case u:case m:return P(K+"Hours",0);case l:return P(K+"Minutes",1);case s:return P(K+"Seconds",2);case a:return P(K+"Milliseconds",3);default:return this.clone()}},N.endOf=function(W){return this.startOf(W,!1)},N.$set=function(W,X){var V,_=M.p(W),y="set"+(this.$u?"UTC":""),R=(V={},V[u]=y+"Date",V[m]=y+"Date",V[f]=y+"Month",V[d]=y+"FullYear",V[l]=y+"Hours",V[s]=y+"Minutes",V[a]=y+"Seconds",V[o]=y+"Milliseconds",V)[_],P=_===u?this.$D+(X-this.$W):X;if(_===f||_===d){var w=this.clone().set(m,1);w.$d[R](P),w.init(),this.$d=w.set(m,Math.min(this.$D,w.daysInMonth())).$d}else R&&this.$d[R](P);return this.init(),this},N.set=function(W,X){return this.clone().$set(W,X)},N.get=function(W){return this[M.p(W)]()},N.add=function(W,X){var V,_=this;W=Number(W);var y=M.p(X),R=function(j){var G=T(_);return M.w(G.date(G.date()+Math.round(j*W)),_)};if(y===f)return this.set(f,this.$M+W);if(y===d)return this.set(d,this.$y+W);if(y===u)return R(1);if(y===c)return R(7);var P=(V={},V[s]=r,V[l]=i,V[a]=n,V)[y]||1,w=this.$d.getTime()+W*P;return M.w(w,this)},N.subtract=function(W,X){return this.add(-1*W,X)},N.format=function(W){var X=this,V=this.$locale();if(!this.isValid())return V.invalidDate||h;var _=W||"YYYY-MM-DDTHH:mm:ssZ",y=M.z(this),R=this.$H,P=this.$m,w=this.$M,j=V.weekdays,G=V.months,K=V.meridiem,Y=function(J,Z,q,ie){return J&&(J[Z]||J(X,_))||q[Z].slice(0,ie)},Q=function(J){return M.s(R%12||12,J,"0")},ee=K||function(J,Z,q){var ie=J<12?"AM":"PM";return q?ie.toLowerCase():ie};return _.replace(v,function(J,Z){return Z||function(q){switch(q){case"YY":return String(X.$y).slice(-2);case"YYYY":return M.s(X.$y,4,"0");case"M":return w+1;case"MM":return M.s(w+1,2,"0");case"MMM":return Y(V.monthsShort,w,G,3);case"MMMM":return Y(G,w);case"D":return X.$D;case"DD":return M.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return Y(V.weekdaysMin,X.$W,j,2);case"ddd":return Y(V.weekdaysShort,X.$W,j,3);case"dddd":return j[X.$W];case"H":return String(R);case"HH":return M.s(R,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ee(R,P,!0);case"A":return ee(R,P,!1);case"m":return String(P);case"mm":return M.s(P,2,"0");case"s":return String(X.$s);case"ss":return M.s(X.$s,2,"0");case"SSS":return M.s(X.$ms,3,"0");case"Z":return y}return null}(J)||y.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(W,X,V){var _,y=this,R=M.p(X),P=T(W),w=(P.utcOffset()-this.utcOffset())*r,j=this-P,G=function(){return M.m(y,P)};switch(R){case d:_=G()/12;break;case f:_=G();break;case p:_=G()/3;break;case c:_=(j-w)/6048e5;break;case u:_=(j-w)/864e5;break;case l:_=j/i;break;case s:_=j/r;break;case a:_=j/n;break;default:_=j}return V?_:M.a(_)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return E[this.$L]},N.locale=function(W,X){if(!W)return this.$L;var V=this.clone(),_=D(W,X,!0);return _&&(V.$L=_),V},N.clone=function(){return M.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},L}(),B=H.prototype;return T.prototype=B,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",d],["$D",m]].forEach(function(L){B[L[1]]=function(N){return this.$g(N,L[0],L[1])}}),T.extend=function(L,N){return L.$i||(L(N,H,T),L.$i=!0),T},T.locale=D,T.isDayjs=F,T.unix=function(L){return T(1e3*L)},T.en=E[S],T.Ls=E,T.p={},T})})(Np);var ik=Np.exports;const Do=ke(ik);var jp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(jp);var ok=jp.exports;const ak=ke(ok);var Lp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(Lp);var sk=Lp.exports;const lk=ke(sk);Do.extend(ak),Do.extend(lk);function Fp(e,t,n,r,i){return e.map(o=>{const{authorId:a}=o,s=a===n?"outgoing":"incoming",l=t.find(c=>c.id===a);let u;return l&&l.id===n?u={name:l.name||"You",avatar:l.pictureUrl}:l?u={name:l.name||"Agent",avatar:l.pictureUrl}:u={name:r||"Bot",avatar:i},{...o,direction:s,sender:u}})}function uk(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Bp(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!Do(s).isSame(l,t)&&l&&n.push(Bp(l))}return n}function Bp(e){return{id:zp(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:zp(e)}}}function zp(e,t=!1){const n=Do(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function ck(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function fk(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function dk(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function pk(e,t){return e.map(n=>Math.round(n*t))}const xi=e=>t=>dk(t,e),wi=e=>t=>pk(t,e),hk={50:xi(.95),100:xi(.9),200:xi(.75),300:xi(.6),400:xi(.3),500:e=>e,600:wi(.9),700:wi(.6),800:wi(.45),900:wi(.3),950:wi(.2)};function Wp(e,t=hk){const n={},r=ck(e);for(const[i,o]of Object.entries(t))n[i]=fk(o(r));return n}function Up(e){const{fontFamily:t,radius:n,themeMode:r,color:i,variant:o,headerVariant:a}=e;let s={},l={};if(i){const d=Wp(i),m=r==="dark"?Tp(d):d,h=Wp(zE(WE(fl(i)))),g=r==="dark"?Tp(h):h,v=r==="dark"?"#101010":"#fdfdfd";l=Object.entries({...m,1:v}).reduce((x,[$,S])=>({...x,[`--bpPrimary-${$}`]:S}),{});const b=Object.entries({...g,1:v}).reduce((x,[$,S])=>({...x,[`--bpGray-${$}`]:S}),{});s={...l,...b}}n&&(s={...s,"--bpRadius-scale":n.toString()});const u=r==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=l?Rp(l["--bpPrimary-600"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=o==="solid"?{"--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":l?Rp(l["--bpPrimary-500"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},p=a==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)"}:{"--header-bg":u.bg,"--header-bg-hover":u.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return s={...s,...f,...p},Dp(":root",s)+(t?Dp(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const mk=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),Hp=["audio","file","image","video"],Vp=e=>Hp.includes(e),qp="The Client ID is required to initialize the webchat.",vk="The API url is required to initialize the webchat.",gk="The Bot ID is required to initialize the webchat.",yk="No config URL provided.",Kp=`Invalid API URL.
|
|
31
|
+
Please use a valid API URL.`,Gp=`Invalid Client ID.
|
|
32
|
+
Please use a valid Botpress Client ID.`,Yp=`Invalid URL.
|
|
33
|
+
Please make sure your client ID and API URL are valid`,bk=`Invalid config URL.
|
|
34
|
+
Please make sure your config URL is valid`,xk=`Invalid webchat configuration.
|
|
35
|
+
Please make sure your config file is valid`,wk="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",Xp=`This bot has temporarily paused.
|
|
36
|
+
Please check back later.`,Jp=`This bot has temporarily paused.
|
|
37
|
+
Please check back later.`,Zp="Something went wrong. To fix it, please clear your browser's local and session storage and then refresh the page",Qp="Please check your internet connection and refresh the page.",eh=`You've been disconnected from the conversation.
|
|
38
|
+
Please refresh the page.`,th=`Unable to process the message.
|
|
39
|
+
Please start a new conversation.`,dl={ResourceNotFound:{type:"configuration",message:Gp},Forbidden:{type:"bot",message:Xp}},pl={MethodNotFound:{type:"configuration",message:Yp},QuotaExceeded:{type:"bot",message:Jp},Forbidden:{type:"bot",message:Zp}};function nh(e){return e in dl}function rh(e){return e in pl}function ih(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function oh(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const Sk=["networkerror","failedtofetch","errorininputstream"],Mo=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return ih(e)?e.message.includes("[Webhook Handler]")&&nh(e.type)?t={id:e.id,...dl[e.type]}:rh(e.type)?t={id:e.id,...pl[e.type]}:t={id:e.id,type:e.type,message:e.message}:oh(e)?ah(e.message)?t={type:"disconnected",message:eh}:sh(e.message).includes("invalidcontenttype")?t={type:"bot",message:th}:t={type:"event",message:e.message}:e instanceof Error&&ah(e.message)&&(t={type:"network",message:Qp}),t};function ah(e){return Sk.some(t=>sh(e).includes(t))}function sh(e){return e.replaceAll(" ","").toLowerCase()}const No=I.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Mp(e??"",15);return C.jsxs(ll,{ref:a,"data-color":s,...n,...o,children:[C.jsx(ul,{src:t,...r}),C.jsx(cl,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});No.displayName="Avatar";function LX(){}function FX(){}function Ek(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ck=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$k={};function lh(e,t){return($k.jsx?Ck:kk).test(e)}const Tk=/[ \t\n\f\r]/g;function Ok(e){return typeof e=="object"?e.type==="text"?uh(e.value):!1:uh(e)}function uh(e){return e.replace(Tk,"")===""}class Si{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Si.prototype.property={},Si.prototype.normal={},Si.prototype.space=null;function ch(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Si(n,r,t)}function hl(e){return e.toLowerCase()}class Wt{constructor(t,n){this.property=t,this.attribute=n}}Wt.prototype.space=null,Wt.prototype.boolean=!1,Wt.prototype.booleanish=!1,Wt.prototype.overloadedBoolean=!1,Wt.prototype.number=!1,Wt.prototype.commaSeparated=!1,Wt.prototype.spaceSeparated=!1,Wt.prototype.commaOrSpaceSeparated=!1,Wt.prototype.mustUseProperty=!1,Wt.prototype.defined=!1;let Ik=0;const ye=tr(),et=tr(),fh=tr(),re=tr(),Ue=tr(),Cr=tr(),Nt=tr();function tr(){return 2**++Ik}const ml=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:et,commaOrSpaceSeparated:Nt,commaSeparated:Cr,number:re,overloadedBoolean:fh,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),vl=Object.keys(ml);class gl extends Wt{constructor(t,n,r,i){let o=-1;if(super(t,n),dh(this,"space",i),typeof r=="number")for(;++o<vl.length;){const a=vl[o];dh(this,vl[o],(r&ml[a])===ml[a])}}}gl.prototype.defined=!0;function dh(e,t,n){n&&(e[t]=n)}const Pk={}.hasOwnProperty;function $r(e){const t={},n={};let r;for(r in e.properties)if(Pk.call(e.properties,r)){const i=e.properties[r],o=new gl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[hl(r)]=r,n[hl(o.attribute)]=r}return new Si(t,n,e.space)}const ph=$r({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),hh=$r({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function mh(e,t){return t in e?e[t]:t}function vh(e,t){return mh(e,t.toLowerCase())}const gh=$r({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:vh,properties:{xmlns:null,xmlnsXLink:null}}),yh=$r({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:et,ariaAutoComplete:null,ariaBusy:et,ariaChecked:et,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:et,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:et,ariaFlowTo:Ue,ariaGrabbed:et,ariaHasPopup:null,ariaHidden:et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:re,ariaLive:null,ariaModal:et,ariaMultiLine:et,ariaMultiSelectable:et,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:et,ariaReadOnly:et,ariaRelevant:null,ariaRequired:et,ariaRoleDescription:Ue,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:et,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),Ak=$r({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:vh,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cr,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Ue,autoFocus:ye,autoPlay:ye,blocking:Ue,capture:null,charSet:null,checked:ye,cite:null,className:Ue,cols:re,colSpan:null,content:null,contentEditable:et,controls:ye,controlsList:Ue,coords:re|Cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:fh,draggable:et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Ue,height:re,hidden:ye,high:re,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:ye,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ye,optimum:re,pattern:null,ping:Ue,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Ue,required:ye,reversed:ye,rows:re,rowSpan:re,sandbox:Ue,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:et,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:et,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:re,security:null,unselectable:null}}),_k=$r({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:mh,properties:{about:Nt,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Ue,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cr,g2:Cr,glyphName:Cr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:Nt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nt,rev:Nt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nt,requiredFeatures:Nt,requiredFonts:Nt,requiredFormats:Nt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:Nt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nt,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Rk=/^data[-\w.:]+$/i,bh=/-[a-z]/g,Dk=/[A-Z]/g;function Mk(e,t){const n=hl(t);let r=t,i=Wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rk.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(bh,jk);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!bh.test(o)){let a=o.replace(Dk,Nk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=gl}return new i(r,t)}function Nk(e){return"-"+e.toLowerCase()}function jk(e){return e.charAt(1).toUpperCase()}const Lk={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Fk=ch([hh,ph,gh,yh,Ak],"html"),yl=ch([hh,ph,gh,yh,_k],"svg");function Bk(e){return e.join(" ").trim()}var xh={},wh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zk=/\n/g,Wk=/^\s*/,Uk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hk=/^:\s*/,Vk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,qk=/^[;\s]*/,Kk=/^\s+|\s+$/g,Gk=`
|
|
40
|
+
`,Sh="/",Eh="*",nr="",Yk="comment",Xk="declaration",Jk=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(zk);h&&(n+=h.length);var g=m.lastIndexOf(Gk);r=~g?m.length-g:r+m.length}function o(){var m={line:n,column:r};return function(h){return h.position=new a(m),u(),h}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(m){var h=m.exec(e);if(h){var g=h[0];return i(g),e=e.slice(g.length),h}}function u(){l(Wk)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=o();if(!(Sh!=e.charAt(0)||Eh!=e.charAt(1))){for(var h=2;nr!=e.charAt(h)&&(Eh!=e.charAt(h)||Sh!=e.charAt(h+1));)++h;if(h+=2,nr===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,i(g),e=e.slice(h),r+=2,m({type:Yk,comment:g})}}function p(){var m=o(),h=l(Uk);if(h){if(f(),!l(Hk))return s("property missing ':'");var g=l(Vk),v=m({type:Xk,property:kh(h[0].replace(wh,nr)),value:g?kh(g[0].replace(wh,nr)):nr});return l(qk),v}}function d(){var m=[];c(m);for(var h;h=p();)h!==!1&&(m.push(h),c(m));return m}return u(),d()};function kh(e){return e?e.replace(Kk,nr):nr}var Zk=Xt&&Xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xh,"__esModule",{value:!0});var Ch=xh.default=eC,Qk=Zk(Jk);function eC(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Qk.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const tC=Ch.default||Ch,$h=Th("end"),bl=Th("start");function Th(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function nC(e){const t=bl(e),n=$h(e);if(t&&n)return{start:t,end:n}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Oh(e.position):"start"in e||"end"in e?Oh(e):"line"in e||"column"in e?xl(e):""}function xl(e){return Ih(e&&e.line)+":"+Ih(e&&e.column)}function Oh(e){return xl(e&&e.start)+"-"+xl(e&&e.end)}function Ih(e){return e&&typeof e=="number"?e:1}class yt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ei(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}yt.prototype.file="",yt.prototype.name="",yt.prototype.reason="",yt.prototype.message="",yt.prototype.stack="",yt.prototype.column=void 0,yt.prototype.line=void 0,yt.prototype.ancestors=void 0,yt.prototype.cause=void 0,yt.prototype.fatal=void 0,yt.prototype.place=void 0,yt.prototype.ruleId=void 0,yt.prototype.source=void 0;const wl={}.hasOwnProperty,rC=new Map,iC=/[A-Z]/g,oC=/-([a-z])/g,aC=new Set(["table","tbody","thead","tfoot","tr"]),sC=new Set(["td","th"]),Ph="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=vC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=mC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?yl:Fk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ah(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ah(e,t,n){if(t.type==="element")return uC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return cC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return dC(e,t,n);if(t.type==="mdxjsEsm")return fC(e,t);if(t.type==="root")return pC(e,t,n);if(t.type==="text")return hC(e,t)}function uC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=yl,e.schema=i),e.ancestors.push(t);const o=Rh(e,t.tagName,!1),a=gC(e,t);let s=El(e,t);return aC.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Ok(l):!0})),_h(e,a,o,t),Sl(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function cC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ki(e,t.position)}function fC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ki(e,t.position)}function dC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=yl,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rh(e,t.name,!0),a=yC(e,t),s=El(e,t);return _h(e,a,o,t),Sl(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function pC(e,t,n){const r={};return Sl(r,El(e,t)),e.create(t,e.Fragment,r,n)}function hC(e,t){return t.value}function _h(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Sl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mC(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function vC(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=bl(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function gC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&wl.call(t.properties,i)){const o=bC(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&sC.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function yC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ki(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else ki(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function El(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:rC;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=Ah(e,o,a);s!==void 0&&n.push(s)}return n}function bC(e,t,n){const r=Mk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ek(n):Bk(n)),r.property==="style"){let i=typeof n=="object"?n:xC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=wC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Lk[r.property]||r.property:r.attribute,n]}}function xC(e,t){const n={};try{tC(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new yt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ph+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(oC,EC)),n[a]=o}}function Rh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=lh(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=lh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return wl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ki(e)}function ki(e,t){const n=new yt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ph+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wC(e){const t={};let n;for(n in e)wl.call(e,n)&&(t[SC(n)]=e[n]);return t}function SC(e){let t=e.replace(iC,kC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function EC(e,t){return t.toUpperCase()}function kC(e){return"-"+e.toLowerCase()}const kl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},CC={};function Cl(e,t){const n=CC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Dh(e,r,i)}function Dh(e,t,n){if($C(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mh(e.children,t,n)}return Array.isArray(e)?Mh(e,t,n):""}function Mh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Dh(e[i],t,n);return r.join("")}function $C(e){return!!(e&&typeof e=="object")}const Nh=document.createElement("i");function $l(e){const t="&"+e+";";Nh.innerHTML=t;const n=Nh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ut(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ht(e,t){return e.length>0?(Ut(e,e.length,0,t),e):t}const jh={}.hasOwnProperty;function Lh(e){const t={};let n=-1;for(;++n<e.length;)TC(t,e[n]);return t}function TC(e,t){let n;for(n in t){const i=(jh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){jh.call(i,a)||(i[a]=[]);const s=o[a];OC(i[a],Array.isArray(s)?s:s?[s]:[])}}}function OC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ut(e,0,0,r)}function Fh(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const $t=Nn(/[A-Za-z]/),bt=Nn(/[\dA-Za-z]/),IC=Nn(/[#-'*+\--9=?A-Z^-~]/);function jo(e){return e!==null&&(e<32||e===127)}const Tl=Nn(/\d/),PC=Nn(/[\dA-Fa-f]/),AC=Nn(/[!-/:-@[-`{-~]/);function he(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function xe(e){return e===-2||e===-1||e===32}const Lo=Nn(new RegExp("\\p{P}|\\p{S}","u")),rr=Nn(/\s/);function Nn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Tr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&bt(e.charCodeAt(n+1))&&bt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return xe(l)?(e.enter(n),s(l)):t(l)}function s(l){return xe(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const _C={tokenize:RC};function RC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return he(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const DC={tokenize:MC},Bh={tokenize:NC};function MC(e){const t=this,n=[];let r=0,i,o,a;return s;function s(x){if(r<n.length){const $=n[r];return t.containerState=$[1],e.attempt($[0].continuation,l,u)(x)}return u(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const $=t.events.length;let S=$,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){E=t.events[S][1].end;break}v(r);let O=$;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},E),O++;return Ut(t.events,S+1,0,t.events.slice($)),t.events.length=O,u(x)}return s(x)}function u(x){if(r===n.length){if(!i)return p(x);if(i.currentConstruct&&i.currentConstruct.concrete)return m(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bh,c,f)(x)}function c(x){return i&&b(),v(r),p(x)}function f(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(x)}function p(x){return t.containerState={},e.attempt(Bh,d,m)(x)}function d(x){return r++,n.push([t.currentConstruct,t.containerState]),p(x)}function m(x){if(x===null){i&&b(),v(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),h(x)}function h(x){if(x===null){g(e.exit("chunkFlow"),!0),v(0),e.consume(x);return}return he(x)?(e.consume(x),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),h)}function g(x,$){const S=t.sliceStream(x);if($&&S.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(S),t.parser.lazy[x.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;const O=t.events.length;let F=O,D,T;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(D){T=t.events[F][1].end;break}D=!0}for(v(r),E=O;E<t.events.length;)t.events[E][1].end=Object.assign({},T),E++;Ut(t.events,F+1,0,t.events.slice(O)),t.events.length=E}}function v(x){let $=n.length;for(;$-- >x;){const S=n[$];t.containerState=S[1],S[0].exit.call(t,e)}n.length=x}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function NC(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fo(e){if(e===null||Be(e)||rr(e))return 1;if(Lo(e))return 2}function Bo(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Ol={name:"attention",tokenize:LC,resolveAll:jC};function jC(e,t){let n=-1,r,i,o,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);zh(f,-l),zh(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ht(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ht(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=Ht(u,Bo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ht(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Ht(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ut(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function LC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fo(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),c=Fo(l),f=!c||c===2&&i||n.includes(l),p=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!p)),u._close=!!(o===42?p:p&&(c||!f)),t(l)}}function zh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const FC={name:"autolink",tokenize:BC};function BC(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return $t(d)?(e.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||bt(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||bt(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||jo(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),c):IC(d)?(e.consume(d),u):n(d)}function c(d){return bt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||bt(d))&&r++<63){const m=d===45?p:f;return e.consume(d),m}return n(d)}}const Ci={tokenize:zC,partial:!0};function zC(e,t,n){return r;function r(o){return xe(o)?Ce(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||he(o)?t(o):n(o)}}const Wh={name:"blockQuote",tokenize:WC,continuation:{tokenize:UC},exit:HC};function WC(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return xe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function UC(e,t,n){const r=this;return i;function i(a){return xe(a)?Ce(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(Wh,t,n)(a)}}function HC(e){e.exit("blockQuote")}const Uh={name:"characterEscape",tokenize:VC};function VC(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return AC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Hh={name:"characterReference",tokenize:qC};function qC(e,t,n){const r=this;let i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=bt,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=PC,c):(e.enter("characterReferenceValue"),o=7,a=Tl,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return a===bt&&!$l(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):n(f)}}const Vh={tokenize:GC,partial:!0},qh={name:"codeFenced",tokenize:KC,concrete:!0};function KC(e,t,n){const r=this,i={tokenize:S,partial:!0};let o=0,a=0,s;return l;function l(E){return u(E)}function u(E){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(a++,e.consume(E),c):a<3?n(E):(e.exit("codeFencedFenceSequence"),xe(E)?Ce(e,f,"whitespace")(E):f(E))}function f(E){return E===null||he(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Vh,h,$)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||he(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):xe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||he(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||he(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),m)}function h(E){return e.attempt(i,$,g)(E)}function g(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return o>0&&xe(E)?Ce(e,b,"linePrefix",o+1)(E):b(E)}function b(E){return E===null||he(E)?e.check(Vh,h,$)(E):(e.enter("codeFlowValue"),x(E))}function x(E){return E===null||he(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),x)}function $(E){return e.exit("codeFenced"),t(E)}function S(E,O,F){let D=0;return T;function T(N){return E.enter("lineEnding"),E.consume(N),E.exit("lineEnding"),M}function M(N){return E.enter("codeFencedFence"),xe(N)?Ce(E,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):H(N)}function H(N){return N===s?(E.enter("codeFencedFenceSequence"),B(N)):F(N)}function B(N){return N===s?(D++,E.consume(N),B):D>=a?(E.exit("codeFencedFenceSequence"),xe(N)?Ce(E,L,"whitespace")(N):L(N)):F(N)}function L(N){return N===null||he(N)?(E.exit("codeFencedFence"),O(N)):F(N)}}}function GC(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Il={name:"codeIndented",tokenize:XC},YC={tokenize:JC,partial:!0};function XC(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ce(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):he(u)?e.attempt(YC,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||he(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function JC(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):he(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ce(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):he(a)?i(a):n(a)}}const ZC={name:"codeText",tokenize:t$,resolve:QC,previous:e$};function QC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function e$(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function t$(e,t,n){let r=0,i,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):he(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||he(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class n${constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$i(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),$i(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),$i(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);$i(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);$i(this.left,n.reverse())}}}function $i(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Kh(e){const t={};let n=-1,r,i,o,a,s,l,u;const c=new n$(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,r$(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Ut(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function r$(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],u={};let c,f,p=-1,d=n,m=0,h=0;const g=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){const v=s.slice(g[p],g[p+1]),b=o.pop();l.push([b,b+v.length-1]),e.splice(b,2,v)}for(l.reverse(),p=-1;++p<l.length;)u[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return u}const i$={tokenize:s$,resolve:a$},o$={tokenize:l$,partial:!0};function a$(e){return Kh(e),e}function s$(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):he(s)?e.check(o$,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function l$(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ce(e,o,"linePrefix")}function o(a){if(a===null||he(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Gh(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(v),e.exit(o),p):v===null||v===32||v===41||jo(v)?n(v):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function p(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===62?(e.exit("chunkString"),e.exit(s),p(v)):v===null||v===60||he(v)?n(v):(e.consume(v),v===92?m:d)}function m(v){return v===60||v===62||v===92?(e.consume(v),d):d(v)}function h(v){return!c&&(v===null||v===41||Be(v))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(v)):c<u&&v===40?(e.consume(v),c++,h):v===41?(e.consume(v),c--,h):v===null||v===32||v===40||jo(v)?n(v):(e.consume(v),v===92?g:h)}function g(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function Yh(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):he(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||he(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!xe(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Xh(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),l(a)):p===null?n(p):he(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ce(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||he(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function Ti(e,t){let n;return r;function r(i){return he(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):xe(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const u$={name:"definition",tokenize:f$},c$={tokenize:d$,partial:!0};function f$(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return Yh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Be(d)?Ti(e,u)(d):u(d)}function u(d){return Gh(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(c$,f,f)(d)}function f(d){return xe(d)?Ce(e,p,"whitespace")(d):p(d)}function p(d){return d===null||he(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function d$(e,t,n){return r;function r(s){return Be(s)?Ti(e,i)(s):n(s)}function i(s){return Xh(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return xe(s)?Ce(e,a,"whitespace")(s):a(s)}function a(s){return s===null||he(s)?t(s):n(s)}}const p$={name:"hardBreakEscape",tokenize:h$};function h$(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return he(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const m$={name:"headingAtx",tokenize:g$,resolve:v$};function v$(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ut(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function g$(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Be(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||he(c)?(e.exit("atxHeading"),t(c)):xe(c)?Ce(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Be(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const y$=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jh=["pre","script","style","textarea"],b$={name:"htmlFlow",tokenize:E$,resolveTo:S$,concrete:!0},x$={tokenize:C$,partial:!0},w$={tokenize:k$,partial:!0};function S$(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function E$(e,t,n){const r=this;let i,o,a,s,l;return u;function u(w){return c(w)}function c(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),p):w===47?(e.consume(w),o=!0,h):w===63?(e.consume(w),i=3,r.interrupt?t:y):$t(w)?(e.consume(w),a=String.fromCharCode(w),g):n(w)}function p(w){return w===45?(e.consume(w),i=2,d):w===91?(e.consume(w),i=5,s=0,m):$t(w)?(e.consume(w),i=4,r.interrupt?t:y):n(w)}function d(w){return w===45?(e.consume(w),r.interrupt?t:y):n(w)}function m(w){const j="CDATA[";return w===j.charCodeAt(s++)?(e.consume(w),s===j.length?r.interrupt?t:H:m):n(w)}function h(w){return $t(w)?(e.consume(w),a=String.fromCharCode(w),g):n(w)}function g(w){if(w===null||w===47||w===62||Be(w)){const j=w===47,G=a.toLowerCase();return!j&&!o&&Jh.includes(G)?(i=1,r.interrupt?t(w):H(w)):y$.includes(a.toLowerCase())?(i=6,j?(e.consume(w),v):r.interrupt?t(w):H(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?b(w):x(w))}return w===45||bt(w)?(e.consume(w),a+=String.fromCharCode(w),g):n(w)}function v(w){return w===62?(e.consume(w),r.interrupt?t:H):n(w)}function b(w){return xe(w)?(e.consume(w),b):T(w)}function x(w){return w===47?(e.consume(w),T):w===58||w===95||$t(w)?(e.consume(w),$):xe(w)?(e.consume(w),x):T(w)}function $(w){return w===45||w===46||w===58||w===95||bt(w)?(e.consume(w),$):S(w)}function S(w){return w===61?(e.consume(w),E):xe(w)?(e.consume(w),S):x(w)}function E(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,O):xe(w)?(e.consume(w),E):F(w)}function O(w){return w===l?(e.consume(w),l=null,D):w===null||he(w)?n(w):(e.consume(w),O)}function F(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Be(w)?S(w):(e.consume(w),F)}function D(w){return w===47||w===62||xe(w)?x(w):n(w)}function T(w){return w===62?(e.consume(w),M):n(w)}function M(w){return w===null||he(w)?H(w):xe(w)?(e.consume(w),M):n(w)}function H(w){return w===45&&i===2?(e.consume(w),W):w===60&&i===1?(e.consume(w),X):w===62&&i===4?(e.consume(w),R):w===63&&i===3?(e.consume(w),y):w===93&&i===5?(e.consume(w),_):he(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(x$,P,B)(w)):w===null||he(w)?(e.exit("htmlFlowData"),B(w)):(e.consume(w),H)}function B(w){return e.check(w$,L,P)(w)}function L(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),N}function N(w){return w===null||he(w)?B(w):(e.enter("htmlFlowData"),H(w))}function W(w){return w===45?(e.consume(w),y):H(w)}function X(w){return w===47?(e.consume(w),a="",V):H(w)}function V(w){if(w===62){const j=a.toLowerCase();return Jh.includes(j)?(e.consume(w),R):H(w)}return $t(w)&&a.length<8?(e.consume(w),a+=String.fromCharCode(w),V):H(w)}function _(w){return w===93?(e.consume(w),y):H(w)}function y(w){return w===62?(e.consume(w),R):w===45&&i===2?(e.consume(w),y):H(w)}function R(w){return w===null||he(w)?(e.exit("htmlFlowData"),P(w)):(e.consume(w),R)}function P(w){return e.exit("htmlFlow"),t(w)}}function k$(e,t,n){const r=this;return i;function i(a){return he(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function C$(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ci,t,n)}}const $$={name:"htmlText",tokenize:T$};function T$(e,t,n){const r=this;let i,o,a;return s;function s(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),S):y===63?(e.consume(y),x):$t(y)?(e.consume(y),F):n(y)}function u(y){return y===45?(e.consume(y),c):y===91?(e.consume(y),o=0,m):$t(y)?(e.consume(y),b):n(y)}function c(y){return y===45?(e.consume(y),d):n(y)}function f(y){return y===null?n(y):y===45?(e.consume(y),p):he(y)?(a=f,X(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?W(y):y===45?p(y):f(y)}function m(y){const R="CDATA[";return y===R.charCodeAt(o++)?(e.consume(y),o===R.length?h:m):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):he(y)?(a=h,X(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),v):h(y)}function v(y){return y===62?W(y):y===93?(e.consume(y),v):h(y)}function b(y){return y===null||y===62?W(y):he(y)?(a=b,X(y)):(e.consume(y),b)}function x(y){return y===null?n(y):y===63?(e.consume(y),$):he(y)?(a=x,X(y)):(e.consume(y),x)}function $(y){return y===62?W(y):x(y)}function S(y){return $t(y)?(e.consume(y),E):n(y)}function E(y){return y===45||bt(y)?(e.consume(y),E):O(y)}function O(y){return he(y)?(a=O,X(y)):xe(y)?(e.consume(y),O):W(y)}function F(y){return y===45||bt(y)?(e.consume(y),F):y===47||y===62||Be(y)?D(y):n(y)}function D(y){return y===47?(e.consume(y),W):y===58||y===95||$t(y)?(e.consume(y),T):he(y)?(a=D,X(y)):xe(y)?(e.consume(y),D):W(y)}function T(y){return y===45||y===46||y===58||y===95||bt(y)?(e.consume(y),T):M(y)}function M(y){return y===61?(e.consume(y),H):he(y)?(a=M,X(y)):xe(y)?(e.consume(y),M):D(y)}function H(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,B):he(y)?(a=H,X(y)):xe(y)?(e.consume(y),H):(e.consume(y),L)}function B(y){return y===i?(e.consume(y),i=void 0,N):y===null?n(y):he(y)?(a=B,X(y)):(e.consume(y),B)}function L(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Be(y)?D(y):(e.consume(y),L)}function N(y){return y===47||y===62||Be(y)?D(y):n(y)}function W(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function X(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),V}function V(y){return xe(y)?Ce(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):_(y)}function _(y){return e.enter("htmlTextData"),a(y)}}const Pl={name:"labelEnd",tokenize:R$,resolveTo:_$,resolveAll:A$},O$={tokenize:D$},I$={tokenize:M$},P$={tokenize:N$};function A$(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function _$(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",u,t]],s=Ht(s,e.slice(o+1,o+r+3)),s=Ht(s,[["enter",c,t]]),s=Ht(s,Bo(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Ht(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=Ht(s,e.slice(a+1)),s=Ht(s,[["exit",l,t]]),Ut(e,o,e.length,s),e}function R$(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?f(p):(a=r.parser.defined.includes(Jt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(O$,c,a?c:f)(p):p===91?e.attempt(I$,c,a?u:f)(p):a?c(p):f(p)}function u(p){return e.attempt(P$,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,n(p)}}function D$(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Be(f)?Ti(e,o)(f):o(f)}function o(f){return f===41?c(f):Gh(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Be(f)?Ti(e,l)(f):c(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?Xh(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Be(f)?Ti(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function M$(e,t,n){const r=this;return i;function i(s){return Yh.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function N$(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const j$={name:"labelStartImage",tokenize:L$,resolveAll:Pl.resolveAll};function L$(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const F$={name:"labelStartLink",tokenize:B$,resolveAll:Pl.resolveAll};function B$(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Al={name:"lineEnding",tokenize:z$};function z$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const zo={name:"thematicBreak",tokenize:W$};function W$(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||he(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),xe(u)?Ce(e,s,"whitespace")(u):s(u))}}const It={name:"list",tokenize:V$,continuation:{tokenize:q$},exit:G$},U$={tokenize:Y$,partial:!0},H$={tokenize:K$,partial:!0};function V$(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Tl(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(zo,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return Tl(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Ci,r.interrupt?n:c,e.attempt(U$,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return xe(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function q$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ci,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!xe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(H$,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(It,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function K$(e,t,n){const r=this;return Ce(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function G$(e){e.exit(this.containerState.type)}function Y$(e,t,n){const r=this;return Ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!xe(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Zh={name:"setextUnderline",tokenize:J$,resolveTo:X$};function X$(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function J$(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),xe(u)?Ce(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||he(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Z$={tokenize:Q$};function Q$(e){const t=this,n=e.attempt(Ci,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(i$,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const eT={resolveAll:em()},tT=Qh("string"),nT=Qh("text");function Qh(e){return{tokenize:t,resolveAll:em(e==="text"?rT:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function em(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function rT(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function iT(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:x,exit:$,attempt:O(S),check:O(E),interrupt:O(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:m,defineSkip:h,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function f(M){return a=Ht(a,M),g(),a[a.length-1]!==null?[]:(F(t,0),u.events=Bo(o,u.events,u),u.events)}function p(M,H){return aT(d(M),H)}function d(M){return oT(a,M)}function m(){const{line:M,column:H,offset:B,_index:L,_bufferIndex:N}=r;return{line:M,column:H,offset:B,_index:L,_bufferIndex:N}}function h(M){i[M.line]=M.column,T()}function g(){let M;for(;r._index<a.length;){const H=a[r._index];if(typeof H=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<H.length;)v(H.charCodeAt(r._bufferIndex));else v(H)}}function v(M){c=c(M)}function b(M){he(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,T()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function x(M,H){const B=H||{};return B.type=M,B.start=m(),u.events.push(["enter",B,u]),s.push(B),B}function $(M){const H=s.pop();return H.end=m(),u.events.push(["exit",H,u]),H}function S(M,H){F(M,H.from)}function E(M,H){H.restore()}function O(M,H){return B;function B(L,N,W){let X,V,_,y;return Array.isArray(L)?P(L):"tokenize"in L?P([L]):R(L);function R(K){return Y;function Y(Q){const ee=Q!==null&&K[Q],J=Q!==null&&K.null,Z=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(J)?J:J?[J]:[]];return P(Z)(Q)}}function P(K){return X=K,V=0,K.length===0?W:w(K[V])}function w(K){return Y;function Y(Q){return y=D(),_=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?G():K.tokenize.call(H?Object.assign(Object.create(u),H):u,l,j,G)(Q)}}function j(K){return M(_,y),N}function G(K){return y.restore(),++V<X.length?w(X[V]):W}}}function F(M,H){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&Ut(u.events,H,u.events.length-H,M.resolve(u.events.slice(H),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function D(){const M=m(),H=u.previous,B=u.currentConstruct,L=u.events.length,N=Array.from(s);return{restore:W,from:L};function W(){r=M,u.previous=H,u.currentConstruct=B,u.events.length=L,s=N,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function oT(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function aT(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
24
41
|
`;break}case-3:{a=`\r
|
|
25
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const jT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:FC},disable:{null:[]},document:{42:mt,43:mt,45:mt,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,62:gh},flow:{35:VC,42:bo,45:[$h,bo],60:YC,61:$h,95:bo,96:wh,126:wh},flowInitial:{[-2]:sl,[-1]:sl,32:sl},insideSpan:{null:[al,PT]},string:{38:bh,92:yh},text:{[-5]:ul,[-4]:ul,[-3]:ul,33:pT,38:bh,42:al,60:[mC,nT],91:mT,92:[UC,yh],93:ll,95:al,96:OC}},Symbol.toStringTag,{value:"Module"}));function LT(e){const n=ph([jT,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(lC),document:i(cC),flow:i(OT),string:i(AT),text:i(RT)};return r;function i(o){return a;function a(s){return _T(r,o,s)}}}function FT(e){for(;!Sh(e););return e}const Ph=/[\0\t\n\r]/g;function BT(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,c,f,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Ph.lastIndex=f,u=Ph.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(f);break}if(d===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(o.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const zT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function WT(e){return e.replace(zT,UT)}function UT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return hh(n.slice(o?2:1),o?16:10)}return il(n)||e}const Ah={}.hasOwnProperty;function HT(e,t,n){return typeof t!="string"&&(n=t,t=void 0),VT(n)(FT(LT(n).document().write(BT()(e,t,!0))))}function VT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Me),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(fe),blockQuote:o(J),characterEscape:M,characterReference:M,codeFenced:o(Q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Q,a),codeText:o(q,a),codeTextData:M,data:M,codeFlowValue:M,definition:o(ne),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(ae),hardBreakEscape:o(ie),hardBreakTrailing:o(ie),htmlFlow:o(pe,a),htmlFlowData:M,htmlText:o(pe,a),htmlTextData:M,image:o(ge),label:a,link:o(Me),listItem:o(wt),listItemValue:p,listOrdered:o(et,f),listUnordered:o(et),paragraph:o(Mt),reference:x,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(fe),strong:o(St),thematicBreak:o(le)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:Z,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:K,characterReference:G,codeFenced:l(y),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:$,codeIndented:l(g),codeText:l(N),codeTextData:$,data:$,definition:l(),definitionDestinationString:C,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(U),hardBreakTrailing:l(U),htmlFlow:l(F),htmlFlowData:$,htmlText:l(L),htmlTextData:$,image:l(Y),label:R,labelText:H,lineEnding:D,link:l(B),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:_,resourceDestinationString:v,resourceTitleString:P,resource:I,setextHeading:l(j),setextHeadingLineSequence:O,setextHeadingText:E,strong:l(),thematicBreak:l()}};Rh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let z={type:"root",children:[]};const ee={stack:[z],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},oe=[];let ue=-1;for(;++ue<W.length;)if(W[ue][1].type==="listOrdered"||W[ue][1].type==="listUnordered")if(W[ue][0]==="enter")oe.push(ue);else{const he=oe.pop();ue=i(W,he,ue)}for(ue=-1;++ue<W.length;){const he=t[W[ue][0]];Ah.call(he,W[ue][1].type)&&he[W[ue][1].type].call(Object.assign({sliceSerialize:W[ue][2].sliceSerialize},ee),W[ue][1])}if(ee.tokenStack.length>0){const he=ee.tokenStack[ee.tokenStack.length-1];(he[1]||Dh).call(ee,void 0,he[0])}for(z.position={start:Sn(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:Sn(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)z=t.transforms[ue](z)||z;return z}function i(W,z,ee){let oe=z-1,ue=-1,he=!1,We,Ue,ht,tt;for(;++oe<=ee;){const Ie=W[oe];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?ue++:ue--,tt=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(We&&!tt&&!ue&&!ht&&(ht=oe),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!ue&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||ue===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(We){let nt=oe;for(Ue=void 0;nt--;){const Ke=W[nt];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;Ue&&(W[Ue][1].type="lineEndingBlank",he=!0),Ke[1].type="lineEnding",Ue=nt}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}ht&&(!Ue||ht<Ue)&&(We._spread=!0),We.end=Object.assign({},Ue?W[Ue][1].start:Ie[1].end),W.splice(Ue||oe,0,["exit",We,Ie[2]]),oe++,ee++}if(Ie[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};We=nt,W.splice(oe,0,["enter",nt,Ie[2]]),oe++,ee++,ht=void 0,tt=!0}}}return W[z][1]._spread=he,ee}function o(W,z){return ee;function ee(oe){s.call(this,W(oe),oe),z&&z.call(this,oe)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,z,ee){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([z,ee]),W.position={start:Sn(z.start),end:void 0}}function l(W){return z;function z(ee){W&&W.call(this,ee),u.call(this,ee)}}function u(W,z){const ee=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==W.type&&(z?z.call(this,W,oe[0]):(oe[1]||Dh).call(this,W,oe[0]));else throw new Error("Cannot close `"+W.type+"` ("+ii({start:W.start,end:W.end})+"): it’s not open");ee.position.end=Sn(W.end)}function c(){return rl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(W){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function d(){const W=this.resume(),z=this.stack[this.stack.length-1];z.lang=W}function m(){const W=this.resume(),z=this.stack[this.stack.length-1];z.meta=W}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W.replace(/(\r?\n|\r)$/g,"")}function b(W){const z=this.resume(),ee=this.stack[this.stack.length-1];ee.label=z,ee.identifier=jt(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function C(){const W=this.resume(),z=this.stack[this.stack.length-1];z.url=W}function S(W){const z=this.stack[this.stack.length-1];if(!z.depth){const ee=this.sliceSerialize(W).length;z.depth=ee}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function O(W){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function M(W){const ee=this.stack[this.stack.length-1].children;let oe=ee[ee.length-1];(!oe||oe.type!=="text")&&(oe=re(),oe.position={start:Sn(W.start),end:void 0},ee.push(oe)),this.stack.push(oe)}function $(W){const z=this.stack.pop();z.value+=this.sliceSerialize(W),z.position.end=Sn(W.end)}function D(W){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=z.children[z.children.length-1];ee.position.end=Sn(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(M.call(this,W),$.call(this,W))}function U(){this.data.atHardBreak=!0}function F(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function L(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function N(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function B(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function Y(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function H(W){const z=this.sliceSerialize(W),ee=this.stack[this.stack.length-2];ee.label=WT(z),ee.identifier=jt(z).toLowerCase()}function R(){const W=this.stack[this.stack.length-1],z=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const oe=W.children;ee.children=oe}else ee.alt=z}function v(){const W=this.resume(),z=this.stack[this.stack.length-1];z.url=W}function P(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function I(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function _(W){const z=this.resume(),ee=this.stack[this.stack.length-1];ee.label=z,ee.identifier=jt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function V(W){this.data.characterReferenceType=W.type}function K(W){const z=this.sliceSerialize(W),ee=this.data.characterReferenceType;let oe;ee?(oe=hh(z,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=il(z);const ue=this.stack[this.stack.length-1];ue.value+=oe}function G(W){const z=this.stack.pop();z.position.end=Sn(W.end)}function X(W){$.call(this,W);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(W)}function Z(W){$.call(this,W);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(W)}function J(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ae(){return{type:"emphasis",children:[]}}function fe(){return{type:"heading",depth:0,children:[]}}function ie(){return{type:"break"}}function pe(){return{type:"html",value:""}}function ge(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function et(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function wt(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Mt(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}function Sn(e){return{line:e.line,column:e.column,offset:e.offset}}function Rh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Rh(e,r):qT(e,r)}}function qT(e,t){let n;for(n in t)if(Ah.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Dh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ii({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ii({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ii({start:t.start,end:t.end})+") is still open")}function KT(e){const t=this;t.parser=n;function n(r){return HT(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function GT(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
26
|
-
`}]}function
|
|
27
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function
|
|
42
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const sT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:u$},disable:{null:[]},document:{42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:Wh},flow:{35:m$,42:zo,45:[Zh,zo],60:b$,61:Zh,95:zo,96:qh,126:qh},flowInitial:{[-2]:Il,[-1]:Il,32:Il},insideSpan:{null:[Ol,eT]},string:{38:Hh,92:Uh},text:{[-5]:Al,[-4]:Al,[-3]:Al,33:j$,38:Hh,42:Ol,60:[FC,$$],91:F$,92:[p$,Uh],93:Pl,95:Ol,96:ZC}},Symbol.toStringTag,{value:"Module"}));function lT(e){const n=Lh([sT,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(_C),document:i(DC),flow:i(Z$),string:i(tT),text:i(nT)};return r;function i(o){return a;function a(s){return iT(r,o,s)}}}function uT(e){for(;!Kh(e););return e}const tm=/[\0\t\n\r]/g;function cT(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,c,f,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(tm.lastIndex=f,u=tm.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(f);break}if(d===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(o.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const fT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dT(e){return e.replace(fT,pT)}function pT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Fh(n.slice(o?2:1),o?16:10)}return $l(n)||e}const nm={}.hasOwnProperty;function hT(e,t,n){return typeof t!="string"&&(n=t,t=void 0),mT(n)(uT(lT(n).document().write(cT()(e,t,!0))))}function mT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(_e),autolinkProtocol:D,autolinkEmail:D,atxHeading:o(pe),blockQuote:o(J),characterEscape:D,characterReference:D,codeFenced:o(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Z,a),codeText:o(q,a),codeTextData:D,data:D,codeFlowValue:D,definition:o(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(le),hardBreakEscape:o(ae),hardBreakTrailing:o(ae),htmlFlow:o(ve,a),htmlFlowData:D,htmlText:o(ve,a),htmlTextData:D,image:o(be),label:a,link:o(_e),listItem:o(Et),listItemValue:p,listOrdered:o(rt,f),listUnordered:o(rt),paragraph:o(kt),reference:w,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(pe),strong:o(Ct),thematicBreak:o(fe)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ee,autolinkProtocol:Q,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:K,characterReference:Y,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:l(v),codeText:l(N),codeTextData:T,data:T,definition:l(),definitionDestinationString:$,definitionLabelString:b,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(H),hardBreakTrailing:l(H),htmlFlow:l(B),htmlFlowData:T,htmlText:l(L),htmlTextData:T,image:l(X),label:_,labelText:V,lineEnding:M,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:j,resourceDestinationString:y,resourceTitleString:R,resource:P,setextHeading:l(F),setextHeadingLineSequence:O,setextHeadingText:E,strong:l(),thematicBreak:l()}};rm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let z={type:"root",children:[]};const ne={stack:[z],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},se=[];let de=-1;for(;++de<U.length;)if(U[de][1].type==="listOrdered"||U[de][1].type==="listUnordered")if(U[de][0]==="enter")se.push(de);else{const ge=se.pop();de=i(U,ge,de)}for(de=-1;++de<U.length;){const ge=t[U[de][0]];nm.call(ge,U[de][1].type)&&ge[U[de][1].type].call(Object.assign({sliceSerialize:U[de][2].sliceSerialize},ne),U[de][1])}if(ne.tokenStack.length>0){const ge=ne.tokenStack[ne.tokenStack.length-1];(ge[1]||im).call(ne,void 0,ge[0])}for(z.position={start:jn(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:jn(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)z=t.transforms[de](z)||z;return z}function i(U,z,ne){let se=z-1,de=-1,ge=!1,Ye,Xe,gt,it;for(;++se<=ne;){const Re=U[se];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?de++:de--,it=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(Ye&&!it&&!de&&!gt&&(gt=se),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!de&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||de===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(Ye){let ot=se;for(Xe=void 0;ot--;){const Ze=U[ot];if(Ze[1].type==="lineEnding"||Ze[1].type==="lineEndingBlank"){if(Ze[0]==="exit")continue;Xe&&(U[Xe][1].type="lineEndingBlank",ge=!0),Ze[1].type="lineEnding",Xe=ot}else if(!(Ze[1].type==="linePrefix"||Ze[1].type==="blockQuotePrefix"||Ze[1].type==="blockQuotePrefixWhitespace"||Ze[1].type==="blockQuoteMarker"||Ze[1].type==="listItemIndent"))break}gt&&(!Xe||gt<Xe)&&(Ye._spread=!0),Ye.end=Object.assign({},Xe?U[Xe][1].start:Re[1].end),U.splice(Xe||se,0,["exit",Ye,Re[2]]),se++,ne++}if(Re[1].type==="listItemPrefix"){const ot={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};Ye=ot,U.splice(se,0,["enter",ot,Re[2]]),se++,ne++,gt=void 0,it=!0}}}return U[z][1]._spread=ge,ne}function o(U,z){return ne;function ne(se){s.call(this,U(se),se),z&&z.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(U,z,ne){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([z,ne]),U.position={start:jn(z.start),end:void 0}}function l(U){return z;function z(ne){U&&U.call(this,ne),u.call(this,ne)}}function u(U,z){const ne=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==U.type&&(z?z.call(this,U,se[0]):(se[1]||im).call(this,U,se[0]));else throw new Error("Cannot close `"+U.type+"` ("+Ei({start:U.start,end:U.end})+"): it’s not open");ne.position.end=jn(U.end)}function c(){return Cl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function d(){const U=this.resume(),z=this.stack[this.stack.length-1];z.lang=U}function m(){const U=this.resume(),z=this.stack[this.stack.length-1];z.meta=U}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U.replace(/(\r?\n|\r)$/g,"")}function b(U){const z=this.resume(),ne=this.stack[this.stack.length-1];ne.label=z,ne.identifier=Jt(this.sliceSerialize(U)).toLowerCase()}function x(){const U=this.resume(),z=this.stack[this.stack.length-1];z.title=U}function $(){const U=this.resume(),z=this.stack[this.stack.length-1];z.url=U}function S(U){const z=this.stack[this.stack.length-1];if(!z.depth){const ne=this.sliceSerialize(U).length;z.depth=ne}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function O(U){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function D(U){const ne=this.stack[this.stack.length-1].children;let se=ne[ne.length-1];(!se||se.type!=="text")&&(se=oe(),se.position={start:jn(U.start),end:void 0},ne.push(se)),this.stack.push(se)}function T(U){const z=this.stack.pop();z.value+=this.sliceSerialize(U),z.position.end=jn(U.end)}function M(U){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=z.children[z.children.length-1];ne.position.end=jn(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(D.call(this,U),T.call(this,U))}function H(){this.data.atHardBreak=!0}function B(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U}function L(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U}function N(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U}function W(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function X(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function V(U){const z=this.sliceSerialize(U),ne=this.stack[this.stack.length-2];ne.label=dT(z),ne.identifier=Jt(z).toLowerCase()}function _(){const U=this.stack[this.stack.length-1],z=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const se=U.children;ne.children=se}else ne.alt=z}function y(){const U=this.resume(),z=this.stack[this.stack.length-1];z.url=U}function R(){const U=this.resume(),z=this.stack[this.stack.length-1];z.title=U}function P(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function j(U){const z=this.resume(),ne=this.stack[this.stack.length-1];ne.label=z,ne.identifier=Jt(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function G(U){this.data.characterReferenceType=U.type}function K(U){const z=this.sliceSerialize(U),ne=this.data.characterReferenceType;let se;ne?(se=Fh(z,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=$l(z);const de=this.stack[this.stack.length-1];de.value+=se}function Y(U){const z=this.stack.pop();z.position.end=jn(U.end)}function Q(U){T.call(this,U);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(U)}function ee(U){T.call(this,U);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(U)}function J(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function pe(){return{type:"heading",depth:0,children:[]}}function ae(){return{type:"break"}}function ve(){return{type:"html",value:""}}function be(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function rt(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Et(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function kt(){return{type:"paragraph",children:[]}}function Ct(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function jn(e){return{line:e.line,column:e.column,offset:e.offset}}function rm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?rm(e,r):vT(e,r)}}function vT(e,t){let n;for(n in t)if(nm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function im(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is still open")}function gT(e){const t=this;t.parser=n;function n(r){return hT(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function yT(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function bT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
|
+
`}]}function xT(e,t){const n=t.value?t.value+`
|
|
44
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function wT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ST(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ET(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Tr(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function kT(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function om(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function $T(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return om(e,t);const i={src:Tr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function TT(e,t){const n={src:Tr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function OT(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function IT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return om(e,t);const i={href:Tr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function PT(e,t){const n={href:Tr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function AT(e,t,n){const r=e.all(t),i=n?_T(n):am(t),o={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
28
45
|
`}),c.type==="element"&&c.tagName==="p"&&!i?a.push(...c.children):a.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
29
|
-
`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function
|
|
46
|
+
`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function _T(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=am(n[r])}return t}function am(e){const t=e.spread;return t??e.children.length>1}function RT(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function DT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function NT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=bl(t.children[1]),l=$h(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function LT(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let m={type:"element",tagName:o,properties:p,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function FT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sm=9,lm=32;function BT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(um(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(um(t.slice(i),i>0,!1)),o.join("")}function um(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===sm||o===lm;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===sm||o===lm;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function zT(e,t){const n={type:"text",value:BT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function WT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const UT={blockquote:yT,break:bT,code:xT,delete:wT,emphasis:ST,footnoteReference:ET,heading:kT,html:CT,imageReference:$T,image:TT,inlineCode:OT,linkReference:IT,link:PT,listItem:AT,list:RT,paragraph:DT,root:MT,strong:NT,table:jT,tableCell:FT,tableRow:LT,text:zT,thematicBreak:WT,toml:Wo,yaml:Wo,definition:Wo,footnoteDefinition:Wo};function Wo(){}const cm=-1,Uo=0,Ho=1,Vo=2,_l=3,Rl=4,Dl=5,Ml=6,fm=7,dm=8,pm=typeof self=="object"?self:globalThis,HT=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Uo:case cm:return n(a,i);case Ho:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Vo:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case _l:return n(new Date(a),i);case Rl:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case Dl:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case Ml:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case fm:{const{name:s,message:l}=a;return n(new pm[s](l),i)}case dm:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new pm[o](a),i)};return r},hm=e=>HT(new Map,e)(0),Or="",{toString:VT}={},{keys:qT}=Object,Oi=e=>{const t=typeof e;if(t!=="object"||!e)return[Uo,t];const n=VT.call(e).slice(8,-1);switch(n){case"Array":return[Ho,Or];case"Object":return[Vo,Or];case"Date":return[_l,Or];case"RegExp":return[Rl,Or];case"Map":return[Dl,Or];case"Set":return[Ml,Or]}return n.includes("Array")?[Ho,n]:n.includes("Error")?[fm,n]:[Vo,n]},qo=([e,t])=>e===Uo&&(t==="function"||t==="symbol"),KT=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=Oi(a);switch(s){case Uo:{let c=a;switch(l){case"bigint":s=dm,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([cm],a)}return i([s,c],a)}case Ho:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case Vo:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of qT(a))(e||!qo(Oi(a[p])))&&c.push([o(p),o(a[p])]);return f}case _l:return i([s,a.toISOString()],a);case Rl:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case Dl:{const c=[],f=i([s,c],a);for(const[p,d]of a)(e||!(qo(Oi(p))||qo(Oi(d))))&&c.push([o(p),o(d)]);return f}case Ml:{const c=[],f=i([s,c],a);for(const p of a)(e||!qo(Oi(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},mm=(e,{json:t,lossy:n}={})=>{const r=[];return KT(!(t||n),!!t,new Map,r)(e),r},Ko=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?hm(mm(e,t)):structuredClone(e):(e,t)=>hm(mm(e,t));function GT(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function YT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function XT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||GT,r=e.options.footnoteBackLabel||YT,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),p=Tr(f.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,d);typeof b=="string"&&(b={type:"text",value:b}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const g=c[c.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const b=g.children[g.children.length-1];b&&b.type==="text"?b.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...m)}else c.push(...m);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ko(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
30
47
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
31
|
-
`}]}}const
|
|
48
|
+
`}]}}const Go=function(e){if(e==null)return eO;if(typeof e=="function")return Yo(e);if(typeof e=="object")return Array.isArray(e)?JT(e):ZT(e);if(typeof e=="string")return QT(e);throw new Error("Expected function, string, or object as test")};function JT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Go(e[n]);return Yo(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function ZT(e){const t=e;return Yo(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function QT(e){return Yo(t);function t(n){return n&&n.type===e}}function Yo(e){return t;function t(n,r,i){return!!(tO(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function eO(){return!0}function tO(e){return e!==null&&typeof e=="object"&&"type"in e}function YX(e){return e}const vm=[],nO=!0,Nl=!1,rO="skip";function gm(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Go(i),a=r?-1:1;s(e,void 0,[])();function s(l,u,c){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=vm,m,h,g;if((!t||o(l,u,c[c.length-1]||void 0))&&(d=iO(n(l,c)),d[0]===Nl))return d;if("children"in l&&l.children){const v=l;if(v.children&&d[0]!==rO)for(h=(r?v.children.length:-1)+a,g=c.concat(v);h>-1&&h<v.children.length;){const b=v.children[h];if(m=s(b,h,g)(),m[0]===Nl)return m;h=typeof m[1]=="number"?m[1]:h+a}}return d}}}function iO(e){return Array.isArray(e)?e:typeof e=="number"?[nO,e]:e==null?vm:[e]}function jl(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),gm(e,o,s,i);function s(l,u){const c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return a(l,f,c)}}const Ll={}.hasOwnProperty,oO={};function aO(e,t){const n=t||oO,r=new Map,i=new Map,o=new Map,a={...UT,...n.handlers},s={all:u,applyData:lO,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:sO,wrap:cO};return jl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),s;function l(c,f){const p=c.type,d=s.handlers[p];if(Ll.call(s.handlers,p)&&d)return d(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:h,...g}=c,v=Ko(g);return v.children=s.all(c),v}return Ko(c)}return(s.options.unknownHandler||uO)(s,c,f)}function u(c){const f=[];if("children"in c){const p=c.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],c);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=ym(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=ym(h.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function sO(e,t){e.position&&(t.position=nC(e))}function lO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Ko(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uO(e,t){const n=t.data||{},r="value"in t&&!(Ll.call(n,"hProperties")||Ll.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
32
49
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
33
50
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
34
|
-
`}),n}function
|
|
35
|
-
`},i),o}function z$(e,t){return e&&"run"in e?async function(n,r){const i=Gh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Gh(n,{file:r,...e||t})}}function Yh(e){if(e)throw e}var Oo=Object.prototype.hasOwnProperty,Xh=Object.prototype.toString,Jh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,Zh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Xh.call(t)==="[object Array]"},em=function(t){if(!t||Xh.call(t)!=="[object Object]")return!1;var n=Oo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Oo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Oo.call(t,i)},tm=function(t,n){Jh&&n.name==="__proto__"?Jh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},nm=function(t,n){if(n==="__proto__")if(Oo.call(t,n)){if(Qh)return Qh(t,n).value}else return;return t[n]},W$=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=nm(s,n),i=nm(t,n),s!==i&&(c&&i&&(em(i)||(o=Zh(i)))?(o?(o=!1,a=r&&Zh(r)?r:[]):a=r&&em(r)?r:{},tm(s,{name:n,newValue:e(c,a,i)})):typeof i<"u"&&tm(s,{name:n,newValue:i}));return s};const gl=be(W$);function yl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function U$(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const c=e[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?H$(c,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function H$(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const Yt={basename:V$,dirname:q$,extname:K$,join:G$,sep:"/"};function V$(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ci(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function q$(e){if(ci(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function K$(e){ci(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function G$(...e){let t=-1,n;for(;++t<e.length;)ci(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Y$(n)}function Y$(e){ci(e);const t=e.codePointAt(0)===47;let n=X$(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function X$(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function ci(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const J$={cwd:Q$};function Q$(){return"/"}function bl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Z$(e){if(typeof e=="string")e=new URL(e);else if(!bl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return eO(e)}function eO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const xl=["history","path","basename","stem","extname","dirname"];class rm{constructor(t){let n;t?bl(t)?n={path:t}:typeof t=="string"||tO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":J$.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<xl.length;){const o=xl[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)xl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Yt.basename(this.path):void 0}set basename(t){Sl(t,"basename"),wl(t,"basename"),this.path=Yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yt.dirname(this.path):void 0}set dirname(t){im(this.basename,"dirname"),this.path=Yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yt.extname(this.path):void 0}set extname(t){if(wl(t,"extname"),im(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bl(t)&&(t=Z$(t)),Sl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yt.basename(this.path,this.extname):void 0}set stem(t){Sl(t,"stem"),wl(t,"stem"),this.path=Yt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new st(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function wl(e,t){if(e&&e.includes(Yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yt.sep+"`")}function Sl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function im(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function tO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nO=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},rO={}.hasOwnProperty;class El extends nO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=U$()}copy(){const t=new El;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(gl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Tl("data",this.frozen),this.namespace[t]=n,this):rO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Tl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Io(t),r=this.parser||this.Parser;return kl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),kl("process",this.parser||this.Parser),Cl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Io(t),l=r.parse(s);r.run(l,s,function(c,f,p){if(c||!f||!p)return u(c);const d=f,m=r.stringify(d,p);aO(m)?p.value=m:p.result=m,u(c,p)});function u(c,f){c||!f?a(c):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),kl("processSync",this.parser||this.Parser),Cl("processSync",this.compiler||this.Compiler),this.process(t,i),am("processSync","process",n),r;function i(o,a){n=!0,Yh(o),r=a}}run(t,n,r){om(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Io(n);i.run(t,l,u);function u(c,f,p){const d=f||t;c?s(c):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),am("runSync","run",r),i;function o(a,s){Yh(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Io(n),i=this.compiler||this.Compiler;return Cl("stringify",i),om(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Tl("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=gl(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[d,...m]=c;const h=r[p][1];yl(h)&&yl(d)&&(d=gl(!0,h,d)),r[p]=[u,d,...m]}}}}const iO=new El().freeze();function kl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function om(e){if(!yl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function am(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Io(e){return oO(e)?e:new rm(e)}function oO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aO(e){return typeof e=="string"||sO(e)}function sO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sm=[],lm={allowDangerousHtml:!0},uO=/^(https?|ircs?|mailto|xmpp)$/i,cO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function um(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||sm,l=e.remarkPlugins||sm,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lm}:lm,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||cm,d=iO().use(KT).use(l).use(z$,u).use(s),m=new rm;typeof r=="string"&&(m.value=r);for(const b of cO)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+lO+b.id,void 0);const h=d.parse(m);let y=d.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),ml(y,g),Lk(y,{Fragment:T.Fragment,components:o,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function g(b,w,C){if(b.type==="raw"&&C&&typeof w=="number")return c?C.children.splice(w,1):C.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let S;for(S in nl)if(Object.hasOwn(nl,S)&&Object.hasOwn(b.properties,S)){const E=b.properties[S],O=nl[S];(O===null||O.includes(b.tagName))&&(b.properties[S]=p(String(E||""),S,b))}}if(b.type==="element"){let S=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!S&&n&&typeof w=="number"&&(S=!n(b,w,C)),S&&C&&typeof w=="number")return f&&b.children?C.children.splice(w,1,...b.children):C.children.splice(w,1),w}}}function cm(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||uO.test(e.slice(0,t))?e:""}function fO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fm(e,t,n){const i=To((n||{}).ignore||[]),o=dO(t);let a=-1;for(;++a<o.length;)qh(e,"text",s);function s(u,c){let f=-1,p;for(;++f<c.length;){const d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return l(u,c)}function l(u,c){const f=c[c.length-1],p=o[a][0],d=o[a][1];let m=0;const y=f.children.indexOf(u);let g=!1,b=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const C=w.index,S={index:w.index,input:w.input,stack:[...c,u]};let E=d(...w,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=C+1:(m!==C&&b.push({type:"text",value:u.value.slice(m,C)}),Array.isArray(E)?b.push(...E):E&&b.push(E),m=C+w[0].length,g=!0),!p.global)break;w=p.exec(u.value)}return g?(m<u.value.length&&b.push({type:"text",value:u.value.slice(m)}),f.children.splice(y,1,...b)):b=[u],y+b.length}}function dO(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([pO(i[0]),hO(i[1])])}return t}function pO(e){return typeof e=="string"?new RegExp(fO(e),"g"):e}function hO(e){return typeof e=="function"?e:function(){return e}}function mO(e){fm(e,[/\r?\n|\r/g,vO])}function vO(){return{type:"break"}}function gO(){return function(e){mO(e)}}function dm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const $l="phrasing",Ol=["autolink","link","image","label"];function yO(){return{transforms:[CO],enter:{literalAutolink:xO,literalAutolinkEmail:Il,literalAutolinkHttp:Il,literalAutolinkWww:Il},exit:{literalAutolink:kO,literalAutolinkEmail:EO,literalAutolinkHttp:wO,literalAutolinkWww:SO}}}function bO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$l,notInConstruct:Ol},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$l,notInConstruct:Ol},{character:":",before:"[ps]",after:"\\/",inConstruct:$l,notInConstruct:Ol}]}}function xO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Il(e){this.config.enter.autolinkProtocol.call(this,e)}function wO(e){this.config.exit.autolinkProtocol.call(this,e)}function SO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function EO(e){this.config.exit.autolinkEmail.call(this,e)}function kO(e){this.exit(e)}function CO(e){fm(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$O]],{ignore:["link","linkReference"]})}function TO(e,t,n,r,i){let o="";if(!pm(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!OO(n)))return!1;const a=IO(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function $O(e,t,n,r){return!pm(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function OO(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function IO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=dm(e,"(");let o=dm(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function pm(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wn(n)||vo(n))&&(!t||n!==47)}hm.peek=BO;function PO(){return{enter:{gfmFootnoteDefinition:RO,gfmFootnoteDefinitionLabelString:DO,gfmFootnoteCall:NO,gfmFootnoteCallString:jO},exit:{gfmFootnoteDefinition:MO,gfmFootnoteDefinitionLabelString:_O,gfmFootnoteCall:FO,gfmFootnoteCallString:LO}}}function AO(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:zO,footnoteReference:hm}}}function RO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DO(){this.buffer()}function _O(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=jt(this.sliceSerialize(e)).toLowerCase()}function MO(e){this.exit(e)}function NO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jO(){this.buffer()}function LO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=jt(this.sliceSerialize(e)).toLowerCase()}function FO(e){this.exit(e)}function hm(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function BO(){return"["}function zO(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),WO)),a(),o}function WO(e,t,n){return t===0?e:(n?"":" ")+e}const UO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mm.peek=GO;function HO(){return{canContainEols:["delete"],enter:{strikethrough:qO},exit:{strikethrough:KO}}}function VO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:UO}],handlers:{delete:mm}}}function qO(e){this.enter({type:"delete",children:[]},e)}function KO(e){this.exit(e)}function mm(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function GO(){return"~"}function YO(e){return e.length}function XO(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||YO,o=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const h=[],y=[];let g=-1;for(e[c].length>u&&(u=e[c].length);++g<e[c].length;){const b=JO(e[c][g]);if(n.alignDelimiters!==!1){const w=i(b);y[g]=w,(l[g]===void 0||w>l[g])&&(l[g]=w)}h.push(b)}a[c]=h,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)o[f]=vm(r[f]);else{const h=vm(r);for(;++f<u;)o[f]=h}f=-1;const p=[],d=[];for(;++f<u;){const h=o[f];let y="",g="";h===99?(y=":",g=":"):h===108?y=":":h===114&&(g=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-y.length-g.length);const w=y+"-".repeat(b)+g;n.alignDelimiters!==!1&&(b=y.length+b+g.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=w}a.splice(1,0,p),s.splice(1,0,d),c=-1;const m=[];for(;++c<a.length;){const h=a[c],y=s[c];f=-1;const g=[];for(;++f<u;){const b=h[f]||"";let w="",C="";if(n.alignDelimiters!==!1){const S=l[f]-(y[f]||0),E=o[f];E===114?w=" ".repeat(S):E===99?S%2?(w=" ".repeat(S/2+.5),C=" ".repeat(S/2-.5)):(w=" ".repeat(S/2),C=w):C=" ".repeat(S)}n.delimiterStart!==!1&&!f&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&g.push(" "),n.alignDelimiters!==!1&&g.push(w),g.push(b),n.alignDelimiters!==!1&&g.push(C),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
|
|
36
|
-
`)}function
|
|
37
|
-
`&&
|
|
38
|
-
`}function
|
|
51
|
+
`}),n}function ym(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bm(e,t){const n=aO(e,t),r=n.one(e,void 0),i=XT(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
52
|
+
`},i),o}function fO(e,t){return e&&"run"in e?async function(n,r){const i=bm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bm(n,{file:r,...e||t})}}function xm(e){if(e)throw e}var Xo=Object.prototype.hasOwnProperty,wm=Object.prototype.toString,Sm=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,km=function(t){return typeof Array.isArray=="function"?Array.isArray(t):wm.call(t)==="[object Array]"},Cm=function(t){if(!t||wm.call(t)!=="[object Object]")return!1;var n=Xo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Xo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Xo.call(t,i)},$m=function(t,n){Sm&&n.name==="__proto__"?Sm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Tm=function(t,n){if(n==="__proto__")if(Xo.call(t,n)){if(Em)return Em(t,n).value}else return;return t[n]},dO=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Tm(s,n),i=Tm(t,n),s!==i&&(c&&i&&(Cm(i)||(o=km(i)))?(o?(o=!1,a=r&&km(r)?r:[]):a=r&&Cm(r)?r:{},$m(s,{name:n,newValue:e(c,a,i)})):typeof i<"u"&&$m(s,{name:n,newValue:i}));return s};const Fl=ke(dO);function Bl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function pO(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const c=e[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?hO(c,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function hO(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const un={basename:mO,dirname:vO,extname:gO,join:yO,sep:"/"};function mO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ii(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function vO(e){if(Ii(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gO(e){Ii(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function yO(...e){let t=-1,n;for(;++t<e.length;)Ii(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bO(n)}function bO(e){Ii(e);const t=e.codePointAt(0)===47;let n=xO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xO(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Ii(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wO={cwd:SO};function SO(){return"/"}function zl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function EO(e){if(typeof e=="string")e=new URL(e);else if(!zl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return kO(e)}function kO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Wl=["history","path","basename","stem","extname","dirname"];class Om{constructor(t){let n;t?zl(t)?n={path:t}:typeof t=="string"||CO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wl.length;){const o=Wl[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Wl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?un.basename(this.path):void 0}set basename(t){Hl(t,"basename"),Ul(t,"basename"),this.path=un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?un.dirname(this.path):void 0}set dirname(t){Im(this.basename,"dirname"),this.path=un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?un.extname(this.path):void 0}set extname(t){if(Ul(t,"extname"),Im(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){zl(t)&&(t=EO(t)),Hl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?un.basename(this.path,this.extname):void 0}set stem(t){Hl(t,"stem"),Ul(t,"stem"),this.path=un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new yt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ul(e,t){if(e&&e.includes(un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+un.sep+"`")}function Hl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Im(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function CO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $O=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},TO={}.hasOwnProperty;class Vl extends $O{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=pO()}copy(){const t=new Vl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Fl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gl("data",this.frozen),this.namespace[t]=n,this):TO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Jo(t),r=this.parser||this.Parser;return ql("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ql("process",this.parser||this.Parser),Kl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Jo(t),l=r.parse(s);r.run(l,s,function(c,f,p){if(c||!f||!p)return u(c);const d=f,m=r.stringify(d,p);PO(m)?p.value=m:p.result=m,u(c,p)});function u(c,f){c||!f?a(c):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ql("processSync",this.parser||this.Parser),Kl("processSync",this.compiler||this.Compiler),this.process(t,i),Am("processSync","process",n),r;function i(o,a){n=!0,xm(o),r=a}}run(t,n,r){Pm(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Jo(n);i.run(t,l,u);function u(c,f,p){const d=f||t;c?s(c):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Am("runSync","run",r),i;function o(a,s){xm(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Jo(n),i=this.compiler||this.Compiler;return Kl("stringify",i),Pm(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Gl("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Fl(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[d,...m]=c;const h=r[p][1];Bl(h)&&Bl(d)&&(d=Fl(!0,h,d)),r[p]=[u,d,...m]}}}}const OO=new Vl().freeze();function ql(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Kl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Pm(e){if(!Bl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Am(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jo(e){return IO(e)?e:new Om(e)}function IO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function PO(e){return typeof e=="string"||AO(e)}function AO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _O="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_m=[],Rm={allowDangerousHtml:!0},RO=/^(https?|ircs?|mailto|xmpp)$/i,DO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Dm(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||_m,l=e.remarkPlugins||_m,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rm}:Rm,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||Mm,d=OO().use(gT).use(l).use(fO,u).use(s),m=new Om;typeof r=="string"&&(m.value=r);for(const b of DO)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+_O+b.id,void 0);const h=d.parse(m);let g=d.runSync(h,m);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),jl(g,v),lC(g,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function v(b,x,$){if(b.type==="raw"&&$&&typeof x=="number")return c?$.children.splice(x,1):$.children[x]={type:"text",value:b.value},x;if(b.type==="element"){let S;for(S in kl)if(Object.hasOwn(kl,S)&&Object.hasOwn(b.properties,S)){const E=b.properties[S],O=kl[S];(O===null||O.includes(b.tagName))&&(b.properties[S]=p(String(E||""),S,b))}}if(b.type==="element"){let S=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!S&&n&&typeof x=="number"&&(S=!n(b,x,$)),S&&$&&typeof x=="number")return f&&b.children?$.children.splice(x,1,...b.children):$.children.splice(x,1),x}}}function Mm(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||RO.test(e.slice(0,t))?e:""}function MO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Nm(e,t,n){const i=Go((n||{}).ignore||[]),o=NO(t);let a=-1;for(;++a<o.length;)gm(e,"text",s);function s(u,c){let f=-1,p;for(;++f<c.length;){const d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return l(u,c)}function l(u,c){const f=c[c.length-1],p=o[a][0],d=o[a][1];let m=0;const g=f.children.indexOf(u);let v=!1,b=[];p.lastIndex=0;let x=p.exec(u.value);for(;x;){const $=x.index,S={index:x.index,input:x.input,stack:[...c,u]};let E=d(...x,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=$+1:(m!==$&&b.push({type:"text",value:u.value.slice(m,$)}),Array.isArray(E)?b.push(...E):E&&b.push(E),m=$+x[0].length,v=!0),!p.global)break;x=p.exec(u.value)}return v?(m<u.value.length&&b.push({type:"text",value:u.value.slice(m)}),f.children.splice(g,1,...b)):b=[u],g+b.length}}function NO(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([jO(i[0]),LO(i[1])])}return t}function jO(e){return typeof e=="string"?new RegExp(MO(e),"g"):e}function LO(e){return typeof e=="function"?e:function(){return e}}function FO(e){Nm(e,[/\r?\n|\r/g,BO])}function BO(){return{type:"break"}}function zO(){return function(e){FO(e)}}function jm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Yl="phrasing",Xl=["autolink","link","image","label"];function WO(){return{transforms:[YO],enter:{literalAutolink:HO,literalAutolinkEmail:Jl,literalAutolinkHttp:Jl,literalAutolinkWww:Jl},exit:{literalAutolink:GO,literalAutolinkEmail:KO,literalAutolinkHttp:VO,literalAutolinkWww:qO}}}function UO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yl,notInConstruct:Xl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yl,notInConstruct:Xl},{character:":",before:"[ps]",after:"\\/",inConstruct:Yl,notInConstruct:Xl}]}}function HO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jl(e){this.config.enter.autolinkProtocol.call(this,e)}function VO(e){this.config.exit.autolinkProtocol.call(this,e)}function qO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function KO(e){this.config.exit.autolinkEmail.call(this,e)}function GO(e){this.exit(e)}function YO(e){Nm(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),JO]],{ignore:["link","linkReference"]})}function XO(e,t,n,r,i){let o="";if(!Lm(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!ZO(n)))return!1;const a=QO(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function JO(e,t,n,r){return!Lm(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZO(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function QO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=jm(e,"(");let o=jm(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Lm(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rr(n)||Lo(n))&&(!t||n!==47)}Fm.peek=cI;function eI(){return{enter:{gfmFootnoteDefinition:nI,gfmFootnoteDefinitionLabelString:rI,gfmFootnoteCall:aI,gfmFootnoteCallString:sI},exit:{gfmFootnoteDefinition:oI,gfmFootnoteDefinitionLabelString:iI,gfmFootnoteCall:uI,gfmFootnoteCallString:lI}}}function tI(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:fI,footnoteReference:Fm}}}function nI(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function rI(){this.buffer()}function iI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Jt(this.sliceSerialize(e)).toLowerCase()}function oI(e){this.exit(e)}function aI(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sI(){this.buffer()}function lI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Jt(this.sliceSerialize(e)).toLowerCase()}function uI(e){this.exit(e)}function Fm(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function cI(){return"["}function fI(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),dI)),a(),o}function dI(e,t,n){return t===0?e:(n?"":" ")+e}const pI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Bm.peek=yI;function hI(){return{canContainEols:["delete"],enter:{strikethrough:vI},exit:{strikethrough:gI}}}function mI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pI}],handlers:{delete:Bm}}}function vI(e){this.enter({type:"delete",children:[]},e)}function gI(e){this.exit(e)}function Bm(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function yI(){return"~"}function bI(e){return e.length}function xI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||bI,o=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const h=[],g=[];let v=-1;for(e[c].length>u&&(u=e[c].length);++v<e[c].length;){const b=wI(e[c][v]);if(n.alignDelimiters!==!1){const x=i(b);g[v]=x,(l[v]===void 0||x>l[v])&&(l[v]=x)}h.push(b)}a[c]=h,s[c]=g}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)o[f]=zm(r[f]);else{const h=zm(r);for(;++f<u;)o[f]=h}f=-1;const p=[],d=[];for(;++f<u;){const h=o[f];let g="",v="";h===99?(g=":",v=":"):h===108?g=":":h===114&&(v=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-v.length);const x=g+"-".repeat(b)+v;n.alignDelimiters!==!1&&(b=g.length+b+v.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=x}a.splice(1,0,p),s.splice(1,0,d),c=-1;const m=[];for(;++c<a.length;){const h=a[c],g=s[c];f=-1;const v=[];for(;++f<u;){const b=h[f]||"";let x="",$="";if(n.alignDelimiters!==!1){const S=l[f]-(g[f]||0),E=o[f];E===114?x=" ".repeat(S):E===99?S%2?(x=" ".repeat(S/2+.5),$=" ".repeat(S/2-.5)):(x=" ".repeat(S/2),$=x):$=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(x),v.push(b),n.alignDelimiters!==!1&&v.push($),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
|
|
53
|
+
`)}function wI(e){return e==null?"":String(e)}function zm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function SI(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),EI);return i(),a}function EI(e,t,n){return">"+(n?"":" ")+e}function kI(e,t){return Wm(e,t.inConstruct,!0)&&!Wm(e,t.notInConstruct,!1)}function Wm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Um(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
54
|
+
`&&kI(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
55
|
+
`}function CI(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function $I(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function TI(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function OI(e,t,n,r){const i=TI(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if($I(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(o,II);return f(),p}const s=n.createTracker(r),l=i.repeat(Math.max(CI(o,i)+1,3)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
39
56
|
`,encode:["`"],...s.current()})),f()}return c+=s.move(`
|
|
40
57
|
`),o&&(c+=s.move(o+`
|
|
41
|
-
`)),c+=s.move(l),u(),c}function
|
|
42
|
-
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function
|
|
58
|
+
`)),c+=s.move(l),u(),c}function II(e,t,n){return(n?"":" ")+e}function Zl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function PI(e,t,n,r){const i=Zl(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
59
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function AI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Hm.peek=_I;function Hm(e,t,n,r){const i=AI(n),o=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function _I(e,t,n){return n.options.emphasis||"*"}function RI(e,t){let n=!1;return jl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Nl}),!!((!e.depth||e.depth<3)&&Cl(e)&&(t.options.setext||n))}function DI(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(RI(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
43
60
|
`,after:`
|
|
44
61
|
`});return f(),c(),p+`
|
|
45
62
|
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
46
63
|
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
47
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}
|
|
48
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,m,h,
|
|
49
|
-
`))}function l(d,m,h,y){const g=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...y,before:o,after:o});return b(),g(),w}function u(d,m){return XO(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(d,m,h){const y=d.children;let g=-1;const b=[],w=m.enter("table");for(;++g<y.length;)b[g]=f(y[g],m,h);return w(),b}function f(d,m,h){const y=d.children;let g=-1;const b=[],w=m.enter("tableRow");for(;++g<y.length;)b[g]=l(y[g],d,m,h);return w(),b}function p(d,m,h){let y=Im.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function jI(){return{exit:{taskListCheckValueChecked:Am,taskListCheckValueUnchecked:Am,paragraph:FI}}}function LI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:BI}}}function Am(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function FI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function BI(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=Im.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function zI(){return[yO(),PO(),HO(),PI(),jI()]}function WI(e){return{extensions:[bO(),AO(),VO(),NI(e),LI()]}}const UI={tokenize:YI,partial:!0},Rm={tokenize:XI,partial:!0},Dm={tokenize:JI,partial:!0},_m={tokenize:QI,partial:!0},HI={tokenize:ZI,partial:!0},Mm={name:"wwwAutolink",tokenize:KI,previous:jm},Nm={name:"protocolAutolink",tokenize:GI,previous:Lm},fn={name:"emailAutolink",tokenize:qI,previous:Fm},Xt={};function VI(){return{text:Xt}}let Un=48;for(;Un<123;)Xt[Un]=fn,Un++,Un===58?Un=65:Un===91&&(Un=97);Xt[43]=fn,Xt[45]=fn,Xt[46]=fn,Xt[95]=fn,Xt[72]=[fn,Nm],Xt[104]=[fn,Nm],Xt[87]=[fn,Mm],Xt[119]=[fn,Mm];function qI(e,t,n){const r=this;let i,o;return a;function a(f){return!Dl(f)||!Fm.call(r,r.previous)||_l(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Dl(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(HI,c,u)(f):f===45||f===95||lt(f)?(o=!0,e.consume(f),l):c(f)}function u(f){return e.consume(f),i=!0,l}function c(f){return o&&i&&dt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function KI(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!jm.call(r,r.previous)||_l(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(UI,e.attempt(Rm,e.attempt(Dm,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function GI(e,t,n){const r=this;let i="",o=!1;return a;function a(f){return(f===72||f===104)&&Lm.call(r,r.previous)&&!_l(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(dt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),o?u:(o=!0,l)):n(f)}function u(f){return f===null||mo(f)||Re(f)||Wn(f)||vo(f)?n(f):e.attempt(Rm,e.attempt(Dm,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function YI(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function XI(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(_m,l,s)(u):u===null||Re(u)||Wn(u)||u!==45&&vo(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function JI(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(_m,t,o)(a):a===null||Re(a)||Wn(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function QI(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Re(s)||Wn(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Re(s)||Wn(s)?t(s):r(s)}function o(s){return dt(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):dt(s)?(e.consume(s),a):n(s)}}function ZI(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return lt(o)?n(o):t(o)}}function jm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Re(e)}function Lm(e){return!dt(e)}function Fm(e){return!(e===47||Dl(e))}function Dl(e){return e===43||e===45||e===46||e===95||lt(e)}function _l(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const eP={tokenize:lP,partial:!0};function tP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oP,continuation:{tokenize:aP},exit:sP}},text:{91:{name:"gfmFootnoteCall",tokenize:iP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nP,resolveTo:rP}}}}function nP(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=jt(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function rP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function iP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!a||f===null||f===91||Re(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Re(f)||(a=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function oP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!s||m===null||m===91||Re(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=jt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Re(m)||(s=!0),a++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),xe(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function aP(e,t,n){return e.check(ai,t,e.attempt(eP,t,n))}function sP(e){e.exit("gfmFootnoteDefinition")}function lP(e,t,n){const r=this;return xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function uP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pt(p,p.length,0,yo(d,a.slice(u+1,l),s)),Pt(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),Pt(a,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,c=this.events;let f=0;return p;function p(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=go(u);if(m===126)return f>1?l(m):(a.consume(m),f++,d);if(f<2&&!n)return l(m);const y=a.exit("strikethroughSequenceTemporary"),g=go(m);return y._open=!g||g===2&&!!h,y._close=!h||h===2&&!!g,s(m)}}}class cP{constructor(){this.map=[]}add(t,n,r){fP(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function fP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function dP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function pP(){return{flow:{null:{name:"table",tokenize:hP,resolveAll:mP}}}}function hP(e,t,n){const r=this;let i=0,o=0,a;return s;function s($){let D=r.events.length-1;for(;D>-1;){const L=r.events[D][1].type;if(L==="lineEnding"||L==="linePrefix")D--;else break}const U=D>-1?r.events[D][1].type:null,F=U==="tableHead"||U==="tableRow"?E:l;return F===E&&r.parser.lazy[r.now().line]?n($):F($)}function l($){return e.enter("tableHead"),e.enter("tableRow"),u($)}function u($){return $===124||(a=!0,o+=1),c($)}function c($){return $===null?n($):ce($)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),d):n($):me($)?xe(e,c,"whitespace")($):(o+=1,a&&(a=!1,i+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f($)))}function f($){return $===null||$===124||Re($)?(e.exit("data"),c($)):(e.consume($),$===92?p:f)}function p($){return $===92||$===124?(e.consume($),f):f($)}function d($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),a=!1,me($)?xe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):m($))}function m($){return $===45||$===58?y($):$===124?(a=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),h):S($)}function h($){return me($)?xe(e,y,"whitespace")($):y($)}function y($){return $===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),g):$===45?(o+=1,g($)):$===null||ce($)?C($):S($)}function g($){return $===45?(e.enter("tableDelimiterFiller"),b($)):S($)}function b($){return $===45?(e.consume($),b):$===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w($))}function w($){return me($)?xe(e,C,"whitespace")($):C($)}function C($){return $===124?m($):$===null||ce($)?!a||i!==o?S($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):S($)}function S($){return n($)}function E($){return e.enter("tableRow"),O($)}function O($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),O):$===null||ce($)?(e.exit("tableRow"),t($)):me($)?xe(e,O,"whitespace")($):(e.enter("data"),j($))}function j($){return $===null||$===124||Re($)?(e.exit("data"),O($)):(e.consume($),$===92?M:j)}function M($){return $===92||$===124?(e.consume($),j):j($)}}function mP(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,f;const p=new cP;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(Bm(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Po(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],f=Po(p,t,o,i,void 0,f)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],f=Po(p,t,o,i,n,f)):a[1]!==0&&(f=Po(p,t,a,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Bm(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=dP(t.events,n))}return e}function Po(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},fr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=fr(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=fr(t.events,n[2]),c=fr(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},fr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Bm(e,t,n,r,i){const o=[],a=fr(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function fr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const vP={name:"tasklistCheck",tokenize:yP};function gP(){return{text:{91:vP}}}function yP(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Re(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ce(l)?t(l):me(l)?e.check({tokenize:bP},t,n)(l):n(l)}}function bP(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function xP(e){return ph([VI(),tP(),uP(e),pP(),gP()])}const wP={};function SP(e){const t=this,n=e||wP,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xP(n)),o.push(zI()),a.push(WI(n))}const ye={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},error:{container:{className:"bpReset bpErrorContainer"},header:{className:"bpErrorHeader"},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}};/**
|
|
50
|
-
* @license lucide-react v0.
|
|
64
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}Vm.peek=MI;function Vm(e){return e.value||""}function MI(){return"<"}qm.peek=NI;function qm(e,t,n,r){const i=Zl(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function NI(){return"!"}Km.peek=jI;function Km(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function jI(){return"!"}Gm.peek=LI;function Gm(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function LI(){return"`"}function Ym(e,t){const n=Cl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Xm.peek=FI;function Xm(e,t,n,r){const i=Zl(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Ym(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=c,f}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function FI(e,t,n){return Ym(e,n)?"<":"["}Jm.peek=BI;function Jm(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function BI(){return"["}function Ql(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function zI(e){const t=Ql(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function WI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Zm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function UI(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?WI(n):Ql(n);const s=e.ordered?a==="."?")":".":zI(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Zm(n)===a&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),u}function HI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VI(e,t,n,r){const i=HI(n);let o=n.bulletCurrent||Ql(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return l(),u;function c(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?o:o+" ".repeat(a-o.length))+f}}function qI(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const KI=Go(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function GI(e,t,n,r){return(e.children.some(function(a){return KI(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function YI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qm.peek=XI;function Qm(e,t,n,r){const i=YI(n),o=n.enter("strong"),a=n.createTracker(r);let s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function XI(e,t,n){return n.options.strong||"*"}function JI(e,t,n,r){return n.safe(e.value,r)}function ZI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function QI(e,t,n){const r=(Zm(n)+(n.options.ruleSpaces?" ":"")).repeat(ZI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ev={blockquote:SI,break:Um,code:OI,definition:PI,emphasis:Hm,hardBreak:Um,heading:DI,html:Vm,image:qm,imageReference:Km,inlineCode:Gm,link:Xm,linkReference:Jm,list:UI,listItem:VI,paragraph:qI,root:GI,strong:Qm,text:JI,thematicBreak:QI};function eP(){return{enter:{table:tP,tableData:tv,tableHeader:tv,tableRow:rP},exit:{codeText:iP,table:nP,tableData:eu,tableHeader:eu,tableRow:eu}}}function tP(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function nP(e){this.exit(e),this.data.inTable=void 0}function rP(e){this.enter({type:"tableRow",children:[]},e)}function eu(e){this.exit(e)}function tv(e){this.enter({type:"tableCell",children:[]},e)}function iP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oP(e,t){return t==="|"?t:e}function aP(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
65
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,m,h,g){return u(c(d,h,g),d.align)}function s(d,m,h,g){const v=f(d,h,g),b=u([v]);return b.slice(0,b.indexOf(`
|
|
66
|
+
`))}function l(d,m,h,g){const v=h.enter("tableCell"),b=h.enter("phrasing"),x=h.containerPhrasing(d,{...g,before:o,after:o});return b(),v(),x}function u(d,m){return xI(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(d,m,h){const g=d.children;let v=-1;const b=[],x=m.enter("table");for(;++v<g.length;)b[v]=f(g[v],m,h);return x(),b}function f(d,m,h){const g=d.children;let v=-1;const b=[],x=m.enter("tableRow");for(;++v<g.length;)b[v]=l(g[v],d,m,h);return x(),b}function p(d,m,h){let g=ev.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function sP(){return{exit:{taskListCheckValueChecked:nv,taskListCheckValueUnchecked:nv,paragraph:uP}}}function lP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cP}}}function nv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cP(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=ev.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function fP(){return[WO(),eI(),hI(),eP(),sP()]}function dP(e){return{extensions:[UO(),tI(),mI(),aP(e),lP()]}}const pP={tokenize:bP,partial:!0},rv={tokenize:xP,partial:!0},iv={tokenize:wP,partial:!0},ov={tokenize:SP,partial:!0},hP={tokenize:EP,partial:!0},av={name:"wwwAutolink",tokenize:gP,previous:lv},sv={name:"protocolAutolink",tokenize:yP,previous:uv},Cn={name:"emailAutolink",tokenize:vP,previous:cv},cn={};function mP(){return{text:cn}}let ir=48;for(;ir<123;)cn[ir]=Cn,ir++,ir===58?ir=65:ir===91&&(ir=97);cn[43]=Cn,cn[45]=Cn,cn[46]=Cn,cn[95]=Cn,cn[72]=[Cn,sv],cn[104]=[Cn,sv],cn[87]=[Cn,av],cn[119]=[Cn,av];function vP(e,t,n){const r=this;let i,o;return a;function a(f){return!tu(f)||!cv.call(r,r.previous)||nu(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return tu(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(hP,c,u)(f):f===45||f===95||bt(f)?(o=!0,e.consume(f),l):c(f)}function u(f){return e.consume(f),i=!0,l}function c(f){return o&&i&&$t(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function gP(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!lv.call(r,r.previous)||nu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pP,e.attempt(rv,e.attempt(iv,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function yP(e,t,n){const r=this;let i="",o=!1;return a;function a(f){return(f===72||f===104)&&uv.call(r,r.previous)&&!nu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if($t(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),o?u:(o=!0,l)):n(f)}function u(f){return f===null||jo(f)||Be(f)||rr(f)||Lo(f)?n(f):e.attempt(rv,e.attempt(iv,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function bP(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function xP(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(ov,l,s)(u):u===null||Be(u)||rr(u)||u!==45&&Lo(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function wP(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(ov,t,o)(a):a===null||Be(a)||rr(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function SP(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Be(s)||rr(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Be(s)||rr(s)?t(s):r(s)}function o(s){return $t(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):$t(s)?(e.consume(s),a):n(s)}}function EP(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return bt(o)?n(o):t(o)}}function lv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Be(e)}function uv(e){return!$t(e)}function cv(e){return!(e===47||tu(e))}function tu(e){return e===43||e===45||e===46||e===95||bt(e)}function nu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const kP={tokenize:_P,partial:!0};function CP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IP,continuation:{tokenize:PP},exit:AP}},text:{91:{name:"gfmFootnoteCall",tokenize:OP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$P,resolveTo:TP}}}}function $P(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=Jt(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function TP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function OP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!a||f===null||f===91||Be(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Be(f)||(a=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function IP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!s||m===null||m===91||Be(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=Jt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Be(m)||(s=!0),a++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ce(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function PP(e,t,n){return e.check(Ci,t,e.attempt(kP,t,n))}function AP(e){e.exit("gfmFootnoteDefinition")}function _P(e,t,n){const r=this;return Ce(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function RP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Ut(p,p.length,0,Bo(d,a.slice(u+1,l),s)),Ut(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),Ut(a,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,c=this.events;let f=0;return p;function p(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=Fo(u);if(m===126)return f>1?l(m):(a.consume(m),f++,d);if(f<2&&!n)return l(m);const g=a.exit("strikethroughSequenceTemporary"),v=Fo(m);return g._open=!v||v===2&&!!h,g._close=!h||h===2&&!!v,s(m)}}}class DP{constructor(){this.map=[]}add(t,n,r){MP(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function MP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function NP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function jP(){return{flow:{null:{name:"table",tokenize:LP,resolveAll:FP}}}}function LP(e,t,n){const r=this;let i=0,o=0,a;return s;function s(T){let M=r.events.length-1;for(;M>-1;){const L=r.events[M][1].type;if(L==="lineEnding"||L==="linePrefix")M--;else break}const H=M>-1?r.events[M][1].type:null,B=H==="tableHead"||H==="tableRow"?E:l;return B===E&&r.parser.lazy[r.now().line]?n(T):B(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),u(T)}function u(T){return T===124||(a=!0,o+=1),c(T)}function c(T){return T===null?n(T):he(T)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):xe(T)?Ce(e,c,"whitespace")(T):(o+=1,a&&(a=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||Be(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,xe(T)?Ce(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):m(T))}function m(T){return T===45||T===58?g(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):S(T)}function h(T){return xe(T)?Ce(e,g,"whitespace")(T):g(T)}function g(T){return T===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(o+=1,v(T)):T===null||he(T)?$(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),b(T)):S(T)}function b(T){return T===45?(e.consume(T),b):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(T))}function x(T){return xe(T)?Ce(e,$,"whitespace")(T):$(T)}function $(T){return T===124?m(T):T===null||he(T)?!a||i!==o?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function E(T){return e.enter("tableRow"),O(T)}function O(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),O):T===null||he(T)?(e.exit("tableRow"),t(T)):xe(T)?Ce(e,O,"whitespace")(T):(e.enter("data"),F(T))}function F(T){return T===null||T===124||Be(T)?(e.exit("data"),O(T)):(e.consume(T),T===92?D:F)}function D(T){return T===92||T===124?(e.consume(T),F):F(T)}}function FP(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,f;const p=new DP;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(fv(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Zo(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],f=Zo(p,t,o,i,void 0,f)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],f=Zo(p,t,o,i,n,f)):a[1]!==0&&(f=Zo(p,t,a,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&fv(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=NP(t.events,n))}return e}function Zo(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Ir(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=Ir(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Ir(t.events,n[2]),c=Ir(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},Ir(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function fv(e,t,n,r,i){const o=[],a=Ir(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ir(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const BP={name:"tasklistCheck",tokenize:WP};function zP(){return{text:{91:BP}}}function WP(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Be(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return he(l)?t(l):xe(l)?e.check({tokenize:UP},t,n)(l):n(l)}}function UP(e,t,n){return Ce(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function HP(e){return Lh([mP(),CP(),RP(e),jP(),zP()])}const VP={};function qP(e){const t=this,n=e||VP,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(HP(n)),o.push(fP()),a.push(dP(n))}const Se={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},imageError:{className:"bpMessageBlocksTextImageError"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},error:{container:{className:"bpReset bpErrorContainer"},id:{className:"bpErrorId"},header:{className:"bpErrorHeader"},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}};/**
|
|
67
|
+
* @license lucide-react v0.525.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const KP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),GP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),dv=e=>{const t=GP(e);return t.charAt(0).toUpperCase()+t.slice(1)},pv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),YP=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
72
|
+
* @license lucide-react v0.525.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/var XP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
77
|
+
* @license lucide-react v0.525.0 - ISC
|
|
51
78
|
*
|
|
52
79
|
* This source code is licensed under the ISC license.
|
|
53
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
55
|
-
* @license lucide-react v0.
|
|
81
|
+
*/const JP=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>I.createElement("svg",{ref:l,...XP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:pv("lucide",i),...!o&&!YP(s)&&{"aria-hidden":"true"},...s},[...a.map(([u,c])=>I.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
|
|
82
|
+
* @license lucide-react v0.525.0 - ISC
|
|
56
83
|
*
|
|
57
84
|
* This source code is licensed under the ISC license.
|
|
58
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/
|
|
60
|
-
* @license lucide-react v0.
|
|
86
|
+
*/const Ie=(e,t)=>{const n=I.forwardRef(({className:r,...i},o)=>I.createElement(JP,{ref:o,iconNode:t,className:pv(`lucide-${KP(dv(e))}`,`lucide-${e}`,r),...i}));return n.displayName=dv(e),n};/**
|
|
87
|
+
* @license lucide-react v0.525.0 - ISC
|
|
61
88
|
*
|
|
62
89
|
* This source code is licensed under the ISC license.
|
|
63
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
65
|
-
* @license lucide-react v0.
|
|
91
|
+
*/const ZP=Ie("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
92
|
+
* @license lucide-react v0.525.0 - ISC
|
|
66
93
|
*
|
|
67
94
|
* This source code is licensed under the ISC license.
|
|
68
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
70
|
-
* @license lucide-react v0.
|
|
96
|
+
*/const hv=Ie("bot-off",[["path",{d:"M13.67 8H18a2 2 0 0 1 2 2v4.33",key:"7az073"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}],["path",{d:"M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586",key:"s09a7a"}],["path",{d:"M9 13v2",key:"rq6x2g"}],["path",{d:"M9.67 4H12v2.33",key:"110xot"}]]);/**
|
|
97
|
+
* @license lucide-react v0.525.0 - ISC
|
|
71
98
|
*
|
|
72
99
|
* This source code is licensed under the ISC license.
|
|
73
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
75
|
-
* @license lucide-react v0.
|
|
101
|
+
*/const QP=Ie("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
102
|
+
* @license lucide-react v0.525.0 - ISC
|
|
76
103
|
*
|
|
77
104
|
* This source code is licensed under the ISC license.
|
|
78
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
80
|
-
* @license lucide-react v0.
|
|
106
|
+
*/const eA=Ie("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
107
|
+
* @license lucide-react v0.525.0 - ISC
|
|
81
108
|
*
|
|
82
109
|
* This source code is licensed under the ISC license.
|
|
83
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const
|
|
85
|
-
* @license lucide-react v0.
|
|
111
|
+
*/const tA=Ie("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
112
|
+
* @license lucide-react v0.525.0 - ISC
|
|
86
113
|
*
|
|
87
114
|
* This source code is licensed under the ISC license.
|
|
88
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const
|
|
90
|
-
* @license lucide-react v0.
|
|
116
|
+
*/const nA=Ie("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
117
|
+
* @license lucide-react v0.525.0 - ISC
|
|
91
118
|
*
|
|
92
119
|
* This source code is licensed under the ISC license.
|
|
93
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const
|
|
95
|
-
* @license lucide-react v0.
|
|
121
|
+
*/const rA=Ie("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
122
|
+
* @license lucide-react v0.525.0 - ISC
|
|
96
123
|
*
|
|
97
124
|
* This source code is licensed under the ISC license.
|
|
98
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
100
|
-
* @license lucide-react v0.
|
|
126
|
+
*/const mv=Ie("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
127
|
+
* @license lucide-react v0.525.0 - ISC
|
|
101
128
|
*
|
|
102
129
|
* This source code is licensed under the ISC license.
|
|
103
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const
|
|
105
|
-
* @license lucide-react v0.
|
|
131
|
+
*/const iA=Ie("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
|
|
132
|
+
* @license lucide-react v0.525.0 - ISC
|
|
106
133
|
*
|
|
107
134
|
* This source code is licensed under the ISC license.
|
|
108
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const
|
|
110
|
-
* @license lucide-react v0.
|
|
136
|
+
*/const oA=Ie("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
137
|
+
* @license lucide-react v0.525.0 - ISC
|
|
111
138
|
*
|
|
112
139
|
* This source code is licensed under the ISC license.
|
|
113
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const
|
|
115
|
-
* @license lucide-react v0.
|
|
141
|
+
*/const aA=Ie("file-down",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
|
|
142
|
+
* @license lucide-react v0.525.0 - ISC
|
|
116
143
|
*
|
|
117
144
|
* This source code is licensed under the ISC license.
|
|
118
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const
|
|
120
|
-
* @license lucide-react v0.
|
|
146
|
+
*/const vv=Ie("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
147
|
+
* @license lucide-react v0.525.0 - ISC
|
|
121
148
|
*
|
|
122
149
|
* This source code is licensed under the ISC license.
|
|
123
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const
|
|
125
|
-
* @license lucide-react v0.
|
|
151
|
+
*/const sA=Ie("files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);/**
|
|
152
|
+
* @license lucide-react v0.525.0 - ISC
|
|
126
153
|
*
|
|
127
154
|
* This source code is licensed under the ISC license.
|
|
128
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const
|
|
130
|
-
* @license lucide-react v0.
|
|
156
|
+
*/const lA=Ie("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
157
|
+
* @license lucide-react v0.525.0 - ISC
|
|
131
158
|
*
|
|
132
159
|
* This source code is licensed under the ISC license.
|
|
133
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const
|
|
135
|
-
* @license lucide-react v0.
|
|
161
|
+
*/const gv=Ie("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
|
|
162
|
+
* @license lucide-react v0.525.0 - ISC
|
|
136
163
|
*
|
|
137
164
|
* This source code is licensed under the ISC license.
|
|
138
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const
|
|
140
|
-
* @license lucide-react v0.
|
|
166
|
+
*/const uA=Ie("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
167
|
+
* @license lucide-react v0.525.0 - ISC
|
|
141
168
|
*
|
|
142
169
|
* This source code is licensed under the ISC license.
|
|
143
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const
|
|
145
|
-
* @license lucide-react v0.
|
|
171
|
+
*/const cA=Ie("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
172
|
+
* @license lucide-react v0.525.0 - ISC
|
|
146
173
|
*
|
|
147
174
|
* This source code is licensed under the ISC license.
|
|
148
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const
|
|
150
|
-
* @license lucide-react v0.
|
|
176
|
+
*/const fA=Ie("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
|
|
177
|
+
* @license lucide-react v0.525.0 - ISC
|
|
151
178
|
*
|
|
152
179
|
* This source code is licensed under the ISC license.
|
|
153
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const
|
|
155
|
-
* @license lucide-react v0.
|
|
181
|
+
*/const dA=Ie("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
182
|
+
* @license lucide-react v0.525.0 - ISC
|
|
156
183
|
*
|
|
157
184
|
* This source code is licensed under the ISC license.
|
|
158
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const
|
|
160
|
-
* @license lucide-react v0.
|
|
186
|
+
*/const pA=Ie("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);/**
|
|
187
|
+
* @license lucide-react v0.525.0 - ISC
|
|
161
188
|
*
|
|
162
189
|
* This source code is licensed under the ISC license.
|
|
163
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const
|
|
165
|
-
* @license lucide-react v0.
|
|
191
|
+
*/const hA=Ie("monitor-cog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
192
|
+
* @license lucide-react v0.525.0 - ISC
|
|
166
193
|
*
|
|
167
194
|
* This source code is licensed under the ISC license.
|
|
168
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const
|
|
170
|
-
* @license lucide-react v0.
|
|
196
|
+
*/const mA=Ie("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
|
|
197
|
+
* @license lucide-react v0.525.0 - ISC
|
|
171
198
|
*
|
|
172
199
|
* This source code is licensed under the ISC license.
|
|
173
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const
|
|
175
|
-
* @license lucide-react v0.
|
|
201
|
+
*/const vA=Ie("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
202
|
+
* @license lucide-react v0.525.0 - ISC
|
|
176
203
|
*
|
|
177
204
|
* This source code is licensed under the ISC license.
|
|
178
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const
|
|
180
|
-
* @license lucide-react v0.
|
|
206
|
+
*/const gA=Ie("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
207
|
+
* @license lucide-react v0.525.0 - ISC
|
|
181
208
|
*
|
|
182
209
|
* This source code is licensed under the ISC license.
|
|
183
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const
|
|
185
|
-
* @license lucide-react v0.
|
|
211
|
+
*/const yA=Ie("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
212
|
+
* @license lucide-react v0.525.0 - ISC
|
|
186
213
|
*
|
|
187
214
|
* This source code is licensed under the ISC license.
|
|
188
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const
|
|
190
|
-
* @license lucide-react v0.
|
|
216
|
+
*/const bA=Ie("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
217
|
+
* @license lucide-react v0.525.0 - ISC
|
|
191
218
|
*
|
|
192
219
|
* This source code is licensed under the ISC license.
|
|
193
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const
|
|
195
|
-
* @license lucide-react v0.
|
|
221
|
+
*/const xA=Ie("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);/**
|
|
222
|
+
* @license lucide-react v0.525.0 - ISC
|
|
196
223
|
*
|
|
197
224
|
* This source code is licensed under the ISC license.
|
|
198
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
-
*/const
|
|
200
|
-
* @license lucide-react v0.
|
|
226
|
+
*/const wA=Ie("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
227
|
+
* @license lucide-react v0.525.0 - ISC
|
|
201
228
|
*
|
|
202
229
|
* This source code is licensed under the ISC license.
|
|
203
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
-
*/const
|
|
205
|
-
* @license lucide-react v0.
|
|
231
|
+
*/const SA=Ie("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
|
|
232
|
+
* @license lucide-react v0.525.0 - ISC
|
|
206
233
|
*
|
|
207
234
|
* This source code is licensed under the ISC license.
|
|
208
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/const
|
|
210
|
-
* @license lucide-react v0.
|
|
236
|
+
*/const EA=Ie("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
237
|
+
* @license lucide-react v0.525.0 - ISC
|
|
211
238
|
*
|
|
212
239
|
* This source code is licensed under the ISC license.
|
|
213
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/const
|
|
241
|
+
*/const kA=Ie("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),CA=({text:e})=>{const{message:{blocks:{text:t}}}=Se,[n,r]=I.useState(new Map);function i(a){if(n.has(a))return;const s=new Image;s.src=a,s.onerror=()=>{r(l=>new Map(l).set(a,!0))},s.onload=()=>{r(l=>new Map(l).set(a,!1))}}I.useEffect(()=>{const a=/!\[.*?\]\((.*?)\)/g,s=[];let l;for(;(l=a.exec(e))!==null;){const u=l[1];u&&!s.includes(u)&&s.push(u)}s.forEach(u=>{i(u)})},[e]);const o={h1:({node:a,...s})=>C.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>C.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>C.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>C.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>C.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>C.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>C.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>C.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...u})=>C.jsx("a",{...u,...t.link,onMouseUp:c=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?C.jsx("div",{"data-error":!0,...t.image,children:C.jsx(gv,{strokeWidth:"1"})}):C.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>C.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>C.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>C.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>C.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{var m,h;const l=a==null?void 0:a.children[0],u=$A(((h=(m=l==null?void 0:l.properties)==null?void 0:m.className)==null?void 0:h[0])||""),[c,f]=I.useState(!1),p=I.useRef(null),d=()=>{if(!p.current)return;const g=p.current.textContent||"";navigator.clipboard.writeText(g).then(()=>{f(!0),setTimeout(()=>{f(!1)},1500)}).catch(v=>{console.error("Failed to copy code to clipboard:",v)})};return C.jsxs("div",{...t.codeBlockContainer,children:[C.jsxs("div",{...t.codeBlockTitle,children:[u?C.jsx("span",{children:u}):"Code",c?C.jsx(QP,{...t.codeBlockCopyIcon}):C.jsx(sA,{...t.codeBlockCopyIcon,onClick:d})]}),C.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>C.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>C.jsx("code",{...s,...t.code}),table:({node:a,...s})=>C.jsx("div",{...t.tableContainer,children:C.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>C.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>C.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>C.jsx("td",{...s,...t.tableData})};return C.jsx(Dm,{urlTransform:a=>a.startsWith("tel:")?a:Mm(a),components:o,remarkPlugins:[qP,zO],children:e})},$A=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},TA={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},yv=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,d))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(TA?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},OA=e=>e?yv(e):yv;var ru={exports:{}},iu={},Qo={exports:{}},ou={};/**
|
|
215
242
|
* @license React
|
|
216
243
|
* use-sync-external-store-shim.production.min.js
|
|
217
244
|
*
|
|
@@ -219,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
219
246
|
*
|
|
220
247
|
* This source code is licensed under the MIT license found in the
|
|
221
248
|
* LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/var
|
|
249
|
+
*/var bv;function IA(){if(bv)return ou;bv=1;var e=I;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,g=m[1];return o(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[f,d,p]),i(function(){return l(h)&&g({inst:h}),f(function(){l(h)&&g({inst:h})})},[f]),a(d),d}function l(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function u(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return ou.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,ou}var au={};/**
|
|
223
250
|
* @license React
|
|
224
251
|
* use-sync-external-store-shim.development.js
|
|
225
252
|
*
|
|
@@ -227,7 +254,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
227
254
|
*
|
|
228
255
|
* This source code is licensed under the MIT license found in the
|
|
229
256
|
* LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/var
|
|
257
|
+
*/var xv;function PA(){return xv||(xv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=I,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var $=arguments.length,S=new Array($>1?$-1:0),E=1;E<$;E++)S[E-1]=arguments[E];r("error",x,S)}}function r(x,$,S){{var E=t.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&($+="%s",S=S.concat([O]));var F=S.map(function(D){return String(D)});F.unshift("Warning: "+$),Function.prototype.apply.call(console[x],console,F)}}function i(x,$){return x===$&&(x!==0||1/x===1/$)||x!==x&&$!==$}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,c=!1,f=!1;function p(x,$,S){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=$();if(!f){var O=$();o(E,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var F=a({inst:{value:E,getSnapshot:$}}),D=F[0].inst,T=F[1];return l(function(){D.value=E,D.getSnapshot=$,d(D)&&T({inst:D})},[x,E,$]),s(function(){d(D)&&T({inst:D});var M=function(){d(D)&&T({inst:D})};return x(M)},[x]),u(E),E}function d(x){var $=x.getSnapshot,S=x.value;try{var E=$();return!o(S,E)}catch{return!0}}function m(x,$,S){return $()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,v=g?m:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;au.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),au}var wv;function Sv(){return wv||(wv=1,process.env.NODE_ENV==="production"?Qo.exports=IA():Qo.exports=PA()),Qo.exports}/**
|
|
231
258
|
* @license React
|
|
232
259
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
233
260
|
*
|
|
@@ -235,7 +262,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
235
262
|
*
|
|
236
263
|
* This source code is licensed under the MIT license found in the
|
|
237
264
|
* LICENSE file in the root directory of this source tree.
|
|
238
|
-
*/var
|
|
265
|
+
*/var Ev;function AA(){if(Ev)return iu;Ev=1;var e=I,t=Sv();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return iu.useSyncExternalStoreWithSelector=function(u,c,f,p,d){var m=o(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function v(E){if(!b){if(b=!0,x=E,E=p(E),d!==void 0&&h.hasValue){var O=h.value;if(d(O,E))return $=O}return $=E}if(O=$,r(x,E))return O;var F=p(E);return d!==void 0&&d(O,F)?O:(x=E,$=F)}var b=!1,x,$,S=f===void 0?null:f;return[function(){return v(c())},S===null?void 0:function(){return v(S())}]},[c,f,p,d]);var g=i(u,m[0],m[1]);return a(function(){h.hasValue=!0,h.value=g},[g]),l(g),g},iu}var su={};/**
|
|
239
266
|
* @license React
|
|
240
267
|
* use-sync-external-store-shim/with-selector.development.js
|
|
241
268
|
*
|
|
@@ -243,56 +270,56 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
270
|
*
|
|
244
271
|
* This source code is licensed under the MIT license found in the
|
|
245
272
|
* LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/var
|
|
273
|
+
*/var kv;function _A(){return kv||(kv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=I,t=Sv();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(c,f,p,d,m){var h=o(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var v=s(function(){var S=!1,E,O,F=function(H){if(!S){S=!0,E=H;var B=d(H);if(m!==void 0&&g.hasValue){var L=g.value;if(m(L,B))return O=L,L}return O=B,B}var N=E,W=O;if(r(N,H))return W;var X=d(H);return m!==void 0&&m(W,X)?W:(E=H,O=X,X)},D=p===void 0?null:p,T=function(){return F(f())},M=D===null?void 0:function(){return F(D())};return[T,M]},[f,p,d,m]),b=v[0],x=v[1],$=i(c,b,x);return a(function(){g.hasValue=!0,g.value=$},[$]),l($),$}su.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),su}process.env.NODE_ENV==="production"?ru.exports=AA():ru.exports=_A();var RA=ru.exports;const DA=ke(RA),Cv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:MA}=I,{useSyncExternalStoreWithSelector:NA}=DA;let $v=!1;const jA=e=>e;function LA(e,t=jA,n){(Cv?"production":void 0)!=="production"&&n&&!$v&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),$v=!0);const r=NA(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return MA(r),r}const FA=e=>{(Cv?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?OA(e):e,n=(r,i)=>LA(t,r,i);return Object.assign(n,t),n},or=e=>FA,ea={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},lu=new Map,ta=e=>{const t=lu.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},BA=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=lu.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return lu.set(n.name,i),{type:"tracked",store:e,...i}},na=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let u;try{u=(o??(ea?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(ea?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=BA(s,u,l);let p=!0;i.setState=(h,g,v)=>{const b=n(h,g);if(!p)return b;const x=v===void 0?{type:a||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(x,r()),b):(c==null||c.send({...x,type:`${s}/${x.type}`},{...ta(l.name),[s]:i.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},m=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(m):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,g])=>[h,h===f.store?m:g.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const g=i.dispatch;i.dispatch=(...v)=>{(ea?"production":void 0)!=="production"&&v[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),g(...v)}}return c.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return uu(h.payload,v=>{if(v.type==="__setState"){if(s===void 0){d(v.state);return}Object.keys(v.state).length!==1&&console.error(`
|
|
247
274
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
248
275
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
249
276
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
250
|
-
`);const b=g.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&d(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(g)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Do(l.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Do(l.name));case"ROLLBACK":return zl(h.state,g=>{if(s===void 0){d(g),c==null||c.init(i.getState());return}d(g[s]),c==null||c.init(Do(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return zl(h.state,g=>{if(s===void 0){d(g);return}JSON.stringify(i.getState())!==JSON.stringify(g[s])&&d(g[s])});case"IMPORT_STATE":{const{nextLiftedState:g}=h.payload,b=(y=g.computedStates.slice(-1)[0])==null?void 0:y.state;if(!b)return;d(s===void 0?b:b[s]),c==null||c.send(null,g);return}case"PAUSE_RECORDING":return p=!p}return}}),m},zl=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function ev(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const fi=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return fi(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return fi(r)(n)}}}},hA=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,g)=>({...g,...y}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=fi(o.serialize),f=()=>{const y=o.partialize({...r()});let g;const b=c({state:y,version:o.version}).then(w=>u.setItem(o.name,w)).catch(w=>{g=w});if(g)throw g;return b},p=i.setState;i.setState=(y,g)=>{p(y,g),f()};const d=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!u)return;a=!1,s.forEach(b=>b(r()));const g=((y=o.onRehydrateStorage)==null?void 0:y.call(o,r()))||void 0;return fi(u.getItem.bind(u))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var w;return m=o.merge(b,(w=r())!=null?w:d),n(m,!0),f()}).then(()=>{g==null||g(m,void 0),a=!0,l.forEach(b=>b(m))}).catch(b=>{g==null||g(void 0,b)})};return i.persist={setOptions:y=>{o={...o,...y},y.getStorage&&(u=y.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},h(),m||d},mA=(e,t)=>(n,r,i)=>{let o={storage:ev(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},a=!1;const s=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const m=()=>{var h,y;if(!u)return;a=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const g=((y=o.onRehydrateStorage)==null?void 0:y.call(o,(h=r())!=null?h:p))||void 0;return fi(u.getItem.bind(u))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return[!0,o.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[C,S]=b;if(d=o.merge(S,(w=r())!=null?w:p),n(d,!0),C)return c()}).then(()=>{g==null||g(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{g==null||g(void 0,b)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||m(),d||p},tv=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Ro?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),hA(e,t)):mA(e,t),nv=Hn()(_o(tv(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let Mo;const vA=new Uint8Array(16);function gA(){if(!Mo&&(Mo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mo(vA)}const rt=[];for(let e=0;e<256;++e)rt.push((e+256).toString(16).slice(1));function yA(e,t=0){return rt[e[t+0]]+rt[e[t+1]]+rt[e[t+2]]+rt[e[t+3]]+"-"+rt[e[t+4]]+rt[e[t+5]]+"-"+rt[e[t+6]]+rt[e[t+7]]+"-"+rt[e[t+8]]+rt[e[t+9]]+"-"+rt[e[t+10]]+rt[e[t+11]]+rt[e[t+12]]+rt[e[t+13]]+rt[e[t+14]]+rt[e[t+15]]}const rv={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function bA(e,t,n){if(rv.randomUUID&&!t&&!e)return rv.randomUUID();e=e||{};const r=e.random||(e.rng||gA)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,yA(r)}function No(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=iv(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const iv=e=>{switch(e.type){case"audio":return ov(e);case"card":return xA(e);case"carousel":return wA(e);case"choice":return SA(e);case"dropdown":return EA(e);case"file":return av(e);case"image":return sv(e);case"location":return lv(e);case"markdown":return uv(e);case"text":return cv(e);case"video":return fv(e);case"bloc":return kA(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},di=e=>({block:e,type:"bubble"}),ov=e=>({payload:{type:"audio",url:e.audioUrl}}),xA=e=>({payload:di(dv(e))}),wA=e=>({payload:{type:"carousel",blocks:e.items.map(t=>dv({type:"card",...t}))}}),SA=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=bA(),i=di({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},EA=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:di({type:"column",blocks:r})}},av=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),sv=e=>({payload:{type:"image",url:e.imageUrl}}),lv=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),uv=e=>({payload:di({type:"text",text:e.markdown})}),cv=e=>({payload:di({type:"text",text:e.text,value:e.value})}),fv=e=>({payload:{type:"video",url:e.videoUrl}}),kA=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return ov({...n.payload,type:n.type}).payload;case"file":return av({...n.payload,type:n.type}).payload;case"image":return sv({...n.payload,type:n.type}).payload;case"location":return lv({...n.payload,type:n.type}).payload;case"markdown":return uv({...n.payload,type:n.type}).payload;case"text":return cv({...n.payload,type:n.type}).payload;case"video":return fv({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),dv=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},Vn=Hn()(_o(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[o];if(o!==-1)return{messages:[...n.slice(0,o),{...a,...t},...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return e({isFetching:!1}),r.reverse().map(o=>No(o)).filter(Boolean)}}),{name:"messagesStore"})),CA=(e,t)=>Hn()(_o(tv(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:ev(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Qr=class Qr{constructor(){}static getInstance(t="bp-webchat",n){return Qr._instances[t]||(Qr._instances[t]=CA(t,n)),Qr._instances[t]}};nE(Qr,"_instances",{});let Wl=Qr;const pv=Wl.getInstance,hv=()=>{const e={};return{on:(i,o)=>{var a;return e[i]||(e[i]=new Set),(a=e[i])==null||a.add(o),()=>{var s;return(s=e[i])==null?void 0:s.delete(o)}},emit:(i,o)=>{var a,s;(a=e[i])==null||a.forEach(l=>l(o)),(s=e["*"])==null||s.forEach(l=>l({type:i,payload:o}))},removeAllListeners:i=>{var o;i?(o=e[i])==null||o.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}},jo=Hn()(_o(e=>({eventEmitter:hv(),messageContainerRef:A.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),TA=8,pi=Hn()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(a=>a.name===n.name)?r.map(a=>a.name===n.name?{...a,...n}:a):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(a=>a.name===n.name),o=t().files.length===TA;if(!(!i&&o)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:a,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:a,instance:n,status:"uploaded"})}catch(a){console.error("Error sending file:",a),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),Lo=Hn()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)}))})),$A=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=jo(w=>w.eventEmitter),[u,c]=A.useState(!1),[f,p]=A.useState(!1),[d,m]=A.useState(!1),{message:{blocks:{button:h}}}=ye;A.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[l,r,i]);const g={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}c(!0),i||m(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":u?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?T.jsx("a",{...g,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):T.jsx("button",{...g,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},mv=A.createContext(null);function OA(){const e=A.useContext(mv);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const vv=A.createContext({open:void 0,showModal:void 0,hideModal:void 0});function Ul(){return A.useContext(vv)}const gv=A.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:i,feedback:o,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:u,...c},f)=>{const[p,d]=A.useState(""),{showModal:m,hideModal:h}=Ul(),{message:{blocks:{bubble:{container:y,feedbackContainer:g,feedbackIcon:b}}}}=ye;return t=="incoming"?T.jsxs("div",{"data-direction":"incoming","data-feedback":!!o,...c,...y,ref:f,children:[T.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l}}),u&&m&&h&&e.type==="text"&&T.jsxs("div",{...g,children:[T.jsx(KP,{...b,"data-selected":o==="positive",onClick:()=>{u(i,{value:"positive"})}}),T.jsx(qP,{...b,"data-selected":o==="negative",onClick:()=>m({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButton:"Send feedback",cancelButton:"Cancel",onConfirm:()=>{u(i,{value:"negative",comment:p}),h()},content:T.jsx(IA,{setFeedbackComment:d})})})]})]}):T.jsx("div",{"data-direction":"outgoing",...c,...y,ref:f,children:T.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:u}})})});gv.displayName="Bubble";const IA=({setFeedbackComment:e})=>{const{modal:{dialog:{content:t}}}=ye;return T.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Rt.apply(this,arguments)};function yv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function dr(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function pr(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function bv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Hl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function PA(){var e=A.useRef(!1),t=A.useCallback(function(){return e.current},[]);return A.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function AA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=A.useRef(0),i=PA(),o=A.useState(n),a=o[0],s=o[1],l=A.useCallback(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var f=++r.current;return a.loading||s(function(p){return Rt(Rt({},p),{loading:!0})}),e.apply(void 0,u).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function xv(e,t){t===void 0&&(t=[]);var n=AA(e,t,{loading:!0}),r=n[0],i=n[1];return A.useEffect(function(){i()},[i]),r}const wv=A.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const o=A.useId(),{setIsLoading:a}=OA(),[s,l]=A.useState(n),[u,c]=A.useState(!1),{message:{blocks:{image:f}}}=ye;return A.useLayoutEffect(()=>{a(p=>[...p,o])},[]),xv(async()=>{if(e){try{const{width:p,height:d}=await VE(e);s==="auto"&&l(RA(p,d))}catch(p){l("square"),console.error(p)}a(p=>p.filter(d=>d!==o))}},[e]),T.jsxs(T.Fragment,{children:[u?null:T.jsx("div",{"data-orientation":s,...f.placeholder}),T.jsx("img",{"data-orientation":s,"data-loaded":u,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});wv.displayName="Image";function RA(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const Sv=A.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=ye;return T.jsx("div",{children:T.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});Sv.displayName="Video";const Ev=A.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=ye;return T.jsx("div",{children:T.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});Ev.displayName="Audio";const kv=A.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},o)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=ye;return T.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:o,children:[T.jsx("p",{...s.title,children:n}),T.jsx(BP,{...s.icon})]})});kv.displayName="Location";const Cv=A.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,messageId:a,isReadOnly:s,sendMessage:l,...u},c)=>{const{message:{blocks:{column:f}}}=ye;return T.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...f,ref:c,children:e.map((p,d)=>T.jsx(Kn,{block:{...p,direction:r,timestamp:o,sender:i,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Cv.displayName="Column";const Tv=A.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,metadata:a,messageId:s,isReadOnly:l,sendMessage:u,...c},f)=>{const{message:{blocks:{row:p}}}=ye;return T.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...p,ref:f,children:e.map((d,m)=>T.jsx(Kn,{block:{...d,direction:r,timestamp:o,sender:i,messageId:s,isReadOnly:l,sendMessage:u}},m))})});Tv.displayName="Row";function DA(e){return Object.prototype.toString.call(e)==="[object Object]"}function $v(e){return DA(e)||Array.isArray(e)}function _A(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Vl(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!$v(s)||!$v(l)?s===l:Vl(s,l)})}function Ov(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function MA(e,t){if(e.length!==t.length)return!1;const n=Ov(e),r=Ov(t);return n.every((i,o)=>{const a=r[o];return Vl(i,a)})}function ql(e){return typeof e=="number"}function Iv(e){return typeof e=="string"}function Kl(e){return typeof e=="boolean"}function Pv(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return Math.abs(e)}function Gl(e){return Math.sign(e)}function Fo(e,t){return ze(e-t)}function NA(e,t){if(e===0||t===0||ze(e)<=ze(t))return 0;const n=Fo(ze(e),ze(t));return ze(n/e)}function hi(e){return zo(e).map(Number)}function dn(e){return e[Bo(e)]}function Bo(e){return Math.max(0,e.length-1)}function zo(e){return Object.keys(e)}function Av(e,t){return[e,t].reduce((n,r)=>(zo(r).forEach(i=>{const o=n[i],a=r[i],s=Pv(o)&&Pv(a);n[i]=s?Av(o,a):a}),n),{})}function Rv(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function jA(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(u){return o(u)/2}function o(u){return t-u}function a(){return t*Number(e)}function s(u){return ql(e)?a():n[e](u)}return{measure:s}}function LA(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function En(e,t){const n=ze(e-t);function r(u){return u<e}function i(u){return u>t}function o(u){return r(u)||i(u)}function a(u){return o(u)?r(u)?e:t:u}function s(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function Dv(e,t,n){const{constrain:r}=En(0,e),i=e+1;let o=a(t);function a(p){return n?ze((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),f}function u(p){return c().set(s()+p)}function c(){return Dv(e,s(),n)}const f={get:s,set:l,add:u,clone:c};return f}function FA(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function mi(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function BA(e,t,n,r,i,o,a,s,l,u,c,f,p,d,m,h,y,g,b){const{cross:w}=e,C=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=mi(),O=mi(),j=En(50,225).constrain(m.measure(20)),M={mouse:300,touch:400},$={mouse:500,touch:600},D=h?43:25;let U=!1,F=0,L=0,N=!1,B=!1,Y=!1,H=!1;function R(Q,q){if(!q)return;function ne(fe){(Kl(q)||q(Q,fe))&&V(fe)}const ae=n;E.add(ae,"dragstart",fe=>fe.preventDefault(),S).add(ae,"touchmove",()=>{},S).add(ae,"touchend",()=>{}).add(ae,"touchstart",ne).add(ae,"mousedown",ne).add(ae,"touchcancel",G).add(ae,"contextmenu",G).add(ae,"click",X,!0)}function v(){E.clear(),O.clear()}function P(){const Q=H?r:n;O.add(Q,"touchmove",K,S).add(Q,"touchend",G).add(Q,"mousemove",K,S).add(Q,"mouseup",G)}function I(Q){const q=Q.nodeName||"";return C.includes(q)}function x(){return(h?$:M)[H?"mouse":"touch"]}function _(Q,q){const ne=p.add(Gl(Q)*-1),ae=f.byDistance(Q,!h).distance;return h||ze(Q)<j?ae:g&&q?ae*.5:f.byIndex(ne.get(),0).distance}function V(Q){const q=Rv(Q,i);H=q,!(q&&Q.button!==0)&&(I(Q.target)||(Y=h&&q&&!Q.buttons&&U,U=Fo(o.get(),s.get())>=2,N=!0,a.pointerDown(Q),c.useFriction(0).useDuration(0),o.set(s),P(),F=a.readPoint(Q),L=a.readPoint(Q,w),d.emit("pointerDown")))}function K(Q){const q=a.readPoint(Q),ne=a.readPoint(Q,w),ae=Fo(q,F),fe=Fo(ne,L);if(!B&&!H&&(!Q.cancelable||(B=ae>fe,!B)))return G(Q);const ie=a.pointerMove(Q);ae>y&&(Y=!0),c.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(ie)),Q.preventDefault()}function G(Q){const ne=f.byDistance(0,!1).index!==p.get(),ae=a.pointerUp(Q)*x(),fe=_(t.apply(ae),ne),ie=NA(ae,fe),pe=D-10*ie,ge=b+ie/50;B=!1,N=!1,O.clear(),c.useDuration(pe).useFriction(ge),u.distance(fe,!h),H=!1,d.emit("pointerUp")}function X(Q){Y&&(Q.stopPropagation(),Q.preventDefault())}function Z(){return N}return{init:R,pointerDown:Z,destroy:v}}function zA(e,t){let r,i;function o(f){return f.timeStamp}function a(f,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Rv(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,a(f)}function l(f){const p=a(f)-a(i),d=o(f)-o(r)>170;return i=f,d&&(r=f),p}function u(f){if(!r||!i)return 0;const p=a(i)-a(r),d=o(f)-o(r),m=o(f)-o(i)>170,h=p/d;return d&&!m&&ze(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:a}}function WA(e){function t(r){return e*(r/100)}return{measure:t}}function UA(e,t,n,r,i){let o,a,s=[],l=!1;function u(d){return i.measureSize(d.getBoundingClientRect())}function c(d,m){if(!m)return;a=u(e),s=r.map(u);function h(g){for(const b of g){const w=b.target===e,C=r.indexOf(b.target),S=w?a:s[C],E=u(w?e:r[C]);if(S!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(g=>{l||(Kl(m)||m(d,g))&&h(g)}),[e].concat(r).forEach(g=>o.observe(g))}function f(){o&&o.disconnect(),l=!0}return{init:c,destroy:f}}function HA(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,u=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let O=0;return E?(o=0,e.set(t),O=S):(o+=S/s,o*=l,u+=o,e.add(o),O=u-c),a=Gl(O),c=u,i=ze(S)<.001,C}function p(){return i}function d(){return s}function m(){return a}function h(){return o}function y(){return b(n)}function g(){return w(r)}function b(S){return s=S,C}function w(S){return l=S,C}const C={direction:m,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:g,useBaseDuration:y,useFriction:w,useDuration:b};return C}function VA(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=En(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",h=ze(e[m]-t.get()),y=n.get()-t.get(),g=s.constrain(h/a);n.subtract(y*g),!d&&ze(y)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:c,toggleActive:f}}function qA(e,t,n,r){const i=En(-t+e,n[0]),o=l(),a=u();function s(){const f=o[0],p=dn(o),d=o.lastIndexOf(f),m=o.indexOf(p)+1;return En(d,m)}function l(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function u(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:f,max:p}=s();return o.slice(f,p)}return{snapsContained:a}}function KA(e,t,n){const r=t[0],i=n?r-e:dn(t);return{limit:En(i,r)}}function GA(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=En(o,a);function u(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function c(p){if(!u(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:c}}function YA(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function XA(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:u}=o,c=d().map(t.measure),f=m(),p=h();function d(){return u(r).map(g=>dn(g)[l]-g[0][s]).map(ze)}function m(){return r.map(g=>n[s]-g[s]).map(g=>-ze(g))}function h(){const b=dn(f)-dn(i);return u(f).map(w=>w[0]).map((w,C,S)=>{const E=!C,O=C===Bo(S);return a&&E?0:a&&O?b:w+c[C]})}return{snaps:f,snapsAligned:p}}function JA(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(m){return m.concat().sort((h,y)=>ze(h)-ze(y))[0]}function u(m){const h=e?a(m):s(m),y=t.map(b=>b-h).map(b=>c(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>ze(b.diff)-ze(w.diff)),{index:g}=y[0];return{index:g,distance:h}}function c(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return l(y);const g=y.filter(b=>Gl(b)===h);return l(g)}function f(m,h){const y=t[m]-i.get(),g=c(y,h);return{index:m,distance:g}}function p(m,h){const y=i.get()+m,{index:g,distance:b}=u(y),w=!e&&o(y);if(!h||w)return{index:g,distance:m};const C=t[g]-b,S=m+c(C,0);return{index:g,distance:S}}return{byDistance:p,byIndex:f,shortcut:c}}function QA(e,t,n,r,i,o,a){function s(f){const p=f.distance,d=f.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function l(f,p){const d=r.byDistance(f,p);s(d)}function u(f,p){const d=t.clone().set(f),m=r.byIndex(d.get(),p);s(m)}return{distance:l,index:u}}function Wo(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return ql(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function _v(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function u(p){o=!p}function c(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function ZA(e,t,n,r,i,o,a,s,l){const u=hi(i),c=hi(i).reverse(),f=h().concat(y());function p(S,E){return S.reduce((O,j)=>O-i[j],E)}function d(S,E){return S.reduce((O,j)=>p(O,E)>0?O.concat([j]):O,[])}function m(S,E){const O=E==="start",j=O?-r:r,M=a.findSlideBounds([j]);return S.map($=>{const D=O?0:-r,U=O?r:0,L=M.filter(N=>N.index===$)[0][O?"end":"start"];return{index:$,slideLocation:Wo(-1),translate:_v(e,t,l[$]),target:()=>s.get()>L?D:U}})}function h(){const S=o[0]-1,E=d(c,S);return m(E,"end")}function y(){const S=n-o[0]-1,E=d(u,S);return m(E,"start")}function g(){return f.every(({index:S})=>{const E=u.filter(O=>O!==S);return p(E,n)<=.1})}function b(){f.forEach(S=>{const{target:E,translate:O,slideLocation:j}=S,M=E();M!==j.get()&&(O.to(M),j.set(M))})}function w(){f.forEach(S=>S.translate.clear())}return{canLoop:g,clear:w,loop:b,loopPoints:f}}function eR(e,t){let n,r=!1;function i(s,l){if(!l)return;function u(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(Kl(l)||l(s,c))&&u(c)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function tR(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,u=.5,c=o?[0,t,-t]:[0],f=d(c,a);function p(y){const g=y||0;return n.map(b=>En(u,b-u).constrain(b*g))}function d(y,g){const b=y||c,w=p(g);return b.reduce((C,S)=>{const E=r.map((O,j)=>({start:O-n[j]+w[j]+S,end:O+e-w[j]+S,index:j}));return C.concat(E)},[])}function m(y,g){const b=o?s(y):l(y);return(g||f).reduce((C,S)=>{const{index:E,start:O,end:j}=S,M=C.includes(E),$=O<b&&j>b;return!M&&$?C.concat([E]):C},[])}return{check:m,findSlideBounds:d}}function nR(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&i,c=m(),f=h(),p=n.map(a),d=y();function m(){if(!u)return 0;const b=n[0];return ze(t[s]-b[s])}function h(){if(!u)return 0;const b=o.getComputedStyle(dn(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function y(){return n.map((b,w,C)=>{const S=!w,E=w===Bo(C);return S?p[w]+c:E?p[w]+f:C[w+1][s]-b[s]}).map(ze)}return{slideSizes:p,slideSizesWithGaps:d}}function rR(e,t,n){const r=ql(n);function i(l,u){return hi(l).filter(c=>c%u===0).map(c=>l.slice(c,c+u))}function o(l){return hi(l).reduce((u,c)=>{const p=t.slice(dn(u),c+1).reduce((d,m)=>d+m,0);return!c||p>e?u.concat(c):u},[]).map((u,c,f)=>l.slice(u,f[c+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function iR(e,t,n,r,i,o,a,s){const{align:l,axis:u,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:g,skipSnaps:b,containScroll:w}=o,C=t.getBoundingClientRect(),S=n.map(ge=>ge.getBoundingClientRect()),E=FA(c),O=LA(u,c),j=O.measureSize(C),M=WA(j),$=jA(l,j),D=!d&&!!w,U=d||!!w,{slideSizes:F,slideSizesWithGaps:L}=nR(O,C,S,n,U,i),N=rR(j,L,g),{snaps:B,snapsAligned:Y}=XA(O,$,C,S,L,N,D),H=-dn(B)+dn(L),{snapsContained:R}=qA(j,H,Y,w),v=D?R:Y,{limit:P}=KA(H,v,d),I=Dv(Bo(v),f,d),x=I.clone(),_=hi(n),V=({dragHandler:ge,scrollBody:Me,scrollBounds:et,eventHandler:wt,animation:Mt,options:{loop:St}})=>{const re=ge.pointerDown();St||et.constrain(re);const le=Me.seek().settled();le&&!re&&(Mt.stop(),wt.emit("settle")),le||wt.emit("scroll")},K=({scrollBody:ge,translate:Me,location:et,offsetLocation:wt,scrollLooper:Mt,slideLooper:St,options:{loop:re}},le)=>{const W=ge.velocity();wt.set(et.get()-W+W*le),re&&(Mt.loop(ge.direction()),St.loop()),Me.to(wt.get())},G={start:()=>s.start(pe),stop:()=>s.stop(pe),update:()=>V(pe),render:ge=>K(pe,ge)},X=.68,Z=v[I.get()],J=Wo(Z),Q=Wo(Z),q=Wo(Z),ne=HA(J,q,m,X),ae=JA(d,v,H,P,q),fe=QA(G,I,x,ae,ne,q,a),ie=tR(j,H,F,B,P,d,p),pe={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:C,slideRects:S,animation:G,axis:O,direction:E,dragHandler:BA(O,E,e,r,i,q,zA(O,i),J,G,fe,ne,ae,I,a,M,h,y,b,X),eventStore:mi(),percentOfView:M,index:I,indexPrevious:x,limit:P,location:J,offsetLocation:Q,options:o,resizeHandler:UA(t,a,i,n,O),scrollBody:ne,scrollBounds:VA(P,J,q,ne,M),scrollLooper:GA(H,P,Q,[J,Q,q]),scrollProgress:YA(P),scrollSnaps:v,scrollTarget:ae,scrollTo:fe,slideLooper:ZA(O,E,j,H,L,v,ie,Q,n),slidesHandler:eR(t,a),slidesInView:ie,slideIndexes:_,slidesToScroll:N,target:q,translate:_v(O,E,t)};return pe}function oR(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const d=ze(i/t);n.forEach(({animation:m})=>m.render(d)),o&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!o&&(o=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function u(){r=null,i=0}return{start:s,stop:l,reset:u,window:e}}function aR(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(u=>u(t,l)),s}function o(l,u){return e[l]=r(l).concat([u]),s}function a(l,u){return e[l]=r(l).filter(c=>c!==u),s}const s={init:n,emit:i,off:a,on:o};return s}const sR={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function lR(e){function t(o,a){return Av(o,a||{})}function n(o){const a=o.breakpoints||{},s=zo(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,u)=>t(l,u),{});return t(o,s)}function r(o){return o.map(a=>zo(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function uR(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function hr(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=lR(i),a=uR(o),s=mi(),l=mi(),u=aR(),{animationRealms:c}=hr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=o,{on:m,off:h,emit:y}=u,g=F;let b=!1,w,C=f(sR,hr.globalOptions),S=f(C),E=[],O,j,M;function $(){const{container:ne,slides:ae}=S;j=(Iv(ne)?e.querySelector(ne):ne)||e.children[0];const ie=Iv(ae)?j.querySelectorAll(ae):ae;M=[].slice.call(ie||j.children)}function D(ne,ae){const fe=iR(e,j,M,r,i,ne,u,ae);if(ne.loop&&!fe.slideLooper.canLoop()){const ie=Object.assign({},ne,{loop:!1});return D(ie,ae)}return fe}function U(ne,ae){if(b)return;const fe=c.find(pe=>pe.window===i),ie=fe||oR(i);fe||c.push(ie),C=f(C,ne),S=p(C),E=ae||E,$(),w=D(S,ie),d([C,...E.map(({options:pe})=>pe)]).forEach(pe=>s.add(pe,"change",F)),S.active&&(w.translate.to(w.location.get()),w.eventHandler.init(q),w.resizeHandler.init(q,S.watchResize),w.slidesHandler.init(q,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&ie.reset()}),w.options.loop&&w.slideLooper.loop(),j.offsetParent&&M.length&&w.dragHandler.init(q,S.watchDrag),O=a.init(E,q))}function F(ne,ae){const fe=V();L(),U(f({startIndex:fe},ne),ae),u.emit("reInit")}function L(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function N(){b||(b=!0,s.clear(),L(),u.emit("destroy"))}function B(ne){const ae=w[ne?"target":"location"].get(),fe=S.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[fe](ae))}function Y(ne){const ae=B(ne);return w.slideIndexes.filter(fe=>!ae.includes(fe))}function H(ne,ae,fe){!S.active||b||(w.scrollBody.useBaseFriction().useDuration(ae?0:S.duration),w.scrollTo.index(ne,fe||0))}function R(ne){const ae=w.index.add(1).get();H(ae,ne===!0,-1)}function v(ne){const ae=w.index.add(-1).get();H(ae,ne===!0,1)}function P(){return w.index.add(1).get()!==V()}function I(){return w.index.add(-1).get()!==V()}function x(){return w.scrollSnaps.map(w.scrollProgress.get)}function _(){return w.scrollProgress.get(w.location.get())}function V(){return w.index.get()}function K(){return w.indexPrevious.get()}function G(){return O}function X(){return w}function Z(){return e}function J(){return j}function Q(){return M}const q={canScrollNext:P,canScrollPrev:I,containerNode:J,internalEngine:X,destroy:N,off:h,on:m,emit:y,plugins:G,previousScrollSnap:K,reInit:g,rootNode:Z,scrollNext:R,scrollPrev:v,scrollProgress:_,scrollSnapList:x,scrollTo:H,selectedScrollSnap:V,slideNodes:Q,slidesInView:B,slidesNotInView:Y};return U(t,n),setTimeout(()=>u.emit("init"),0),q}hr.animationRealms=[],hr.globalOptions=void 0;function Yl(e={},t=[]){const n=A.useRef(e),r=A.useRef(t),[i,o]=A.useState(),[a,s]=A.useState(),l=A.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return A.useEffect(()=>{if(_A()&&a){hr.globalOptions=Yl.globalOptions;const u=hr(a,n.current,r.current);return o(u),()=>u.destroy()}else o(void 0)},[a,o]),A.useEffect(()=>{Vl(n.current,e)||(n.current=e,l())},[e,l]),A.useEffect(()=>{MA(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}Yl.globalOptions=void 0;const Mv=A.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:i,isReadOnly:o,sendMessage:a,addMessageFeedback:s},l)=>{const[u,c]=Yl({skipSnaps:!0,loop:!0}),[f,p]=A.useState(!0),[d,m]=A.useState(!0),h=A.useCallback(()=>c==null?void 0:c.scrollPrev(),[c]),y=A.useCallback(()=>c==null?void 0:c.scrollNext(),[c]),{message:{blocks:{carousel:g}}}=ye,b=A.useCallback(w=>{p(!w.canScrollPrev()),m(!w.canScrollNext())},[]);return A.useEffect(()=>{c&&(b(c),c.on("reInit",b),c.on("select",b))},[c,b]),T.jsxs("div",{...g==null?void 0:g.container,"data-container":"carousel",ref:u,children:[T.jsx("div",{ref:l,...g==null?void 0:g.slidesContainer,children:e.map((w,C)=>T.jsx(Kn,{block:{...w,direction:t,timestamp:r,sender:n,messageId:i,sendMessage:a,isReadOnly:o}},C))}),e.length>1&&T.jsxs(T.Fragment,{children:[T.jsx(IP,{...g==null?void 0:g.backButton,"data-disabled":f?"":void 0,onClick:h}),T.jsx(PP,{...g==null?void 0:g.nextButton,"data-disabled":d?"":void 0,onClick:y})]})]})});Mv.displayName="Carousel";const Nv=Math.floor;function jv(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function vi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cR(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return e instanceof Node||e instanceof vi(e).Node}function Dt(e){return e instanceof Element||e instanceof vi(e).Element}function mr(e){return e instanceof HTMLElement||e instanceof vi(e).HTMLElement}function Xl(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vi(e).ShadowRoot}function fR(e){return["html","body","#document"].includes(jv(e))}function dR(e){return vi(e).getComputedStyle(e)}function pR(e){if(jv(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xl(e)&&e.host||cR(e);return Xl(t)?t.host:t}function kn(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function vt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Xl(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Fv(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function hR(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Bv(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Fv())||t.test(hR()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function zv(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Wv(){return/apple/i.test(navigator.vendor)}function mR(){return Fv().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Uv(e,t){return["mouse","pen"].includes(e)}function vR(e){return"nativeEvent"in e}function gR(e){return e.matches("html,body")}function Lt(e){return(e==null?void 0:e.ownerDocument)||document}function Jl(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Hv(e){return"composedPath"in e?e.composedPath()[0]:e.target}const yR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vv(e){return mr(e)&&e.matches(yR)}function it(e){e.preventDefault(),e.stopPropagation()}const vr=Math.min,kt=Math.max,Uo=Math.round,Ho=Math.floor,Jt=e=>({x:e,y:e});function qv(e,t,n){return kt(e,vr(t,n))}function Vo(e,t){return typeof e=="function"?e(t):e}function gi(e){return e.split("-")[0]}function Ql(e){return e.split("-")[1]}function Kv(e){return e==="x"?"y":"x"}function bR(e){return e==="y"?"height":"width"}function yi(e){return["top","bottom"].includes(gi(e))?"y":"x"}function xR(e){return Kv(yi(e))}function wR(e){return{top:0,right:0,bottom:0,left:0,...e}}function SR(e){return typeof e!="number"?wR(e):{top:e,right:e,bottom:e,left:e}}function qo(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Gv(e,t,n){let{reference:r,floating:i}=e;const o=yi(t),a=xR(t),s=bR(a),l=gi(t),u=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Ql(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const ER=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=Gv(u,r,l),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:g}=s[h],{x:b,y:w,data:C,reset:S}=await g({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,f=w??f,d={...d,[y]:{...d[y],...C}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=Gv(u,p,l)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function Yv(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Vo(t,e),m=SR(d),y=s[p?f==="floating"?"reference":"floating":f],g=qo(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=qo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(g.top-S.top+m.top)/C.y,bottom:(S.bottom-g.bottom+m.bottom)/C.y,left:(g.left-S.left+m.left)/C.x,right:(S.right-g.right+m.right)/C.x}}async function kR(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=gi(n),s=Ql(n),l=yi(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,f=Vo(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}const CR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await kR(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},TR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:g,y:b}=y;return{x:g,y:b}}},...l}=Vo(e,t),u={x:n,y:r},c=await Yv(t,l),f=yi(gi(i)),p=Kv(f);let d=u[p],m=u[f];if(o){const y=p==="y"?"top":"left",g=p==="y"?"bottom":"right",b=d+c[y],w=d-c[g];d=qv(b,d,w)}if(a){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=m+c[y],w=m-c[g];m=qv(b,m,w)}const h=s.fn({...t,[p]:d,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[f]:a}}}}}},$R=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=Vo(e,t),c=await Yv(t,u),f=gi(i),p=Ql(i),d=yi(i)==="y",{width:m,height:h}=o.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,y=p==="end"?"top":"bottom");const b=h-c.top-c.bottom,w=m-c.left-c.right,C=vr(h-c[y],b),S=vr(m-c[g],w),E=!t.middlewareData.shift;let O=C,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=b),E&&!p){const $=kt(c.left,0),D=kt(c.right,0),U=kt(c.top,0),F=kt(c.bottom,0);d?j=m-2*($!==0||D!==0?$+D:kt(c.left,c.right)):O=h-2*(U!==0||F!==0?U+F:kt(c.top,c.bottom))}await l({...t,availableWidth:j,availableHeight:O});const M=await a.getDimensions(s.floating);return m!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}};function Ko(){return typeof window<"u"}function gr(e){return Xv(e)?(e.nodeName||"").toLowerCase():"#document"}function Ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qt(e){var t;return(t=(Xv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xv(e){return Ko()?e instanceof Node||e instanceof Ct(e).Node:!1}function Ft(e){return Ko()?e instanceof Element||e instanceof Ct(e).Element:!1}function Zt(e){return Ko()?e instanceof HTMLElement||e instanceof Ct(e).HTMLElement:!1}function Jv(e){return!Ko()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ct(e).ShadowRoot}function bi(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function OR(e){return["table","td","th"].includes(gr(e))}function Go(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Zl(e){const t=eu(),n=Ft(e)?Bt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function IR(e){let t=Cn(e);for(;Zt(t)&&!yr(t);){if(Zl(t))return t;if(Go(t))return null;t=Cn(t)}return null}function eu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yr(e){return["html","body","#document"].includes(gr(e))}function Bt(e){return Ct(e).getComputedStyle(e)}function Yo(e){return Ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cn(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jv(e)&&e.host||Qt(e);return Jv(t)?t.host:t}function Qv(e){const t=Cn(e);return yr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&bi(t)?t:Qv(t)}function Tn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Qv(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ct(i);if(o){const s=tu(a);return t.concat(a,a.visualViewport||[],bi(i)?i:[],s&&n?Tn(s):[])}return t.concat(i,Tn(i,[],n))}function tu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zv(e){const t=Bt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Uo(n)!==o||Uo(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function nu(e){return Ft(e)?e:e.contextElement}function br(e){const t=nu(e);if(!Zt(t))return Jt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Zv(t);let a=(o?Uo(n.width):n.width)/r,s=(o?Uo(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const PR=Jt(0);function eg(e){const t=Ct(e);return!eu()||!t.visualViewport?PR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ct(e)?!1:t}function qn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=nu(e);let a=Jt(1);t&&(r?Ft(r)&&(a=br(r)):a=br(e));const s=AR(o,n,r)?eg(o):Jt(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const p=Ct(o),d=r&&Ft(r)?Ct(r):r;let m=p,h=tu(m);for(;h&&r&&d!==m;){const y=br(h),g=h.getBoundingClientRect(),b=Bt(h),w=g.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,C=g.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,f*=y.y,l+=w,u+=C,m=Ct(h),h=tu(m)}}return qo({width:c,height:f,x:l,y:u})}function ru(e,t){const n=Yo(e).scrollLeft;return t?t.left+n:qn(Qt(e)).left+n}function tg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ru(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function RR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Qt(r),s=t?Go(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Jt(1);const c=Jt(0),f=Zt(r);if((f||!f&&!o)&&((gr(r)!=="body"||bi(a))&&(l=Yo(r)),Zt(r))){const d=qn(r);u=br(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const p=a&&!f&&!o?tg(a,l,!0):Jt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function DR(e){return Array.from(e.getClientRects())}function _R(e){const t=Qt(e),n=Yo(e),r=e.ownerDocument.body,i=kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ru(e);const s=-n.scrollTop;return Bt(r).direction==="rtl"&&(a+=kt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function MR(e,t){const n=Ct(e),r=Qt(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=eu();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function NR(e,t){const n=qn(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Zt(e)?br(e):Jt(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function ng(e,t,n){let r;if(t==="viewport")r=MR(e,n);else if(t==="document")r=_R(Qt(e));else if(Ft(t))r=NR(t,n);else{const i=eg(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return qo(r)}function rg(e,t){const n=Cn(e);return n===t||!Ft(n)||yr(n)?!1:Bt(n).position==="fixed"||rg(n,t)}function jR(e,t){const n=t.get(e);if(n)return n;let r=Tn(e,[],!1).filter(s=>Ft(s)&&gr(s)!=="body"),i=null;const o=Bt(e).position==="fixed";let a=o?Cn(e):e;for(;Ft(a)&&!yr(a);){const s=Bt(a),l=Zl(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||bi(a)&&!l&&rg(e,a))?r=r.filter(c=>c!==a):i=s,a=Cn(a)}return t.set(e,r),r}function LR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Go(t)?[]:jR(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const f=ng(t,c,i);return u.top=kt(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=kt(f.left,u.left),u},ng(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function FR(e){const{width:t,height:n}=Zv(e);return{width:t,height:n}}function BR(e,t,n){const r=Zt(t),i=Qt(t),o=n==="fixed",a=qn(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Jt(0);function u(){l.x=ru(i)}if(r||!r&&!o)if((gr(t)!=="body"||bi(i))&&(s=Yo(t)),r){const d=qn(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?tg(i,s):Jt(0),f=a.left+s.scrollLeft-l.x-c.x,p=a.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function iu(e){return Bt(e).position==="static"}function ig(e,t){if(!Zt(e)||Bt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qt(e)===n&&(n=n.ownerDocument.body),n}function og(e,t){const n=Ct(e);if(Go(e))return n;if(!Zt(e)){let i=Cn(e);for(;i&&!yr(i);){if(Ft(i)&&!iu(i))return i;i=Cn(i)}return n}let r=ig(e,t);for(;r&&OR(r)&&iu(r);)r=ig(r,t);return r&&yr(r)&&iu(r)&&!Zl(r)?n:r||IR(e)||n}const zR=async function(e){const t=this.getOffsetParent||og,n=this.getDimensions,r=await n(e.floating);return{reference:BR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WR(e){return Bt(e).direction==="rtl"}const UR={convertOffsetParentRelativeRectToViewportRelativeRect:RR,getDocumentElement:Qt,getClippingRect:LR,getOffsetParent:og,getElementRects:zR,getClientRects:DR,getDimensions:FR,getScale:br,isElement:Ft,isRTL:WR};function ag(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HR(e,t){let n=null,r;const i=Qt(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:d}=u;if(s||t(),!p||!d)return;const m=Ho(f),h=Ho(i.clientWidth-(c+p)),y=Ho(i.clientHeight-(f+d)),g=Ho(c),w={rootMargin:-m+"px "+-h+"px "+-y+"px "+-g+"px",threshold:kt(0,vr(1,l))||1};let C=!0;function S(E){const O=E[0].intersectionRatio;if(O!==l){if(!C)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!ag(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return a(!0),o}function VR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=nu(e),c=i||o?[...u?Tn(u):[],...Tn(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=u&&s?HR(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(g=>{let[b]=g;b&&b.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let m,h=l?qn(e):null;l&&y();function y(){const g=qn(e);h&&!ag(h,g)&&n(),h=g,m=requestAnimationFrame(y)}return n(),()=>{var g;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const qR=CR,KR=TR,GR=$R,YR=(e,t,n)=>{const r=new Map,i={platform:UR,...n},o={...i.platform,_c:r};return ER(e,t,{...i,platform:o})};var Xo=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Jo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Jo(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function sg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lg(e,t){const n=sg(e);return Math.round(t*n)/n}function ou(e){const t=k.useRef(e);return Xo(()=>{t.current=e}),t}function XR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=k.useState(r);Jo(p,r)||d(r);const[m,h]=k.useState(null),[y,g]=k.useState(null),b=k.useCallback(H=>{H!==E.current&&(E.current=H,h(H))},[]),w=k.useCallback(H=>{H!==O.current&&(O.current=H,g(H))},[]),C=o||m,S=a||y,E=k.useRef(null),O=k.useRef(null),j=k.useRef(c),M=l!=null,$=ou(l),D=ou(i),U=ou(u),F=k.useCallback(()=>{if(!E.current||!O.current)return;const H={placement:t,strategy:n,middleware:p};D.current&&(H.platform=D.current),YR(E.current,O.current,H).then(R=>{const v={...R,isPositioned:U.current!==!1};L.current&&!Jo(j.current,v)&&(j.current=v,Yd.flushSync(()=>{f(v)}))})},[p,t,n,D,U]);Xo(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[u]);const L=k.useRef(!1);Xo(()=>(L.current=!0,()=>{L.current=!1}),[]),Xo(()=>{if(C&&(E.current=C),S&&(O.current=S),C&&S){if($.current)return $.current(C,S,F);F()}},[C,S,F,$,M]);const N=k.useMemo(()=>({reference:E,floating:O,setReference:b,setFloating:w}),[b,w]),B=k.useMemo(()=>({reference:C,floating:S}),[C,S]),Y=k.useMemo(()=>{const H={position:n,left:0,top:0};if(!B.floating)return H;const R=lg(B.floating,c.x),v=lg(B.floating,c.y);return s?{...H,transform:"translate("+R+"px, "+v+"px)",...sg(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:v}},[n,s,B.floating,c.x,c.y]);return k.useMemo(()=>({...c,update:F,refs:N,elements:B,floatingStyles:Y}),[c,F,N,B,Y])}const JR=(e,t)=>({...qR(e),options:[e,t]}),QR=(e,t)=>({...KR(e),options:[e,t]}),ZR=(e,t)=>({...GR(e),options:[e,t]});/*!
|
|
277
|
+
`);const b=v.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&d(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(ta(l.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(ta(l.name));case"ROLLBACK":return uu(h.state,v=>{if(s===void 0){d(v),c==null||c.init(i.getState());return}d(v[s]),c==null||c.init(ta(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return uu(h.state,v=>{if(s===void 0){d(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&d(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,b=(g=v.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return p=!p}return}}),m},uu=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Tv(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Pi=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Pi(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Pi(r)(n)}}}},zA=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,v)=>({...v,...g}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...g)},r,i);const c=Pi(o.serialize),f=()=>{const g=o.partialize({...r()});let v;const b=c({state:g,version:o.version}).then(x=>u.setItem(o.name,x)).catch(x=>{v=x});if(v)throw v;return b},p=i.setState;i.setState=(g,v)=>{p(g,v),f()};const d=e((...g)=>{n(...g),f()},r,i);let m;const h=()=>{var g;if(!u)return;a=!1,s.forEach(b=>b(r()));const v=((g=o.onRehydrateStorage)==null?void 0:g.call(o,r()))||void 0;return Pi(u.getItem.bind(u))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var x;return m=o.merge(b,(x=r())!=null?x:d),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),a=!0,l.forEach(b=>b(m))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:g=>{o={...o,...g},g.getStorage&&(u=g.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),m||d},WA=(e,t)=>(n,r,i)=>{let o={storage:Tv(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},f=i.setState;i.setState=(h,g)=>{f(h,g),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const m=()=>{var h,g;if(!u)return;a=!1,s.forEach(b=>{var x;return b((x=r())!=null?x:p)});const v=((g=o.onRehydrateStorage)==null?void 0:g.call(o,(h=r())!=null?h:p))||void 0;return Pi(u.getItem.bind(u))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return[!0,o.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var x;const[$,S]=b;if(d=o.merge(S,(x=r())!=null?x:p),n(d,!0),$)return c()}).then(()=>{v==null||v(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||m(),d||p},Ov=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ea?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),zA(e,t)):WA(e,t),Iv=or()(na(Ov(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let ra;const UA=new Uint8Array(16);function HA(){if(!ra&&(ra=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ra))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ra(UA)}const pt=[];for(let e=0;e<256;++e)pt.push((e+256).toString(16).slice(1));function VA(e,t=0){return pt[e[t+0]]+pt[e[t+1]]+pt[e[t+2]]+pt[e[t+3]]+"-"+pt[e[t+4]]+pt[e[t+5]]+"-"+pt[e[t+6]]+pt[e[t+7]]+"-"+pt[e[t+8]]+pt[e[t+9]]+"-"+pt[e[t+10]]+pt[e[t+11]]+pt[e[t+12]]+pt[e[t+13]]+pt[e[t+14]]+pt[e[t+15]]}const Pv={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qA(e,t,n){if(Pv.randomUUID&&!t&&!e)return Pv.randomUUID();e=e||{};const r=e.random||(e.rng||HA)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,VA(r)}function ia(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=Av(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const Av=e=>{switch(e.type){case"audio":return _v(e);case"card":return KA(e);case"carousel":return GA(e);case"choice":return YA(e);case"dropdown":return XA(e);case"file":return Rv(e);case"image":return Dv(e);case"location":return Mv(e);case"markdown":return Nv(e);case"text":return jv(e);case"video":return Lv(e);case"bloc":return JA(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},Ai=e=>({block:e,type:"bubble"}),_v=e=>({payload:{type:"audio",url:e.audioUrl}}),KA=e=>({payload:Ai(Fv(e))}),GA=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Fv({type:"card",...t}))}}),YA=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=qA(),i=Ai({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},XA=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:Ai({type:"column",blocks:r})}},Rv=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),Dv=e=>({payload:{type:"image",url:e.imageUrl}}),Mv=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),Nv=e=>({payload:Ai({type:"text",text:e.markdown})}),jv=e=>({payload:Ai({type:"text",text:e.text,value:e.value})}),Lv=e=>({payload:{type:"video",url:e.videoUrl}}),JA=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return _v({...n.payload,type:n.type}).payload;case"file":return Rv({...n.payload,type:n.type}).payload;case"image":return Dv({...n.payload,type:n.type}).payload;case"location":return Mv({...n.payload,type:n.type}).payload;case"markdown":return Nv({...n.payload,type:n.type}).payload;case"text":return jv({...n.payload,type:n.type}).payload;case"video":return Lv({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),Fv=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},ar=or()(na(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[o];if(o!==-1)return{messages:[...n.slice(0,o),{...a,...t},...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return e({isFetching:!1}),r.reverse().map(o=>ia(o)).filter(Boolean)}}),{name:"messagesStore"})),ZA=(e,t)=>or()(na(Ov(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:Tv(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),vi=class vi{constructor(){}static getInstance(t="bp-webchat",n){return vi._instances[t]||(vi._instances[t]=ZA(t,n)),vi._instances[t]}};$E(vi,"_instances",{});let cu=vi;const Bv=cu.getInstance,zv=()=>{const e={};return{on:(i,o)=>{var a;return e[i]||(e[i]=new Set),(a=e[i])==null||a.add(o),()=>{var s;return(s=e[i])==null?void 0:s.delete(o)}},emit:(i,o)=>{var a,s;(a=e[i])==null||a.forEach(l=>l(o)),(s=e["*"])==null||s.forEach(l=>l({type:i,payload:o}))},removeAllListeners:i=>{var o;i?(o=e[i])==null||o.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}},oa=or()(na(e=>({eventEmitter:zv(),messageContainerRef:I.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),QA=8,_i=or()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(a=>a.name===n.name)?r.map(a=>a.name===n.name?{...a,...n}:a):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(a=>a.name===n.name),o=t().files.length===QA;if(!(!i&&o)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:a,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:a,instance:n,status:"uploaded"})}catch(a){console.error("Error sending file:",a),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),aa=or()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)}))})),e_=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=oa(x=>x.eventEmitter),[u,c]=I.useState(!1),[f,p]=I.useState(!1),[d,m]=I.useState(!1),{message:{blocks:{button:h}}}=Se;I.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[l,r,i]);const v={...s,onClick:x=>{if((d||a)&&n==="link"){x.preventDefault();return}c(!0),i||m(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":u?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?C.jsx("a",{...v,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):C.jsx("button",{...v,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Wv=I.createContext(null);function t_(){const e=I.useContext(Wv);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Uv=I.createContext({open:void 0,showModal:void 0,hideModal:void 0});function fu(){return I.useContext(Uv)}const Hv=I.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:i,feedback:o,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:u,...c},f)=>{const[p,d]=I.useState(""),{showModal:m,hideModal:h}=fu(),{message:{blocks:{bubble:{container:g,feedbackContainer:v,feedbackIcon:b}}}}=Se;return t=="incoming"?C.jsxs("div",{"data-direction":"incoming","data-feedback":!!o,...c,...g,ref:f,children:[C.jsx(lr,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l}}),u&&m&&h&&e.type==="text"&&C.jsxs("div",{...v,children:[C.jsx(bA,{...b,"data-selected":o==="positive",onClick:()=>{u(i,{value:"positive"})}}),C.jsx(yA,{...b,"data-selected":o==="negative",onClick:()=>m({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButton:"Send feedback",cancelButton:"Cancel",onConfirm:()=>{u(i,{value:"negative",comment:p}),h()},content:C.jsx(n_,{setFeedbackComment:d})})})]})]}):C.jsx("div",{"data-direction":"outgoing",...c,...g,ref:f,children:C.jsx(lr,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:u}})})});Hv.displayName="Bubble";const n_=({setFeedbackComment:e})=>{const{modal:{dialog:{content:t}}}=Se;return C.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var Vt=function(){return Vt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vt.apply(this,arguments)};function Vv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pr(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function Ar(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function qv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function du(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function r_(){var e=I.useRef(!1),t=I.useCallback(function(){return e.current},[]);return I.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function i_(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=I.useRef(0),i=r_(),o=I.useState(n),a=o[0],s=o[1],l=I.useCallback(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var f=++r.current;return a.loading||s(function(p){return Vt(Vt({},p),{loading:!0})}),e.apply(void 0,u).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function Kv(e,t){t===void 0&&(t=[]);var n=i_(e,t,{loading:!0}),r=n[0],i=n[1];return I.useEffect(function(){i()},[i]),r}const Gv=I.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const o=I.useId(),{setIsLoading:a}=t_(),[s,l]=I.useState(n),[u,c]=I.useState(!1),[f,p]=I.useState(!1),{message:{blocks:{image:d}}}=Se;return I.useLayoutEffect(()=>{a(m=>[...m,o])},[]),Kv(async()=>{if(e){try{const{width:m,height:h}=await mk(e);s==="auto"&&l(o_(m,h))}catch(m){l("square"),console.error(m)}a(m=>m.filter(h=>h!==o))}},[e]),C.jsxs(C.Fragment,{children:[u?null:C.jsx("div",{"data-orientation":s,...d.placeholder}),f?C.jsx("div",{"data-error":"true","data-orientation":s,...r,...d.image,ref:i,children:C.jsx(gv,{size:"25%",strokeWidth:"5%"})}):C.jsx("img",{"data-orientation":s,"data-loaded":u,...r,...d.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)},onError:()=>{p(!0),c(!0)}})]})});Gv.displayName="Image";function o_(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const Yv=I.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=Se;return C.jsx("div",{children:C.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});Yv.displayName="Video";const Xv=I.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=Se;return C.jsx("div",{children:C.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});Xv.displayName="Audio";const Jv=I.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},o)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=Se;return C.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:o,children:[C.jsx("p",{...s.title,children:n}),C.jsx(dA,{...s.icon})]})});Jv.displayName="Location";const Zv=I.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,messageId:a,isReadOnly:s,sendMessage:l,...u},c)=>{const{message:{blocks:{column:f}}}=Se;return C.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...f,ref:c,children:e.map((p,d)=>C.jsx(lr,{block:{...p,direction:r,timestamp:o,sender:i,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Zv.displayName="Column";const Qv=I.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,metadata:a,messageId:s,isReadOnly:l,sendMessage:u,...c},f)=>{const{message:{blocks:{row:p}}}=Se;return C.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...p,ref:f,children:e.map((d,m)=>C.jsx(lr,{block:{...d,direction:r,timestamp:o,sender:i,messageId:s,isReadOnly:l,sendMessage:u}},m))})});Qv.displayName="Row";function a_(e){return Object.prototype.toString.call(e)==="[object Object]"}function eg(e){return a_(e)||Array.isArray(e)}function s_(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function pu(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!eg(s)||!eg(l)?s===l:pu(s,l)})}function tg(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function l_(e,t){if(e.length!==t.length)return!1;const n=tg(e),r=tg(t);return n.every((i,o)=>{const a=r[o];return pu(i,a)})}function hu(e){return typeof e=="number"}function ng(e){return typeof e=="string"}function mu(e){return typeof e=="boolean"}function rg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Je(e){return Math.abs(e)}function vu(e){return Math.sign(e)}function sa(e,t){return Je(e-t)}function u_(e,t){if(e===0||t===0||Je(e)<=Je(t))return 0;const n=sa(Je(e),Je(t));return Je(n/e)}function Ri(e){return ua(e).map(Number)}function $n(e){return e[la(e)]}function la(e){return Math.max(0,e.length-1)}function ua(e){return Object.keys(e)}function ig(e,t){return[e,t].reduce((n,r)=>(ua(r).forEach(i=>{const o=n[i],a=r[i],s=rg(o)&&rg(a);n[i]=s?ig(o,a):a}),n),{})}function og(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function c_(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(u){return o(u)/2}function o(u){return t-u}function a(){return t*Number(e)}function s(u){return hu(e)?a():n[e](u)}return{measure:s}}function f_(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function Ln(e,t){const n=Je(e-t);function r(u){return u<e}function i(u){return u>t}function o(u){return r(u)||i(u)}function a(u){return o(u)?r(u)?e:t:u}function s(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function ag(e,t,n){const{constrain:r}=Ln(0,e),i=e+1;let o=a(t);function a(p){return n?Je((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),f}function u(p){return c().set(s()+p)}function c(){return ag(e,s(),n)}const f={get:s,set:l,add:u,clone:c};return f}function d_(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Di(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function p_(e,t,n,r,i,o,a,s,l,u,c,f,p,d,m,h,g,v,b){const{cross:x}=e,$=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Di(),O=Di(),F=Ln(50,225).constrain(m.measure(20)),D={mouse:300,touch:400},T={mouse:500,touch:600},M=h?43:25;let H=!1,B=0,L=0,N=!1,W=!1,X=!1,V=!1;function _(Z,q){if(!q)return;function ie(pe){(mu(q)||q(Z,pe))&&G(pe)}const le=n;E.add(le,"dragstart",pe=>pe.preventDefault(),S).add(le,"touchmove",()=>{},S).add(le,"touchend",()=>{}).add(le,"touchstart",ie).add(le,"mousedown",ie).add(le,"touchcancel",Y).add(le,"contextmenu",Y).add(le,"click",Q,!0)}function y(){E.clear(),O.clear()}function R(){const Z=V?r:n;O.add(Z,"touchmove",K,S).add(Z,"touchend",Y).add(Z,"mousemove",K,S).add(Z,"mouseup",Y)}function P(Z){const q=Z.nodeName||"";return $.includes(q)}function w(){return(h?T:D)[V?"mouse":"touch"]}function j(Z,q){const ie=p.add(vu(Z)*-1),le=f.byDistance(Z,!h).distance;return h||Je(Z)<F?le:v&&q?le*.5:f.byIndex(ie.get(),0).distance}function G(Z){const q=og(Z,i);V=q,!(q&&Z.button!==0)&&(P(Z.target)||(X=h&&q&&!Z.buttons&&H,H=sa(o.get(),s.get())>=2,N=!0,a.pointerDown(Z),c.useFriction(0).useDuration(0),o.set(s),R(),B=a.readPoint(Z),L=a.readPoint(Z,x),d.emit("pointerDown")))}function K(Z){const q=a.readPoint(Z),ie=a.readPoint(Z,x),le=sa(q,B),pe=sa(ie,L);if(!W&&!V&&(!Z.cancelable||(W=le>pe,!W)))return Y(Z);const ae=a.pointerMove(Z);le>g&&(X=!0),c.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(ae)),Z.preventDefault()}function Y(Z){const ie=f.byDistance(0,!1).index!==p.get(),le=a.pointerUp(Z)*w(),pe=j(t.apply(le),ie),ae=u_(le,pe),ve=M-10*ae,be=b+ae/50;W=!1,N=!1,O.clear(),c.useDuration(ve).useFriction(be),u.distance(pe,!h),V=!1,d.emit("pointerUp")}function Q(Z){X&&(Z.stopPropagation(),Z.preventDefault())}function ee(){return N}return{init:_,pointerDown:ee,destroy:y}}function h_(e,t){let r,i;function o(f){return f.timeStamp}function a(f,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(og(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,a(f)}function l(f){const p=a(f)-a(i),d=o(f)-o(r)>170;return i=f,d&&(r=f),p}function u(f){if(!r||!i)return 0;const p=a(i)-a(r),d=o(f)-o(r),m=o(f)-o(i)>170,h=p/d;return d&&!m&&Je(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:a}}function m_(e){function t(r){return e*(r/100)}return{measure:t}}function v_(e,t,n,r,i){let o,a,s=[],l=!1;function u(d){return i.measureSize(d.getBoundingClientRect())}function c(d,m){if(!m)return;a=u(e),s=r.map(u);function h(v){for(const b of v){const x=b.target===e,$=r.indexOf(b.target),S=x?a:s[$],E=u(x?e:r[$]);if(S!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(v=>{l||(mu(m)||m(d,v))&&h(v)}),[e].concat(r).forEach(v=>o.observe(v))}function f(){o&&o.disconnect(),l=!0}return{init:c,destroy:f}}function g_(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,u=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let O=0;return E?(o=0,e.set(t),O=S):(o+=S/s,o*=l,u+=o,e.add(o),O=u-c),a=vu(O),c=u,i=Je(S)<.001,$}function p(){return i}function d(){return s}function m(){return a}function h(){return o}function g(){return b(n)}function v(){return x(r)}function b(S){return s=S,$}function x(S){return l=S,$}const $={direction:m,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:v,useBaseDuration:g,useFriction:x,useDuration:b};return $}function y_(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Ln(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",h=Je(e[m]-t.get()),g=n.get()-t.get(),v=s.constrain(h/a);n.subtract(g*v),!d&&Je(g)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:c,toggleActive:f}}function b_(e,t,n,r){const i=Ln(-t+e,n[0]),o=l(),a=u();function s(){const f=o[0],p=$n(o),d=o.lastIndexOf(f),m=o.indexOf(p)+1;return Ln(d,m)}function l(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function u(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:f,max:p}=s();return o.slice(f,p)}return{snapsContained:a}}function x_(e,t,n){const r=t[0],i=n?r-e:$n(t);return{limit:Ln(i,r)}}function w_(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Ln(o,a);function u(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function c(p){if(!u(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:c}}function S_(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function E_(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:u}=o,c=d().map(t.measure),f=m(),p=h();function d(){return u(r).map(v=>$n(v)[l]-v[0][s]).map(Je)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-Je(v))}function h(){const b=$n(f)-$n(i);return u(f).map(x=>x[0]).map((x,$,S)=>{const E=!$,O=$===la(S);return a&&E?0:a&&O?b:x+c[$]})}return{snaps:f,snapsAligned:p}}function k_(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(m){return m.concat().sort((h,g)=>Je(h)-Je(g))[0]}function u(m){const h=e?a(m):s(m),g=t.map(b=>b-h).map(b=>c(b,0)).map((b,x)=>({diff:b,index:x})).sort((b,x)=>Je(b.diff)-Je(x.diff)),{index:v}=g[0];return{index:v,distance:h}}function c(m,h){const g=[m,m+n,m-n];if(!e)return g[0];if(!h)return l(g);const v=g.filter(b=>vu(b)===h);return l(v)}function f(m,h){const g=t[m]-i.get(),v=c(g,h);return{index:m,distance:v}}function p(m,h){const g=i.get()+m,{index:v,distance:b}=u(g),x=!e&&o(g);if(!h||x)return{index:v,distance:m};const $=t[v]-b,S=m+c($,0);return{index:v,distance:S}}return{byDistance:p,byIndex:f,shortcut:c}}function C_(e,t,n,r,i,o,a){function s(f){const p=f.distance,d=f.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function l(f,p){const d=r.byDistance(f,p);s(d)}function u(f,p){const d=t.clone().set(f),m=r.byIndex(d.get(),p);s(m)}return{distance:l,index:u}}function ca(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return hu(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function sg(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function u(p){o=!p}function c(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function $_(e,t,n,r,i,o,a,s,l){const u=Ri(i),c=Ri(i).reverse(),f=h().concat(g());function p(S,E){return S.reduce((O,F)=>O-i[F],E)}function d(S,E){return S.reduce((O,F)=>p(O,E)>0?O.concat([F]):O,[])}function m(S,E){const O=E==="start",F=O?-r:r,D=a.findSlideBounds([F]);return S.map(T=>{const M=O?0:-r,H=O?r:0,L=D.filter(N=>N.index===T)[0][O?"end":"start"];return{index:T,slideLocation:ca(-1),translate:sg(e,t,l[T]),target:()=>s.get()>L?M:H}})}function h(){const S=o[0]-1,E=d(c,S);return m(E,"end")}function g(){const S=n-o[0]-1,E=d(u,S);return m(E,"start")}function v(){return f.every(({index:S})=>{const E=u.filter(O=>O!==S);return p(E,n)<=.1})}function b(){f.forEach(S=>{const{target:E,translate:O,slideLocation:F}=S,D=E();D!==F.get()&&(O.to(D),F.set(D))})}function x(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:x,loop:b,loopPoints:f}}function T_(e,t){let n,r=!1;function i(s,l){if(!l)return;function u(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(mu(l)||l(s,c))&&u(c)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function O_(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,u=.5,c=o?[0,t,-t]:[0],f=d(c,a);function p(g){const v=g||0;return n.map(b=>Ln(u,b-u).constrain(b*v))}function d(g,v){const b=g||c,x=p(v);return b.reduce(($,S)=>{const E=r.map((O,F)=>({start:O-n[F]+x[F]+S,end:O+e-x[F]+S,index:F}));return $.concat(E)},[])}function m(g,v){const b=o?s(g):l(g);return(v||f).reduce(($,S)=>{const{index:E,start:O,end:F}=S,D=$.includes(E),T=O<b&&F>b;return!D&&T?$.concat([E]):$},[])}return{check:m,findSlideBounds:d}}function I_(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&i,c=m(),f=h(),p=n.map(a),d=g();function m(){if(!u)return 0;const b=n[0];return Je(t[s]-b[s])}function h(){if(!u)return 0;const b=o.getComputedStyle($n(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,x,$)=>{const S=!x,E=x===la($);return S?p[x]+c:E?p[x]+f:$[x+1][s]-b[s]}).map(Je)}return{slideSizes:p,slideSizesWithGaps:d}}function P_(e,t,n){const r=hu(n);function i(l,u){return Ri(l).filter(c=>c%u===0).map(c=>l.slice(c,c+u))}function o(l){return Ri(l).reduce((u,c)=>{const p=t.slice($n(u),c+1).reduce((d,m)=>d+m,0);return!c||p>e?u.concat(c):u},[]).map((u,c,f)=>l.slice(u,f[c+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function A_(e,t,n,r,i,o,a,s){const{align:l,axis:u,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:m,dragFree:h,dragThreshold:g,slidesToScroll:v,skipSnaps:b,containScroll:x}=o,$=t.getBoundingClientRect(),S=n.map(be=>be.getBoundingClientRect()),E=d_(c),O=f_(u,c),F=O.measureSize($),D=m_(F),T=c_(l,F),M=!d&&!!x,H=d||!!x,{slideSizes:B,slideSizesWithGaps:L}=I_(O,$,S,n,H,i),N=P_(F,L,v),{snaps:W,snapsAligned:X}=E_(O,T,$,S,L,N,M),V=-$n(W)+$n(L),{snapsContained:_}=b_(F,V,X,x),y=M?_:X,{limit:R}=x_(V,y,d),P=ag(la(y),f,d),w=P.clone(),j=Ri(n),G=({dragHandler:be,scrollBody:_e,scrollBounds:rt,eventHandler:Et,animation:kt,options:{loop:Ct}})=>{const oe=be.pointerDown();Ct||rt.constrain(oe);const fe=_e.seek().settled();fe&&!oe&&(kt.stop(),Et.emit("settle")),fe||Et.emit("scroll")},K=({scrollBody:be,translate:_e,location:rt,offsetLocation:Et,scrollLooper:kt,slideLooper:Ct,options:{loop:oe}},fe)=>{const U=be.velocity();Et.set(rt.get()-U+U*fe),oe&&(kt.loop(be.direction()),Ct.loop()),_e.to(Et.get())},Y={start:()=>s.start(ve),stop:()=>s.stop(ve),update:()=>G(ve),render:be=>K(ve,be)},Q=.68,ee=y[P.get()],J=ca(ee),Z=ca(ee),q=ca(ee),ie=g_(J,q,m,Q),le=k_(d,y,V,R,q),pe=C_(Y,P,w,le,ie,q,a),ae=O_(F,V,B,W,R,d,p),ve={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:$,slideRects:S,animation:Y,axis:O,direction:E,dragHandler:p_(O,E,e,r,i,q,h_(O,i),J,Y,pe,ie,le,P,a,D,h,g,b,Q),eventStore:Di(),percentOfView:D,index:P,indexPrevious:w,limit:R,location:J,offsetLocation:Z,options:o,resizeHandler:v_(t,a,i,n,O),scrollBody:ie,scrollBounds:y_(R,J,q,ie,D),scrollLooper:w_(V,R,Z,[J,Z,q]),scrollProgress:S_(R),scrollSnaps:y,scrollTarget:le,scrollTo:pe,slideLooper:$_(O,E,F,V,L,y,ae,Z,n),slidesHandler:T_(t,a),slidesInView:ae,slideIndexes:j,slidesToScroll:N,target:q,translate:sg(O,E,t)};return ve}function __(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const d=Je(i/t);n.forEach(({animation:m})=>m.render(d)),o&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!o&&(o=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function u(){r=null,i=0}return{start:s,stop:l,reset:u,window:e}}function R_(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(u=>u(t,l)),s}function o(l,u){return e[l]=r(l).concat([u]),s}function a(l,u){return e[l]=r(l).filter(c=>c!==u),s}const s={init:n,emit:i,off:a,on:o};return s}const D_={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function M_(e){function t(o,a){return ig(o,a||{})}function n(o){const a=o.breakpoints||{},s=ua(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,u)=>t(l,u),{});return t(o,s)}function r(o){return o.map(a=>ua(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function N_(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function _r(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=M_(i),a=N_(o),s=Di(),l=Di(),u=R_(),{animationRealms:c}=_r,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=o,{on:m,off:h,emit:g}=u,v=B;let b=!1,x,$=f(D_,_r.globalOptions),S=f($),E=[],O,F,D;function T(){const{container:ie,slides:le}=S;F=(ng(ie)?e.querySelector(ie):ie)||e.children[0];const ae=ng(le)?F.querySelectorAll(le):le;D=[].slice.call(ae||F.children)}function M(ie,le){const pe=A_(e,F,D,r,i,ie,u,le);if(ie.loop&&!pe.slideLooper.canLoop()){const ae=Object.assign({},ie,{loop:!1});return M(ae,le)}return pe}function H(ie,le){if(b)return;const pe=c.find(ve=>ve.window===i),ae=pe||__(i);pe||c.push(ae),$=f($,ie),S=p($),E=le||E,T(),x=M(S,ae),d([$,...E.map(({options:ve})=>ve)]).forEach(ve=>s.add(ve,"change",B)),S.active&&(x.translate.to(x.location.get()),x.eventHandler.init(q),x.resizeHandler.init(q,S.watchResize),x.slidesHandler.init(q,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&ae.reset()}),x.options.loop&&x.slideLooper.loop(),F.offsetParent&&D.length&&x.dragHandler.init(q,S.watchDrag),O=a.init(E,q))}function B(ie,le){const pe=G();L(),H(f({startIndex:pe},ie),le),u.emit("reInit")}function L(){x.dragHandler.destroy(),x.animation.stop(),x.eventStore.clear(),x.translate.clear(),x.slideLooper.clear(),x.resizeHandler.destroy(),x.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function N(){b||(b=!0,s.clear(),L(),u.emit("destroy"))}function W(ie){const le=x[ie?"target":"location"].get(),pe=S.loop?"removeOffset":"constrain";return x.slidesInView.check(x.limit[pe](le))}function X(ie){const le=W(ie);return x.slideIndexes.filter(pe=>!le.includes(pe))}function V(ie,le,pe){!S.active||b||(x.scrollBody.useBaseFriction().useDuration(le?0:S.duration),x.scrollTo.index(ie,pe||0))}function _(ie){const le=x.index.add(1).get();V(le,ie===!0,-1)}function y(ie){const le=x.index.add(-1).get();V(le,ie===!0,1)}function R(){return x.index.add(1).get()!==G()}function P(){return x.index.add(-1).get()!==G()}function w(){return x.scrollSnaps.map(x.scrollProgress.get)}function j(){return x.scrollProgress.get(x.location.get())}function G(){return x.index.get()}function K(){return x.indexPrevious.get()}function Y(){return O}function Q(){return x}function ee(){return e}function J(){return F}function Z(){return D}const q={canScrollNext:R,canScrollPrev:P,containerNode:J,internalEngine:Q,destroy:N,off:h,on:m,emit:g,plugins:Y,previousScrollSnap:K,reInit:v,rootNode:ee,scrollNext:_,scrollPrev:y,scrollProgress:j,scrollSnapList:w,scrollTo:V,selectedScrollSnap:G,slideNodes:Z,slidesInView:W,slidesNotInView:X};return H(t,n),setTimeout(()=>u.emit("init"),0),q}_r.animationRealms=[],_r.globalOptions=void 0;function gu(e={},t=[]){const n=I.useRef(e),r=I.useRef(t),[i,o]=I.useState(),[a,s]=I.useState(),l=I.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return I.useEffect(()=>{if(s_()&&a){_r.globalOptions=gu.globalOptions;const u=_r(a,n.current,r.current);return o(u),()=>u.destroy()}else o(void 0)},[a,o]),I.useEffect(()=>{pu(n.current,e)||(n.current=e,l())},[e,l]),I.useEffect(()=>{l_(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}gu.globalOptions=void 0;const lg=I.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:i,isReadOnly:o,sendMessage:a,addMessageFeedback:s},l)=>{const[u,c]=gu({skipSnaps:!0,loop:!0}),[f,p]=I.useState(!0),[d,m]=I.useState(!0),h=I.useCallback(()=>c==null?void 0:c.scrollPrev(),[c]),g=I.useCallback(()=>c==null?void 0:c.scrollNext(),[c]),{message:{blocks:{carousel:v}}}=Se,b=I.useCallback(x=>{p(!x.canScrollPrev()),m(!x.canScrollNext())},[]);return I.useEffect(()=>{c&&(b(c),c.on("reInit",b),c.on("select",b))},[c,b]),C.jsxs("div",{...v==null?void 0:v.container,"data-container":"carousel",ref:u,children:[C.jsx("div",{ref:l,...v==null?void 0:v.slidesContainer,children:e.map((x,$)=>C.jsx(lr,{block:{...x,direction:t,timestamp:r,sender:n,messageId:i,sendMessage:a,isReadOnly:o}},$))}),e.length>1&&C.jsxs(C.Fragment,{children:[C.jsx(tA,{...v==null?void 0:v.backButton,"data-disabled":f?"":void 0,onClick:h}),C.jsx(nA,{...v==null?void 0:v.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});lg.displayName="Carousel";const ug=Math.floor;function cg(e){return fg(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j_(e){var t;return(t=(fg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fg(e){return e instanceof Node||e instanceof Mi(e).Node}function qt(e){return e instanceof Element||e instanceof Mi(e).Element}function Rr(e){return e instanceof HTMLElement||e instanceof Mi(e).HTMLElement}function yu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot}function L_(e){return["html","body","#document"].includes(cg(e))}function F_(e){return Mi(e).getComputedStyle(e)}function B_(e){if(cg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yu(e)&&e.host||j_(e);return yu(t)?t.host:t}function Fn(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Pt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&yu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dg(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function z_(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function pg(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(dg())||t.test(z_()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function hg(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function mg(){return/apple/i.test(navigator.vendor)}function W_(){return dg().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function vg(e,t){return["mouse","pen"].includes(e)}function U_(e){return"nativeEvent"in e}function H_(e){return e.matches("html,body")}function Zt(e){return(e==null?void 0:e.ownerDocument)||document}function bu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function gg(e){return"composedPath"in e?e.composedPath()[0]:e.target}const V_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function yg(e){return Rr(e)&&e.matches(V_)}function ht(e){e.preventDefault(),e.stopPropagation()}const Dr=Math.min,jt=Math.max,fa=Math.round,da=Math.floor,fn=e=>({x:e,y:e});function bg(e,t,n){return jt(e,Dr(t,n))}function pa(e,t){return typeof e=="function"?e(t):e}function Ni(e){return e.split("-")[0]}function xu(e){return e.split("-")[1]}function xg(e){return e==="x"?"y":"x"}function q_(e){return e==="y"?"height":"width"}function ji(e){return["top","bottom"].includes(Ni(e))?"y":"x"}function K_(e){return xg(ji(e))}function G_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Y_(e){return typeof e!="number"?G_(e):{top:e,right:e,bottom:e,left:e}}function ha(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function wg(e,t,n){let{reference:r,floating:i}=e;const o=ji(t),a=K_(t),s=q_(a),l=Ni(t),u=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(xu(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const X_=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=wg(u,r,l),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:g,fn:v}=s[h],{x:b,y:x,data:$,reset:S}=await v({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,f=x??f,d={...d,[g]:{...d[g],...$}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=wg(u,p,l)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function Sg(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=pa(t,e),m=Y_(d),g=s[p?f==="floating"?"reference":"floating":f],v=ha(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),$=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},S=ha(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-S.top+m.top)/$.y,bottom:(S.bottom-v.bottom+m.bottom)/$.y,left:(v.left-S.left+m.left)/$.x,right:(S.right-v.right+m.right)/$.x}}async function J_(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ni(n),s=xu(n),l=ji(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,f=pa(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}const Z_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await J_(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Q_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:v,y:b}=g;return{x:v,y:b}}},...l}=pa(e,t),u={x:n,y:r},c=await Sg(t,l),f=ji(Ni(i)),p=xg(f);let d=u[p],m=u[f];if(o){const g=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=d+c[g],x=d-c[v];d=bg(b,d,x)}if(a){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=m+c[g],x=m-c[v];m=bg(b,m,x)}const h=s.fn({...t,[p]:d,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[f]:a}}}}}},eR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=pa(e,t),c=await Sg(t,u),f=Ni(i),p=xu(i),d=ji(i)==="y",{width:m,height:h}=o.floating;let g,v;f==="top"||f==="bottom"?(g=f,v=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,g=p==="end"?"top":"bottom");const b=h-c.top-c.bottom,x=m-c.left-c.right,$=Dr(h-c[g],b),S=Dr(m-c[v],x),E=!t.middlewareData.shift;let O=$,F=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=b),E&&!p){const T=jt(c.left,0),M=jt(c.right,0),H=jt(c.top,0),B=jt(c.bottom,0);d?F=m-2*(T!==0||M!==0?T+M:jt(c.left,c.right)):O=h-2*(H!==0||B!==0?H+B:jt(c.top,c.bottom))}await l({...t,availableWidth:F,availableHeight:O});const D=await a.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function ma(){return typeof window<"u"}function Mr(e){return Eg(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dn(e){var t;return(t=(Eg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Eg(e){return ma()?e instanceof Node||e instanceof Lt(e).Node:!1}function Qt(e){return ma()?e instanceof Element||e instanceof Lt(e).Element:!1}function pn(e){return ma()?e instanceof HTMLElement||e instanceof Lt(e).HTMLElement:!1}function kg(e){return!ma()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}function Li(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=en(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function tR(e){return["table","td","th"].includes(Mr(e))}function va(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function wu(e){const t=Su(),n=Qt(e)?en(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function nR(e){let t=Bn(e);for(;pn(t)&&!Nr(t);){if(wu(t))return t;if(va(t))return null;t=Bn(t)}return null}function Su(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Nr(e){return["html","body","#document"].includes(Mr(e))}function en(e){return Lt(e).getComputedStyle(e)}function ga(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bn(e){if(Mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||kg(e)&&e.host||dn(e);return kg(t)?t.host:t}function Cg(e){const t=Bn(e);return Nr(t)?e.ownerDocument?e.ownerDocument.body:e.body:pn(t)&&Li(t)?t:Cg(t)}function zn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Cg(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Lt(i);if(o){const s=Eu(a);return t.concat(a,a.visualViewport||[],Li(i)?i:[],s&&n?zn(s):[])}return t.concat(i,zn(i,[],n))}function Eu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $g(e){const t=en(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=fa(n)!==o||fa(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function ku(e){return Qt(e)?e:e.contextElement}function jr(e){const t=ku(e);if(!pn(t))return fn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=$g(t);let a=(o?fa(n.width):n.width)/r,s=(o?fa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const rR=fn(0);function Tg(e){const t=Lt(e);return!Su()||!t.visualViewport?rR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function sr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=ku(e);let a=fn(1);t&&(r?Qt(r)&&(a=jr(r)):a=jr(e));const s=iR(o,n,r)?Tg(o):fn(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const p=Lt(o),d=r&&Qt(r)?Lt(r):r;let m=p,h=Eu(m);for(;h&&r&&d!==m;){const g=jr(h),v=h.getBoundingClientRect(),b=en(h),x=v.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,$=v.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=x,u+=$,m=Lt(h),h=Eu(m)}}return ha({width:c,height:f,x:l,y:u})}function Cu(e,t){const n=ga(e).scrollLeft;return t?t.left+n:sr(dn(e)).left+n}function Og(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Cu(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function oR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=dn(r),s=t?va(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=fn(1);const c=fn(0),f=pn(r);if((f||!f&&!o)&&((Mr(r)!=="body"||Li(a))&&(l=ga(r)),pn(r))){const d=sr(r);u=jr(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const p=a&&!f&&!o?Og(a,l,!0):fn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function aR(e){return Array.from(e.getClientRects())}function sR(e){const t=dn(e),n=ga(e),r=e.ownerDocument.body,i=jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Cu(e);const s=-n.scrollTop;return en(r).direction==="rtl"&&(a+=jt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function lR(e,t){const n=Lt(e),r=dn(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=Su();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function uR(e,t){const n=sr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pn(e)?jr(e):fn(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function Ig(e,t,n){let r;if(t==="viewport")r=lR(e,n);else if(t==="document")r=sR(dn(e));else if(Qt(t))r=uR(t,n);else{const i=Tg(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ha(r)}function Pg(e,t){const n=Bn(e);return n===t||!Qt(n)||Nr(n)?!1:en(n).position==="fixed"||Pg(n,t)}function cR(e,t){const n=t.get(e);if(n)return n;let r=zn(e,[],!1).filter(s=>Qt(s)&&Mr(s)!=="body"),i=null;const o=en(e).position==="fixed";let a=o?Bn(e):e;for(;Qt(a)&&!Nr(a);){const s=en(a),l=wu(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Li(a)&&!l&&Pg(e,a))?r=r.filter(c=>c!==a):i=s,a=Bn(a)}return t.set(e,r),r}function fR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?va(t)?[]:cR(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const f=Ig(t,c,i);return u.top=jt(f.top,u.top),u.right=Dr(f.right,u.right),u.bottom=Dr(f.bottom,u.bottom),u.left=jt(f.left,u.left),u},Ig(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dR(e){const{width:t,height:n}=$g(e);return{width:t,height:n}}function pR(e,t,n){const r=pn(t),i=dn(t),o=n==="fixed",a=sr(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=fn(0);function u(){l.x=Cu(i)}if(r||!r&&!o)if((Mr(t)!=="body"||Li(i))&&(s=ga(t)),r){const d=sr(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?Og(i,s):fn(0),f=a.left+s.scrollLeft-l.x-c.x,p=a.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function $u(e){return en(e).position==="static"}function Ag(e,t){if(!pn(e)||en(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dn(e)===n&&(n=n.ownerDocument.body),n}function _g(e,t){const n=Lt(e);if(va(e))return n;if(!pn(e)){let i=Bn(e);for(;i&&!Nr(i);){if(Qt(i)&&!$u(i))return i;i=Bn(i)}return n}let r=Ag(e,t);for(;r&&tR(r)&&$u(r);)r=Ag(r,t);return r&&Nr(r)&&$u(r)&&!wu(r)?n:r||nR(e)||n}const hR=async function(e){const t=this.getOffsetParent||_g,n=this.getDimensions,r=await n(e.floating);return{reference:pR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mR(e){return en(e).direction==="rtl"}const vR={convertOffsetParentRelativeRectToViewportRelativeRect:oR,getDocumentElement:dn,getClippingRect:fR,getOffsetParent:_g,getElementRects:hR,getClientRects:aR,getDimensions:dR,getScale:jr,isElement:Qt,isRTL:mR};function Rg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gR(e,t){let n=null,r;const i=dn(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:d}=u;if(s||t(),!p||!d)return;const m=da(f),h=da(i.clientWidth-(c+p)),g=da(i.clientHeight-(f+d)),v=da(c),x={rootMargin:-m+"px "+-h+"px "+-g+"px "+-v+"px",threshold:jt(0,Dr(1,l))||1};let $=!0;function S(E){const O=E[0].intersectionRatio;if(O!==l){if(!$)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Rg(u,e.getBoundingClientRect())&&a(),$=!1}try{n=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),o}function yR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ku(e),c=i||o?[...u?zn(u):[],...zn(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const f=u&&s?gR(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let m,h=l?sr(e):null;l&&g();function g(){const v=sr(e);h&&!Rg(h,v)&&n(),h=v,m=requestAnimationFrame(g)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const bR=Z_,xR=Q_,wR=eR,SR=(e,t,n)=>{const r=new Map,i={platform:vR,...n},o={...i.platform,_c:r};return X_(e,t,{...i,platform:o})};var ya=typeof document<"u"?I.useLayoutEffect:I.useEffect;function ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ba(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ba(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Dg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mg(e,t){const n=Dg(e);return Math.round(t*n)/n}function Tu(e){const t=k.useRef(e);return ya(()=>{t.current=e}),t}function ER(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=k.useState(r);ba(p,r)||d(r);const[m,h]=k.useState(null),[g,v]=k.useState(null),b=k.useCallback(V=>{V!==E.current&&(E.current=V,h(V))},[]),x=k.useCallback(V=>{V!==O.current&&(O.current=V,v(V))},[]),$=o||m,S=a||g,E=k.useRef(null),O=k.useRef(null),F=k.useRef(c),D=l!=null,T=Tu(l),M=Tu(i),H=Tu(u),B=k.useCallback(()=>{if(!E.current||!O.current)return;const V={placement:t,strategy:n,middleware:p};M.current&&(V.platform=M.current),SR(E.current,O.current,V).then(_=>{const y={..._,isPositioned:H.current!==!1};L.current&&!ba(F.current,y)&&(F.current=y,xp.flushSync(()=>{f(y)}))})},[p,t,n,M,H]);ya(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[u]);const L=k.useRef(!1);ya(()=>(L.current=!0,()=>{L.current=!1}),[]),ya(()=>{if($&&(E.current=$),S&&(O.current=S),$&&S){if(T.current)return T.current($,S,B);B()}},[$,S,B,T,D]);const N=k.useMemo(()=>({reference:E,floating:O,setReference:b,setFloating:x}),[b,x]),W=k.useMemo(()=>({reference:$,floating:S}),[$,S]),X=k.useMemo(()=>{const V={position:n,left:0,top:0};if(!W.floating)return V;const _=Mg(W.floating,c.x),y=Mg(W.floating,c.y);return s?{...V,transform:"translate("+_+"px, "+y+"px)",...Dg(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:y}},[n,s,W.floating,c.x,c.y]);return k.useMemo(()=>({...c,update:B,refs:N,elements:W,floatingStyles:X}),[c,B,N,W,X])}const kR=(e,t)=>({...bR(e),options:[e,t]}),CR=(e,t)=>({...xR(e),options:[e,t]}),$R=(e,t)=>({...wR(e),options:[e,t]});/*!
|
|
251
278
|
* tabbable 6.2.0
|
|
252
279
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
253
|
-
*/var eD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],au=eD.join(","),ug=typeof Element>"u",xi=ug?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qo=!ug&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Zo=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},tD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},nD=function(t,n,r){if(Zo(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(au));return n&&xi.call(t,au)&&i.unshift(t),i=i.filter(r),i},rD=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Zo(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var c=xi.call(a,au);c&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Zo(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},cg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},fg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||tD(t))&&!cg(t)?0:t.tabIndex},iD=function(t,n){var r=fg(t);return r<0&&n&&!cg(t)?0:r},oD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},dg=function(t){return t.tagName==="INPUT"},aD=function(t){return dg(t)&&t.type==="hidden"},sD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},lD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},uD=function(t){if(!t.name)return!0;var n=t.form||Qo(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=lD(i,t.form);return!o||o===t},cD=function(t){return dg(t)&&t.type==="radio"},fD=function(t){return cD(t)&&!uD(t)},dD=function(t){var n,r=t&&Qo(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,f;r=Qo(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},pg=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},pD=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=xi.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(xi.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=Qo(t);if(l&&!l.shadowRoot&&i(l)===!0)return pg(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(dD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return pg(t);return!1},hD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return xi.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},mD=function(t,n){return!(n.disabled||Zo(n)||aD(n)||pD(n,t)||sD(n)||hD(n))},hg=function(t,n){return!(fD(n)||fg(n)<0||!mD(t,n))},vD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gD=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=iD(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(oD).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},su=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rD([t],n.includeContainer,{filter:hg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:vD}):r=nD(t,n.includeContainer,hg.bind(null,n)),gD(r)};const lu="ArrowUp",ea="ArrowDown",xr="ArrowLeft",wi="ArrowRight";function ta(e,t,n){return Math.floor(e/t)!==n}function Si(e,t){return t<0||t>=e.current.length}function uu(e,t){return ut(e,{disabledIndices:t})}function mg(e,t){return ut(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ut(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,u;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((u=a[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function yD(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}=t,f=u;if(n.key===lu){if(c&&it(n),u===-1)f=l;else if(f=ut(e,{startingIndex:f,amount:o,decrement:!0,disabledIndices:a}),i&&(u-o<s||f<0)){const p=u%o,d=l%o,m=l-(d-p);d===p?f=l:f=d>p?m:m-o}Si(e,f)&&(f=u)}if(n.key===ea&&(c&&it(n),u===-1?f=s:(f=ut(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(f=ut(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),Si(e,f)&&(f=u)),r==="both"){const p=Nv(u/o);n.key===wi&&(c&&it(n),u%o!==o-1?(f=ut(e,{startingIndex:u,disabledIndices:a}),i&&ta(f,o,p)&&(f=ut(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(f=ut(e,{startingIndex:u-u%o-1,disabledIndices:a})),ta(f,o,p)&&(f=u)),n.key===xr&&(c&&it(n),u%o!==0?(f=ut(e,{startingIndex:u,disabledIndices:a,decrement:!0}),i&&ta(f,o,p)&&(f=ut(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(f=ut(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),ta(f,o,p)&&(f=u));const d=Nv(l/o)===p;Si(e,f)&&(i&&d?f=n.key===xr?l:ut(e,{startingIndex:u-u%o-1,disabledIndices:a}):f=u)}return f}let vg=0;function pn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(vg);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():vg=requestAnimationFrame(o)}var Ge=typeof document<"u"?A.useLayoutEffect:A.useEffect;function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},na.apply(this,arguments)}let cu=!1,bD=0;const gg=()=>"floating-ui-"+bD++;function xD(){const[e,t]=k.useState(()=>cu?gg():void 0);return Ge(()=>{e==null&&t(gg())},[]),k.useEffect(()=>{cu||(cu=!0)},[]),e}const fu=k.useId||xD;function wD(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const SD=k.createContext(null),ED=k.createContext(null),yg=()=>{var e;return((e=k.useContext(SD))==null?void 0:e.id)||null},ra=()=>k.useContext(ED);function Ei(e){return"data-floating-ui-"+e}function $n(e){const t=A.useRef(e);return Ge(()=>{t.current=e}),t}function kD(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function wr(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function CD(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),wr(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let Sr=new WeakMap,ia=new WeakSet,oa={},du=0;const TD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,bg=e=>e&&(e.host||bg(e.parentNode)),$D=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=bg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function OD(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=$D(t,e),s=new Set,l=new Set(a),u=[];oa[i]||(oa[i]=new WeakMap);const c=oa[i];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=o?m.getAttribute(o):null,y=h!==null&&h!=="false",g=(Sr.get(m)||0)+1,b=(c.get(m)||0)+1;Sr.set(m,g),c.set(m,b),u.push(m),g===1&&y&&ia.add(m),b===1&&m.setAttribute(i,""),!y&&o&&m.setAttribute(o,"true")}})}return du++,()=>{u.forEach(d=>{const m=(Sr.get(d)||0)-1,h=(c.get(d)||0)-1;Sr.set(d,m),c.set(d,h),m||(!ia.has(d)&&o&&d.removeAttribute(o),ia.delete(d)),h||d.removeAttribute(i)}),du--,du||(Sr=new WeakMap,Sr=new WeakMap,ia=new WeakSet,oa={})}}function xg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Lt(e[0]).body;return OD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const pu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wg(e,t){const n=su(e,pu());t==="prev"&&n.reverse();const r=n.indexOf(kn(Lt(e)));return n.slice(r+1)[0]}function Sg(){return wg(document.body,"next")}function Eg(){return wg(document.body,"prev")}function ki(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!vt(n,r)}function ID(e){su(e,pu()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function PD(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const hu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let AD;function kg(e){e.key==="Tab"&&(e.target,clearTimeout(AD))}const aa=k.forwardRef(function(t,n){const[r,i]=k.useState();Ge(()=>(Wv()&&i("button"),document.addEventListener("keydown",kg),()=>{document.removeEventListener("keydown",kg)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ei("focus-guard")]:"",style:hu};return k.createElement("span",na({},t,o))}),Cg=k.createContext(null);function RD(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=k.useState(null),o=fu(),a=Tg(),s=k.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=k.useRef();return Ge(()=>()=>{r==null||r.remove()},[r,s]),Ge(()=>{if(l.current===s)return;l.current=s;const{id:u,root:c,portalContext:f,uniqueId:p}=s,d=u?document.getElementById(u):null,m=Ei("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!Dt(h)&&(h=h.current),h=h||document.body;let y=null;u&&(y=document.createElement("div"),y.id=u,h.appendChild(y));const g=document.createElement("div");g.id=p,g.setAttribute(m,""),h=y||h,h.appendChild(g),i(g)}},[s]),r}function DD(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=RD({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),u=k.useRef(null),c=k.useRef(null),f=k.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return k.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(m){o&&ki(m)&&(m.type==="focusin"?PD:ID)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),k.createElement(Cg.Provider,{value:k.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&k.createElement(aa,{"data-type":"outside",ref:l,onFocus:d=>{if(ki(d,o)){var m;(m=c.current)==null||m.focus()}else{const h=Eg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&k.createElement("span",{"aria-owns":o.id,style:hu}),o&&Fn.createPortal(t,o),p&&o&&k.createElement(aa,{"data-type":"outside",ref:u,onFocus:d=>{if(ki(d,o)){var m;(m=f.current)==null||m.focus()}else{const h=Sg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Tg=()=>k.useContext(Cg),_D=k.forwardRef(function(t,n){return k.createElement("button",na({},t,{type:"button",ref:n,tabIndex:-1,style:hu}))});function MD(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:m,events:h,dataRef:y,elements:{domReference:g,floating:b}}=t,w=TD()?o:!0,C=$n(i),S=$n(a),E=$n(s),O=ra(),j=Tg(),M=typeof a=="number"&&a<0,$=k.useRef(null),D=k.useRef(null),U=k.useRef(!1),F=k.useRef(null),L=k.useRef(!1),N=j!=null,B=g&&g.getAttribute("role")==="combobox"&&Vv(g)&&M,Y=k.useCallback(function(P){return P===void 0&&(P=b),P?su(P,pu()):[]},[b]),H=k.useCallback(P=>{const I=Y(P);return C.current.map(x=>g&&x==="reference"?g:b&&x==="floating"?b:I).filter(Boolean).flat()},[g,b,C,Y]);k.useEffect(()=>{if(r||!l)return;function P(x){if(x.key==="Tab"){vt(b,kn(Lt(b)))&&Y().length===0&&!B&&it(x);const _=H(),V=Hv(x);C.current[0]==="reference"&&V===g&&(it(x),x.shiftKey?pn(_[_.length-1]):pn(_[1])),C.current[1]==="floating"&&V===b&&x.shiftKey&&(it(x),pn(_[0]))}}const I=Lt(b);return I.addEventListener("keydown",P),()=>{I.removeEventListener("keydown",P)}},[r,g,b,l,C,p,B,Y,H]),k.useEffect(()=>{if(r||!c)return;function P(){L.current=!0,setTimeout(()=>{L.current=!1})}function I(x){const _=x.relatedTarget;queueMicrotask(()=>{const V=!(vt(g,_)||vt(b,_)||vt(_,b)||vt(j==null?void 0:j.portalNode,_)||_!=null&&_.hasAttribute(Ei("focus-guard"))||O&&(wr(O.nodesRef.current,d).find(K=>{var G,X;return vt((G=K.context)==null?void 0:G.elements.floating,_)||vt((X=K.context)==null?void 0:X.elements.domReference,_)})||kD(O.nodesRef.current,d).find(K=>{var G,X;return((G=K.context)==null?void 0:G.elements.floating)===_||((X=K.context)==null?void 0:X.elements.domReference)===_})));_&&V&&!L.current&&_!==F.current&&(U.current=!0,m(!1,x))})}if(b&&mr(g))return g.addEventListener("focusout",I),g.addEventListener("pointerdown",P),!l&&b.addEventListener("focusout",I),()=>{g.removeEventListener("focusout",I),g.removeEventListener("pointerdown",P),!l&&b.removeEventListener("focusout",I)}},[r,g,b,l,d,O,j,m,c]),k.useEffect(()=>{var P;if(r)return;const I=Array.from((j==null||(P=j.portalNode)==null?void 0:P.querySelectorAll("["+Ei("portal")+"]"))||[]);if(b){const x=[b,...I,$.current,D.current,C.current.includes("reference")||B?g:null].filter(V=>V!=null),_=l?xg(x,w,!w):xg(x);return()=>{_()}}},[r,g,b,l,C,j,B,w]),Ge(()=>{if(r||!b)return;const P=Lt(b),I=kn(P);queueMicrotask(()=>{const x=H(b),_=S.current,V=(typeof _=="number"?x[_]:_.current)||b,K=vt(b,I);!M&&!K&&f&&pn(V,{preventScroll:V===b})})},[r,f,b,M,H,S]),Ge(()=>{if(r||!b)return;let P=!1;const I=Lt(b),x=kn(I),_=y.current;F.current=x;function V(K){if(K.type==="escapeKey"&&p.domReference.current&&(F.current=p.domReference.current),["referencePress","escapeKey"].includes(K.type))return;const G=K.data.returnFocus;typeof G=="object"?(U.current=!1,P=G.preventScroll):U.current=!G}return h.on("dismiss",V),()=>{h.off("dismiss",V);const K=kn(I);(vt(b,K)||O&&wr(O.nodesRef.current,d).some(X=>{var Z;return vt((Z=X.context)==null?void 0:Z.elements.floating,K)})||_.openEvent&&["click","mousedown"].includes(_.openEvent.type))&&p.domReference.current&&(F.current=p.domReference.current),E.current&&mr(F.current)&&!U.current&&pn(F.current,{cancelPrevious:!1,preventScroll:P})}},[r,b,E,y,p,h,O,d]),Ge(()=>{if(!(r||!j))return j.setFocusManagerState({modal:l,closeOnFocusOut:c,open:f,onOpenChange:m,refs:p}),()=>{j.setFocusManagerState(null)}},[r,j,l,f,m,p,c]),Ge(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!M){const P=()=>{const x=b.getAttribute("tabindex");C.current.includes("floating")||kn(Lt(b))!==p.domReference.current&&Y().length===0?x!=="0"&&b.setAttribute("tabindex","0"):x!=="-1"&&b.setAttribute("tabindex","-1")};P();const I=new MutationObserver(P);return I.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{I.disconnect()}}},[r,b,p,C,Y,M]);function R(P){return r||!u||!l?null:k.createElement(_D,{ref:P==="start"?$:D,onClick:I=>m(!1,I.nativeEvent)},typeof u=="string"?u:"Dismiss")}const v=!r&&w&&!B&&(N||l);return k.createElement(k.Fragment,null,v&&k.createElement(aa,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:P=>{if(l){const x=H();pn(i[0]==="reference"?x[0]:x[x.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(U.current=!1,ki(P,j.portalNode)){const x=Sg()||g;x==null||x.focus()}else{var I;(I=j.beforeOutsideRef.current)==null||I.focus()}}}),!B&&R("start"),n,R("end"),v&&k.createElement(aa,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:P=>{if(l)pn(H()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(c&&(U.current=!0),ki(P,j.portalNode)){const x=Eg()||g;x==null||x.focus()}else{var I;(I=j.afterOutsideRef.current)==null||I.focus()}}}))}function $g(e){return mr(e.target)&&e.target.tagName==="BUTTON"}function Og(e){return Vv(e)}function ND(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0}=t,f=k.useRef(),p=k.useRef(!1);return k.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Uv(f.current)&&u||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}Uv(f.current)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||$g(d))&&(d.key===" "&&!Og(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||$g(d)||Og(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,u,c,o,l,n,r])}const jD=k.useInsertionEffect||(e=>e());function On(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jD(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const LD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},FD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},BD=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function zD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:g}=t,b=ra(),w=yg()!=null,C=On(typeof p=="function"?p:()=>!1),S=typeof p=="function"?C:p,E=k.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:j}=BD(g),M=On(D=>{if(!n||!c||!f||D.key!=="Escape")return;const U=b?wr(b.nodesRef.current,o):[];if(!O&&(D.stopPropagation(),U.length>0)){let F=!0;if(U.forEach(L=>{var N;if((N=L.context)!=null&&N.open&&!L.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,vR(D)?D.nativeEvent:D)}),$=On(D=>{const U=E.current;if(E.current=!1,U||typeof S=="function"&&!S(D))return;const F=Hv(D),L="["+Ei("inert")+"]",N=Lt(l).querySelectorAll(L);let B=Dt(F)?F:null;for(;B&&!fR(B);){const R=pR(B);if(R===Lt(l).body||!Dt(R))break;B=R}if(N.length&&Dt(F)&&!gR(F)&&!vt(F,l)&&Array.from(N).every(R=>!vt(B,R)))return;if(mr(F)&&l){const R=F.clientWidth>0&&F.scrollWidth>F.clientWidth,v=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let P=v&&D.offsetX>F.clientWidth;if(v&&dR(F).direction==="rtl"&&(P=D.offsetX<=F.offsetWidth-F.clientWidth),P||R&&D.offsetY>F.clientHeight)return}const Y=b&&wr(b.nodesRef.current,o).some(R=>{var v;return Jl(D,(v=R.context)==null?void 0:v.elements.floating)});if(Jl(D,l)||Jl(D,s)||Y)return;const H=b?wr(b.nodesRef.current,o):[];if(H.length>0){let R=!0;if(H.forEach(v=>{var P;if((P=v.context)!=null&&P.open&&!v.context.dataRef.current.__outsidePressBubbles){R=!1;return}}),!R)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Bv(D)||zv(D)}}),r(!1,D)});return k.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=O,u.current.__outsidePressBubbles=j;function D(L){r(!1,L)}const U=Lt(l);f&&U.addEventListener("keydown",M),S&&U.addEventListener(d,$);let F=[];return y&&(Dt(s)&&(F=Tn(s)),Dt(l)&&(F=F.concat(Tn(l))),!Dt(a)&&a&&a.contextElement&&(F=F.concat(Tn(a.contextElement)))),F=F.filter(L=>{var N;return L!==((N=U.defaultView)==null?void 0:N.visualViewport)}),F.forEach(L=>{L.addEventListener("scroll",D,{passive:!0})}),()=>{f&&U.removeEventListener("keydown",M),S&&U.removeEventListener(d,$),F.forEach(L=>{L.removeEventListener("scroll",D)})}},[u,l,s,a,f,S,d,n,r,y,c,O,j,M,$]),k.useEffect(()=>{E.current=!1},[S,d]),k.useMemo(()=>c?{reference:{onKeyDown:M,[LD[h]]:D=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,D.nativeEvent))}},floating:{onKeyDown:M,[FD[d]]:()=>{E.current=!0}}}:{},[c,i,m,d,h,r,M])}let mu;process.env.NODE_ENV!=="production"&&(mu=new Set);function WD(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const O="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!Dt(e.elements.reference)){var a;if(!((a=mu)!=null&&a.has(O))){var s;(s=mu)==null||s.add(O),console.error(O)}}}const[l,u]=k.useState(null),c=((t=e.elements)==null?void 0:t.reference)||l,f=XR(e),p=ra(),d=On((O,j)=>{O&&(h.current.openEvent=j),r==null||r(O,j)}),m=k.useRef(null),h=k.useRef({}),y=k.useState(()=>wD())[0],g=fu(),b=k.useCallback(O=>{const j=Dt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(j)},[f.refs]),w=k.useCallback(O=>{(Dt(O)||O===null)&&(m.current=O,u(O)),(Dt(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!Dt(O))&&f.refs.setReference(O)},[f.refs]),C=k.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:m}),[f.refs,w,b]),S=k.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=k.useMemo(()=>({...f,refs:C,elements:S,dataRef:h,nodeId:i,floatingId:g,events:y,open:n,onOpenChange:d}),[f,i,g,y,n,d,C,S]);return Ge(()=>{const O=p==null?void 0:p.nodesRef.current.find(j=>j.id===i);O&&(O.context=E)}),k.useMemo(()=>({...f,context:E,refs:C,elements:S}),[f,C,S,E])}function vu(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=l}),i),{})}}function UD(e){e===void 0&&(e=[]);const t=e,n=k.useCallback(o=>vu(o,e,"reference"),t),r=k.useCallback(o=>vu(o,e,"floating"),t),i=k.useCallback(o=>vu(o,e,"item"),e.map(o=>o==null?void 0:o.item));return k.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Ig=!1;function sa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Pg(e,t){return sa(t,e===lu||e===ea,e===xr||e===wi)}function gu(e,t,n){return sa(t,e===ea,n?e===xr:e===wi)||e==="Enter"||e==" "||e===""}function HD(e,t,n){return sa(t,n?e===xr:e===wi,e===ea)}function Ag(e,t,n){return sa(t,n?e===wi:e===xr,e===lu)}function VD(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:g="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:O=!0,virtualItemRef:j}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const M=yg(),$=ra(),D=On(u),U=k.useRef(g),F=k.useRef(f??-1),L=k.useRef(null),N=k.useRef(!0),B=k.useRef(D),Y=k.useRef(!!a),H=k.useRef(!1),R=k.useRef(!1),v=$n(C),P=$n(n),I=$n(O),[x,_]=k.useState(),[V,K]=k.useState(),G=On(function(J,Q,q){q===void 0&&(q=!1);const ne=J.current[Q.current];ne&&(y?(_(ne.id),$==null||$.events.emit("virtualfocus",ne),j&&(j.current=ne)):pn(ne,{preventScroll:!0,sync:mR()&&Wv()?Ig||H.current:!1}),requestAnimationFrame(()=>{const ae=I.current;ae&&ne&&(q||!N.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ae=="boolean"?{block:"nearest",inline:"nearest"}:ae))}))});Ge(()=>{document.createElement("div").focus({get preventScroll(){return Ig=!0,!1}})},[]),Ge(()=>{c&&(n&&a?U.current&&f!=null&&(R.current=!0,D(f)):Y.current&&(F.current=-1,B.current(null)))},[c,n,a,f,D]),Ge(()=>{if(c&&n&&a)if(l==null){if(H.current=!1,f!=null)return;if(Y.current&&(F.current=-1,G(s,F)),!Y.current&&U.current&&(L.current!=null||U.current===!0&&L.current==null)){let J=0;const Q=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Q),J++):(F.current=L.current==null||gu(L.current,S,h)||m?uu(s,v.current):mg(s,v.current),L.current=null,D(F.current))};Q()}}else Si(s,l)||(F.current=l,G(s,F,R.current),R.current=!1)},[c,n,a,l,f,m,s,S,h,D,G,v]),Ge(()=>{var J,Q;if(!c||a||!$||y||!Y.current)return;const q=$.nodesRef.current,ne=(J=q.find(ie=>ie.id===M))==null||(Q=J.context)==null?void 0:Q.elements.floating,ae=kn(Lt(a)),fe=q.some(ie=>ie.context&&vt(ie.context.elements.floating,ae));ne&&!fe&&N.current&&ne.focus({preventScroll:!0})},[c,a,$,M,y]),Ge(()=>{if(!c||!$||!y||M)return;function J(Q){K(Q.id),j&&(j.current=Q)}return $.events.on("virtualfocus",J),()=>{$.events.off("virtualfocus",J)}},[c,$,y,M,j]),Ge(()=>{B.current=D,Y.current=!!a}),Ge(()=>{n||(L.current=null)},[n]);const X=l!=null,Z=k.useMemo(()=>{function J(q){if(!n)return;const ne=s.current.indexOf(q);ne!==-1&&D(ne)}return{onFocus(q){let{currentTarget:ne}=q;J(ne)},onClick:q=>{let{currentTarget:ne}=q;return ne.focus({preventScroll:!0})},...b&&{onMouseMove(q){let{currentTarget:ne}=q;J(ne)},onPointerLeave(q){let{pointerType:ne}=q;!N.current||ne==="touch"||(F.current=-1,G(s,F),D(null),y||pn(i.floating.current,{preventScroll:!0}))}}}},[n,i,G,b,s,D,y]);return k.useMemo(()=>{if(!c)return{};const J=v.current;function Q(ie){if(N.current=!1,H.current=!0,!P.current&&ie.currentTarget===i.floating.current)return;if(m&&Ag(ie.key,S,h)){it(ie),r(!1,ie.nativeEvent),mr(o)&&!y&&o.focus();return}const pe=F.current,ge=uu(s,J),Me=mg(s,J);if(ie.key==="Home"&&(it(ie),F.current=ge,D(F.current)),ie.key==="End"&&(it(ie),F.current=Me,D(F.current)),!(E>1&&(F.current=yD(s,{event:ie,orientation:S,loop:d,cols:E,disabledIndices:J,minIndex:ge,maxIndex:Me,prevIndex:F.current,stopEvent:!0}),D(F.current),S==="both"))&&Pg(ie.key,S)){if(it(ie),n&&!y&&kn(ie.currentTarget.ownerDocument)===ie.currentTarget){F.current=gu(ie.key,S,h)?ge:Me,D(F.current);return}gu(ie.key,S,h)?d?F.current=pe>=Me?p&&pe!==s.current.length?-1:ge:ut(s,{startingIndex:pe,disabledIndices:J}):F.current=Math.min(Me,ut(s,{startingIndex:pe,disabledIndices:J})):d?F.current=pe<=ge?p&&pe!==-1?s.current.length:Me:ut(s,{startingIndex:pe,decrement:!0,disabledIndices:J}):F.current=Math.max(ge,ut(s,{startingIndex:pe,decrement:!0,disabledIndices:J})),Si(s,F.current)?D(null):D(F.current)}}function q(ie){g==="auto"&&Bv(ie.nativeEvent)&&(U.current=!0)}function ne(ie){U.current=g,g==="auto"&&zv(ie.nativeEvent)&&(U.current=!0)}const ae=y&&n&&X&&{"aria-activedescendant":V||x},fe=s.current.find(ie=>(ie==null?void 0:ie.id)===x);return{reference:{...ae,onKeyDown(ie){N.current=!1;const pe=ie.key.indexOf("Arrow")===0,ge=HD(ie.key,S,h),Me=Ag(ie.key,S,h),et=Pg(ie.key,S),wt=(m?ge:et)||ie.key==="Enter"||ie.key.trim()==="";if(y&&n){const le=$==null?void 0:$.nodesRef.current.find(z=>z.parentId==null),W=$&&le?CD($.nodesRef.current,le.id):null;if(pe&&W&&j){const z=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(ge||Me){var Mt,St;const ee=((Mt=W.context)==null?void 0:Mt.elements.domReference)===ie.currentTarget,oe=Me&&!ee?(St=W.context)==null?void 0:St.elements.domReference:ge?fe:null;oe&&(it(ie),oe.dispatchEvent(z),K(void 0))}if(et&&W.context&&W.context.open&&W.parentId&&ie.currentTarget!==W.context.elements.domReference){var re;it(ie),(re=W.context.elements.domReference)==null||re.dispatchEvent(z);return}}return Q(ie)}if(!(!n&&!w&&pe)){if(wt&&(L.current=m&&et?null:ie.key),m){ge&&(it(ie),n?(F.current=uu(s,J),D(F.current)):r(!0,ie.nativeEvent));return}et&&(f!=null&&(F.current=f),it(ie),!n&&w?r(!0,ie.nativeEvent):Q(ie),n&&D(F.current))}},onFocus(){n&&D(null)},onPointerDown:ne,onMouseDown:q,onClick:q},floating:{"aria-orientation":S==="both"?void 0:S,...ae,onKeyDown:Q,onPointerMove(){N.current=!0}},item:Z}},[o,i,x,V,v,P,s,c,S,h,y,n,X,m,f,w,p,E,d,g,D,r,Z,$,j])}function qD(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=fu();return k.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function KD(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=k.useRef(),h=k.useRef(""),y=k.useRef((n=d??a)!=null?n:-1),g=k.useRef(null),b=On(s),w=On(l),C=$n(c),S=$n(p);return Ge(()=>{r&&(clearTimeout(m.current),g.current=null,h.current="")},[r]),Ge(()=>{if(r&&h.current===""){var E;y.current=(E=d??a)!=null?E:-1}},[r,d,a]),k.useMemo(()=>{if(!u)return{};function E(M){M?i.current.typing||(i.current.typing=M,w(M)):i.current.typing&&(i.current.typing=M,w(M))}function O(M,$,D){const U=C.current?C.current($,D):$.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return U?M.indexOf(U):-1}function j(M){const $=o.current;if(h.current.length>0&&h.current[0]!==" "&&(O($,$,h.current)===-1?E(!1):M.key===" "&&it(M)),$==null||S.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;r&&M.key!==" "&&(it(M),E(!0)),$.every(L=>{var N,B;return L?((N=L[0])==null?void 0:N.toLocaleLowerCase())!==((B=L[1])==null?void 0:B.toLocaleLowerCase()):!0})&&h.current===M.key&&(h.current="",y.current=g.current),h.current+=M.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=g.current,E(!1)},f);const U=y.current,F=O($,[...$.slice((U||0)+1),...$.slice(0,(U||0)+1)],h.current);F!==-1?(b(F),g.current=F):M.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:j},floating:{onKeyDown:j,onKeyUp(M){M.key===" "&&E(!1)}}}},[u,r,i,o,f,S,C,b,w])}const GD=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var L,N,B,Y,H;const i=jo(R=>R.messageContainerRef),[o,a]=k.useState(!1),[s,l]=k.useState(null),[u,c]=k.useState(null),{message:{blocks:{dropdown:f}}}=ye,p=e.reduce((R,v)=>(R[v.label]=v.value,R),{}),d=p?Object.keys(p):[],m=R=>{a(u!==null&&!t?!1:R)},{refs:h,floatingStyles:y,context:g}=WD({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:VR,middleware:[JR(5),QR({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),ZR({apply({rects:R,elements:v,availableHeight:P}){Object.assign(v.floating.style,{maxHeight:`${P}px`,minWidth:`${R.reference.width}px`})},padding:10})]}),b=k.useRef([]),w=k.useRef(d),C=k.useRef(!1),S=ND(g,{event:"mousedown"}),E=zD(g),O=qD(g,{role:"listbox"}),j=VD(g,{listRef:b,activeIndex:s,selectedIndex:u,onNavigate:l,loop:!0}),M=KD(g,{listRef:w,activeIndex:s,selectedIndex:u,onMatch:o?l:c,onTypingChange(R){C.current=R}}),{getReferenceProps:$,getFloatingProps:D,getItemProps:U}=UD([E,O,j,M,S]),F=R=>{c(R),d[R]!==void 0&&(n==null||n({type:"text",text:d[R]??"",value:p[d[R]]??""})),a(!1)};return T.jsxs(T.Fragment,{children:[T.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(L=f.button)==null?void 0:L.container,...$(),children:[T.jsx("span",{...(N=f.button)==null?void 0:N.text,children:u?d[u]:"Select..."}),T.jsx(OP,{...(B=f.button)==null?void 0:B.icon})]}),o&&T.jsx(DD,{children:T.jsx(MD,{context:g,modal:!1,children:T.jsx("div",{ref:h.setFloating,className:(H=(Y=f.content)==null?void 0:Y.container)==null?void 0:H.className,style:{...y},...D(),children:d.map((R,v)=>{var P;return T.jsx("div",{ref:I=>{b.current[v]=I},role:"option",tabIndex:v===s?0:-1,"aria-selected":v===u&&v===s,"data-active":v===s?"":void 0,...(P=f.content)==null?void 0:P.item,...U({onClick(){F(v)},onKeyDown(I){I.key==="Enter"&&(I.preventDefault(),F(v)),I.key===" "&&!C.current&&(I.preventDefault(),F(v))}}),children:R},R)})})})})]})},Rg=A.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:o}}}=ye;return T.jsxs("a",{...r,...o.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[T.jsx("p",{...o.title,children:e||t}),T.jsx(_P,{...o.icon})]})});Rg.displayName="File";const YD=Hn()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(u=>u.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(u=>({components:{...u.components,[n]:l}})),l}}));globalThis.React=A;const Dg={audio:Ev,bubble:gv,button:$A,carousel:Mv,column:Cv,dropdown:GD,file:Rg,image:wv,location:kv,row:Tv,text:QP,video:Sv,custom:({url:e,name:t,data:n,...r})=>{const i=YD(u=>u.getCustomComponent),[o,a]=A.useState(null),[s,l]=A.useState(null);return A.useEffect(()=>{i(e).then(a).catch(u=>{l(u.message)})},[e]),s?T.jsx("div",{style:{color:"red"},children:s}):o?T.jsx(o,{...n,...r}):null}},Kn=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Dg[e.type],i={...n,...e};return T.jsx(r,{...i})};function _g(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_g(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Er(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_g(e))&&(r&&(r+=" "),r+=t);return r}const XD=({disabled:e,onFileSelected:t})=>{const n=A.useRef(null),{uploadButton:r}=ye.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return T.jsxs(T.Fragment,{children:[T.jsx(HP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),T.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},JD=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:u}=ye.composer.fileWidget,c=["PNG","JPEG","JPG"].includes(ua(e)),f=A.useMemo(()=>c?URL.createObjectURL(n):"",[n]);return r==="loading"?T.jsx(la,{name:e,status:r,removeButton:T.jsx("div",{...o}),extension:ua(e),children:T.jsx("div",{...a.container,children:T.jsx(yu,{type:t,...a.icon})})}):r==="error"?T.jsx(la,{name:e,status:r,removeButton:T.jsx(Mg,{removeFile:()=>i(e)}),extension:"Upload Error",children:T.jsxs("div",{...a.container,children:[T.jsx(AP,{...l}),T.jsx(yu,{type:t,...a.icon})]})}):r=="uploaded"&&c?T.jsx(la,{name:e,status:r,removeButton:T.jsx(Mg,{removeFile:()=>i(e)}),extension:ua(e),children:T.jsx("div",{...a.container,children:T.jsx("img",{src:f,alt:e,...u})})}):T.jsx(la,{name:e,status:r,removeButton:T.jsx(Um,{onClick:()=>i(e),...s}),extension:ua(e),children:T.jsx("div",{...a.container,children:T.jsx(yu,{type:t,...a.icon})})})},la=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=ye.composer.fileWidget;return T.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,T.jsxs("div",{...a.container,children:[T.jsx("div",{...a.name,children:e}),T.jsx("div",{...a.type,children:i})]})]})},yu=({type:e,...t})=>e==="image"?T.jsx(jP,{...t}):e==="video"?T.jsx(GP,{...t}):e==="audio"?T.jsx(YP,{...t}):T.jsx(Hm,{...t}),ua=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Mg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ye;return T.jsx(Um,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bu.apply(null,arguments)}function QD(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var ZD=A.useLayoutEffect,e_=function(t){var n=k.useRef(t);return ZD(function(){n.current=t}),n},Ng=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},t_=function(t,n){var r=A.useRef();return A.useCallback(function(i){t.current=i,r.current&&Ng(r.current,null),r.current=n,n&&Ng(n,i)},[n])},jg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},n_=function(t){Object.keys(jg).forEach(function(n){t.style.setProperty(n,jg[n],"important")})},Lg=n_,pt=null,Fg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function r_(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),pt||(pt=document.createElement("textarea"),pt.setAttribute("tabindex","-1"),pt.setAttribute("aria-hidden","true"),Lg(pt)),pt.parentNode===null&&document.body.appendChild(pt);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;pt.style[d]=a[d]}),Lg(pt),pt.value=t;var l=Fg(pt,e);pt.value=t,l=Fg(pt,e),pt.value="x";var u=pt.scrollHeight-i,c=u*n;s==="border-box"&&(c=c+i+o),l=Math.max(c,l);var f=u*r;return s==="border-box"&&(f=f+i+o),l=Math.min(f,l),[l,u]}var Bg=function(){},i_=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},o_=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],a_=!!document.documentElement.currentStyle,s_=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=i_(o_,n),i=r.boxSizing;if(i==="")return null;a_&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},l_=s_;function zg(e,t,n){var r=e_(n);k.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var u_=function(t){zg(window,"resize",t)},c_=function(t){zg(document.fonts,"loadingdone",t)},f_=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],d_=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?Bg:a,l=t.onHeightChange,u=l===void 0?Bg:l,c=QD(t,f_),f=c.value!==void 0,p=k.useRef(null),d=t_(p,n),m=k.useRef(0),h=k.useRef(),y=function(){var w=p.current,C=r&&h.current?h.current:l_(w);if(C){h.current=C;var S=r_(C,w.value||w.placeholder||"x",o,i),E=S[0],O=S[1];m.current!==E&&(m.current=E,w.style.setProperty("height",E+"px","important"),u(E,{rowHeight:O}))}},g=function(w){f||y(),s(w)};return k.useLayoutEffect(y),u_(y),c_(y),k.createElement("textarea",bu({},c,{onChange:g,ref:d}))},p_=k.forwardRef(d_);const h_=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s})=>{const l=nv(c=>c.messageHistory),{input:u}=ye.composer;return T.jsx(p_,{...u,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:c=>o(c.target.value),maxRows:5,onKeyDown:c=>{n||(c.key==="Enter"&&c.shiftKey?(c.preventDefault(),o(`${r}
|
|
254
|
-
`)):c.key==="Enter"&&(c.preventDefault(),s()),c.key==="ArrowUp"&&(c.preventDefault(),i<l.length-1&&o(l[i+1]??""),a(Math.min(i+1,l.length-1))),c.key==="ArrowDown"&&(c.preventDefault(),o(i===0?"":l[i-1]??""),a(Math.max(i-1,-1))))}})},
|
|
280
|
+
*/var TR=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ou=TR.join(","),Ng=typeof Element>"u",Fi=Ng?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xa=!Ng&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},wa=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},OR=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},IR=function(t,n,r){if(wa(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ou));return n&&Fi.call(t,Ou)&&i.unshift(t),i=i.filter(r),i},PR=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!wa(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var c=Fi.call(a,Ou);c&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},jg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Lg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||OR(t))&&!jg(t)?0:t.tabIndex},AR=function(t,n){var r=Lg(t);return r<0&&n&&!jg(t)?0:r},_R=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Fg=function(t){return t.tagName==="INPUT"},RR=function(t){return Fg(t)&&t.type==="hidden"},DR=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},MR=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},NR=function(t){if(!t.name)return!0;var n=t.form||xa(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=MR(i,t.form);return!o||o===t},jR=function(t){return Fg(t)&&t.type==="radio"},LR=function(t){return jR(t)&&!NR(t)},FR=function(t){var n,r=t&&xa(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,f;r=xa(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},Bg=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},BR=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Fi.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Fi.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=xa(t);if(l&&!l.shadowRoot&&i(l)===!0)return Bg(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(FR(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Bg(t);return!1},zR=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Fi.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},WR=function(t,n){return!(n.disabled||wa(n)||RR(n)||BR(n,t)||DR(n)||zR(n))},zg=function(t,n){return!(LR(n)||Lg(n)<0||!WR(t,n))},UR=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},HR=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=AR(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(_R).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Iu=function(t,n){n=n||{};var r;return n.getShadowRoot?r=PR([t],n.includeContainer,{filter:zg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:UR}):r=IR(t,n.includeContainer,zg.bind(null,n)),HR(r)};const Pu="ArrowUp",Sa="ArrowDown",Lr="ArrowLeft",Bi="ArrowRight";function Ea(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Au(e,t){return xt(e,{disabledIndices:t})}function Wg(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,u;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((u=a[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function VR(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}=t,f=u;if(n.key===Pu){if(c&&ht(n),u===-1)f=l;else if(f=xt(e,{startingIndex:f,amount:o,decrement:!0,disabledIndices:a}),i&&(u-o<s||f<0)){const p=u%o,d=l%o,m=l-(d-p);d===p?f=l:f=d>p?m:m-o}zi(e,f)&&(f=u)}if(n.key===Sa&&(c&&ht(n),u===-1?f=s:(f=xt(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(f=xt(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),zi(e,f)&&(f=u)),r==="both"){const p=ug(u/o);n.key===Bi&&(c&&ht(n),u%o!==o-1?(f=xt(e,{startingIndex:u,disabledIndices:a}),i&&Ea(f,o,p)&&(f=xt(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(f=xt(e,{startingIndex:u-u%o-1,disabledIndices:a})),Ea(f,o,p)&&(f=u)),n.key===Lr&&(c&&ht(n),u%o!==0?(f=xt(e,{startingIndex:u,disabledIndices:a,decrement:!0}),i&&Ea(f,o,p)&&(f=xt(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(f=xt(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),Ea(f,o,p)&&(f=u));const d=ug(l/o)===p;zi(e,f)&&(i&&d?f=n.key===Lr?l:xt(e,{startingIndex:u-u%o-1,disabledIndices:a}):f=u)}return f}let Ug=0;function Tn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Ug);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():Ug=requestAnimationFrame(o)}var st=typeof document<"u"?I.useLayoutEffect:I.useEffect;function ka(){return ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ka.apply(this,arguments)}let _u=!1,qR=0;const Hg=()=>"floating-ui-"+qR++;function KR(){const[e,t]=k.useState(()=>_u?Hg():void 0);return st(()=>{e==null&&t(Hg())},[]),k.useEffect(()=>{_u||(_u=!0)},[]),e}const Ru=k.useId||KR;function GR(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const YR=k.createContext(null),XR=k.createContext(null),Vg=()=>{var e;return((e=k.useContext(YR))==null?void 0:e.id)||null},Ca=()=>k.useContext(XR);function Wi(e){return"data-floating-ui-"+e}function Wn(e){const t=I.useRef(e);return st(()=>{t.current=e}),t}function JR(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function Fr(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function ZR(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),Fr(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let Br=new WeakMap,$a=new WeakSet,Ta={},Du=0;const QR=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qg=e=>e&&(e.host||qg(e.parentNode)),eD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function tD(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=eD(t,e),s=new Set,l=new Set(a),u=[];Ta[i]||(Ta[i]=new WeakMap);const c=Ta[i];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=o?m.getAttribute(o):null,g=h!==null&&h!=="false",v=(Br.get(m)||0)+1,b=(c.get(m)||0)+1;Br.set(m,v),c.set(m,b),u.push(m),v===1&&g&&$a.add(m),b===1&&m.setAttribute(i,""),!g&&o&&m.setAttribute(o,"true")}})}return Du++,()=>{u.forEach(d=>{const m=(Br.get(d)||0)-1,h=(c.get(d)||0)-1;Br.set(d,m),c.set(d,h),m||(!$a.has(d)&&o&&d.removeAttribute(o),$a.delete(d)),h||d.removeAttribute(i)}),Du--,Du||(Br=new WeakMap,Br=new WeakMap,$a=new WeakSet,Ta={})}}function Kg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zt(e[0]).body;return tD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Mu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Gg(e,t){const n=Iu(e,Mu());t==="prev"&&n.reverse();const r=n.indexOf(Fn(Zt(e)));return n.slice(r+1)[0]}function Yg(){return Gg(document.body,"next")}function Xg(){return Gg(document.body,"prev")}function Ui(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Pt(n,r)}function nD(e){Iu(e,Mu()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function rD(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Nu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let iD;function Jg(e){e.key==="Tab"&&(e.target,clearTimeout(iD))}const Oa=k.forwardRef(function(t,n){const[r,i]=k.useState();st(()=>(mg()&&i("button"),document.addEventListener("keydown",Jg),()=>{document.removeEventListener("keydown",Jg)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wi("focus-guard")]:"",style:Nu};return k.createElement("span",ka({},t,o))}),Zg=k.createContext(null);function oD(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=k.useState(null),o=Ru(),a=Qg(),s=k.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=k.useRef();return st(()=>()=>{r==null||r.remove()},[r,s]),st(()=>{if(l.current===s)return;l.current=s;const{id:u,root:c,portalContext:f,uniqueId:p}=s,d=u?document.getElementById(u):null,m=Wi("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!qt(h)&&(h=h.current),h=h||document.body;let g=null;u&&(g=document.createElement("div"),g.id=u,h.appendChild(g));const v=document.createElement("div");v.id=p,v.setAttribute(m,""),h=g||h,h.appendChild(v),i(v)}},[s]),r}function aD(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=oD({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),u=k.useRef(null),c=k.useRef(null),f=k.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return k.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(m){o&&Ui(m)&&(m.type==="focusin"?rD:nD)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),k.createElement(Zg.Provider,{value:k.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&k.createElement(Oa,{"data-type":"outside",ref:l,onFocus:d=>{if(Ui(d,o)){var m;(m=c.current)==null||m.focus()}else{const h=Xg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&k.createElement("span",{"aria-owns":o.id,style:Nu}),o&&er.createPortal(t,o),p&&o&&k.createElement(Oa,{"data-type":"outside",ref:u,onFocus:d=>{if(Ui(d,o)){var m;(m=f.current)==null||m.focus()}else{const h=Yg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Qg=()=>k.useContext(Zg),sD=k.forwardRef(function(t,n){return k.createElement("button",ka({},t,{type:"button",ref:n,tabIndex:-1,style:Nu}))});function lD(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:m,events:h,dataRef:g,elements:{domReference:v,floating:b}}=t,x=QR()?o:!0,$=Wn(i),S=Wn(a),E=Wn(s),O=Ca(),F=Qg(),D=typeof a=="number"&&a<0,T=k.useRef(null),M=k.useRef(null),H=k.useRef(!1),B=k.useRef(null),L=k.useRef(!1),N=F!=null,W=v&&v.getAttribute("role")==="combobox"&&yg(v)&&D,X=k.useCallback(function(R){return R===void 0&&(R=b),R?Iu(R,Mu()):[]},[b]),V=k.useCallback(R=>{const P=X(R);return $.current.map(w=>v&&w==="reference"?v:b&&w==="floating"?b:P).filter(Boolean).flat()},[v,b,$,X]);k.useEffect(()=>{if(r||!l)return;function R(w){if(w.key==="Tab"){Pt(b,Fn(Zt(b)))&&X().length===0&&!W&&ht(w);const j=V(),G=gg(w);$.current[0]==="reference"&&G===v&&(ht(w),w.shiftKey?Tn(j[j.length-1]):Tn(j[1])),$.current[1]==="floating"&&G===b&&w.shiftKey&&(ht(w),Tn(j[0]))}}const P=Zt(b);return P.addEventListener("keydown",R),()=>{P.removeEventListener("keydown",R)}},[r,v,b,l,$,p,W,X,V]),k.useEffect(()=>{if(r||!c)return;function R(){L.current=!0,setTimeout(()=>{L.current=!1})}function P(w){const j=w.relatedTarget;queueMicrotask(()=>{const G=!(Pt(v,j)||Pt(b,j)||Pt(j,b)||Pt(F==null?void 0:F.portalNode,j)||j!=null&&j.hasAttribute(Wi("focus-guard"))||O&&(Fr(O.nodesRef.current,d).find(K=>{var Y,Q;return Pt((Y=K.context)==null?void 0:Y.elements.floating,j)||Pt((Q=K.context)==null?void 0:Q.elements.domReference,j)})||JR(O.nodesRef.current,d).find(K=>{var Y,Q;return((Y=K.context)==null?void 0:Y.elements.floating)===j||((Q=K.context)==null?void 0:Q.elements.domReference)===j})));j&&G&&!L.current&&j!==B.current&&(H.current=!0,m(!1,w))})}if(b&&Rr(v))return v.addEventListener("focusout",P),v.addEventListener("pointerdown",R),!l&&b.addEventListener("focusout",P),()=>{v.removeEventListener("focusout",P),v.removeEventListener("pointerdown",R),!l&&b.removeEventListener("focusout",P)}},[r,v,b,l,d,O,F,m,c]),k.useEffect(()=>{var R;if(r)return;const P=Array.from((F==null||(R=F.portalNode)==null?void 0:R.querySelectorAll("["+Wi("portal")+"]"))||[]);if(b){const w=[b,...P,T.current,M.current,$.current.includes("reference")||W?v:null].filter(G=>G!=null),j=l?Kg(w,x,!x):Kg(w);return()=>{j()}}},[r,v,b,l,$,F,W,x]),st(()=>{if(r||!b)return;const R=Zt(b),P=Fn(R);queueMicrotask(()=>{const w=V(b),j=S.current,G=(typeof j=="number"?w[j]:j.current)||b,K=Pt(b,P);!D&&!K&&f&&Tn(G,{preventScroll:G===b})})},[r,f,b,D,V,S]),st(()=>{if(r||!b)return;let R=!1;const P=Zt(b),w=Fn(P),j=g.current;B.current=w;function G(K){if(K.type==="escapeKey"&&p.domReference.current&&(B.current=p.domReference.current),["referencePress","escapeKey"].includes(K.type))return;const Y=K.data.returnFocus;typeof Y=="object"?(H.current=!1,R=Y.preventScroll):H.current=!Y}return h.on("dismiss",G),()=>{h.off("dismiss",G);const K=Fn(P);(Pt(b,K)||O&&Fr(O.nodesRef.current,d).some(Q=>{var ee;return Pt((ee=Q.context)==null?void 0:ee.elements.floating,K)})||j.openEvent&&["click","mousedown"].includes(j.openEvent.type))&&p.domReference.current&&(B.current=p.domReference.current),E.current&&Rr(B.current)&&!H.current&&Tn(B.current,{cancelPrevious:!1,preventScroll:R})}},[r,b,E,g,p,h,O,d]),st(()=>{if(!(r||!F))return F.setFocusManagerState({modal:l,closeOnFocusOut:c,open:f,onOpenChange:m,refs:p}),()=>{F.setFocusManagerState(null)}},[r,F,l,f,m,p,c]),st(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!D){const R=()=>{const w=b.getAttribute("tabindex");$.current.includes("floating")||Fn(Zt(b))!==p.domReference.current&&X().length===0?w!=="0"&&b.setAttribute("tabindex","0"):w!=="-1"&&b.setAttribute("tabindex","-1")};R();const P=new MutationObserver(R);return P.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{P.disconnect()}}},[r,b,p,$,X,D]);function _(R){return r||!u||!l?null:k.createElement(sD,{ref:R==="start"?T:M,onClick:P=>m(!1,P.nativeEvent)},typeof u=="string"?u:"Dismiss")}const y=!r&&x&&!W&&(N||l);return k.createElement(k.Fragment,null,y&&k.createElement(Oa,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:R=>{if(l){const w=V();Tn(i[0]==="reference"?w[0]:w[w.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(H.current=!1,Ui(R,F.portalNode)){const w=Yg()||v;w==null||w.focus()}else{var P;(P=F.beforeOutsideRef.current)==null||P.focus()}}}),!W&&_("start"),n,_("end"),y&&k.createElement(Oa,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:R=>{if(l)Tn(V()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(c&&(H.current=!0),Ui(R,F.portalNode)){const w=Xg()||v;w==null||w.focus()}else{var P;(P=F.afterOutsideRef.current)==null||P.focus()}}}))}function ey(e){return Rr(e.target)&&e.target.tagName==="BUTTON"}function ty(e){return yg(e)}function uD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0}=t,f=k.useRef(),p=k.useRef(!1);return k.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(vg(f.current)&&u||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}vg(f.current)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||ey(d))&&(d.key===" "&&!ty(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||ey(d)||ty(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,u,c,o,l,n,r])}const cD=k.useInsertionEffect||(e=>e());function Un(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return cD(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const fD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},pD=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function hD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:v}=t,b=Ca(),x=Vg()!=null,$=Un(typeof p=="function"?p:()=>!1),S=typeof p=="function"?$:p,E=k.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:F}=pD(v),D=Un(M=>{if(!n||!c||!f||M.key!=="Escape")return;const H=b?Fr(b.nodesRef.current,o):[];if(!O&&(M.stopPropagation(),H.length>0)){let B=!0;if(H.forEach(L=>{var N;if((N=L.context)!=null&&N.open&&!L.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,U_(M)?M.nativeEvent:M)}),T=Un(M=>{const H=E.current;if(E.current=!1,H||typeof S=="function"&&!S(M))return;const B=gg(M),L="["+Wi("inert")+"]",N=Zt(l).querySelectorAll(L);let W=qt(B)?B:null;for(;W&&!L_(W);){const _=B_(W);if(_===Zt(l).body||!qt(_))break;W=_}if(N.length&&qt(B)&&!H_(B)&&!Pt(B,l)&&Array.from(N).every(_=>!Pt(W,_)))return;if(Rr(B)&&l){const _=B.clientWidth>0&&B.scrollWidth>B.clientWidth,y=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let R=y&&M.offsetX>B.clientWidth;if(y&&F_(B).direction==="rtl"&&(R=M.offsetX<=B.offsetWidth-B.clientWidth),R||_&&M.offsetY>B.clientHeight)return}const X=b&&Fr(b.nodesRef.current,o).some(_=>{var y;return bu(M,(y=_.context)==null?void 0:y.elements.floating)});if(bu(M,l)||bu(M,s)||X)return;const V=b?Fr(b.nodesRef.current,o):[];if(V.length>0){let _=!0;if(V.forEach(y=>{var R;if((R=y.context)!=null&&R.open&&!y.context.dataRef.current.__outsidePressBubbles){_=!1;return}}),!_)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:pg(M)||hg(M)}}),r(!1,M)});return k.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=O,u.current.__outsidePressBubbles=F;function M(L){r(!1,L)}const H=Zt(l);f&&H.addEventListener("keydown",D),S&&H.addEventListener(d,T);let B=[];return g&&(qt(s)&&(B=zn(s)),qt(l)&&(B=B.concat(zn(l))),!qt(a)&&a&&a.contextElement&&(B=B.concat(zn(a.contextElement)))),B=B.filter(L=>{var N;return L!==((N=H.defaultView)==null?void 0:N.visualViewport)}),B.forEach(L=>{L.addEventListener("scroll",M,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",D),S&&H.removeEventListener(d,T),B.forEach(L=>{L.removeEventListener("scroll",M)})}},[u,l,s,a,f,S,d,n,r,g,c,O,F,D,T]),k.useEffect(()=>{E.current=!1},[S,d]),k.useMemo(()=>c?{reference:{onKeyDown:D,[fD[h]]:M=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:D,[dD[d]]:()=>{E.current=!0}}}:{},[c,i,m,d,h,r,D])}let ju;process.env.NODE_ENV!=="production"&&(ju=new Set);function mD(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const O="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!qt(e.elements.reference)){var a;if(!((a=ju)!=null&&a.has(O))){var s;(s=ju)==null||s.add(O),console.error(O)}}}const[l,u]=k.useState(null),c=((t=e.elements)==null?void 0:t.reference)||l,f=ER(e),p=Ca(),d=Un((O,F)=>{O&&(h.current.openEvent=F),r==null||r(O,F)}),m=k.useRef(null),h=k.useRef({}),g=k.useState(()=>GR())[0],v=Ru(),b=k.useCallback(O=>{const F=qt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(F)},[f.refs]),x=k.useCallback(O=>{(qt(O)||O===null)&&(m.current=O,u(O)),(qt(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!qt(O))&&f.refs.setReference(O)},[f.refs]),$=k.useMemo(()=>({...f.refs,setReference:x,setPositionReference:b,domReference:m}),[f.refs,x,b]),S=k.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=k.useMemo(()=>({...f,refs:$,elements:S,dataRef:h,nodeId:i,floatingId:v,events:g,open:n,onOpenChange:d}),[f,i,v,g,n,d,$,S]);return st(()=>{const O=p==null?void 0:p.nodesRef.current.find(F=>F.id===i);O&&(O.context=E)}),k.useMemo(()=>({...f,context:E,refs:$,elements:S}),[f,$,S,E])}function Lu(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=l}),i),{})}}function vD(e){e===void 0&&(e=[]);const t=e,n=k.useCallback(o=>Lu(o,e,"reference"),t),r=k.useCallback(o=>Lu(o,e,"floating"),t),i=k.useCallback(o=>Lu(o,e,"item"),e.map(o=>o==null?void 0:o.item));return k.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let ny=!1;function Ia(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ry(e,t){return Ia(t,e===Pu||e===Sa,e===Lr||e===Bi)}function Fu(e,t,n){return Ia(t,e===Sa,n?e===Lr:e===Bi)||e==="Enter"||e==" "||e===""}function gD(e,t,n){return Ia(t,n?e===Lr:e===Bi,e===Sa)}function iy(e,t,n){return Ia(t,n?e===Bi:e===Lr,e===Pu)}function yD(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:v="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:x=!0,disabledIndices:$=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:O=!0,virtualItemRef:F}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),g||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const D=Vg(),T=Ca(),M=Un(u),H=k.useRef(v),B=k.useRef(f??-1),L=k.useRef(null),N=k.useRef(!0),W=k.useRef(M),X=k.useRef(!!a),V=k.useRef(!1),_=k.useRef(!1),y=Wn($),R=Wn(n),P=Wn(O),[w,j]=k.useState(),[G,K]=k.useState(),Y=Un(function(J,Z,q){q===void 0&&(q=!1);const ie=J.current[Z.current];ie&&(g?(j(ie.id),T==null||T.events.emit("virtualfocus",ie),F&&(F.current=ie)):Tn(ie,{preventScroll:!0,sync:W_()&&mg()?ny||V.current:!1}),requestAnimationFrame(()=>{const le=P.current;le&&ie&&(q||!N.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le))}))});st(()=>{document.createElement("div").focus({get preventScroll(){return ny=!0,!1}})},[]),st(()=>{c&&(n&&a?H.current&&f!=null&&(_.current=!0,M(f)):X.current&&(B.current=-1,W.current(null)))},[c,n,a,f,M]),st(()=>{if(c&&n&&a)if(l==null){if(V.current=!1,f!=null)return;if(X.current&&(B.current=-1,Y(s,B)),!X.current&&H.current&&(L.current!=null||H.current===!0&&L.current==null)){let J=0;const Z=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Z),J++):(B.current=L.current==null||Fu(L.current,S,h)||m?Au(s,y.current):Wg(s,y.current),L.current=null,M(B.current))};Z()}}else zi(s,l)||(B.current=l,Y(s,B,_.current),_.current=!1)},[c,n,a,l,f,m,s,S,h,M,Y,y]),st(()=>{var J,Z;if(!c||a||!T||g||!X.current)return;const q=T.nodesRef.current,ie=(J=q.find(ae=>ae.id===D))==null||(Z=J.context)==null?void 0:Z.elements.floating,le=Fn(Zt(a)),pe=q.some(ae=>ae.context&&Pt(ae.context.elements.floating,le));ie&&!pe&&N.current&&ie.focus({preventScroll:!0})},[c,a,T,D,g]),st(()=>{if(!c||!T||!g||D)return;function J(Z){K(Z.id),F&&(F.current=Z)}return T.events.on("virtualfocus",J),()=>{T.events.off("virtualfocus",J)}},[c,T,g,D,F]),st(()=>{W.current=M,X.current=!!a}),st(()=>{n||(L.current=null)},[n]);const Q=l!=null,ee=k.useMemo(()=>{function J(q){if(!n)return;const ie=s.current.indexOf(q);ie!==-1&&M(ie)}return{onFocus(q){let{currentTarget:ie}=q;J(ie)},onClick:q=>{let{currentTarget:ie}=q;return ie.focus({preventScroll:!0})},...b&&{onMouseMove(q){let{currentTarget:ie}=q;J(ie)},onPointerLeave(q){let{pointerType:ie}=q;!N.current||ie==="touch"||(B.current=-1,Y(s,B),M(null),g||Tn(i.floating.current,{preventScroll:!0}))}}}},[n,i,Y,b,s,M,g]);return k.useMemo(()=>{if(!c)return{};const J=y.current;function Z(ae){if(N.current=!1,V.current=!0,!R.current&&ae.currentTarget===i.floating.current)return;if(m&&iy(ae.key,S,h)){ht(ae),r(!1,ae.nativeEvent),Rr(o)&&!g&&o.focus();return}const ve=B.current,be=Au(s,J),_e=Wg(s,J);if(ae.key==="Home"&&(ht(ae),B.current=be,M(B.current)),ae.key==="End"&&(ht(ae),B.current=_e,M(B.current)),!(E>1&&(B.current=VR(s,{event:ae,orientation:S,loop:d,cols:E,disabledIndices:J,minIndex:be,maxIndex:_e,prevIndex:B.current,stopEvent:!0}),M(B.current),S==="both"))&&ry(ae.key,S)){if(ht(ae),n&&!g&&Fn(ae.currentTarget.ownerDocument)===ae.currentTarget){B.current=Fu(ae.key,S,h)?be:_e,M(B.current);return}Fu(ae.key,S,h)?d?B.current=ve>=_e?p&&ve!==s.current.length?-1:be:xt(s,{startingIndex:ve,disabledIndices:J}):B.current=Math.min(_e,xt(s,{startingIndex:ve,disabledIndices:J})):d?B.current=ve<=be?p&&ve!==-1?s.current.length:_e:xt(s,{startingIndex:ve,decrement:!0,disabledIndices:J}):B.current=Math.max(be,xt(s,{startingIndex:ve,decrement:!0,disabledIndices:J})),zi(s,B.current)?M(null):M(B.current)}}function q(ae){v==="auto"&&pg(ae.nativeEvent)&&(H.current=!0)}function ie(ae){H.current=v,v==="auto"&&hg(ae.nativeEvent)&&(H.current=!0)}const le=g&&n&&Q&&{"aria-activedescendant":G||w},pe=s.current.find(ae=>(ae==null?void 0:ae.id)===w);return{reference:{...le,onKeyDown(ae){N.current=!1;const ve=ae.key.indexOf("Arrow")===0,be=gD(ae.key,S,h),_e=iy(ae.key,S,h),rt=ry(ae.key,S),Et=(m?be:rt)||ae.key==="Enter"||ae.key.trim()==="";if(g&&n){const fe=T==null?void 0:T.nodesRef.current.find(z=>z.parentId==null),U=T&&fe?ZR(T.nodesRef.current,fe.id):null;if(ve&&U&&F){const z=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(be||_e){var kt,Ct;const ne=((kt=U.context)==null?void 0:kt.elements.domReference)===ae.currentTarget,se=_e&&!ne?(Ct=U.context)==null?void 0:Ct.elements.domReference:be?pe:null;se&&(ht(ae),se.dispatchEvent(z),K(void 0))}if(rt&&U.context&&U.context.open&&U.parentId&&ae.currentTarget!==U.context.elements.domReference){var oe;ht(ae),(oe=U.context.elements.domReference)==null||oe.dispatchEvent(z);return}}return Z(ae)}if(!(!n&&!x&&ve)){if(Et&&(L.current=m&&rt?null:ae.key),m){be&&(ht(ae),n?(B.current=Au(s,J),M(B.current)):r(!0,ae.nativeEvent));return}rt&&(f!=null&&(B.current=f),ht(ae),!n&&x?r(!0,ae.nativeEvent):Z(ae),n&&M(B.current))}},onFocus(){n&&M(null)},onPointerDown:ie,onMouseDown:q,onClick:q},floating:{"aria-orientation":S==="both"?void 0:S,...le,onKeyDown:Z,onPointerMove(){N.current=!0}},item:ee}},[o,i,w,G,y,R,s,c,S,h,g,n,Q,m,f,x,p,E,d,v,M,r,ee,T,F])}function bD(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=Ru();return k.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function xD(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=k.useRef(),h=k.useRef(""),g=k.useRef((n=d??a)!=null?n:-1),v=k.useRef(null),b=Un(s),x=Un(l),$=Wn(c),S=Wn(p);return st(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),st(()=>{if(r&&h.current===""){var E;g.current=(E=d??a)!=null?E:-1}},[r,d,a]),k.useMemo(()=>{if(!u)return{};function E(D){D?i.current.typing||(i.current.typing=D,x(D)):i.current.typing&&(i.current.typing=D,x(D))}function O(D,T,M){const H=$.current?$.current(T,M):T.find(B=>(B==null?void 0:B.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return H?D.indexOf(H):-1}function F(D){const T=o.current;if(h.current.length>0&&h.current[0]!==" "&&(O(T,T,h.current)===-1?E(!1):D.key===" "&&ht(D)),T==null||S.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(ht(D),E(!0)),T.every(L=>{var N,W;return L?((N=L[0])==null?void 0:N.toLocaleLowerCase())!==((W=L[1])==null?void 0:W.toLocaleLowerCase()):!0})&&h.current===D.key&&(h.current="",g.current=v.current),h.current+=D.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",g.current=v.current,E(!1)},f);const H=g.current,B=O(T,[...T.slice((H||0)+1),...T.slice(0,(H||0)+1)],h.current);B!==-1?(b(B),v.current=B):D.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:F},floating:{onKeyDown:F,onKeyUp(D){D.key===" "&&E(!1)}}}},[u,r,i,o,f,S,$,b,x])}const wD=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var L,N,W,X,V;const i=oa(_=>_.messageContainerRef),[o,a]=k.useState(!1),[s,l]=k.useState(null),[u,c]=k.useState(null),{message:{blocks:{dropdown:f}}}=Se,p=e.reduce((_,y)=>(_[y.label]=y.value,_),{}),d=p?Object.keys(p):[],m=_=>{a(u!==null&&!t?!1:_)},{refs:h,floatingStyles:g,context:v}=mD({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:yR,middleware:[kR(5),CR({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),$R({apply({rects:_,elements:y,availableHeight:R}){Object.assign(y.floating.style,{maxHeight:`${R}px`,minWidth:`${_.reference.width}px`})},padding:10})]}),b=k.useRef([]),x=k.useRef(d),$=k.useRef(!1),S=uD(v,{event:"mousedown"}),E=hD(v),O=bD(v,{role:"listbox"}),F=yD(v,{listRef:b,activeIndex:s,selectedIndex:u,onNavigate:l,loop:!0}),D=xD(v,{listRef:x,activeIndex:s,selectedIndex:u,onMatch:o?l:c,onTypingChange(_){$.current=_}}),{getReferenceProps:T,getFloatingProps:M,getItemProps:H}=vD([E,O,F,D,S]),B=_=>{c(_),d[_]!==void 0&&(n==null||n({type:"text",text:d[_]??"",value:p[d[_]]??""})),a(!1)};return C.jsxs(C.Fragment,{children:[C.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(L=f.button)==null?void 0:L.container,...T(),children:[C.jsx("span",{...(N=f.button)==null?void 0:N.text,children:u?d[u]:"Select..."}),C.jsx(eA,{...(W=f.button)==null?void 0:W.icon})]}),o&&C.jsx(aD,{children:C.jsx(lD,{context:v,modal:!1,children:C.jsx("div",{ref:h.setFloating,className:(V=(X=f.content)==null?void 0:X.container)==null?void 0:V.className,style:{...g},...M(),children:d.map((_,y)=>{var R;return C.jsx("div",{ref:P=>{b.current[y]=P},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===u&&y===s,"data-active":y===s?"":void 0,...(R=f.content)==null?void 0:R.item,...H({onClick(){B(y)},onKeyDown(P){P.key==="Enter"&&(P.preventDefault(),B(y)),P.key===" "&&!$.current&&(P.preventDefault(),B(y))}}),children:_},_)})})})})]})},oy=I.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:o}}}=Se;return C.jsxs("a",{...r,...o.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...o.title,children:e||t}),C.jsx(aA,{...o.icon})]})});oy.displayName="File";const SD=or()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(u=>u.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(u=>({components:{...u.components,[n]:l}})),l}}));globalThis.React=I;const ay={audio:Xv,bubble:Hv,button:e_,carousel:lg,column:Zv,dropdown:wD,file:oy,image:Gv,location:Jv,row:Qv,text:CA,video:Yv,custom:({url:e,name:t,data:n,...r})=>{const i=SD(u=>u.getCustomComponent),[o,a]=I.useState(null),[s,l]=I.useState(null);return I.useEffect(()=>{i(e).then(a).catch(u=>{l(u.message)})},[e]),s?C.jsx("div",{style:{color:"red"},children:s}):o?C.jsx(o,{...n,...r}):null}},lr=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??ay[e.type],i={...n,...e};return C.jsx(r,{...i})};function sy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=sy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sy(e))&&(r&&(r+=" "),r+=t);return r}const ED=({disabled:e,onFileSelected:t})=>{const n=I.useRef(null),{uploadButton:r}=Se.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return C.jsxs(C.Fragment,{children:[C.jsx(vA,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),C.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},kD=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:u}=Se.composer.fileWidget,c=["PNG","JPEG","JPG"].includes(Aa(e)),f=I.useMemo(()=>c?URL.createObjectURL(n):"",[n]);return r==="loading"?C.jsx(Pa,{name:e,status:r,removeButton:C.jsx("div",{...o}),extension:Aa(e),children:C.jsx("div",{...a.container,children:C.jsx(Bu,{type:t,...a.icon})})}):r==="error"?C.jsx(Pa,{name:e,status:r,removeButton:C.jsx(ly,{removeFile:()=>i(e)}),extension:"Upload Error",children:C.jsxs("div",{...a.container,children:[C.jsx(rA,{...l}),C.jsx(Bu,{type:t,...a.icon})]})}):r=="uploaded"&&c?C.jsx(Pa,{name:e,status:r,removeButton:C.jsx(ly,{removeFile:()=>i(e)}),extension:Aa(e),children:C.jsx("div",{...a.container,children:C.jsx("img",{src:f,alt:e,...u})})}):C.jsx(Pa,{name:e,status:r,removeButton:C.jsx(mv,{onClick:()=>i(e),...s}),extension:Aa(e),children:C.jsx("div",{...a.container,children:C.jsx(Bu,{type:t,...a.icon})})})},Pa=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=Se.composer.fileWidget;return C.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,C.jsxs("div",{...a.container,children:[C.jsx("div",{...a.name,children:e}),C.jsx("div",{...a.type,children:i})]})]})},Bu=({type:e,...t})=>e==="image"?C.jsx(uA,{...t}):e==="video"?C.jsx(wA,{...t}):e==="audio"?C.jsx(SA,{...t}):C.jsx(vv,{...t}),Aa=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},ly=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=Se;return C.jsx(mv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function zu(){return zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zu.apply(null,arguments)}function CD(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var $D=I.useLayoutEffect,TD=function(t){var n=k.useRef(t);return $D(function(){n.current=t}),n},uy=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},OD=function(t,n){var r=I.useRef();return I.useCallback(function(i){t.current=i,r.current&&uy(r.current,null),r.current=n,n&&uy(n,i)},[n])},cy={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},ID=function(t){Object.keys(cy).forEach(function(n){t.style.setProperty(n,cy[n],"important")})},fy=ID,Tt=null,dy=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function PD(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Tt||(Tt=document.createElement("textarea"),Tt.setAttribute("tabindex","-1"),Tt.setAttribute("aria-hidden","true"),fy(Tt)),Tt.parentNode===null&&document.body.appendChild(Tt);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;Tt.style[d]=a[d]}),fy(Tt),Tt.value=t;var l=dy(Tt,e);Tt.value=t,l=dy(Tt,e),Tt.value="x";var u=Tt.scrollHeight-i,c=u*n;s==="border-box"&&(c=c+i+o),l=Math.max(c,l);var f=u*r;return s==="border-box"&&(f=f+i+o),l=Math.min(f,l),[l,u]}var py=function(){},AD=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},_D=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],RD=!!document.documentElement.currentStyle,DD=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=AD(_D,n),i=r.boxSizing;if(i==="")return null;RD&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},MD=DD;function hy(e,t,n){var r=TD(n);k.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var ND=function(t){hy(window,"resize",t)},jD=function(t){hy(document.fonts,"loadingdone",t)},LD=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],FD=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?py:a,l=t.onHeightChange,u=l===void 0?py:l,c=CD(t,LD),f=c.value!==void 0,p=k.useRef(null),d=OD(p,n),m=k.useRef(0),h=k.useRef(),g=function(){var x=p.current,$=r&&h.current?h.current:MD(x);if($){h.current=$;var S=PD($,x.value||x.placeholder||"x",o,i),E=S[0],O=S[1];m.current!==E&&(m.current=E,x.style.setProperty("height",E+"px","important"),u(E,{rowHeight:O}))}},v=function(x){f||g(),s(x)};return k.useLayoutEffect(g),ND(g),jD(g),k.createElement("textarea",zu({},c,{onChange:v,ref:d}))},BD=k.forwardRef(FD);const zD=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s})=>{const l=Iv(c=>c.messageHistory),{input:u}=Se.composer;return C.jsx(BD,{...u,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:c=>o(c.target.value),maxRows:5,onKeyDown:c=>{n||(c.key==="Enter"&&c.shiftKey?(c.preventDefault(),o(`${r}
|
|
281
|
+
`)):c.key==="Enter"&&(c.preventDefault(),s()),c.key==="ArrowUp"&&(c.preventDefault(),i<l.length-1&&o(l[i+1]??""),a(Math.min(i+1,l.length-1))),c.key==="ArrowDown"&&(c.preventDefault(),o(i===0?"":l[i-1]??""),a(Math.max(i-1,-1))))}})},WD=({disabled:e,setTextInput:t})=>{const[n,r]=I.useState(!1),i=I.useRef(null),{voiceButton:o}=Se.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{i.current||(i.current=new a);const l=i.current;l&&(l.continuous=!0,l.onresult=u=>{var f,p,d;const c=((d=(p=(f=u.results)==null?void 0:f[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(c??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return C.jsx(pA,{...o,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},my=I.memo(I.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:o,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:u,...c},f)=>{const{composer:p}=Se,d=n||r||!o,[m,h]=I.useState(""),[g,v]=I.useState(-1),b=_i(D=>D.files),x=_i(D=>D.setFiles),$=_i(D=>D.deleteFile),S=_i(D=>D.uploadFile),E=Iv(D=>D.addMessageToHistory),O=!!m||b.filter(D=>D.status==="uploaded").length>0;t=t??I.useRef(null);const F=()=>{const D=b.filter(H=>H.status==="uploaded");if(!D.length&&!m)return;const T=(D==null?void 0:D.map(H=>{const B=H.url,L=H.type;return{video:{type:"video",videoUrl:B},audio:{type:"audio",audioUrl:B},image:{type:"image",imageUrl:B}}[L]??{title:H.name,type:"file",fileUrl:B}}))??[];m&&T.push({type:"text",text:m});let M;T.length==1?M=T[0]:M={type:"bloc",items:T.map(B=>{const{type:L,...N}=B;return{type:L,payload:N}})},l==null||l(M),x([]),h(""),E(m),v(-1)};return r?null:C.jsxs(C.Fragment,{children:[C.jsxs("div",{"data-disabled":d,...c,className:zr(p.container.className,e),ref:f,children:[b.length>0&&C.jsx("div",{...p==null?void 0:p.fileContainer,children:b.map(D=>C.jsx(kD,{...D,removeFile:$},D.name))}),C.jsxs("div",{...p.inputContainer,onClick:()=>{t&&"current"in t&&t.current&&t.current.focus()},children:[i&&C.jsx(ED,{disabled:d||!u,onFileSelected:D=>{u&&S(D,u)}}),C.jsx(zD,{inputRef:t,composerPlaceholder:a,composerDisabled:d,textInput:m,historyIndex:g,setTextInput:h,setHistoryIndex:v,sendComposerMessage:F}),!d&&C.jsxs(C.Fragment,{children:[C.jsx(ZP,{...p.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":O,onClick:()=>F()}),C.jsx(WD,{disabled:O,setTextInput:h})]})]})]}),C.jsx(Dm,{components:{a:({node:D,...T})=>C.jsx("a",{...T,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...p.footer,children:s})]})}));var Wu={exports:{}},_a={exports:{}},De={};/** @license React v16.13.1
|
|
255
282
|
* react-is.production.min.js
|
|
256
283
|
*
|
|
257
284
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
258
285
|
*
|
|
259
286
|
* This source code is licensed under the MIT license found in the
|
|
260
287
|
* LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/var
|
|
288
|
+
*/var vy;function UD(){if(vy)return De;vy=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case u:case r:case o:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case m:case d:case a:return S;default:return E}}case n:return E}}}function $(S){return x(S)===u}return De.AsyncMode=l,De.ConcurrentMode=u,De.ContextConsumer=s,De.ContextProvider=a,De.Element=t,De.ForwardRef=c,De.Fragment=r,De.Lazy=m,De.Memo=d,De.Portal=n,De.Profiler=o,De.StrictMode=i,De.Suspense=f,De.isAsyncMode=function(S){return $(S)||x(S)===l},De.isConcurrentMode=$,De.isContextConsumer=function(S){return x(S)===s},De.isContextProvider=function(S){return x(S)===a},De.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},De.isForwardRef=function(S){return x(S)===c},De.isFragment=function(S){return x(S)===r},De.isLazy=function(S){return x(S)===m},De.isMemo=function(S){return x(S)===d},De.isPortal=function(S){return x(S)===n},De.isProfiler=function(S){return x(S)===o},De.isStrictMode=function(S){return x(S)===i},De.isSuspense=function(S){return x(S)===f},De.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===o||S===i||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===d||S.$$typeof===a||S.$$typeof===s||S.$$typeof===c||S.$$typeof===g||S.$$typeof===v||S.$$typeof===b||S.$$typeof===h)},De.typeOf=x,De}var Me={};/** @license React v16.13.1
|
|
262
289
|
* react-is.development.js
|
|
263
290
|
*
|
|
264
291
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
265
292
|
*
|
|
266
293
|
* This source code is licensed under the MIT license found in the
|
|
267
294
|
* LICENSE file in the root directory of this source tree.
|
|
268
|
-
*/var
|
|
295
|
+
*/var gy;function HD(){return gy||(gy=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(q){return typeof q=="string"||typeof q=="function"||q===r||q===u||q===o||q===i||q===f||q===p||typeof q=="object"&&q!==null&&(q.$$typeof===m||q.$$typeof===d||q.$$typeof===a||q.$$typeof===s||q.$$typeof===c||q.$$typeof===g||q.$$typeof===v||q.$$typeof===b||q.$$typeof===h)}function $(q){if(typeof q=="object"&&q!==null){var ie=q.$$typeof;switch(ie){case t:var le=q.type;switch(le){case l:case u:case r:case o:case i:case f:return le;default:var pe=le&&le.$$typeof;switch(pe){case s:case c:case m:case d:case a:return pe;default:return ie}}case n:return ie}}}var S=l,E=u,O=s,F=a,D=t,T=c,M=r,H=m,B=d,L=n,N=o,W=i,X=f,V=!1;function _(q){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(q)||$(q)===l}function y(q){return $(q)===u}function R(q){return $(q)===s}function P(q){return $(q)===a}function w(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function j(q){return $(q)===c}function G(q){return $(q)===r}function K(q){return $(q)===m}function Y(q){return $(q)===d}function Q(q){return $(q)===n}function ee(q){return $(q)===o}function J(q){return $(q)===i}function Z(q){return $(q)===f}Me.AsyncMode=S,Me.ConcurrentMode=E,Me.ContextConsumer=O,Me.ContextProvider=F,Me.Element=D,Me.ForwardRef=T,Me.Fragment=M,Me.Lazy=H,Me.Memo=B,Me.Portal=L,Me.Profiler=N,Me.StrictMode=W,Me.Suspense=X,Me.isAsyncMode=_,Me.isConcurrentMode=y,Me.isContextConsumer=R,Me.isContextProvider=P,Me.isElement=w,Me.isForwardRef=j,Me.isFragment=G,Me.isLazy=K,Me.isMemo=Y,Me.isPortal=Q,Me.isProfiler=ee,Me.isStrictMode=J,Me.isSuspense=Z,Me.isValidElementType=x,Me.typeOf=$}()),Me}var yy;function Ra(){return yy||(yy=1,process.env.NODE_ENV==="production"?_a.exports=UD():_a.exports=HD()),_a.exports}/*
|
|
269
296
|
object-assign
|
|
270
297
|
(c) Sindre Sorhus
|
|
271
298
|
@license MIT
|
|
272
|
-
*/var
|
|
273
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
274
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
275
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
276
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
277
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vy(e,t){if(e){if(typeof e=="string")return Au(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Au(e,t)}}function Au(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function hM(e){if(Array.isArray(e))return e}function gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gy(Object(n),!0).forEach(function(r){Ru(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ru(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ma(e,t){if(e==null)return{};var n=mM(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var va=A.forwardRef(function(e,t){var n=e.children,r=ma(e,iM),i=vM(r),o=i.open,a=ma(i,oM);return A.useImperativeHandle(t,function(){return{open:o}},[o]),A.createElement(A.Fragment,null,n(je(je({},a),{},{open:o})))});va.displayName="Dropzone";var yy={disabled:!1,getFilesFromEvent:$_,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};va.defaultProps=yy,va.propTypes={children:De.func,accept:De.objectOf(De.arrayOf(De.string)),multiple:De.bool,preventDropOnDocument:De.bool,noClick:De.bool,noKeyboard:De.bool,noDrag:De.bool,noDragEventsBubbling:De.bool,minSize:De.number,maxSize:De.number,maxFiles:De.number,disabled:De.bool,getFilesFromEvent:De.func,onFileDialogCancel:De.func,onFileDialogOpen:De.func,useFsAccessApi:De.bool,autoFocus:De.bool,onDragEnter:De.func,onDragLeave:De.func,onDragOver:De.func,onDrop:De.func,onDropAccepted:De.func,onDropRejected:De.func,onError:De.func,validator:De.func};var Du={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=je(je({},yy),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,g=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,C=t.noClick,S=t.noKeyboard,E=t.noDrag,O=t.noDragEventsBubbling,j=t.onError,M=t.validator,$=A.useMemo(function(){return tM(n)},[n]),D=A.useMemo(function(){return eM(n)},[n]),U=A.useMemo(function(){return typeof y=="function"?y:by},[y]),F=A.useMemo(function(){return typeof h=="function"?h:by},[h]),L=A.useRef(null),N=A.useRef(null),B=A.useReducer(gM,Du),Y=Pu(B,2),H=Y[0],R=Y[1],v=H.isFocused,P=H.isFileDialogActive,I=A.useRef(typeof window<"u"&&window.isSecureContext&&g&&Z_()),x=function(){!I.current&&P&&setTimeout(function(){if(N.current){var le=N.current.files;le.length||(R({type:"closeDialog"}),F())}},300)};A.useEffect(function(){return window.addEventListener("focus",x,!1),function(){window.removeEventListener("focus",x,!1)}},[N,P,F,I]);var _=A.useRef([]),V=function(le){L.current&&L.current.contains(le.target)||(le.preventDefault(),_.current=[])};A.useEffect(function(){return w&&(document.addEventListener("dragover",py,!1),document.addEventListener("drop",V,!1)),function(){w&&(document.removeEventListener("dragover",py),document.removeEventListener("drop",V))}},[L,w]),A.useEffect(function(){return!r&&b&&L.current&&L.current.focus(),function(){}},[L,b,r]);var K=A.useCallback(function(re){j?j(re):console.error(re)},[j]),G=A.useCallback(function(re){re.preventDefault(),re.persist(),et(re),_.current=[].concat(lM(_.current),[re.target]),ha(re)&&Promise.resolve(i(re)).then(function(le){if(!(pa(re)&&!O)){var W=le.length,z=W>0&&Y_({files:le,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:M}),ee=W>0&&!z;R({isDragAccept:z,isDragReject:ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(re)}}).catch(function(le){return K(le)})},[i,u,K,O,$,a,o,s,l,M]),X=A.useCallback(function(re){re.preventDefault(),re.persist(),et(re);var le=ha(re);if(le&&re.dataTransfer)try{re.dataTransfer.dropEffect="copy"}catch{}return le&&f&&f(re),!1},[f,O]),Z=A.useCallback(function(re){re.preventDefault(),re.persist(),et(re);var le=_.current.filter(function(z){return L.current&&L.current.contains(z)}),W=le.indexOf(re.target);W!==-1&&le.splice(W,1),_.current=le,!(le.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ha(re)&&c&&c(re))},[L,c,O]),J=A.useCallback(function(re,le){var W=[],z=[];re.forEach(function(ee){var oe=fy(ee,$),ue=Pu(oe,2),he=ue[0],We=ue[1],Ue=dy(ee,a,o),ht=Pu(Ue,2),tt=ht[0],Ie=ht[1],nt=M?M(ee):null;if(he&&tt&&!nt)W.push(ee);else{var Ke=[We,Ie];nt&&(Ke=Ke.concat(nt)),z.push({file:ee,errors:Ke.filter(function(Ln){return Ln})})}}),(!s&&W.length>1||s&&l>=1&&W.length>l)&&(W.forEach(function(ee){z.push({file:ee,errors:[G_]})}),W.splice(0)),R({acceptedFiles:W,fileRejections:z,type:"setFiles"}),p&&p(W,z,le),z.length>0&&m&&m(z,le),W.length>0&&d&&d(W,le)},[R,s,$,a,o,l,p,d,m,M]),Q=A.useCallback(function(re){re.preventDefault(),re.persist(),et(re),_.current=[],ha(re)&&Promise.resolve(i(re)).then(function(le){pa(re)&&!O||J(le,re)}).catch(function(le){return K(le)}),R({type:"reset"})},[i,J,K,O]),q=A.useCallback(function(){if(I.current){R({type:"openDialog"}),U();var re={multiple:s,types:D};window.showOpenFilePicker(re).then(function(le){return i(le)}).then(function(le){J(le,null),R({type:"closeDialog"})}).catch(function(le){nM(le)?(F(le),R({type:"closeDialog"})):rM(le)?(I.current=!1,N.current?(N.current.value=null,N.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(le)});return}N.current&&(R({type:"openDialog"}),U(),N.current.value=null,N.current.click())},[R,U,F,g,J,K,D,s]),ne=A.useCallback(function(re){!L.current||!L.current.isEqualNode(re.target)||(re.key===" "||re.key==="Enter"||re.keyCode===32||re.keyCode===13)&&(re.preventDefault(),q())},[L,q]),ae=A.useCallback(function(){R({type:"focus"})},[]),fe=A.useCallback(function(){R({type:"blur"})},[]),ie=A.useCallback(function(){C||(Q_()?setTimeout(q,0):q())},[C,q]),pe=function(le){return r?null:le},ge=function(le){return S?null:pe(le)},Me=function(le){return E?null:pe(le)},et=function(le){O&&le.stopPropagation()},wt=A.useMemo(function(){return function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=re.refKey,W=le===void 0?"ref":le,z=re.role,ee=re.onKeyDown,oe=re.onFocus,ue=re.onBlur,he=re.onClick,We=re.onDragEnter,Ue=re.onDragOver,ht=re.onDragLeave,tt=re.onDrop,Ie=ma(re,aM);return je(je(Ru({onKeyDown:ge(en(ee,ne)),onFocus:ge(en(oe,ae)),onBlur:ge(en(ue,fe)),onClick:pe(en(he,ie)),onDragEnter:Me(en(We,G)),onDragOver:Me(en(Ue,X)),onDragLeave:Me(en(ht,Z)),onDrop:Me(en(tt,Q)),role:typeof z=="string"&&z!==""?z:"presentation"},W,L),!r&&!S?{tabIndex:0}:{}),Ie)}},[L,ne,ae,fe,ie,G,X,Z,Q,S,E,r]),Mt=A.useCallback(function(re){re.stopPropagation()},[]),St=A.useMemo(function(){return function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=re.refKey,W=le===void 0?"ref":le,z=re.onChange,ee=re.onClick,oe=ma(re,sM),ue=Ru({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:pe(en(z,Q)),onClick:pe(en(ee,Mt)),tabIndex:-1},W,N);return je(je({},ue),oe)}},[N,n,s,Q,r]);return je(je({},H),{},{isFocused:v&&!r,getRootProps:wt,getInputProps:St,rootRef:L,inputRef:N,open:pe(q)})}function gM(e,t){switch(t.type){case"focus":return je(je({},e),{},{isFocused:!0});case"blur":return je(je({},e),{},{isFocused:!1});case"openDialog":return je(je({},Du),{},{isFileDialogActive:!0});case"closeDialog":return je(je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return je(je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return je(je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return je({},Du);default:return e}}function by(){}const _u=({children:e})=>{const[t,n]=A.useState(!1),[r,i]=A.useState(""),[o,a]=A.useState(""),[s,l]=A.useState(""),[u,c]=A.useState(()=>{}),[f,p]=A.useState(""),[d,m]=A.useState(null),h=({title:g,description:b,confirmButton:w,onConfirm:C,cancelButton:S,content:E})=>{i(g),a(b),l(w),c(()=>C),p(S),m(E),n(!0)},y=()=>{n(!1)};return T.jsxs(vv.Provider,{value:{open:t,showModal:h,hideModal:y},children:[T.jsx(Jr,{open:t,onOpenChange:n,children:T.jsx(Jr.Content,{title:r,description:o,confirmButton:s,onConfirm:u,cancelButton:f,hideModal:y,children:d})}),e]})},xy=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o})=>{const a=A.useMemo(()=>yp({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return T.jsx("style",{children:a})},Mu=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...o})=>{const{container:a}=ye,s=jo(c=>c.setMessageContainerRef),l=pi(c=>c.uploadFile),u=A.useRef(null);return A.useEffect(()=>{s(u)},[u]),i&&r?T.jsx(va,{noClick:!0,onDrop:c=>c.forEach(f=>l(f,r)),children:({getRootProps:c,isDragActive:f})=>T.jsxs("div",{...o,className:Er(a.className,t),ref:u,children:[T.jsxs("div",{"data-hover":f,...a.dropzone.overlay,children:["Drop files to upload",T.jsx(RP,{style:{width:"50px"}})]}),T.jsxs(_u,{children:[T.jsx(wy,{connected:n}),T.jsx("div",{...a.dropzone.container,...c(),children:e})]})]})}):T.jsx("div",{...o,className:Er(a.className,t),ref:u,children:T.jsxs(_u,{children:[T.jsx(wy,{connected:n}),e]})})},wy=({connected:e})=>{const{open:t,showModal:n}=Ul();return e===!1&&!t&&n&&n({title:"Connection Error",description:"There was an error connecting to the server. Please check your internet connection and try again.",confirmButton:"Restart",onConfirm:()=>window.parent.location.reload(),cancelButton:"Cancel"}),T.jsx(T.Fragment,{})};Mu.displayName="Container";const Sy=A.forwardRef(({children:e,onClick:t,imgUrl:n,...r},i)=>{const{fab:o}=ye,{container:a,icon:s,image:l}=o??{};return n?T.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):T.jsx("div",{...r,...a,ref:i,onClick:t,children:T.jsx("div",{...s})})});Sy.displayName="Fab";function hn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function yM(e,t){const n=k.createContext(t),r=o=>{const{children:a,...s}=o,l=k.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=k.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Ey(e,t=[]){let n=[];function r(o,a){const s=k.createContext(a),l=n.length;n=[...n,a];const u=f=>{var g;const{scope:p,children:d,...m}=f,h=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,y=k.useMemo(()=>m,Object.values(m));return T.jsx(h.Provider,{value:y,children:d})};u.displayName=o+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,m=k.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,bM(i,...t)]}function bM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ky({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=xM({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=xn(n),l=k.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,l]}function xM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,i=k.useRef(r),o=xn(t);return k.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Cy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ty(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Cy(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Cy(e[i],null)}}}}function In(...e){return k.useCallback(Ty(...e),e)}var Nu=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(SM);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return T.jsx(ju,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return T.jsx(ju,{...r,ref:t,children:n})});Nu.displayName="Slot";var ju=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=kM(n);return k.cloneElement(n,{...EM(r,n.props),ref:t?Ty(t,i):i})}return k.Children.count(n)>1?k.Children.only(null):null});ju.displayName="SlotClone";var wM=({children:e})=>T.jsx(T.Fragment,{children:e});function SM(e){return k.isValidElement(e)&&e.type===wM}function EM(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function kM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var CM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zt=CM.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Nu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function TM(e,t){e&&Yd.flushSync(()=>e.dispatchEvent(t))}function $M(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var ga=e=>{const{present:t,children:n}=e,r=OM(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),o=In(r.ref,IM(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:o}):null};ga.displayName="Presence";function OM(e){const[t,n]=k.useState(),r=k.useRef({}),i=k.useRef(e),o=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=$M(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const u=ya(r.current);o.current=s==="mounted"?u:"none"},[s]),ar(()=>{const u=r.current,c=i.current;if(c!==e){const p=o.current,d=ya(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),ar(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=d=>{const h=ya(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=d=>{d.target===t&&(o.current=ya(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function ya(e){return(e==null?void 0:e.animationName)||"none"}function IM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var PM=k.useId||(()=>{}),AM=0;function ba(e){const[t,n]=k.useState(PM());return ar(()=>{e||n(r=>r??String(AM++))},[e]),e||(t?`radix-${t}`:"")}var Lu="Collapsible",[RM,gX]=Ey(Lu),[DM,Fu]=RM(Lu),$y=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=ky({prop:r,defaultProp:i,onChange:a});return T.jsx(DM,{scope:n,disabled:o,contentId:ba(),open:l,onOpenToggle:k.useCallback(()=>u(c=>!c),[u]),children:T.jsx(zt.div,{"data-state":zu(l),"data-disabled":o?"":void 0,...s,ref:t})})});$y.displayName=Lu;var Oy="CollapsibleTrigger",Iy=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Fu(Oy,n);return T.jsx(zt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":zu(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:hn(e.onClick,i.onOpenToggle)})});Iy.displayName=Oy;var Bu="CollapsibleContent",Py=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Fu(Bu,e.__scopeCollapsible);return T.jsx(ga,{present:n||i.open,children:({present:o})=>T.jsx(_M,{...r,ref:t,present:o})})});Py.displayName=Bu;var _M=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=Fu(Bu,n),[s,l]=k.useState(r),u=k.useRef(null),c=In(t,u),f=k.useRef(0),p=f.current,d=k.useRef(0),m=d.current,h=a.open||s,y=k.useRef(h),g=k.useRef(void 0);return k.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),ar(()=>{const b=u.current;if(b){g.current=g.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,d.current=w.width,y.current||(b.style.transitionDuration=g.current.transitionDuration,b.style.animationName=g.current.animationName),l(r)}},[a.open,r]),T.jsx(zt.div,{"data-state":zu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function zu(e){return e?"open":"closed"}var MM=$y,NM=Py;const Wu=({restartConversation:e,...t})=>{var a,s;const{header:n}=ye,{showModal:r,hideModal:i}=Ul(),o=l=>{l.stopPropagation(),r&&i?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButton:"New conversation",onConfirm:()=>{e(),i()},cancelButton:"Cancel"}):e()};return T.jsx(VP,{...t,...(s=(a=n==null?void 0:n.content)==null?void 0:a.actions)==null?void 0:s.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},jM=({onClick:e,...t})=>{const{header:n}=ye,r=i=>{i.stopPropagation(),e==null||e()};return T.jsx(JP,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},$i=({icon:e,title:t,link:n,...r})=>{var a,s,l,u,c,f,p,d,m,h,y,g;const{header:i}=ye,o=e??DP;return t?n?T.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[T.jsx(o,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),T.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):T.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[T.jsx(o,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),T.jsx("p",{...(g=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:g.text,children:t})]}):null},Ay=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var c,f,p,d,m,h,y,g,b,w,C,S,E,O,j,M,$,D,U,F,L,N;const{header:o}=ye,[a,s]=A.useState(!!e),l=!!((c=n.email)!=null&&c.title)||!!((f=n.phone)!=null&&f.title)||!!((p=n.website)!=null&&p.title)||!!((d=n.termsOfService)!=null&&d.link)||!!((m=n.privacyPolicy)!=null&&m.link),u=l||!!n.botDescription;return T.jsxs(MM,{open:u?a:!1,onOpenChange:s,"data-disabled":u?void 0:"",...o.container,...i,children:[T.jsxs(Iy,{"aria-label":"Expand Header Button",...o.content.container,children:[T.jsx(ho,{...i,src:n.botAvatar,...o.content.avatar,children:n.botName||"Bot"}),T.jsx("h2",{...o.content.title,children:n.botName||"Bot"}),n.botDescription&&T.jsx("p",{...o.content.description,children:n.botDescription}),T.jsxs("div",{...o.content.actions.container,children:[r&&T.jsx(Wu,{restartConversation:r}),t&&T.jsx(jM,{onClick:t})]})]}),l&&T.jsxs(NM,{...o.expandedContent.container,children:[T.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[T.jsx($i,{"data-email":"",icon:FP,title:(h=n.email)==null?void 0:h.title,link:(g=(y=n.email)==null?void 0:y.link)!=null&&g.startsWith("mailto:")?(b=n.email)==null?void 0:b.link:`mailto:${(w=n.email)==null?void 0:w.link}`}),T.jsx($i,{"data-phone":"",icon:UP,title:(C=n.phone)==null?void 0:C.title,link:(E=(S=n.phone)==null?void 0:S.link)!=null&&E.startsWith("tel:")?(O=n.phone)==null?void 0:O.link:`tel:${(j=n.phone)==null?void 0:j.link}`}),T.jsx($i,{"data-website":"",link:(M=n.website)==null?void 0:M.link,icon:NP,title:($=n.website)==null?void 0:$.title})]}),T.jsxs("div",{"data-legal":"",...(D=o.expandedContent)==null?void 0:D.group,children:[T.jsx($i,{"data-terms":"",link:(U=n.termsOfService)==null?void 0:U.link,icon:Hm,title:(F=n.termsOfService)==null?void 0:F.title}),T.jsx($i,{"data-privacy":"",link:(L=n.privacyPolicy)==null?void 0:L.link,icon:LP,title:(N=n.privacyPolicy)==null?void 0:N.title})]})]})]})},Uu=A.memo(({...e})=>{const{typingIndicator:t}=ye;return T.jsx("div",{...e,...t==null?void 0:t.container,children:T.jsx("div",{...t==null?void 0:t.loader})})});Uu.displayName="TypingIndicator";const Hu=A.memo(A.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:o,authorId:a,status:s,renderers:l,isReadOnly:u,isLastDeliveredMessage:c,feedback:f,timestamp:p,metadata:d,sendMessage:m,addMessageFeedback:h},y)=>{const[g,b]=A.useState([]),{message:{container:w,avatar:C,deliveryStatus:S}}=ye,E=cp(a??"",15),[O,j]=A.useState("idle");return T.jsx(mv.Provider,{value:{isLoading:g,setIsLoading:b},children:T.jsxs("div",{...w,className:Er(w==null?void 0:w.className,c&&(S==null?void 0:S.className)),"data-loaded":g.length===0,"data-disable-input":!!n,"data-direction":e,ref:y,children:[T.jsxs(Bs,{"data-color":E,"data-loading-status":O,...C==null?void 0:C.container,children:[T.jsx(zs,{...C==null?void 0:C.image,onLoadingStatusChange:j,src:i==null?void 0:i.avatar}),T.jsxs(Ws,{...C==null?void 0:C.fallback,children:[i==null?void 0:i.name[0]," "]})]}),t&&T.jsx(Kn,{block:{...t,isReadOnly:u,direction:e,timestamp:p,sender:i,feedback:f,messageId:o,status:s,metadata:d,sendMessage:m,addMessageFeedback:h},renderers:l}),r]})})}));function LM({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ye;return T.jsxs("li",{...r.container,children:[T.jsx(ho,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),T.jsxs("div",{...r.content,children:[T.jsx("h1",{...r.title,children:n||"Bot"}),T.jsx("p",{...r.description,children:t})]})]})}function FM(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function BM(){FM("react-scroll-to-bottom:version","4.2.0")}var Oi=function(e){return e&&e.Math===Math&&e},Ye=Oi(typeof globalThis=="object"&&globalThis)||Oi(typeof window=="object"&&window)||Oi(typeof self=="object"&&self)||Oi(typeof Nt=="object"&&Nt)||Oi(typeof Nt=="object"&&Nt)||function(){return this}()||Function("return this")(),Xe=function(e){try{return!!e()}catch{return!0}},zM=Xe,xa=!zM(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),WM=xa,Ry=Function.prototype,Dy=Ry.apply,_y=Ry.call,Vu=typeof Reflect=="object"&&Reflect.apply||(WM?_y.bind(Dy):function(){return _y.apply(Dy,arguments)}),My=xa,Ny=Function.prototype,qu=Ny.call,UM=My&&Ny.bind.bind(qu,qu),Ve=My?UM:function(e){return function(){return qu.apply(e,arguments)}},jy=Ve,HM=jy({}.toString),VM=jy("".slice),Yn=function(e){return VM(HM(e),8,-1)},qM=Yn,KM=Ve,Ku=function(e){if(qM(e)==="Function")return KM(e)},Gu=typeof document=="object"&&document.all,ct=typeof Gu>"u"&&Gu!==void 0?function(e){return typeof e=="function"||e===Gu}:function(e){return typeof e=="function"},Ii={},GM=Xe,gt=!GM(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),YM=xa,wa=Function.prototype.call,tn=YM?wa.bind(wa):function(){return wa.apply(wa,arguments)},Yu={},Ly={}.propertyIsEnumerable,Fy=Object.getOwnPropertyDescriptor,XM=Fy&&!Ly.call({1:2},1);Yu.f=XM?function(t){var n=Fy(this,t);return!!n&&n.enumerable}:Ly;var Pi=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},JM=Ve,QM=Xe,ZM=Yn,Xu=Object,eN=JM("".split),By=QM(function(){return!Xu("z").propertyIsEnumerable(0)})?function(e){return ZM(e)==="String"?eN(e,""):Xu(e)}:Xu,Ju=function(e){return e==null},tN=Ju,nN=TypeError,Sa=function(e){if(tN(e))throw new nN("Can't call method on "+e);return e},rN=By,iN=Sa,nn=function(e){return rN(iN(e))},oN=ct,Wt=function(e){return typeof e=="object"?e!==null:oN(e)},ot={},Qu=ot,Zu=Ye,aN=ct,zy=function(e){return aN(e)?e:void 0},rn=function(e,t){return arguments.length<2?zy(Qu[e])||zy(Zu[e]):Qu[e]&&Qu[e][t]||Zu[e]&&Zu[e][t]},sN=Ve,mn=sN({}.isPrototypeOf),lN=Ye,Wy=lN.navigator,Uy=Wy&&Wy.userAgent,ec=Uy?String(Uy):"",Hy=Ye,tc=ec,Vy=Hy.process,qy=Hy.Deno,Ky=Vy&&Vy.versions||qy&&qy.version,Gy=Ky&&Ky.v8,Ut,Ea;Gy&&(Ut=Gy.split("."),Ea=Ut[0]>0&&Ut[0]<4?1:+(Ut[0]+Ut[1])),!Ea&&tc&&(Ut=tc.match(/Edge\/(\d+)/),(!Ut||Ut[1]>=74)&&(Ut=tc.match(/Chrome\/(\d+)/),Ut&&(Ea=+Ut[1])));var nc=Ea,Yy=nc,uN=Xe,cN=Ye,fN=cN.String,kr=!!Object.getOwnPropertySymbols&&!uN(function(){var e=Symbol("symbol detection");return!fN(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Yy&&Yy<41}),dN=kr,Xy=dN&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pN=rn,hN=ct,mN=mn,vN=Xy,gN=Object,Ai=vN?function(e){return typeof e=="symbol"}:function(e){var t=pN("Symbol");return hN(t)&&mN(t.prototype,gN(e))},yN=String,ka=function(e){try{return yN(e)}catch{return"Object"}},bN=ct,xN=ka,wN=TypeError,Ca=function(e){if(bN(e))return e;throw new wN(xN(e)+" is not a function")},SN=Ca,EN=Ju,rc=function(e,t){var n=e[t];return EN(n)?void 0:SN(n)},ic=tn,oc=ct,ac=Wt,kN=TypeError,CN=function(e,t){var n,r;if(t==="string"&&oc(n=e.toString)&&!ac(r=ic(n,e))||oc(n=e.valueOf)&&!ac(r=ic(n,e))||t!=="string"&&oc(n=e.toString)&&!ac(r=ic(n,e)))return r;throw new kN("Can't convert object to primitive value")},Jy={exports:{}},Qy=Ye,TN=Object.defineProperty,$N=function(e,t){try{TN(Qy,e,{value:t,configurable:!0,writable:!0})}catch{Qy[e]=t}return t},ON=Ye,IN=$N,Zy="__core-js_shared__",eb=Jy.exports=ON[Zy]||IN(Zy,{});(eb.versions||(eb.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var sc=Jy.exports,tb=sc,Cr=function(e,t){return tb[e]||(tb[e]=t||{})},PN=Sa,AN=Object,vn=function(e){return AN(PN(e))},RN=Ve,DN=vn,_N=RN({}.hasOwnProperty),Tt=Object.hasOwn||function(t,n){return _N(DN(t),n)},MN=Ve,NN=0,jN=Math.random(),LN=MN(1 .toString),lc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+LN(++NN+jN,36)},FN=Ye,BN=Cr,nb=Tt,zN=lc,WN=kr,UN=Xy,Tr=FN.Symbol,uc=BN("wks"),HN=UN?Tr.for||Tr:Tr&&Tr.withoutSetter||zN,Qe=function(e){return nb(uc,e)||(uc[e]=WN&&nb(Tr,e)?Tr[e]:HN("Symbol."+e)),uc[e]},VN=tn,rb=Wt,ib=Ai,qN=rc,KN=CN,GN=Qe,YN=TypeError,XN=GN("toPrimitive"),JN=function(e,t){if(!rb(e)||ib(e))return e;var n=qN(e,XN),r;if(n){if(t===void 0&&(t="default"),r=VN(n,e,t),!rb(r)||ib(r))return r;throw new YN("Can't convert object to primitive value")}return t===void 0&&(t="number"),KN(e,t)},QN=JN,ZN=Ai,cc=function(e){var t=QN(e,"string");return ZN(t)?t:t+""},e2=Ye,ob=Wt,fc=e2.document,t2=ob(fc)&&ob(fc.createElement),ab=function(e){return t2?fc.createElement(e):{}},n2=gt,r2=Xe,i2=ab,sb=!n2&&!r2(function(){return Object.defineProperty(i2("div"),"a",{get:function(){return 7}}).a!==7}),o2=gt,a2=tn,s2=Yu,l2=Pi,u2=nn,c2=cc,f2=Tt,d2=sb,lb=Object.getOwnPropertyDescriptor;Ii.f=o2?lb:function(t,n){if(t=u2(t),n=c2(n),d2)try{return lb(t,n)}catch{}if(f2(t,n))return l2(!a2(s2.f,t,n),t[n])};var p2=Xe,h2=ct,m2=/#|\.prototype\./,Ri=function(e,t){var n=g2[v2(e)];return n===b2?!0:n===y2?!1:h2(t)?p2(t):!!t},v2=Ri.normalize=function(e){return String(e).replace(m2,".").toLowerCase()},g2=Ri.data={},y2=Ri.NATIVE="N",b2=Ri.POLYFILL="P",x2=Ri,ub=Ku,w2=Ca,S2=xa,E2=ub(ub.bind),dc=function(e,t){return w2(e),t===void 0?e:S2?E2(e,t):function(){return e.apply(t,arguments)}},Ht={},k2=gt,C2=Xe,cb=k2&&C2(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),T2=Wt,$2=String,O2=TypeError,Pn=function(e){if(T2(e))return e;throw new O2($2(e)+" is not an object")},I2=gt,P2=sb,A2=cb,Ta=Pn,fb=cc,R2=TypeError,pc=Object.defineProperty,D2=Object.getOwnPropertyDescriptor,hc="enumerable",mc="configurable",vc="writable";Ht.f=I2?A2?function(t,n,r){if(Ta(t),n=fb(n),Ta(r),typeof t=="function"&&n==="prototype"&&"value"in r&&vc in r&&!r[vc]){var i=D2(t,n);i&&i[vc]&&(t[n]=r.value,r={configurable:mc in r?r[mc]:i[mc],enumerable:hc in r?r[hc]:i[hc],writable:!1})}return pc(t,n,r)}:pc:function(t,n,r){if(Ta(t),n=fb(n),Ta(r),P2)try{return pc(t,n,r)}catch{}if("get"in r||"set"in r)throw new R2("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var _2=gt,M2=Ht,N2=Pi,$a=_2?function(e,t,n){return M2.f(e,t,N2(1,n))}:function(e,t,n){return e[t]=n,e},Di=Ye,j2=Vu,L2=Ku,F2=ct,B2=Ii.f,z2=x2,$r=ot,W2=dc,Or=$a,db=Tt,U2=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return j2(e,this,arguments)};return t.prototype=e.prototype,t},Pe=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,a=r?Di:i?Di[n]:Di[n]&&Di[n].prototype,s=r?$r:$r[n]||Or($r,n,{})[n],l=s.prototype,u,c,f,p,d,m,h,y,g;for(p in t)u=z2(r?p:n+(i?".":"#")+p,e.forced),c=!u&&a&&db(a,p),m=s[p],c&&(e.dontCallGetSet?(g=B2(a,p),h=g&&g.value):h=a[p]),d=c&&h?h:t[p],!(!u&&!o&&typeof m==typeof d)&&(e.bind&&c?y=W2(d,Di):e.wrap&&c?y=U2(d):o&&F2(d)?y=L2(d):y=d,(e.sham||d&&d.sham||m&&m.sham)&&Or(y,"sham",!0),Or(s,p,y),o&&(f=n+"Prototype",db($r,f)||Or($r,f,{}),Or($r[f],p,d),e.real&&l&&(u||!l[p])&&Or(l,p,d)))},H2=Yn,Ir=Array.isArray||function(t){return H2(t)==="Array"},V2=Pe,q2=Ir;V2({target:"Array",stat:!0},{isArray:q2});var K2=ot,G2=K2.Array.isArray,Y2=G2,pb=Y2,X2=pb,J2=X2,Q2=J2,Z2=Q2,ej=Z2;const hb=be(ej);function tj(e){if(hb(e))return e}var nj=Math.ceil,rj=Math.floor,ij=Math.trunc||function(t){var n=+t;return(n>0?rj:nj)(n)},oj=ij,Oa=function(e){var t=+e;return t!==t||t===0?0:oj(t)},aj=Oa,sj=Math.min,lj=function(e){var t=aj(e);return t>0?sj(t,9007199254740991):0},uj=lj,Xn=function(e){return uj(e.length)},cj=TypeError,fj=9007199254740991,gc=function(e){if(e>fj)throw cj("Maximum allowed index exceeded");return e},dj=gt,pj=Ht,hj=Pi,_i=function(e,t,n){dj?pj.f(e,t,hj(0,n)):e[t]=n},mj=Qe,vj=mj("toStringTag"),mb={};mb[vj]="z";var yc=String(mb)==="[object z]",gj=yc,yj=ct,Ia=Yn,bj=Qe,xj=bj("toStringTag"),wj=Object,Sj=Ia(function(){return arguments}())==="Arguments",Ej=function(e,t){try{return e[t]}catch{}},Mi=gj?Ia:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=Ej(t=wj(e),xj))=="string"?n:Sj?Ia(t):(r=Ia(t))==="Object"&&yj(t.callee)?"Arguments":r},kj=Ve,Cj=ct,bc=sc,Tj=kj(Function.toString);Cj(bc.inspectSource)||(bc.inspectSource=function(e){return Tj(e)});var $j=bc.inspectSource,Oj=Ve,Ij=Xe,vb=ct,Pj=Mi,Aj=rn,Rj=$j,gb=function(){},yb=Aj("Reflect","construct"),xc=/^\s*(?:class|function)\b/,Dj=Oj(xc.exec),_j=!xc.test(gb),Ni=function(t){if(!vb(t))return!1;try{return yb(gb,[],t),!0}catch{return!1}},bb=function(t){if(!vb(t))return!1;switch(Pj(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _j||!!Dj(xc,Rj(t))}catch{return!0}};bb.sham=!0;var wc=!yb||Ij(function(){var e;return Ni(Ni.call)||!Ni(Object)||!Ni(function(){e=!0})||e})?bb:Ni,xb=Ir,Mj=wc,Nj=Wt,jj=Qe,Lj=jj("species"),wb=Array,Fj=function(e){var t;return xb(e)&&(t=e.constructor,Mj(t)&&(t===wb||xb(t.prototype))?t=void 0:Nj(t)&&(t=t[Lj],t===null&&(t=void 0))),t===void 0?wb:t},Bj=Fj,Sc=function(e,t){return new(Bj(e))(t===0?0:t)},zj=Xe,Wj=Qe,Uj=nc,Hj=Wj("species"),Pa=function(e){return Uj>=51||!zj(function(){var t=[],n=t.constructor={};return n[Hj]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Vj=Pe,qj=Xe,Kj=Ir,Gj=Wt,Yj=vn,Xj=Xn,Sb=gc,Eb=_i,Jj=Sc,Qj=Pa,Zj=Qe,eL=nc,kb=Zj("isConcatSpreadable"),tL=eL>=51||!qj(function(){var e=[];return e[kb]=!1,e.concat()[0]!==e}),nL=function(e){if(!Gj(e))return!1;var t=e[kb];return t!==void 0?!!t:Kj(e)},rL=!tL||!Qj("concat");Vj({target:"Array",proto:!0,arity:1,forced:rL},{concat:function(t){var n=Yj(this),r=Jj(n,0),i=0,o,a,s,l,u;for(o=-1,s=arguments.length;o<s;o++)if(u=o===-1?n:arguments[o],nL(u))for(l=Xj(u),Sb(i+l),a=0;a<l;a++,i++)a in u&&Eb(r,i,u[a]);else Sb(i+1),Eb(r,i++,u);return r.length=i,r}});var iL=Mi,oL=String,ji=function(e){if(iL(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return oL(e)},Aa={},aL=Oa,sL=Math.max,lL=Math.min,Ec=function(e,t){var n=aL(e);return n<0?sL(n+t,0):lL(n,t)},uL=nn,cL=Ec,fL=Xn,Cb=function(e){return function(t,n,r){var i=uL(t),o=fL(i);if(o===0)return!e&&-1;var a=cL(r,o),s;if(e&&n!==n){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Tb={includes:Cb(!0),indexOf:Cb(!1)},Ra={},dL=Ve,kc=Tt,pL=nn,hL=Tb.indexOf,mL=Ra,$b=dL([].push),Ob=function(e,t){var n=pL(e),r=0,i=[],o;for(o in n)!kc(mL,o)&&kc(n,o)&&$b(i,o);for(;t.length>r;)kc(n,o=t[r++])&&(~hL(i,o)||$b(i,o));return i},Cc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vL=Ob,gL=Cc,Tc=Object.keys||function(t){return vL(t,gL)},yL=gt,bL=cb,xL=Ht,wL=Pn,SL=nn,EL=Tc;Aa.f=yL&&!bL?Object.defineProperties:function(t,n){wL(t);for(var r=SL(n),i=EL(n),o=i.length,a=0,s;o>a;)xL.f(t,s=i[a++],r[s]);return t};var kL=rn,CL=kL("document","documentElement"),TL=Cr,$L=lc,Ib=TL("keys"),Da=function(e){return Ib[e]||(Ib[e]=$L(e))},OL=Pn,IL=Aa,Pb=Cc,PL=Ra,AL=CL,RL=ab,DL=Da,Ab=">",Rb="<",$c="prototype",Oc="script",Db=DL("IE_PROTO"),Ic=function(){},_b=function(e){return Rb+Oc+Ab+e+Rb+"/"+Oc+Ab},Mb=function(e){e.write(_b("")),e.close();var t=e.parentWindow.Object;return e=null,t},_L=function(){var e=RL("iframe"),t="java"+Oc+":",n;return e.style.display="none",AL.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(_b("document.F=Object")),n.close(),n.F},_a,Ma=function(){try{_a=new ActiveXObject("htmlfile")}catch{}Ma=typeof document<"u"?document.domain&&_a?Mb(_a):_L():Mb(_a);for(var e=Pb.length;e--;)delete Ma[$c][Pb[e]];return Ma()};PL[Db]=!0;var Pc=Object.create||function(t,n){var r;return t!==null?(Ic[$c]=OL(t),r=new Ic,Ic[$c]=null,r[Db]=t):r=Ma(),n===void 0?r:IL.f(r,n)},Na={},ML=Ob,NL=Cc,jL=NL.concat("length","prototype");Na.f=Object.getOwnPropertyNames||function(t){return ML(t,jL)};var Nb={},LL=Ve,ja=LL([].slice),FL=Yn,BL=nn,jb=Na.f,zL=ja,Lb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],WL=function(e){try{return jb(e)}catch{return zL(Lb)}};Nb.f=function(t){return Lb&&FL(t)==="Window"?WL(t):jb(BL(t))};var La={};La.f=Object.getOwnPropertySymbols;var UL=$a,Fa=function(e,t,n,r){return r&&r.enumerable?e[t]=n:UL(e,t,n),e},HL=Ht,VL=function(e,t,n){return HL.f(e,t,n)},Li={},qL=Qe;Li.f=qL;var Fb=ot,KL=Tt,GL=Li,YL=Ht.f,Le=function(e){var t=Fb.Symbol||(Fb.Symbol={});KL(t,e)||YL(t,e,{value:GL.f(e)})},XL=tn,JL=rn,QL=Qe,ZL=Fa,Bb=function(){var e=JL("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=QL("toPrimitive");t&&!t[r]&&ZL(t,r,function(i){return XL(n,this)},{arity:1})},eF=yc,tF=Mi,nF=eF?{}.toString:function(){return"[object "+tF(this)+"]"},rF=yc,iF=Ht.f,oF=$a,aF=Tt,sF=nF,lF=Qe,zb=lF("toStringTag"),Pr=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(aF(i,zb)||iF(i,zb,{configurable:!0,value:t}),r&&!rF&&oF(i,"toString",sF))},uF=Ye,cF=ct,Wb=uF.WeakMap,fF=cF(Wb)&&/native code/.test(String(Wb)),dF=fF,Ub=Ye,pF=Wt,hF=$a,Ac=Tt,Rc=sc,mF=Da,vF=Ra,Hb="Object already initialized",Dc=Ub.TypeError,gF=Ub.WeakMap,Ba,Fi,za,yF=function(e){return za(e)?Fi(e):Ba(e,{})},bF=function(e){return function(t){var n;if(!pF(t)||(n=Fi(t)).type!==e)throw new Dc("Incompatible receiver, "+e+" required");return n}};if(dF||Rc.state){var on=Rc.state||(Rc.state=new gF);on.get=on.get,on.has=on.has,on.set=on.set,Ba=function(e,t){if(on.has(e))throw new Dc(Hb);return t.facade=e,on.set(e,t),t},Fi=function(e){return on.get(e)||{}},za=function(e){return on.has(e)}}else{var Ar=mF("state");vF[Ar]=!0,Ba=function(e,t){if(Ac(e,Ar))throw new Dc(Hb);return t.facade=e,hF(e,Ar,t),t},Fi=function(e){return Ac(e,Ar)?e[Ar]:{}},za=function(e){return Ac(e,Ar)}}var _c={set:Ba,get:Fi,has:za,enforce:yF,getterFor:bF},xF=dc,wF=Ve,SF=By,EF=vn,kF=Xn,CF=Sc,Vb=wF([].push),An=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,o=e===6,a=e===7,s=e===5||o;return function(l,u,c,f){for(var p=EF(l),d=SF(p),m=kF(d),h=xF(u,c),y=0,g=f||CF,b=t?g(l,m):n||a?g(l,0):void 0,w,C;m>y;y++)if((s||y in d)&&(w=d[y],C=h(w,y,p),e))if(t)b[y]=C;else if(C)switch(e){case 3:return!0;case 5:return w;case 6:return y;case 2:Vb(b,w)}else switch(e){case 4:return!1;case 7:Vb(b,w)}return o?-1:r||i?i:b}},Mc={forEach:An(0),map:An(1),filter:An(2),some:An(3),every:An(4),find:An(5),findIndex:An(6),filterReject:An(7)},Wa=Pe,Bi=Ye,Nc=tn,TF=Ve,Rr=gt,Dr=kr,$F=Xe,Ze=Tt,OF=mn,jc=Pn,Ua=nn,Lc=cc,IF=ji,Fc=Pi,_r=Pc,qb=Tc,PF=Na,Kb=Nb,AF=La,Gb=Ii,Yb=Ht,RF=Aa,Xb=Yu,Jb=Fa,DF=VL,Bc=Cr,_F=Da,Qb=Ra,Zb=lc,MF=Qe,NF=Li,jF=Le,LF=Bb,FF=Pr,ex=_c,Ha=Mc.forEach,yt=_F("hidden"),Va="Symbol",zi="prototype",BF=ex.set,tx=ex.getterFor(Va),Vt=Object[zi],Jn=Bi.Symbol,Wi=Jn&&Jn[zi],zF=Bi.RangeError,WF=Bi.TypeError,zc=Bi.QObject,nx=Gb.f,Qn=Yb.f,rx=Kb.f,UF=Xb.f,ix=TF([].push),gn=Bc("symbols"),Ui=Bc("op-symbols"),HF=Bc("wks"),Wc=!zc||!zc[zi]||!zc[zi].findChild,ox=function(e,t,n){var r=nx(Vt,t);r&&delete Vt[t],Qn(e,t,n),r&&e!==Vt&&Qn(Vt,t,r)},Uc=Rr&&$F(function(){return _r(Qn({},"a",{get:function(){return Qn(this,"a",{value:7}).a}})).a!==7})?ox:Qn,Hc=function(e,t){var n=gn[e]=_r(Wi);return BF(n,{type:Va,tag:e,description:t}),Rr||(n.description=t),n},qa=function(t,n,r){t===Vt&&qa(Ui,n,r),jc(t);var i=Lc(n);return jc(r),Ze(gn,i)?(r.enumerable?(Ze(t,yt)&&t[yt][i]&&(t[yt][i]=!1),r=_r(r,{enumerable:Fc(0,!1)})):(Ze(t,yt)||Qn(t,yt,Fc(1,_r(null))),t[yt][i]=!0),Uc(t,i,r)):Qn(t,i,r)},Vc=function(t,n){jc(t);var r=Ua(n),i=qb(r).concat(ux(r));return Ha(i,function(o){(!Rr||Nc(ax,r,o))&&qa(t,o,r[o])}),t},VF=function(t,n){return n===void 0?_r(t):Vc(_r(t),n)},ax=function(t){var n=Lc(t),r=Nc(UF,this,n);return this===Vt&&Ze(gn,n)&&!Ze(Ui,n)?!1:r||!Ze(this,n)||!Ze(gn,n)||Ze(this,yt)&&this[yt][n]?r:!0},sx=function(t,n){var r=Ua(t),i=Lc(n);if(!(r===Vt&&Ze(gn,i)&&!Ze(Ui,i))){var o=nx(r,i);return o&&Ze(gn,i)&&!(Ze(r,yt)&&r[yt][i])&&(o.enumerable=!0),o}},lx=function(t){var n=rx(Ua(t)),r=[];return Ha(n,function(i){!Ze(gn,i)&&!Ze(Qb,i)&&ix(r,i)}),r},ux=function(e){var t=e===Vt,n=rx(t?Ui:Ua(e)),r=[];return Ha(n,function(i){Ze(gn,i)&&(!t||Ze(Vt,i))&&ix(r,gn[i])}),r};Dr||(Jn=function(){if(OF(Wi,this))throw new WF("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:IF(arguments[0]),n=Zb(t),r=function(i){var o=this===void 0?Bi:this;o===Vt&&Nc(r,Ui,i),Ze(o,yt)&&Ze(o[yt],n)&&(o[yt][n]=!1);var a=Fc(1,i);try{Uc(o,n,a)}catch(s){if(!(s instanceof zF))throw s;ox(o,n,a)}};return Rr&&Wc&&Uc(Vt,n,{configurable:!0,set:r}),Hc(n,t)},Wi=Jn[zi],Jb(Wi,"toString",function(){return tx(this).tag}),Jb(Jn,"withoutSetter",function(e){return Hc(Zb(e),e)}),Xb.f=ax,Yb.f=qa,RF.f=Vc,Gb.f=sx,PF.f=Kb.f=lx,AF.f=ux,NF.f=function(e){return Hc(MF(e),e)},Rr&&DF(Wi,"description",{configurable:!0,get:function(){return tx(this).description}})),Wa({global:!0,constructor:!0,wrap:!0,forced:!Dr,sham:!Dr},{Symbol:Jn}),Ha(qb(HF),function(e){jF(e)}),Wa({target:Va,stat:!0,forced:!Dr},{useSetter:function(){Wc=!0},useSimple:function(){Wc=!1}}),Wa({target:"Object",stat:!0,forced:!Dr,sham:!Rr},{create:VF,defineProperty:qa,defineProperties:Vc,getOwnPropertyDescriptor:sx}),Wa({target:"Object",stat:!0,forced:!Dr},{getOwnPropertyNames:lx}),LF(),FF(Jn,Va),Qb[yt]=!0;var qF=kr,cx=qF&&!!Symbol.for&&!!Symbol.keyFor,KF=Pe,GF=rn,YF=Tt,XF=ji,fx=Cr,JF=cx,qc=fx("string-to-symbol-registry"),QF=fx("symbol-to-string-registry");KF({target:"Symbol",stat:!0,forced:!JF},{for:function(e){var t=XF(e);if(YF(qc,t))return qc[t];var n=GF("Symbol")(t);return qc[t]=n,QF[n]=t,n}});var ZF=Pe,eB=Tt,tB=Ai,nB=ka,rB=Cr,iB=cx,dx=rB("symbol-to-string-registry");ZF({target:"Symbol",stat:!0,forced:!iB},{keyFor:function(t){if(!tB(t))throw new TypeError(nB(t)+" is not a symbol");if(eB(dx,t))return dx[t]}});var oB=Ve,px=Ir,aB=ct,hx=Yn,sB=ji,mx=oB([].push),lB=function(e){if(aB(e))return e;if(px(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?mx(n,i):(typeof i=="number"||hx(i)==="Number"||hx(i)==="String")&&mx(n,sB(i))}var o=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(px(this))return l;for(var u=0;u<o;u++)if(n[u]===s)return l}}},uB=Pe,vx=rn,gx=Vu,cB=tn,Hi=Ve,yx=Xe,bx=ct,xx=Ai,wx=ja,fB=lB,dB=kr,pB=String,Rn=vx("JSON","stringify"),Ka=Hi(/./.exec),Sx=Hi("".charAt),hB=Hi("".charCodeAt),mB=Hi("".replace),vB=Hi(1 .toString),gB=/[\uD800-\uDFFF]/g,Ex=/^[\uD800-\uDBFF]$/,kx=/^[\uDC00-\uDFFF]$/,Cx=!dB||yx(function(){var e=vx("Symbol")("stringify detection");return Rn([e])!=="[null]"||Rn({a:e})!=="{}"||Rn(Object(e))!=="{}"}),Tx=yx(function(){return Rn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Rn("\uDEAD")!=='"\\udead"'}),yB=function(e,t){var n=wx(arguments),r=fB(t);if(!(!bx(r)&&(e===void 0||xx(e))))return n[1]=function(i,o){if(bx(r)&&(o=cB(r,this,pB(i),o)),!xx(o))return o},gx(Rn,null,n)},bB=function(e,t,n){var r=Sx(n,t-1),i=Sx(n,t+1);return Ka(Ex,e)&&!Ka(kx,i)||Ka(kx,e)&&!Ka(Ex,r)?"\\u"+vB(hB(e,0),16):e};Rn&&uB({target:"JSON",stat:!0,arity:3,forced:Cx||Tx},{stringify:function(t,n,r){var i=wx(arguments),o=gx(Cx?yB:Rn,null,i);return Tx&&typeof o=="string"?mB(o,gB,bB):o}});var xB=Pe,wB=kr,SB=Xe,$x=La,EB=vn,kB=!wB||SB(function(){$x.f(1)});xB({target:"Object",stat:!0,forced:kB},{getOwnPropertySymbols:function(t){var n=$x.f;return n?n(EB(t)):[]}});var CB=Le;CB("asyncIterator");var TB=Le;TB("hasInstance");var $B=Le;$B("isConcatSpreadable");var OB=Le;OB("iterator");var IB=Le;IB("match");var PB=Le;PB("matchAll");var AB=Le;AB("replace");var RB=Le;RB("search");var DB=Le;DB("species");var _B=Le;_B("split");var MB=Le,NB=Bb;MB("toPrimitive"),NB();var jB=rn,LB=Le,FB=Pr;LB("toStringTag"),FB(jB("Symbol"),"Symbol");var BB=Le;BB("unscopables");var zB=Ye,WB=Pr;WB(zB.JSON,"JSON",!0);var UB=ot,HB=UB.Symbol,Mr={},Kc=gt,VB=Tt,Ox=Function.prototype,qB=Kc&&Object.getOwnPropertyDescriptor,Gc=VB(Ox,"name"),KB=Gc&&(function(){}).name==="something",GB=Gc&&(!Kc||Kc&&qB(Ox,"name").configurable),YB={EXISTS:Gc,PROPER:KB,CONFIGURABLE:GB},XB=Xe,JB=!XB(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),QB=Tt,ZB=ct,e4=vn,t4=Da,n4=JB,Ix=t4("IE_PROTO"),Yc=Object,r4=Yc.prototype,Px=n4?Yc.getPrototypeOf:function(e){var t=e4(e);if(QB(t,Ix))return t[Ix];var n=t.constructor;return ZB(n)&&t instanceof n?n.prototype:t instanceof Yc?r4:null},i4=Xe,o4=ct,a4=Wt,s4=Pc,Ax=Px,l4=Fa,u4=Qe,Xc=u4("iterator"),Rx=!1,yn,Jc,Qc;[].keys&&(Qc=[].keys(),"next"in Qc?(Jc=Ax(Ax(Qc)),Jc!==Object.prototype&&(yn=Jc)):Rx=!0);var c4=!a4(yn)||i4(function(){var e={};return yn[Xc].call(e)!==e});c4?yn={}:yn=s4(yn),o4(yn[Xc])||l4(yn,Xc,function(){return this});var Dx={IteratorPrototype:yn,BUGGY_SAFARI_ITERATORS:Rx},f4=Dx.IteratorPrototype,d4=Pc,p4=Pi,h4=Pr,m4=Mr,v4=function(){return this},g4=function(e,t,n,r){var i=t+" Iterator";return e.prototype=d4(f4,{next:p4(+!r,n)}),h4(e,i,!1,!0),m4[i]=v4,e},y4=Ve,b4=Ca,x4=function(e,t,n){try{return y4(b4(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},w4=Wt,S4=function(e){return w4(e)||e===null},E4=S4,k4=String,C4=TypeError,T4=function(e){if(E4(e))return e;throw new C4("Can't set "+k4(e)+" as a prototype")},$4=x4,O4=Wt,I4=Sa,P4=T4;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=$4(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,o){return I4(i),P4(o),O4(i)&&(e?n(i,o):i.__proto__=o),i}}();var A4=Pe,R4=tn,_x=YB,D4=g4,_4=Px,M4=Pr,Mx=Fa,N4=Qe,Nx=Mr,jx=Dx,j4=_x.PROPER;_x.CONFIGURABLE,jx.IteratorPrototype;var Ga=jx.BUGGY_SAFARI_ITERATORS,Zc=N4("iterator"),Lx="keys",Ya="values",Fx="entries",L4=function(){return this},Bx=function(e,t,n,r,i,o,a){D4(n,t,r);var s=function(g){if(g===i&&p)return p;if(!Ga&&g&&g in c)return c[g];switch(g){case Lx:return function(){return new n(this,g)};case Ya:return function(){return new n(this,g)};case Fx:return function(){return new n(this,g)}}return function(){return new n(this)}},l=t+" Iterator",u=!1,c=e.prototype,f=c[Zc]||c["@@iterator"]||i&&c[i],p=!Ga&&f||s(i),d=t==="Array"&&c.entries||f,m,h,y;if(d&&(m=_4(d.call(new e)),m!==Object.prototype&&m.next&&(M4(m,l,!0,!0),Nx[l]=L4)),j4&&i===Ya&&f&&f.name!==Ya&&(u=!0,p=function(){return R4(f,this)}),i)if(h={values:s(Ya),keys:o?p:s(Lx),entries:s(Fx)},a)for(y in h)(Ga||u||!(y in c))&&Mx(c,y,h[y]);else A4({target:t,proto:!0,forced:Ga||u},h);return a&&c[Zc]!==p&&Mx(c,Zc,p,{name:i}),Nx[t]=p,h},zx=function(e,t){return{value:e,done:t}},F4=nn,Wx=Mr,Ux=_c;Ht.f;var B4=Bx,Xa=zx,Hx="Array Iterator",z4=Ux.set,W4=Ux.getterFor(Hx);B4(Array,"Array",function(e,t){z4(this,{type:Hx,target:F4(e),index:0,kind:t})},function(){var e=W4(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Xa(void 0,!0);switch(e.kind){case"keys":return Xa(n,!1);case"values":return Xa(t[n],!1)}return Xa([n,t[n]],!1)},"values"),Wx.Arguments=Wx.Array;var U4={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},H4=U4,V4=Ye,q4=Pr,Vx=Mr;for(var ef in H4)q4(V4[ef],ef),Vx[ef]=Vx.Array;var K4=HB,G4=K4,Y4=Qe,X4=Ht.f,qx=Y4("metadata"),Kx=Function.prototype;Kx[qx]===void 0&&X4(Kx,qx,{value:null});var J4=Le;J4("asyncDispose");var Q4=Le;Q4("dispose");var Z4=Le;Z4("metadata");var e3=G4,t3=e3,n3=rn,r3=Ve,tf=n3("Symbol"),i3=tf.keyFor,o3=r3(tf.prototype.valueOf),Gx=tf.isRegisteredSymbol||function(t){try{return i3(o3(t))!==void 0}catch{return!1}},a3=Pe,s3=Gx;a3({target:"Symbol",stat:!0},{isRegisteredSymbol:s3});for(var l3=Cr,Yx=rn,u3=Ve,c3=Ai,f3=Qe,Ja=Yx("Symbol"),Xx=Ja.isWellKnownSymbol,Jx=Yx("Object","getOwnPropertyNames"),d3=u3(Ja.prototype.valueOf),Qx=l3("wks"),nf=0,Zx=Jx(Ja),p3=Zx.length;nf<p3;nf++)try{var ew=Zx[nf];c3(Ja[ew])&&f3(ew)}catch{}var tw=function(t){if(Xx&&Xx(t))return!0;try{for(var n=d3(t),r=0,i=Jx(Qx),o=i.length;r<o;r++)if(Qx[i[r]]==n)return!0}catch{}return!1},h3=Pe,m3=tw;h3({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:m3});var v3=Le;v3("customMatcher");var g3=Le;g3("observable");var y3=Pe,b3=Gx;y3({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:b3});var x3=Pe,w3=tw;x3({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:w3});var S3=Le;S3("matcher");var E3=Le;E3("metadataKey");var k3=Le;k3("patternMatch");var C3=Le;C3("replaceAll");var T3=t3,$3=T3,O3=$3;const Nr=be(O3);var rf=Ve,I3=Oa,P3=ji,A3=Sa,R3=rf("".charAt),nw=rf("".charCodeAt),D3=rf("".slice),rw=function(e){return function(t,n){var r=P3(A3(t)),i=I3(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=nw(r,i),a<55296||a>56319||i+1===o||(s=nw(r,i+1))<56320||s>57343?e?R3(r,i):a:e?D3(r,i,i+2):(a-55296<<10)+(s-56320)+65536)}},_3={codeAt:rw(!1),charAt:rw(!0)},M3=_3.charAt,N3=ji,iw=_c,j3=Bx,ow=zx,aw="String Iterator",L3=iw.set,F3=iw.getterFor(aw);j3(String,"String",function(e){L3(this,{type:aw,string:N3(e),index:0})},function(){var t=F3(this),n=t.string,r=t.index,i;return r>=n.length?ow(void 0,!0):(i=M3(n,r),t.index+=i.length,ow(i,!1))});var B3=Mi,sw=rc,z3=Ju,W3=Mr,U3=Qe,H3=U3("iterator"),of=function(e){if(!z3(e))return sw(e,H3)||sw(e,"@@iterator")||W3[B3(e)]},V3=of,q3=V3,K3=q3,G3=K3,Y3=G3,X3=Y3,J3=X3,Q3=J3,Z3=Q3;const lw=be(Z3);var ez=gt,tz=Ir,nz=TypeError,rz=Object.getOwnPropertyDescriptor,iz=ez&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),uw=iz?function(e,t){if(tz(e)&&!rz(e,"length").writable)throw new nz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},oz=Pe,az=vn,sz=Xn,lz=uw,uz=gc,cz=Xe,fz=cz(function(){return[].push.call({length:4294967296},1)!==4294967297}),dz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},pz=fz||!dz();oz({target:"Array",proto:!0,arity:1,forced:pz},{push:function(t){var n=az(this),r=sz(n),i=arguments.length;uz(r+i);for(var o=0;o<i;o++)n[r]=arguments[o],r++;return lz(n,r),r}});var hz=Ye,mz=ot,Zn=function(e,t){var n=mz[e+"Prototype"],r=n&&n[t];if(r)return r;var i=hz[e],o=i&&i.prototype;return o&&o[t]},vz=Zn,gz=vz("Array","push"),yz=mn,bz=gz,af=Array.prototype,xz=function(e){var t=e.push;return e===af||yz(af,e)&&t===af.push?bz:t},wz=xz,Sz=wz,Ez=Sz,kz=Ez,Cz=kz,Tz=Cz,$z=Tz;const Oz=be($z);function Iz(e,t){var n=e==null?null:typeof Nr<"u"&&lw(e)||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(Oz(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}var Pz=Pe,cw=Ir,Az=wc,Rz=Wt,fw=Ec,Dz=Xn,_z=nn,Mz=_i,Nz=Qe,jz=Pa,Lz=ja,Fz=jz("slice"),Bz=Nz("species"),sf=Array,zz=Math.max;Pz({target:"Array",proto:!0,forced:!Fz},{slice:function(t,n){var r=_z(this),i=Dz(r),o=fw(t,i),a=fw(n===void 0?i:n,i),s,l,u;if(cw(r)&&(s=r.constructor,Az(s)&&(s===sf||cw(s.prototype))?s=void 0:Rz(s)&&(s=s[Bz],s===null&&(s=void 0)),s===sf||s===void 0))return Lz(r,o,a);for(l=new(s===void 0?sf:s)(zz(a-o,0)),u=0;o<a;o++,u++)o in r&&Mz(l,u,r[o]);return l.length=u,l}});var Wz=Zn,Uz=Wz("Array","slice"),Hz=mn,Vz=Uz,lf=Array.prototype,qz=function(e){var t=e.slice;return e===lf||Hz(lf,e)&&t===lf.slice?Vz:t},Kz=qz,Gz=Kz,Yz=Gz,Xz=Yz,Jz=Xz,Qz=Jz,Zz=Qz;const e5=be(Zz);var t5=tn,dw=Pn,n5=rc,r5=function(e,t,n){var r,i;dw(e);try{if(r=n5(e,"return"),!r){if(t==="throw")throw n;return n}r=t5(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return dw(r),n},i5=Pn,o5=r5,a5=function(e,t,n,r){try{return r?t(i5(n)[0],n[1]):t(n)}catch(i){o5(e,"throw",i)}},s5=Qe,l5=Mr,u5=s5("iterator"),c5=Array.prototype,f5=function(e){return e!==void 0&&(l5.Array===e||c5[u5]===e)},d5=tn,p5=Ca,h5=Pn,m5=ka,v5=of,g5=TypeError,y5=function(e,t){var n=arguments.length<2?v5(e):t;if(p5(n))return h5(d5(n,e));throw new g5(m5(e)+" is not iterable")},b5=dc,x5=tn,w5=vn,S5=a5,E5=f5,k5=wc,C5=Xn,pw=_i,T5=y5,$5=of,hw=Array,O5=function(t){var n=w5(t),r=k5(this),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0;a&&(o=b5(o,i>2?arguments[2]:void 0));var s=$5(n),l=0,u,c,f,p,d,m;if(s&&!(this===hw&&E5(s)))for(c=r?new this:[],p=T5(n,s),d=p.next;!(f=x5(d,p)).done;l++)m=a?S5(p,o,[f.value,l],!0):f.value,pw(c,l,m);else for(u=C5(n),c=r?new this(u):hw(u);u>l;l++)m=a?o(n[l],l):n[l],pw(c,l,m);return c.length=l,c},I5=Qe,mw=I5("iterator"),vw=!1;try{var P5=0,gw={next:function(){return{done:!!P5++}},return:function(){vw=!0}};gw[mw]=function(){return this},Array.from(gw,function(){throw 2})}catch{}var A5=function(e,t){try{if(!t&&!vw)return!1}catch{return!1}var n=!1;try{var r={};r[mw]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},R5=Pe,D5=O5,_5=A5,M5=!_5(function(e){Array.from(e)});R5({target:"Array",stat:!0,forced:M5},{from:D5});var N5=ot,j5=N5.Array.from,L5=j5,F5=L5,B5=F5,z5=B5,W5=z5,U5=W5,H5=U5;const yw=be(H5);function uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bw(e,t){if(e){var n;if(typeof e=="string")return uf(e,t);var r=e5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?yw(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uf(e,t):void 0}}function V5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
278
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
299
|
+
*/var Uu,by;function xy(){if(by)return Uu;by=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(c){return a[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Uu=i()?Object.assign:function(o,a){for(var s,l=r(o),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var p=0;p<u.length;p++)n.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},Uu}var Hu,wy;function Vu(){if(wy)return Hu;wy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hu=e,Hu}var qu,Sy;function Ey(){return Sy||(Sy=1,qu=Function.call.bind(Object.prototype.hasOwnProperty)),qu}var Ku,ky;function VD(){if(ky)return Ku;ky=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vu(),n={},r=Ey();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var f;try{if(typeof o[c]!="function"){var p=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=o[c](a,c,l,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ku=i,Ku}var Gu,Cy;function qD(){if(Cy)return Gu;Cy=1;var e=Ra(),t=xy(),n=Vu(),r=Ey(),i=VD(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Gu=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(y){var R=y&&(u&&y[u]||y[c]);if(typeof R=="function")return R}var p="<<anonymous>>",d={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:$(),elementType:S(),instanceOf:E,node:T(),objectOf:F,oneOf:O,oneOfType:D,shape:H,exact:B};function m(y,R){return y===R?y!==0||1/y===1/R:y!==y&&R!==R}function h(y,R){this.message=y,this.data=R&&typeof R=="object"?R:{},this.stack=""}h.prototype=Error.prototype;function g(y){if(process.env.NODE_ENV!=="production")var R={},P=0;function w(G,K,Y,Q,ee,J,Z){if(Q=Q||p,J=J||Y,Z!==n){if(l){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=Q+":"+Y;!R[ie]&&P<3&&(o("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[ie]=!0,P++)}}return K[Y]==null?G?K[Y]===null?new h("The "+ee+" `"+J+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+ee+" `"+J+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:y(K,Y,Q,ee,J)}var j=w.bind(null,!1);return j.isRequired=w.bind(null,!0),j}function v(y){function R(P,w,j,G,K,Y){var Q=P[w],ee=W(Q);if(ee!==y){var J=X(Q);return new h("Invalid "+G+" `"+K+"` of type "+("`"+J+"` supplied to `"+j+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return g(R)}function b(){return g(a)}function x(y){function R(P,w,j,G,K){if(typeof y!="function")return new h("Property `"+K+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var Y=P[w];if(!Array.isArray(Y)){var Q=W(Y);return new h("Invalid "+G+" `"+K+"` of type "+("`"+Q+"` supplied to `"+j+"`, expected an array."))}for(var ee=0;ee<Y.length;ee++){var J=y(Y,ee,j,G,K+"["+ee+"]",n);if(J instanceof Error)return J}return null}return g(R)}function $(){function y(R,P,w,j,G){var K=R[P];if(!s(K)){var Y=W(K);return new h("Invalid "+j+" `"+G+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected a single ReactElement."))}return null}return g(y)}function S(){function y(R,P,w,j,G){var K=R[P];if(!e.isValidElementType(K)){var Y=W(K);return new h("Invalid "+j+" `"+G+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected a single ReactElement type."))}return null}return g(y)}function E(y){function R(P,w,j,G,K){if(!(P[w]instanceof y)){var Y=y.name||p,Q=_(P[w]);return new h("Invalid "+G+" `"+K+"` of type "+("`"+Q+"` supplied to `"+j+"`, expected ")+("instance of `"+Y+"`."))}return null}return g(R)}function O(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function R(P,w,j,G,K){for(var Y=P[w],Q=0;Q<y.length;Q++)if(m(Y,y[Q]))return null;var ee=JSON.stringify(y,function(Z,q){var ie=X(q);return ie==="symbol"?String(q):q});return new h("Invalid "+G+" `"+K+"` of value `"+String(Y)+"` "+("supplied to `"+j+"`, expected one of "+ee+"."))}return g(R)}function F(y){function R(P,w,j,G,K){if(typeof y!="function")return new h("Property `"+K+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var Y=P[w],Q=W(Y);if(Q!=="object")return new h("Invalid "+G+" `"+K+"` of type "+("`"+Q+"` supplied to `"+j+"`, expected an object."));for(var ee in Y)if(r(Y,ee)){var J=y(Y,ee,j,G,K+"."+ee,n);if(J instanceof Error)return J}return null}return g(R)}function D(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<y.length;R++){var P=y[R];if(typeof P!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(P)+" at index "+R+"."),a}function w(j,G,K,Y,Q){for(var ee=[],J=0;J<y.length;J++){var Z=y[J],q=Z(j,G,K,Y,Q,n);if(q==null)return null;q.data&&r(q.data,"expectedType")&&ee.push(q.data.expectedType)}var ie=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new h("Invalid "+Y+" `"+Q+"` supplied to "+("`"+K+"`"+ie+"."))}return g(w)}function T(){function y(R,P,w,j,G){return L(R[P])?null:new h("Invalid "+j+" `"+G+"` supplied to "+("`"+w+"`, expected a ReactNode."))}return g(y)}function M(y,R,P,w,j){return new h((y||"React class")+": "+R+" type `"+P+"."+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function H(y){function R(P,w,j,G,K){var Y=P[w],Q=W(Y);if(Q!=="object")return new h("Invalid "+G+" `"+K+"` of type `"+Q+"` "+("supplied to `"+j+"`, expected `object`."));for(var ee in y){var J=y[ee];if(typeof J!="function")return M(j,G,K,ee,X(J));var Z=J(Y,ee,j,G,K+"."+ee,n);if(Z)return Z}return null}return g(R)}function B(y){function R(P,w,j,G,K){var Y=P[w],Q=W(Y);if(Q!=="object")return new h("Invalid "+G+" `"+K+"` of type `"+Q+"` "+("supplied to `"+j+"`, expected `object`."));var ee=t({},P[w],y);for(var J in ee){var Z=y[J];if(r(y,J)&&typeof Z!="function")return M(j,G,K,J,X(Z));if(!Z)return new h("Invalid "+G+" `"+K+"` key `"+J+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(P[w],null," ")+`
|
|
300
|
+
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var q=Z(Y,J,j,G,K+"."+J,n);if(q)return q}return null}return g(R)}function L(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(L);if(y===null||s(y))return!0;var R=f(y);if(R){var P=R.call(y),w;if(R!==y.entries){for(;!(w=P.next()).done;)if(!L(w.value))return!1}else for(;!(w=P.next()).done;){var j=w.value;if(j&&!L(j[1]))return!1}}else return!1;return!0;default:return!1}}function N(y,R){return y==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function W(y){var R=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":N(R,y)?"symbol":R}function X(y){if(typeof y>"u"||y===null)return""+y;var R=W(y);if(R==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return R}function V(y){var R=X(y);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function _(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Gu}var Yu,$y;function KD(){if($y)return Yu;$y=1;var e=Vu();function t(){}function n(){}return n.resetWarningCache=t,Yu=function(){function r(a,s,l,u,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Yu}if(process.env.NODE_ENV!=="production"){var GD=Ra(),YD=!0;Wu.exports=qD()(GD.isElement,YD)}else Wu.exports=KD()();var XD=Wu.exports;const ze=ke(XD);var JD=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Hi(e,t){var n=ZD(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function ZD(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=JD.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var QD=[".DS_Store","Thumbs.db"];function eM(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return Da(e)&&tM(e.dataTransfer)?[2,oM(e.dataTransfer,e.type)]:nM(e)?[2,rM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,iM(e)]:[2,[]]})})}function tM(e){return Da(e)}function nM(e){return Da(e)&&Da(e.target)}function Da(e){return typeof e=="object"&&e!==null}function rM(e){return Xu(e.target.files).map(function(t){return Hi(t)})}function iM(e){return Pr(this,void 0,void 0,function(){var t;return Ar(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Hi(r)})]}})})}function oM(e,t){return Pr(this,void 0,void 0,function(){var n,r;return Ar(this,function(i){switch(i.label){case 0:return e.items?(n=Xu(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(aM))]):[3,2];case 1:return r=i.sent(),[2,Ty(Oy(r))];case 2:return[2,Ty(Xu(e.files).map(function(o){return Hi(o)}))]}})})}function Ty(e){return e.filter(function(t){return QD.indexOf(t.name)===-1})}function Xu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function aM(e){if(typeof e.webkitGetAsEntry!="function")return Iy(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Py(t):Iy(e)}function Oy(e){return e.reduce(function(t,n){return du(du([],qv(t),!1),qv(Array.isArray(n)?Oy(n):[n]),!1)},[])}function Iy(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Hi(t);return Promise.resolve(n)}function sM(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return[2,e.isDirectory?Py(e):lM(e)]})})}function Py(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return Pr(a,void 0,void 0,function(){var l,u,c;return Ar(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=f.sent(),n(l),[3,4];case 3:return u=f.sent(),r(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(sM)),i.push(c),o(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function lM(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=Hi(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var uM=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function Ay(e){return dM(e)||fM(e)||My(e)||cM()}function cM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
301
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dM(e){if(Array.isArray(e))return Ju(e)}function _y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ry(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(n),!0).forEach(function(r){Dy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_y(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vi(e,t){return mM(e)||hM(e,t)||My(e,t)||pM()}function pM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
302
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function My(e,t){if(e){if(typeof e=="string")return Ju(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ju(e,t)}}function Ju(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function mM(e){if(Array.isArray(e))return e}var vM="file-invalid-type",gM="file-too-large",yM="file-too-small",bM="too-many-files",xM=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:vM,message:"File type must be ".concat(n)}},Ny=function(t){return{code:gM,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},jy=function(t){return{code:yM,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},wM={code:bM,message:"Too many files"};function Ly(e,t){var n=e.type==="application/x-moz-file"||uM(e,t);return[n,n?null:xM(t)]}function Fy(e,t,n){if(ur(e.size))if(ur(t)&&ur(n)){if(e.size>n)return[!1,Ny(n)];if(e.size<t)return[!1,jy(t)]}else{if(ur(t)&&e.size<t)return[!1,jy(t)];if(ur(n)&&e.size>n)return[!1,Ny(n)]}return[!0,null]}function ur(e){return e!=null}function SM(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=Ly(l,n),c=Vi(u,1),f=c[0],p=Fy(l,r,i),d=Vi(p,1),m=d[0],h=s?s(l):null;return f&&m&&!h})}function Ma(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Na(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function By(e){e.preventDefault()}function EM(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function kM(e){return e.indexOf("Edge/")!==-1}function CM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return EM(e)||kM(e)}function hn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!Ma(r)&&s&&s.apply(void 0,[r].concat(o)),Ma(r)})}}function $M(){return"showOpenFilePicker"in window}function TM(e){if(ur(e)){var t=Object.entries(e).filter(function(n){var r=Vi(n,2),i=r[0],o=r[1],a=!0;return zy(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(Wy))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Vi(r,2),o=i[0],a=i[1];return Ry(Ry({},n),{},Dy({},o,a))},{});return[{description:"Files",accept:t}]}return e}function OM(e){if(ur(e))return Object.entries(e).reduce(function(t,n){var r=Vi(n,2),i=r[0],o=r[1];return[].concat(Ay(t),[i],Ay(o))},[]).filter(function(t){return zy(t)||Wy(t)}).join(",")}function IM(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function PM(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function zy(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Wy(e){return/^.*\.[\w]+$/.test(e)}var AM=["children"],_M=["open"],RM=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],DM=["refKey","onChange","onClick"];function MM(e){return LM(e)||jM(e)||Uy(e)||NM()}function NM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
303
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LM(e){if(Array.isArray(e))return Qu(e)}function Zu(e,t){return zM(e)||BM(e,t)||Uy(e,t)||FM()}function FM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
304
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uy(e,t){if(e){if(typeof e=="string")return Qu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qu(e,t)}}function Qu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function zM(e){if(Array.isArray(e))return e}function Hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hy(Object(n),!0).forEach(function(r){ec(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ec(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ja(e,t){if(e==null)return{};var n=WM(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var La=I.forwardRef(function(e,t){var n=e.children,r=ja(e,AM),i=UM(r),o=i.open,a=ja(i,_M);return I.useImperativeHandle(t,function(){return{open:o}},[o]),I.createElement(I.Fragment,null,n(Ve(Ve({},a),{},{open:o})))});La.displayName="Dropzone";var Vy={disabled:!1,getFilesFromEvent:eM,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};La.defaultProps=Vy,La.propTypes={children:ze.func,accept:ze.objectOf(ze.arrayOf(ze.string)),multiple:ze.bool,preventDropOnDocument:ze.bool,noClick:ze.bool,noKeyboard:ze.bool,noDrag:ze.bool,noDragEventsBubbling:ze.bool,minSize:ze.number,maxSize:ze.number,maxFiles:ze.number,disabled:ze.bool,getFilesFromEvent:ze.func,onFileDialogCancel:ze.func,onFileDialogOpen:ze.func,useFsAccessApi:ze.bool,autoFocus:ze.bool,onDragEnter:ze.func,onDragLeave:ze.func,onDragOver:ze.func,onDrop:ze.func,onDropAccepted:ze.func,onDropRejected:ze.func,onError:ze.func,validator:ze.func};var tc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function UM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ve(Ve({},Vy),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,$=t.noClick,S=t.noKeyboard,E=t.noDrag,O=t.noDragEventsBubbling,F=t.onError,D=t.validator,T=I.useMemo(function(){return OM(n)},[n]),M=I.useMemo(function(){return TM(n)},[n]),H=I.useMemo(function(){return typeof g=="function"?g:qy},[g]),B=I.useMemo(function(){return typeof h=="function"?h:qy},[h]),L=I.useRef(null),N=I.useRef(null),W=I.useReducer(HM,tc),X=Zu(W,2),V=X[0],_=X[1],y=V.isFocused,R=V.isFileDialogActive,P=I.useRef(typeof window<"u"&&window.isSecureContext&&v&&$M()),w=function(){!P.current&&R&&setTimeout(function(){if(N.current){var fe=N.current.files;fe.length||(_({type:"closeDialog"}),B())}},300)};I.useEffect(function(){return window.addEventListener("focus",w,!1),function(){window.removeEventListener("focus",w,!1)}},[N,R,B,P]);var j=I.useRef([]),G=function(fe){L.current&&L.current.contains(fe.target)||(fe.preventDefault(),j.current=[])};I.useEffect(function(){return x&&(document.addEventListener("dragover",By,!1),document.addEventListener("drop",G,!1)),function(){x&&(document.removeEventListener("dragover",By),document.removeEventListener("drop",G))}},[L,x]),I.useEffect(function(){return!r&&b&&L.current&&L.current.focus(),function(){}},[L,b,r]);var K=I.useCallback(function(oe){F?F(oe):console.error(oe)},[F]),Y=I.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe),j.current=[].concat(MM(j.current),[oe.target]),Na(oe)&&Promise.resolve(i(oe)).then(function(fe){if(!(Ma(oe)&&!O)){var U=fe.length,z=U>0&&SM({files:fe,accept:T,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:D}),ne=U>0&&!z;_({isDragAccept:z,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(oe)}}).catch(function(fe){return K(fe)})},[i,u,K,O,T,a,o,s,l,D]),Q=I.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe);var fe=Na(oe);if(fe&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return fe&&f&&f(oe),!1},[f,O]),ee=I.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe);var fe=j.current.filter(function(z){return L.current&&L.current.contains(z)}),U=fe.indexOf(oe.target);U!==-1&&fe.splice(U,1),j.current=fe,!(fe.length>0)&&(_({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Na(oe)&&c&&c(oe))},[L,c,O]),J=I.useCallback(function(oe,fe){var U=[],z=[];oe.forEach(function(ne){var se=Ly(ne,T),de=Zu(se,2),ge=de[0],Ye=de[1],Xe=Fy(ne,a,o),gt=Zu(Xe,2),it=gt[0],Re=gt[1],ot=D?D(ne):null;if(ge&&it&&!ot)U.push(ne);else{var Ze=[Ye,Re];ot&&(Ze=Ze.concat(ot)),z.push({file:ne,errors:Ze.filter(function(Gt){return Gt})})}}),(!s&&U.length>1||s&&l>=1&&U.length>l)&&(U.forEach(function(ne){z.push({file:ne,errors:[wM]})}),U.splice(0)),_({acceptedFiles:U,fileRejections:z,type:"setFiles"}),p&&p(U,z,fe),z.length>0&&m&&m(z,fe),U.length>0&&d&&d(U,fe)},[_,s,T,a,o,l,p,d,m,D]),Z=I.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe),j.current=[],Na(oe)&&Promise.resolve(i(oe)).then(function(fe){Ma(oe)&&!O||J(fe,oe)}).catch(function(fe){return K(fe)}),_({type:"reset"})},[i,J,K,O]),q=I.useCallback(function(){if(P.current){_({type:"openDialog"}),H();var oe={multiple:s,types:M};window.showOpenFilePicker(oe).then(function(fe){return i(fe)}).then(function(fe){J(fe,null),_({type:"closeDialog"})}).catch(function(fe){IM(fe)?(B(fe),_({type:"closeDialog"})):PM(fe)?(P.current=!1,N.current?(N.current.value=null,N.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(fe)});return}N.current&&(_({type:"openDialog"}),H(),N.current.value=null,N.current.click())},[_,H,B,v,J,K,M,s]),ie=I.useCallback(function(oe){!L.current||!L.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),q())},[L,q]),le=I.useCallback(function(){_({type:"focus"})},[]),pe=I.useCallback(function(){_({type:"blur"})},[]),ae=I.useCallback(function(){$||(CM()?setTimeout(q,0):q())},[$,q]),ve=function(fe){return r?null:fe},be=function(fe){return S?null:ve(fe)},_e=function(fe){return E?null:ve(fe)},rt=function(fe){O&&fe.stopPropagation()},Et=I.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=oe.refKey,U=fe===void 0?"ref":fe,z=oe.role,ne=oe.onKeyDown,se=oe.onFocus,de=oe.onBlur,ge=oe.onClick,Ye=oe.onDragEnter,Xe=oe.onDragOver,gt=oe.onDragLeave,it=oe.onDrop,Re=ja(oe,RM);return Ve(Ve(ec({onKeyDown:be(hn(ne,ie)),onFocus:be(hn(se,le)),onBlur:be(hn(de,pe)),onClick:ve(hn(ge,ae)),onDragEnter:_e(hn(Ye,Y)),onDragOver:_e(hn(Xe,Q)),onDragLeave:_e(hn(gt,ee)),onDrop:_e(hn(it,Z)),role:typeof z=="string"&&z!==""?z:"presentation"},U,L),!r&&!S?{tabIndex:0}:{}),Re)}},[L,ie,le,pe,ae,Y,Q,ee,Z,S,E,r]),kt=I.useCallback(function(oe){oe.stopPropagation()},[]),Ct=I.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=oe.refKey,U=fe===void 0?"ref":fe,z=oe.onChange,ne=oe.onClick,se=ja(oe,DM),de=ec({accept:T,multiple:s,type:"file",style:{display:"none"},onChange:ve(hn(z,Z)),onClick:ve(hn(ne,kt)),tabIndex:-1},U,N);return Ve(Ve({},de),se)}},[N,n,s,Z,r]);return Ve(Ve({},V),{},{isFocused:y&&!r,getRootProps:Et,getInputProps:Ct,rootRef:L,inputRef:N,open:ve(q)})}function HM(e,t){switch(t.type){case"focus":return Ve(Ve({},e),{},{isFocused:!0});case"blur":return Ve(Ve({},e),{},{isFocused:!1});case"openDialog":return Ve(Ve({},tc),{},{isFileDialogActive:!0});case"closeDialog":return Ve(Ve({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ve(Ve({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ve(Ve({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ve({},tc);default:return e}}function qy(){}const nc=({children:e})=>{const[t,n]=I.useState(!1),[r,i]=I.useState(""),[o,a]=I.useState(""),[s,l]=I.useState(""),[u,c]=I.useState(()=>{}),[f,p]=I.useState(""),[d,m]=I.useState(null),h=({title:v,description:b,confirmButton:x,onConfirm:$,cancelButton:S,content:E})=>{i(v),a(b),l(x),c(()=>$),p(S),m(E),n(!0)},g=()=>{n(!1)};return C.jsxs(Uv.Provider,{value:{open:t,showModal:h,hideModal:g},children:[C.jsx(mi,{open:t,onOpenChange:n,children:C.jsx(mi.Content,{title:r,description:o,confirmButton:s,onConfirm:u,cancelButton:f,hideModal:g,children:d})}),e]})},Ky=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o})=>{const a=I.useMemo(()=>Up({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return C.jsx("style",{children:a})},rc=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...o})=>{const{container:a}=Se,s=oa(c=>c.setMessageContainerRef),l=_i(c=>c.uploadFile),u=I.useRef(null);return I.useEffect(()=>{s(u)},[u]),i&&r?C.jsx(La,{noClick:!0,onDrop:c=>c.forEach(f=>l(f,r)),children:({getRootProps:c,isDragActive:f})=>C.jsxs("div",{...o,className:zr(a.className,t),ref:u,children:[C.jsxs("div",{"data-hover":f,...a.dropzone.overlay,children:["Drop files to upload",C.jsx(iA,{style:{width:"50px"}})]}),C.jsxs(nc,{children:[C.jsx(Gy,{connected:n}),C.jsx("div",{...a.dropzone.container,...c(),children:e})]})]})}):C.jsx("div",{...o,className:zr(a.className,t),ref:u,children:C.jsxs(nc,{children:[C.jsx(Gy,{connected:n}),e]})})},Gy=({connected:e})=>{const{open:t,showModal:n}=fu();return e===!1&&!t&&n&&n({title:"Connection Error",description:"There was an error connecting to the server. Please check your internet connection and try again.",confirmButton:"Restart",onConfirm:()=>window.parent.location.reload(),cancelButton:"Cancel"}),C.jsx(C.Fragment,{})};rc.displayName="Container";const Yy=I.forwardRef(({children:e,onClick:t,imgUrl:n,...r},i)=>{const{fab:o}=Se,{container:a,icon:s,image:l}=o??{};return n?C.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):C.jsx("div",{...r,...a,ref:i,onClick:t,children:C.jsx("div",{...s})})});Yy.displayName="Fab";function On(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function VM(e,t){const n=k.createContext(t),r=o=>{const{children:a,...s}=o,l=k.useMemo(()=>s,Object.values(s));return C.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=k.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Xy(e,t=[]){let n=[];function r(o,a){const s=k.createContext(a),l=n.length;n=[...n,a];const u=f=>{var v;const{scope:p,children:d,...m}=f,h=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,g=k.useMemo(()=>m,Object.values(m));return C.jsx(h.Provider,{value:g,children:d})};u.displayName=o+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,m=k.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,qM(i,...t)]}function qM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Jy({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=KM({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Mn(n),l=k.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,l]}function KM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,i=k.useRef(r),o=Mn(t);return k.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Zy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ic(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Zy(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Zy(e[i],null)}}}}function Hn(...e){return k.useCallback(ic(...e),e)}var Qy=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(YM);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(oc,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(oc,{...r,ref:t,children:n})});Qy.displayName="Slot";var oc=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=JM(n);return k.cloneElement(n,{...XM(r,n.props),ref:t?ic(t,i):i})}return k.Children.count(n)>1?k.Children.only(null):null});oc.displayName="SlotClone";var GM=({children:e})=>C.jsx(C.Fragment,{children:e});function YM(e){return k.isValidElement(e)&&e.type===GM}function XM(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function JM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ac=ZM.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Qy:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function QM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Fa=e=>{const{present:t,children:n}=e,r=e2(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),o=Hn(r.ref,t2(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:o}):null};Fa.displayName="Presence";function e2(e){const[t,n]=k.useState(),r=k.useRef({}),i=k.useRef(e),o=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=QM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const u=Ba(r.current);o.current=s==="mounted"?u:"none"},[s]),kr(()=>{const u=r.current,c=i.current;if(c!==e){const p=o.current,d=Ba(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),kr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=d=>{const h=Ba(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(o.current=Ba(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ba(e){return(e==null?void 0:e.animationName)||"none"}function t2(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var n2=k.useId||(()=>{}),r2=0;function za(e){const[t,n]=k.useState(n2());return kr(()=>{e||n(r=>r??String(r2++))},[e]),e||(t?`radix-${t}`:"")}var sc="Collapsible",[i2,RJ]=Xy(sc),[o2,lc]=i2(sc),eb=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=Jy({prop:r,defaultProp:i,onChange:a});return C.jsx(o2,{scope:n,disabled:o,contentId:za(),open:l,onOpenToggle:k.useCallback(()=>u(c=>!c),[u]),children:C.jsx(ac.div,{"data-state":cc(l),"data-disabled":o?"":void 0,...s,ref:t})})});eb.displayName=sc;var tb="CollapsibleTrigger",nb=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=lc(tb,n);return C.jsx(ac.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":cc(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:On(e.onClick,i.onOpenToggle)})});nb.displayName=tb;var uc="CollapsibleContent",rb=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=lc(uc,e.__scopeCollapsible);return C.jsx(Fa,{present:n||i.open,children:({present:o})=>C.jsx(a2,{...r,ref:t,present:o})})});rb.displayName=uc;var a2=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=lc(uc,n),[s,l]=k.useState(r),u=k.useRef(null),c=Hn(t,u),f=k.useRef(0),p=f.current,d=k.useRef(0),m=d.current,h=a.open||s,g=k.useRef(h),v=k.useRef(void 0);return k.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),kr(()=>{const b=u.current;if(b){v.current=v.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();f.current=x.height,d.current=x.width,g.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),l(r)}},[a.open,r]),C.jsx(ac.div,{"data-state":cc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function cc(e){return e?"open":"closed"}var s2=eb,l2=rb;const fc=({restartConversation:e,...t})=>{var a,s;const{header:n}=Se,{showModal:r,hideModal:i}=fu(),o=l=>{l.stopPropagation(),r&&i?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButton:"New conversation",onConfirm:()=>{e(),i()},cancelButton:"Cancel"}):e()};return C.jsx(gA,{...t,...(s=(a=n==null?void 0:n.content)==null?void 0:a.actions)==null?void 0:s.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},u2=({onClick:e,...t})=>{const{header:n}=Se,r=i=>{i.stopPropagation(),e==null||e()};return C.jsx(kA,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},qi=({icon:e,title:t,link:n,...r})=>{var a,s,l,u,c,f,p,d,m,h,g,v;const{header:i}=Se,o=e??oA;return t?n?C.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[C.jsx(o,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),C.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[C.jsx(o,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),C.jsx("p",{...(v=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:v.text,children:t})]}):null},ib=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:i,...o})=>{var f,p,d,m,h,g,v,b,x,$,S,E,O,F,D,T,M,H,B,L,N,W;const{header:a}=Se,[s,l]=I.useState(e),u=!!((f=n.email)!=null&&f.title)||!!((p=n.phone)!=null&&p.title)||!!((d=n.website)!=null&&d.title)||!!((m=n.termsOfService)!=null&&m.link)||!!((h=n.privacyPolicy)!=null&&h.link),c=u&&!i;return C.jsxs(s2,{open:c?s:!1,onOpenChange:l,"data-disabled":c?void 0:"",...a.container,...o,children:[C.jsxs(nb,{"aria-label":"Expand Header Button",...a.content.container,children:[C.jsx(No,{...o,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),C.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&C.jsx("p",{...a.content.description,children:n.botDescription}),C.jsxs("div",{...a.content.actions.container,children:[r&&C.jsx(fc,{restartConversation:r}),t&&C.jsx(u2,{onClick:t})]})]}),u&&C.jsxs(l2,{...a.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[C.jsx(qi,{"data-email":"",icon:fA,title:(g=n.email)==null?void 0:g.title,link:(b=(v=n.email)==null?void 0:v.link)!=null&&b.startsWith("mailto:")?(x=n.email)==null?void 0:x.link:`mailto:${($=n.email)==null?void 0:$.link}`}),C.jsx(qi,{"data-phone":"",icon:mA,title:(S=n.phone)==null?void 0:S.title,link:(O=(E=n.phone)==null?void 0:E.link)!=null&&O.startsWith("tel:")?(F=n.phone)==null?void 0:F.link:`tel:${(D=n.phone)==null?void 0:D.link}`}),C.jsx(qi,{"data-website":"",link:(T=n.website)==null?void 0:T.link,icon:lA,title:(M=n.website)==null?void 0:M.title})]}),C.jsxs("div",{"data-legal":"",...(H=a.expandedContent)==null?void 0:H.group,children:[C.jsx(qi,{"data-terms":"",link:(B=n.termsOfService)==null?void 0:B.link,icon:vv,title:(L=n.termsOfService)==null?void 0:L.title}),C.jsx(qi,{"data-privacy":"",link:(N=n.privacyPolicy)==null?void 0:N.link,icon:cA,title:(W=n.privacyPolicy)==null?void 0:W.title})]})]})]})},dc=I.memo(({...e})=>{const{typingIndicator:t}=Se;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})});dc.displayName="TypingIndicator";const pc=I.memo(I.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:o,authorId:a,status:s,renderers:l,isReadOnly:u,isLastDeliveredMessage:c,feedback:f,timestamp:p,metadata:d,sendMessage:m,addMessageFeedback:h},g)=>{const[v,b]=I.useState([]),{message:{container:x,avatar:$,deliveryStatus:S}}=Se,E=Mp(a??"",15),[O,F]=I.useState("idle");return C.jsx(Wv.Provider,{value:{isLoading:v,setIsLoading:b},children:C.jsxs("div",{...x,className:zr(x==null?void 0:x.className,c&&(S==null?void 0:S.className)),"data-loaded":v.length===0,"data-disable-input":!!n,"data-direction":e,ref:g,children:[C.jsxs(ll,{"data-color":E,"data-loading-status":O,...$==null?void 0:$.container,children:[C.jsx(ul,{...$==null?void 0:$.image,onLoadingStatusChange:F,src:i==null?void 0:i.avatar}),C.jsxs(cl,{...$==null?void 0:$.fallback,children:[i==null?void 0:i.name[0]," "]})]}),t&&C.jsx(lr,{block:{...t,isReadOnly:u,direction:e,timestamp:p,sender:i,feedback:f,messageId:o,status:s,metadata:d,sendMessage:m,addMessageFeedback:h},renderers:l}),r]})})}));function c2({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=Se;return C.jsxs("li",{...r.container,children:[C.jsx(No,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),C.jsxs("div",{...r.content,children:[C.jsx("h1",{...r.title,children:n||"Bot"}),C.jsx("p",{...r.description,children:t})]})]})}function f2(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function d2(){f2("react-scroll-to-bottom:version","4.2.0")}var Ki=function(e){return e&&e.Math===Math&&e},lt=Ki(typeof globalThis=="object"&&globalThis)||Ki(typeof window=="object"&&window)||Ki(typeof self=="object"&&self)||Ki(typeof Xt=="object"&&Xt)||Ki(typeof Xt=="object"&&Xt)||function(){return this}()||Function("return this")(),ut=function(e){try{return!!e()}catch{return!0}},p2=ut,Wa=!p2(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),h2=Wa,ob=Function.prototype,ab=ob.apply,sb=ob.call,hc=typeof Reflect=="object"&&Reflect.apply||(h2?sb.bind(ab):function(){return sb.apply(ab,arguments)}),lb=Wa,ub=Function.prototype,mc=ub.call,m2=lb&&ub.bind.bind(mc,mc),tt=lb?m2:function(e){return function(){return mc.apply(e,arguments)}},cb=tt,v2=cb({}.toString),g2=cb("".slice),cr=function(e){return g2(v2(e),8,-1)},y2=cr,b2=tt,vc=function(e){if(y2(e)==="Function")return b2(e)},gc=typeof document=="object"&&document.all,wt=typeof gc>"u"&&gc!==void 0?function(e){return typeof e=="function"||e===gc}:function(e){return typeof e=="function"},Gi={},x2=ut,At=!x2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),w2=Wa,Ua=Function.prototype.call,mn=w2?Ua.bind(Ua):function(){return Ua.apply(Ua,arguments)},yc={},fb={}.propertyIsEnumerable,db=Object.getOwnPropertyDescriptor,S2=db&&!fb.call({1:2},1);yc.f=S2?function(t){var n=db(this,t);return!!n&&n.enumerable}:fb;var Yi=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},E2=tt,k2=ut,C2=cr,bc=Object,$2=E2("".split),pb=k2(function(){return!bc("z").propertyIsEnumerable(0)})?function(e){return C2(e)==="String"?$2(e,""):bc(e)}:bc,xc=function(e){return e==null},T2=xc,O2=TypeError,Ha=function(e){if(T2(e))throw new O2("Can't call method on "+e);return e},I2=pb,P2=Ha,vn=function(e){return I2(P2(e))},A2=wt,tn=function(e){return typeof e=="object"?e!==null:A2(e)},mt={},wc=mt,Sc=lt,_2=wt,hb=function(e){return _2(e)?e:void 0},gn=function(e,t){return arguments.length<2?hb(wc[e])||hb(Sc[e]):wc[e]&&wc[e][t]||Sc[e]&&Sc[e][t]},R2=tt,In=R2({}.isPrototypeOf),D2=lt,mb=D2.navigator,vb=mb&&mb.userAgent,Ec=vb?String(vb):"",gb=lt,kc=Ec,yb=gb.process,bb=gb.Deno,xb=yb&&yb.versions||bb&&bb.version,wb=xb&&xb.v8,nn,Va;wb&&(nn=wb.split("."),Va=nn[0]>0&&nn[0]<4?1:+(nn[0]+nn[1])),!Va&&kc&&(nn=kc.match(/Edge\/(\d+)/),(!nn||nn[1]>=74)&&(nn=kc.match(/Chrome\/(\d+)/),nn&&(Va=+nn[1])));var Cc=Va,Sb=Cc,M2=ut,N2=lt,j2=N2.String,Wr=!!Object.getOwnPropertySymbols&&!M2(function(){var e=Symbol("symbol detection");return!j2(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Sb&&Sb<41}),L2=Wr,Eb=L2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",F2=gn,B2=wt,z2=In,W2=Eb,U2=Object,Xi=W2?function(e){return typeof e=="symbol"}:function(e){var t=F2("Symbol");return B2(t)&&z2(t.prototype,U2(e))},H2=String,qa=function(e){try{return H2(e)}catch{return"Object"}},V2=wt,q2=qa,K2=TypeError,Ka=function(e){if(V2(e))return e;throw new K2(q2(e)+" is not a function")},G2=Ka,Y2=xc,$c=function(e,t){var n=e[t];return Y2(n)?void 0:G2(n)},Tc=mn,Oc=wt,Ic=tn,X2=TypeError,J2=function(e,t){var n,r;if(t==="string"&&Oc(n=e.toString)&&!Ic(r=Tc(n,e))||Oc(n=e.valueOf)&&!Ic(r=Tc(n,e))||t!=="string"&&Oc(n=e.toString)&&!Ic(r=Tc(n,e)))return r;throw new X2("Can't convert object to primitive value")},kb={exports:{}},Cb=lt,Z2=Object.defineProperty,Q2=function(e,t){try{Z2(Cb,e,{value:t,configurable:!0,writable:!0})}catch{Cb[e]=t}return t},eN=lt,tN=Q2,$b="__core-js_shared__",Tb=kb.exports=eN[$b]||tN($b,{});(Tb.versions||(Tb.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Pc=kb.exports,Ob=Pc,Ur=function(e,t){return Ob[e]||(Ob[e]=t||{})},nN=Ha,rN=Object,Pn=function(e){return rN(nN(e))},iN=tt,oN=Pn,aN=iN({}.hasOwnProperty),Ft=Object.hasOwn||function(t,n){return aN(oN(t),n)},sN=tt,lN=0,uN=Math.random(),cN=sN(1 .toString),Ac=function(e){return"Symbol("+(e===void 0?"":e)+")_"+cN(++lN+uN,36)},fN=lt,dN=Ur,Ib=Ft,pN=Ac,hN=Wr,mN=Eb,Hr=fN.Symbol,_c=dN("wks"),vN=mN?Hr.for||Hr:Hr&&Hr.withoutSetter||pN,ft=function(e){return Ib(_c,e)||(_c[e]=hN&&Ib(Hr,e)?Hr[e]:vN("Symbol."+e)),_c[e]},gN=mn,Pb=tn,Ab=Xi,yN=$c,bN=J2,xN=ft,wN=TypeError,SN=xN("toPrimitive"),EN=function(e,t){if(!Pb(e)||Ab(e))return e;var n=yN(e,SN),r;if(n){if(t===void 0&&(t="default"),r=gN(n,e,t),!Pb(r)||Ab(r))return r;throw new wN("Can't convert object to primitive value")}return t===void 0&&(t="number"),bN(e,t)},kN=EN,CN=Xi,Rc=function(e){var t=kN(e,"string");return CN(t)?t:t+""},$N=lt,_b=tn,Dc=$N.document,TN=_b(Dc)&&_b(Dc.createElement),Rb=function(e){return TN?Dc.createElement(e):{}},ON=At,IN=ut,PN=Rb,Db=!ON&&!IN(function(){return Object.defineProperty(PN("div"),"a",{get:function(){return 7}}).a!==7}),AN=At,_N=mn,RN=yc,DN=Yi,MN=vn,NN=Rc,jN=Ft,LN=Db,Mb=Object.getOwnPropertyDescriptor;Gi.f=AN?Mb:function(t,n){if(t=MN(t),n=NN(n),LN)try{return Mb(t,n)}catch{}if(jN(t,n))return DN(!_N(RN.f,t,n),t[n])};var FN=ut,BN=wt,zN=/#|\.prototype\./,Ji=function(e,t){var n=UN[WN(e)];return n===VN?!0:n===HN?!1:BN(t)?FN(t):!!t},WN=Ji.normalize=function(e){return String(e).replace(zN,".").toLowerCase()},UN=Ji.data={},HN=Ji.NATIVE="N",VN=Ji.POLYFILL="P",qN=Ji,Nb=vc,KN=Ka,GN=Wa,YN=Nb(Nb.bind),Mc=function(e,t){return KN(e),t===void 0?e:GN?YN(e,t):function(){return e.apply(t,arguments)}},rn={},XN=At,JN=ut,jb=XN&&JN(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ZN=tn,QN=String,ej=TypeError,Vn=function(e){if(ZN(e))return e;throw new ej(QN(e)+" is not an object")},tj=At,nj=Db,rj=jb,Ga=Vn,Lb=Rc,ij=TypeError,Nc=Object.defineProperty,oj=Object.getOwnPropertyDescriptor,jc="enumerable",Lc="configurable",Fc="writable";rn.f=tj?rj?function(t,n,r){if(Ga(t),n=Lb(n),Ga(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Fc in r&&!r[Fc]){var i=oj(t,n);i&&i[Fc]&&(t[n]=r.value,r={configurable:Lc in r?r[Lc]:i[Lc],enumerable:jc in r?r[jc]:i[jc],writable:!1})}return Nc(t,n,r)}:Nc:function(t,n,r){if(Ga(t),n=Lb(n),Ga(r),nj)try{return Nc(t,n,r)}catch{}if("get"in r||"set"in r)throw new ij("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var aj=At,sj=rn,lj=Yi,Ya=aj?function(e,t,n){return sj.f(e,t,lj(1,n))}:function(e,t,n){return e[t]=n,e},Zi=lt,uj=hc,cj=vc,fj=wt,dj=Gi.f,pj=qN,Vr=mt,hj=Mc,qr=Ya,Fb=Ft,mj=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return uj(e,this,arguments)};return t.prototype=e.prototype,t},Le=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,a=r?Zi:i?Zi[n]:Zi[n]&&Zi[n].prototype,s=r?Vr:Vr[n]||qr(Vr,n,{})[n],l=s.prototype,u,c,f,p,d,m,h,g,v;for(p in t)u=pj(r?p:n+(i?".":"#")+p,e.forced),c=!u&&a&&Fb(a,p),m=s[p],c&&(e.dontCallGetSet?(v=dj(a,p),h=v&&v.value):h=a[p]),d=c&&h?h:t[p],!(!u&&!o&&typeof m==typeof d)&&(e.bind&&c?g=hj(d,Zi):e.wrap&&c?g=mj(d):o&&fj(d)?g=cj(d):g=d,(e.sham||d&&d.sham||m&&m.sham)&&qr(g,"sham",!0),qr(s,p,g),o&&(f=n+"Prototype",Fb(Vr,f)||qr(Vr,f,{}),qr(Vr[f],p,d),e.real&&l&&(u||!l[p])&&qr(l,p,d)))},vj=cr,Kr=Array.isArray||function(t){return vj(t)==="Array"},gj=Le,yj=Kr;gj({target:"Array",stat:!0},{isArray:yj});var bj=mt,xj=bj.Array.isArray,wj=xj,Bb=wj,Sj=Bb,Ej=Sj,kj=Ej,Cj=kj,$j=Cj;const zb=ke($j);function Tj(e){if(zb(e))return e}var Oj=Math.ceil,Ij=Math.floor,Pj=Math.trunc||function(t){var n=+t;return(n>0?Ij:Oj)(n)},Aj=Pj,Xa=function(e){var t=+e;return t!==t||t===0?0:Aj(t)},_j=Xa,Rj=Math.min,Dj=function(e){var t=_j(e);return t>0?Rj(t,9007199254740991):0},Mj=Dj,fr=function(e){return Mj(e.length)},Nj=TypeError,jj=9007199254740991,Bc=function(e){if(e>jj)throw Nj("Maximum allowed index exceeded");return e},Lj=At,Fj=rn,Bj=Yi,Qi=function(e,t,n){Lj?Fj.f(e,t,Bj(0,n)):e[t]=n},zj=ft,Wj=zj("toStringTag"),Wb={};Wb[Wj]="z";var zc=String(Wb)==="[object z]",Uj=zc,Hj=wt,Ja=cr,Vj=ft,qj=Vj("toStringTag"),Kj=Object,Gj=Ja(function(){return arguments}())==="Arguments",Yj=function(e,t){try{return e[t]}catch{}},eo=Uj?Ja:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=Yj(t=Kj(e),qj))=="string"?n:Gj?Ja(t):(r=Ja(t))==="Object"&&Hj(t.callee)?"Arguments":r},Xj=tt,Jj=wt,Wc=Pc,Zj=Xj(Function.toString);Jj(Wc.inspectSource)||(Wc.inspectSource=function(e){return Zj(e)});var Qj=Wc.inspectSource,eL=tt,tL=ut,Ub=wt,nL=eo,rL=gn,iL=Qj,Hb=function(){},Vb=rL("Reflect","construct"),Uc=/^\s*(?:class|function)\b/,oL=eL(Uc.exec),aL=!Uc.test(Hb),to=function(t){if(!Ub(t))return!1;try{return Vb(Hb,[],t),!0}catch{return!1}},qb=function(t){if(!Ub(t))return!1;switch(nL(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return aL||!!oL(Uc,iL(t))}catch{return!0}};qb.sham=!0;var Hc=!Vb||tL(function(){var e;return to(to.call)||!to(Object)||!to(function(){e=!0})||e})?qb:to,Kb=Kr,sL=Hc,lL=tn,uL=ft,cL=uL("species"),Gb=Array,fL=function(e){var t;return Kb(e)&&(t=e.constructor,sL(t)&&(t===Gb||Kb(t.prototype))?t=void 0:lL(t)&&(t=t[cL],t===null&&(t=void 0))),t===void 0?Gb:t},dL=fL,Vc=function(e,t){return new(dL(e))(t===0?0:t)},pL=ut,hL=ft,mL=Cc,vL=hL("species"),Za=function(e){return mL>=51||!pL(function(){var t=[],n=t.constructor={};return n[vL]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gL=Le,yL=ut,bL=Kr,xL=tn,wL=Pn,SL=fr,Yb=Bc,Xb=Qi,EL=Vc,kL=Za,CL=ft,$L=Cc,Jb=CL("isConcatSpreadable"),TL=$L>=51||!yL(function(){var e=[];return e[Jb]=!1,e.concat()[0]!==e}),OL=function(e){if(!xL(e))return!1;var t=e[Jb];return t!==void 0?!!t:bL(e)},IL=!TL||!kL("concat");gL({target:"Array",proto:!0,arity:1,forced:IL},{concat:function(t){var n=wL(this),r=EL(n,0),i=0,o,a,s,l,u;for(o=-1,s=arguments.length;o<s;o++)if(u=o===-1?n:arguments[o],OL(u))for(l=SL(u),Yb(i+l),a=0;a<l;a++,i++)a in u&&Xb(r,i,u[a]);else Yb(i+1),Xb(r,i++,u);return r.length=i,r}});var PL=eo,AL=String,no=function(e){if(PL(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return AL(e)},Qa={},_L=Xa,RL=Math.max,DL=Math.min,qc=function(e,t){var n=_L(e);return n<0?RL(n+t,0):DL(n,t)},ML=vn,NL=qc,jL=fr,Zb=function(e){return function(t,n,r){var i=ML(t),o=jL(i);if(o===0)return!e&&-1;var a=NL(r,o),s;if(e&&n!==n){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Qb={includes:Zb(!0),indexOf:Zb(!1)},es={},LL=tt,Kc=Ft,FL=vn,BL=Qb.indexOf,zL=es,ex=LL([].push),tx=function(e,t){var n=FL(e),r=0,i=[],o;for(o in n)!Kc(zL,o)&&Kc(n,o)&&ex(i,o);for(;t.length>r;)Kc(n,o=t[r++])&&(~BL(i,o)||ex(i,o));return i},Gc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],WL=tx,UL=Gc,Yc=Object.keys||function(t){return WL(t,UL)},HL=At,VL=jb,qL=rn,KL=Vn,GL=vn,YL=Yc;Qa.f=HL&&!VL?Object.defineProperties:function(t,n){KL(t);for(var r=GL(n),i=YL(n),o=i.length,a=0,s;o>a;)qL.f(t,s=i[a++],r[s]);return t};var XL=gn,JL=XL("document","documentElement"),ZL=Ur,QL=Ac,nx=ZL("keys"),ts=function(e){return nx[e]||(nx[e]=QL(e))},eF=Vn,tF=Qa,rx=Gc,nF=es,rF=JL,iF=Rb,oF=ts,ix=">",ox="<",Xc="prototype",Jc="script",ax=oF("IE_PROTO"),Zc=function(){},sx=function(e){return ox+Jc+ix+e+ox+"/"+Jc+ix},lx=function(e){e.write(sx("")),e.close();var t=e.parentWindow.Object;return e=null,t},aF=function(){var e=iF("iframe"),t="java"+Jc+":",n;return e.style.display="none",rF.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(sx("document.F=Object")),n.close(),n.F},ns,rs=function(){try{ns=new ActiveXObject("htmlfile")}catch{}rs=typeof document<"u"?document.domain&&ns?lx(ns):aF():lx(ns);for(var e=rx.length;e--;)delete rs[Xc][rx[e]];return rs()};nF[ax]=!0;var Qc=Object.create||function(t,n){var r;return t!==null?(Zc[Xc]=eF(t),r=new Zc,Zc[Xc]=null,r[ax]=t):r=rs(),n===void 0?r:tF.f(r,n)},is={},sF=tx,lF=Gc,uF=lF.concat("length","prototype");is.f=Object.getOwnPropertyNames||function(t){return sF(t,uF)};var ux={},cF=tt,os=cF([].slice),fF=cr,dF=vn,cx=is.f,pF=os,fx=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],hF=function(e){try{return cx(e)}catch{return pF(fx)}};ux.f=function(t){return fx&&fF(t)==="Window"?hF(t):cx(dF(t))};var as={};as.f=Object.getOwnPropertySymbols;var mF=Ya,ss=function(e,t,n,r){return r&&r.enumerable?e[t]=n:mF(e,t,n),e},vF=rn,gF=function(e,t,n){return vF.f(e,t,n)},ro={},yF=ft;ro.f=yF;var dx=mt,bF=Ft,xF=ro,wF=rn.f,qe=function(e){var t=dx.Symbol||(dx.Symbol={});bF(t,e)||wF(t,e,{value:xF.f(e)})},SF=mn,EF=gn,kF=ft,CF=ss,px=function(){var e=EF("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=kF("toPrimitive");t&&!t[r]&&CF(t,r,function(i){return SF(n,this)},{arity:1})},$F=zc,TF=eo,OF=$F?{}.toString:function(){return"[object "+TF(this)+"]"},IF=zc,PF=rn.f,AF=Ya,_F=Ft,RF=OF,DF=ft,hx=DF("toStringTag"),Gr=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(_F(i,hx)||PF(i,hx,{configurable:!0,value:t}),r&&!IF&&AF(i,"toString",RF))},MF=lt,NF=wt,mx=MF.WeakMap,jF=NF(mx)&&/native code/.test(String(mx)),LF=jF,vx=lt,FF=tn,BF=Ya,ef=Ft,tf=Pc,zF=ts,WF=es,gx="Object already initialized",nf=vx.TypeError,UF=vx.WeakMap,ls,io,us,HF=function(e){return us(e)?io(e):ls(e,{})},VF=function(e){return function(t){var n;if(!FF(t)||(n=io(t)).type!==e)throw new nf("Incompatible receiver, "+e+" required");return n}};if(LF||tf.state){var yn=tf.state||(tf.state=new UF);yn.get=yn.get,yn.has=yn.has,yn.set=yn.set,ls=function(e,t){if(yn.has(e))throw new nf(gx);return t.facade=e,yn.set(e,t),t},io=function(e){return yn.get(e)||{}},us=function(e){return yn.has(e)}}else{var Yr=zF("state");WF[Yr]=!0,ls=function(e,t){if(ef(e,Yr))throw new nf(gx);return t.facade=e,BF(e,Yr,t),t},io=function(e){return ef(e,Yr)?e[Yr]:{}},us=function(e){return ef(e,Yr)}}var rf={set:ls,get:io,has:us,enforce:HF,getterFor:VF},qF=Mc,KF=tt,GF=pb,YF=Pn,XF=fr,JF=Vc,yx=KF([].push),qn=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,o=e===6,a=e===7,s=e===5||o;return function(l,u,c,f){for(var p=YF(l),d=GF(p),m=XF(d),h=qF(u,c),g=0,v=f||JF,b=t?v(l,m):n||a?v(l,0):void 0,x,$;m>g;g++)if((s||g in d)&&(x=d[g],$=h(x,g,p),e))if(t)b[g]=$;else if($)switch(e){case 3:return!0;case 5:return x;case 6:return g;case 2:yx(b,x)}else switch(e){case 4:return!1;case 7:yx(b,x)}return o?-1:r||i?i:b}},of={forEach:qn(0),map:qn(1),filter:qn(2),some:qn(3),every:qn(4),find:qn(5),findIndex:qn(6),filterReject:qn(7)},cs=Le,oo=lt,af=mn,ZF=tt,Xr=At,Jr=Wr,QF=ut,dt=Ft,eB=In,sf=Vn,fs=vn,lf=Rc,tB=no,uf=Yi,Zr=Qc,bx=Yc,nB=is,xx=ux,rB=as,wx=Gi,Sx=rn,iB=Qa,Ex=yc,kx=ss,oB=gF,cf=Ur,aB=ts,Cx=es,$x=Ac,sB=ft,lB=ro,uB=qe,cB=px,fB=Gr,Tx=rf,ds=of.forEach,_t=aB("hidden"),ps="Symbol",ao="prototype",dB=Tx.set,Ox=Tx.getterFor(ps),on=Object[ao],dr=oo.Symbol,so=dr&&dr[ao],pB=oo.RangeError,hB=oo.TypeError,ff=oo.QObject,Ix=wx.f,pr=Sx.f,Px=xx.f,mB=Ex.f,Ax=ZF([].push),An=cf("symbols"),lo=cf("op-symbols"),vB=cf("wks"),df=!ff||!ff[ao]||!ff[ao].findChild,_x=function(e,t,n){var r=Ix(on,t);r&&delete on[t],pr(e,t,n),r&&e!==on&&pr(on,t,r)},pf=Xr&&QF(function(){return Zr(pr({},"a",{get:function(){return pr(this,"a",{value:7}).a}})).a!==7})?_x:pr,hf=function(e,t){var n=An[e]=Zr(so);return dB(n,{type:ps,tag:e,description:t}),Xr||(n.description=t),n},hs=function(t,n,r){t===on&&hs(lo,n,r),sf(t);var i=lf(n);return sf(r),dt(An,i)?(r.enumerable?(dt(t,_t)&&t[_t][i]&&(t[_t][i]=!1),r=Zr(r,{enumerable:uf(0,!1)})):(dt(t,_t)||pr(t,_t,uf(1,Zr(null))),t[_t][i]=!0),pf(t,i,r)):pr(t,i,r)},mf=function(t,n){sf(t);var r=fs(n),i=bx(r).concat(Nx(r));return ds(i,function(o){(!Xr||af(Rx,r,o))&&hs(t,o,r[o])}),t},gB=function(t,n){return n===void 0?Zr(t):mf(Zr(t),n)},Rx=function(t){var n=lf(t),r=af(mB,this,n);return this===on&&dt(An,n)&&!dt(lo,n)?!1:r||!dt(this,n)||!dt(An,n)||dt(this,_t)&&this[_t][n]?r:!0},Dx=function(t,n){var r=fs(t),i=lf(n);if(!(r===on&&dt(An,i)&&!dt(lo,i))){var o=Ix(r,i);return o&&dt(An,i)&&!(dt(r,_t)&&r[_t][i])&&(o.enumerable=!0),o}},Mx=function(t){var n=Px(fs(t)),r=[];return ds(n,function(i){!dt(An,i)&&!dt(Cx,i)&&Ax(r,i)}),r},Nx=function(e){var t=e===on,n=Px(t?lo:fs(e)),r=[];return ds(n,function(i){dt(An,i)&&(!t||dt(on,i))&&Ax(r,An[i])}),r};Jr||(dr=function(){if(eB(so,this))throw new hB("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:tB(arguments[0]),n=$x(t),r=function(i){var o=this===void 0?oo:this;o===on&&af(r,lo,i),dt(o,_t)&&dt(o[_t],n)&&(o[_t][n]=!1);var a=uf(1,i);try{pf(o,n,a)}catch(s){if(!(s instanceof pB))throw s;_x(o,n,a)}};return Xr&&df&&pf(on,n,{configurable:!0,set:r}),hf(n,t)},so=dr[ao],kx(so,"toString",function(){return Ox(this).tag}),kx(dr,"withoutSetter",function(e){return hf($x(e),e)}),Ex.f=Rx,Sx.f=hs,iB.f=mf,wx.f=Dx,nB.f=xx.f=Mx,rB.f=Nx,lB.f=function(e){return hf(sB(e),e)},Xr&&oB(so,"description",{configurable:!0,get:function(){return Ox(this).description}})),cs({global:!0,constructor:!0,wrap:!0,forced:!Jr,sham:!Jr},{Symbol:dr}),ds(bx(vB),function(e){uB(e)}),cs({target:ps,stat:!0,forced:!Jr},{useSetter:function(){df=!0},useSimple:function(){df=!1}}),cs({target:"Object",stat:!0,forced:!Jr,sham:!Xr},{create:gB,defineProperty:hs,defineProperties:mf,getOwnPropertyDescriptor:Dx}),cs({target:"Object",stat:!0,forced:!Jr},{getOwnPropertyNames:Mx}),cB(),fB(dr,ps),Cx[_t]=!0;var yB=Wr,jx=yB&&!!Symbol.for&&!!Symbol.keyFor,bB=Le,xB=gn,wB=Ft,SB=no,Lx=Ur,EB=jx,vf=Lx("string-to-symbol-registry"),kB=Lx("symbol-to-string-registry");bB({target:"Symbol",stat:!0,forced:!EB},{for:function(e){var t=SB(e);if(wB(vf,t))return vf[t];var n=xB("Symbol")(t);return vf[t]=n,kB[n]=t,n}});var CB=Le,$B=Ft,TB=Xi,OB=qa,IB=Ur,PB=jx,Fx=IB("symbol-to-string-registry");CB({target:"Symbol",stat:!0,forced:!PB},{keyFor:function(t){if(!TB(t))throw new TypeError(OB(t)+" is not a symbol");if($B(Fx,t))return Fx[t]}});var AB=tt,Bx=Kr,_B=wt,zx=cr,RB=no,Wx=AB([].push),DB=function(e){if(_B(e))return e;if(Bx(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?Wx(n,i):(typeof i=="number"||zx(i)==="Number"||zx(i)==="String")&&Wx(n,RB(i))}var o=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(Bx(this))return l;for(var u=0;u<o;u++)if(n[u]===s)return l}}},MB=Le,Ux=gn,Hx=hc,NB=mn,uo=tt,Vx=ut,qx=wt,Kx=Xi,Gx=os,jB=DB,LB=Wr,FB=String,Kn=Ux("JSON","stringify"),ms=uo(/./.exec),Yx=uo("".charAt),BB=uo("".charCodeAt),zB=uo("".replace),WB=uo(1 .toString),UB=/[\uD800-\uDFFF]/g,Xx=/^[\uD800-\uDBFF]$/,Jx=/^[\uDC00-\uDFFF]$/,Zx=!LB||Vx(function(){var e=Ux("Symbol")("stringify detection");return Kn([e])!=="[null]"||Kn({a:e})!=="{}"||Kn(Object(e))!=="{}"}),Qx=Vx(function(){return Kn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Kn("\uDEAD")!=='"\\udead"'}),HB=function(e,t){var n=Gx(arguments),r=jB(t);if(!(!qx(r)&&(e===void 0||Kx(e))))return n[1]=function(i,o){if(qx(r)&&(o=NB(r,this,FB(i),o)),!Kx(o))return o},Hx(Kn,null,n)},VB=function(e,t,n){var r=Yx(n,t-1),i=Yx(n,t+1);return ms(Xx,e)&&!ms(Jx,i)||ms(Jx,e)&&!ms(Xx,r)?"\\u"+WB(BB(e,0),16):e};Kn&&MB({target:"JSON",stat:!0,arity:3,forced:Zx||Qx},{stringify:function(t,n,r){var i=Gx(arguments),o=Hx(Zx?HB:Kn,null,i);return Qx&&typeof o=="string"?zB(o,UB,VB):o}});var qB=Le,KB=Wr,GB=ut,ew=as,YB=Pn,XB=!KB||GB(function(){ew.f(1)});qB({target:"Object",stat:!0,forced:XB},{getOwnPropertySymbols:function(t){var n=ew.f;return n?n(YB(t)):[]}});var JB=qe;JB("asyncIterator");var ZB=qe;ZB("hasInstance");var QB=qe;QB("isConcatSpreadable");var e3=qe;e3("iterator");var t3=qe;t3("match");var n3=qe;n3("matchAll");var r3=qe;r3("replace");var i3=qe;i3("search");var o3=qe;o3("species");var a3=qe;a3("split");var s3=qe,l3=px;s3("toPrimitive"),l3();var u3=gn,c3=qe,f3=Gr;c3("toStringTag"),f3(u3("Symbol"),"Symbol");var d3=qe;d3("unscopables");var p3=lt,h3=Gr;h3(p3.JSON,"JSON",!0);var m3=mt,v3=m3.Symbol,Qr={},gf=At,g3=Ft,tw=Function.prototype,y3=gf&&Object.getOwnPropertyDescriptor,yf=g3(tw,"name"),b3=yf&&(function(){}).name==="something",x3=yf&&(!gf||gf&&y3(tw,"name").configurable),w3={EXISTS:yf,PROPER:b3,CONFIGURABLE:x3},S3=ut,E3=!S3(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),k3=Ft,C3=wt,$3=Pn,T3=ts,O3=E3,nw=T3("IE_PROTO"),bf=Object,I3=bf.prototype,rw=O3?bf.getPrototypeOf:function(e){var t=$3(e);if(k3(t,nw))return t[nw];var n=t.constructor;return C3(n)&&t instanceof n?n.prototype:t instanceof bf?I3:null},P3=ut,A3=wt,_3=tn,R3=Qc,iw=rw,D3=ss,M3=ft,xf=M3("iterator"),ow=!1,_n,wf,Sf;[].keys&&(Sf=[].keys(),"next"in Sf?(wf=iw(iw(Sf)),wf!==Object.prototype&&(_n=wf)):ow=!0);var N3=!_3(_n)||P3(function(){var e={};return _n[xf].call(e)!==e});N3?_n={}:_n=R3(_n),A3(_n[xf])||D3(_n,xf,function(){return this});var aw={IteratorPrototype:_n,BUGGY_SAFARI_ITERATORS:ow},j3=aw.IteratorPrototype,L3=Qc,F3=Yi,B3=Gr,z3=Qr,W3=function(){return this},U3=function(e,t,n,r){var i=t+" Iterator";return e.prototype=L3(j3,{next:F3(+!r,n)}),B3(e,i,!1,!0),z3[i]=W3,e},H3=tt,V3=Ka,q3=function(e,t,n){try{return H3(V3(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},K3=tn,G3=function(e){return K3(e)||e===null},Y3=G3,X3=String,J3=TypeError,Z3=function(e){if(Y3(e))return e;throw new J3("Can't set "+X3(e)+" as a prototype")},Q3=q3,e4=tn,t4=Ha,n4=Z3;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=Q3(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,o){return t4(i),n4(o),e4(i)&&(e?n(i,o):i.__proto__=o),i}}();var r4=Le,i4=mn,sw=w3,o4=U3,a4=rw,s4=Gr,lw=ss,l4=ft,uw=Qr,cw=aw,u4=sw.PROPER;sw.CONFIGURABLE,cw.IteratorPrototype;var vs=cw.BUGGY_SAFARI_ITERATORS,Ef=l4("iterator"),fw="keys",gs="values",dw="entries",c4=function(){return this},pw=function(e,t,n,r,i,o,a){o4(n,t,r);var s=function(v){if(v===i&&p)return p;if(!vs&&v&&v in c)return c[v];switch(v){case fw:return function(){return new n(this,v)};case gs:return function(){return new n(this,v)};case dw:return function(){return new n(this,v)}}return function(){return new n(this)}},l=t+" Iterator",u=!1,c=e.prototype,f=c[Ef]||c["@@iterator"]||i&&c[i],p=!vs&&f||s(i),d=t==="Array"&&c.entries||f,m,h,g;if(d&&(m=a4(d.call(new e)),m!==Object.prototype&&m.next&&(s4(m,l,!0,!0),uw[l]=c4)),u4&&i===gs&&f&&f.name!==gs&&(u=!0,p=function(){return i4(f,this)}),i)if(h={values:s(gs),keys:o?p:s(fw),entries:s(dw)},a)for(g in h)(vs||u||!(g in c))&&lw(c,g,h[g]);else r4({target:t,proto:!0,forced:vs||u},h);return a&&c[Ef]!==p&&lw(c,Ef,p,{name:i}),uw[t]=p,h},hw=function(e,t){return{value:e,done:t}},f4=vn,mw=Qr,vw=rf;rn.f;var d4=pw,ys=hw,gw="Array Iterator",p4=vw.set,h4=vw.getterFor(gw);d4(Array,"Array",function(e,t){p4(this,{type:gw,target:f4(e),index:0,kind:t})},function(){var e=h4(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,ys(void 0,!0);switch(e.kind){case"keys":return ys(n,!1);case"values":return ys(t[n],!1)}return ys([n,t[n]],!1)},"values"),mw.Arguments=mw.Array;var m4={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},v4=m4,g4=lt,y4=Gr,yw=Qr;for(var kf in v4)y4(g4[kf],kf),yw[kf]=yw.Array;var b4=v3,x4=b4,w4=ft,S4=rn.f,bw=w4("metadata"),xw=Function.prototype;xw[bw]===void 0&&S4(xw,bw,{value:null});var E4=qe;E4("asyncDispose");var k4=qe;k4("dispose");var C4=qe;C4("metadata");var $4=x4,T4=$4,O4=gn,I4=tt,Cf=O4("Symbol"),P4=Cf.keyFor,A4=I4(Cf.prototype.valueOf),ww=Cf.isRegisteredSymbol||function(t){try{return P4(A4(t))!==void 0}catch{return!1}},_4=Le,R4=ww;_4({target:"Symbol",stat:!0},{isRegisteredSymbol:R4});for(var D4=Ur,Sw=gn,M4=tt,N4=Xi,j4=ft,bs=Sw("Symbol"),Ew=bs.isWellKnownSymbol,kw=Sw("Object","getOwnPropertyNames"),L4=M4(bs.prototype.valueOf),Cw=D4("wks"),$f=0,$w=kw(bs),F4=$w.length;$f<F4;$f++)try{var Tw=$w[$f];N4(bs[Tw])&&j4(Tw)}catch{}var Ow=function(t){if(Ew&&Ew(t))return!0;try{for(var n=L4(t),r=0,i=kw(Cw),o=i.length;r<o;r++)if(Cw[i[r]]==n)return!0}catch{}return!1},B4=Le,z4=Ow;B4({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:z4});var W4=qe;W4("customMatcher");var U4=qe;U4("observable");var H4=Le,V4=ww;H4({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:V4});var q4=Le,K4=Ow;q4({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:K4});var G4=qe;G4("matcher");var Y4=qe;Y4("metadataKey");var X4=qe;X4("patternMatch");var J4=qe;J4("replaceAll");var Z4=T4,Q4=Z4,ez=Q4;const ei=ke(ez);var Tf=tt,tz=Xa,nz=no,rz=Ha,iz=Tf("".charAt),Iw=Tf("".charCodeAt),oz=Tf("".slice),Pw=function(e){return function(t,n){var r=nz(rz(t)),i=tz(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=Iw(r,i),a<55296||a>56319||i+1===o||(s=Iw(r,i+1))<56320||s>57343?e?iz(r,i):a:e?oz(r,i,i+2):(a-55296<<10)+(s-56320)+65536)}},az={codeAt:Pw(!1),charAt:Pw(!0)},sz=az.charAt,lz=no,Aw=rf,uz=pw,_w=hw,Rw="String Iterator",cz=Aw.set,fz=Aw.getterFor(Rw);uz(String,"String",function(e){cz(this,{type:Rw,string:lz(e),index:0})},function(){var t=fz(this),n=t.string,r=t.index,i;return r>=n.length?_w(void 0,!0):(i=sz(n,r),t.index+=i.length,_w(i,!1))});var dz=eo,Dw=$c,pz=xc,hz=Qr,mz=ft,vz=mz("iterator"),Of=function(e){if(!pz(e))return Dw(e,vz)||Dw(e,"@@iterator")||hz[dz(e)]},gz=Of,yz=gz,bz=yz,xz=bz,wz=xz,Sz=wz,Ez=Sz,kz=Ez,Cz=kz;const Mw=ke(Cz);var $z=At,Tz=Kr,Oz=TypeError,Iz=Object.getOwnPropertyDescriptor,Pz=$z&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),Nw=Pz?function(e,t){if(Tz(e)&&!Iz(e,"length").writable)throw new Oz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Az=Le,_z=Pn,Rz=fr,Dz=Nw,Mz=Bc,Nz=ut,jz=Nz(function(){return[].push.call({length:4294967296},1)!==4294967297}),Lz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Fz=jz||!Lz();Az({target:"Array",proto:!0,arity:1,forced:Fz},{push:function(t){var n=_z(this),r=Rz(n),i=arguments.length;Mz(r+i);for(var o=0;o<i;o++)n[r]=arguments[o],r++;return Dz(n,r),r}});var Bz=lt,zz=mt,hr=function(e,t){var n=zz[e+"Prototype"],r=n&&n[t];if(r)return r;var i=Bz[e],o=i&&i.prototype;return o&&o[t]},Wz=hr,Uz=Wz("Array","push"),Hz=In,Vz=Uz,If=Array.prototype,qz=function(e){var t=e.push;return e===If||Hz(If,e)&&t===If.push?Vz:t},Kz=qz,Gz=Kz,Yz=Gz,Xz=Yz,Jz=Xz,Zz=Jz,Qz=Zz;const e5=ke(Qz);function t5(e,t){var n=e==null?null:typeof ei<"u"&&Mw(e)||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(e5(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}var n5=Le,jw=Kr,r5=Hc,i5=tn,Lw=qc,o5=fr,a5=vn,s5=Qi,l5=ft,u5=Za,c5=os,f5=u5("slice"),d5=l5("species"),Pf=Array,p5=Math.max;n5({target:"Array",proto:!0,forced:!f5},{slice:function(t,n){var r=a5(this),i=o5(r),o=Lw(t,i),a=Lw(n===void 0?i:n,i),s,l,u;if(jw(r)&&(s=r.constructor,r5(s)&&(s===Pf||jw(s.prototype))?s=void 0:i5(s)&&(s=s[d5],s===null&&(s=void 0)),s===Pf||s===void 0))return c5(r,o,a);for(l=new(s===void 0?Pf:s)(p5(a-o,0)),u=0;o<a;o++,u++)o in r&&s5(l,u,r[o]);return l.length=u,l}});var h5=hr,m5=h5("Array","slice"),v5=In,g5=m5,Af=Array.prototype,y5=function(e){var t=e.slice;return e===Af||v5(Af,e)&&t===Af.slice?g5:t},b5=y5,x5=b5,w5=x5,S5=w5,E5=S5,k5=E5,C5=k5;const $5=ke(C5);var T5=mn,Fw=Vn,O5=$c,I5=function(e,t,n){var r,i;Fw(e);try{if(r=O5(e,"return"),!r){if(t==="throw")throw n;return n}r=T5(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return Fw(r),n},P5=Vn,A5=I5,_5=function(e,t,n,r){try{return r?t(P5(n)[0],n[1]):t(n)}catch(i){A5(e,"throw",i)}},R5=ft,D5=Qr,M5=R5("iterator"),N5=Array.prototype,j5=function(e){return e!==void 0&&(D5.Array===e||N5[M5]===e)},L5=mn,F5=Ka,B5=Vn,z5=qa,W5=Of,U5=TypeError,H5=function(e,t){var n=arguments.length<2?W5(e):t;if(F5(n))return B5(L5(n,e));throw new U5(z5(e)+" is not iterable")},V5=Mc,q5=mn,K5=Pn,G5=_5,Y5=j5,X5=Hc,J5=fr,Bw=Qi,Z5=H5,Q5=Of,zw=Array,e6=function(t){var n=K5(t),r=X5(this),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0;a&&(o=V5(o,i>2?arguments[2]:void 0));var s=Q5(n),l=0,u,c,f,p,d,m;if(s&&!(this===zw&&Y5(s)))for(c=r?new this:[],p=Z5(n,s),d=p.next;!(f=q5(d,p)).done;l++)m=a?G5(p,o,[f.value,l],!0):f.value,Bw(c,l,m);else for(u=J5(n),c=r?new this(u):zw(u);u>l;l++)m=a?o(n[l],l):n[l],Bw(c,l,m);return c.length=l,c},t6=ft,Ww=t6("iterator"),Uw=!1;try{var n6=0,Hw={next:function(){return{done:!!n6++}},return:function(){Uw=!0}};Hw[Ww]=function(){return this},Array.from(Hw,function(){throw 2})}catch{}var r6=function(e,t){try{if(!t&&!Uw)return!1}catch{return!1}var n=!1;try{var r={};r[Ww]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},i6=Le,o6=e6,a6=r6,s6=!a6(function(e){Array.from(e)});i6({target:"Array",stat:!0,forced:s6},{from:o6});var l6=mt,u6=l6.Array.from,c6=u6,f6=c6,d6=f6,p6=d6,h6=p6,m6=h6,v6=m6;const Vw=ke(v6);function _f(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qw(e,t){if(e){var n;if(typeof e=="string")return _f(e,t);var r=$5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Vw(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_f(e,t):void 0}}function g6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
305
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bn(e,t){return Tj(e)||t5(e,t)||qw(e,t)||g6()}var Kw={exports:{}};/*!
|
|
279
306
|
Copyright (c) 2018 Jed Watson.
|
|
280
307
|
Licensed under the MIT License (MIT), see
|
|
281
308
|
http://jedwatson.github.io/classnames
|
|
282
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object")if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&r.push(l);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(
|
|
283
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
284
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(e){return B6(e)||z6(e)||bw(e)||W6()}var Za=function(e){return e&&e.Math==Math&&e},$t=Za(typeof globalThis=="object"&&globalThis)||Za(typeof window=="object"&&window)||Za(typeof self=="object"&&self)||Za(typeof Nt=="object"&&Nt)||function(){return this}()||Function("return this")(),Ef={},qt=function(e){try{return!!e()}catch{return!0}},U6=qt,er=!U6(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Pw={},Aw={}.propertyIsEnumerable,Rw=Object.getOwnPropertyDescriptor,H6=Rw&&!Aw.call({1:2},1);Pw.f=H6?function(t){var n=Rw(this,t);return!!n&&n.enumerable}:Aw;var Dw=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},V6={}.toString,kf=function(e){return V6.call(e).slice(8,-1)},q6=qt,K6=kf,G6="".split,Y6=q6(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return K6(e)=="String"?G6.call(e,""):Object(e)}:Object,es=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},X6=Y6,J6=es,Cf=function(e){return X6(J6(e))},_t=function(e){return typeof e=="function"},Q6=_t,qi=function(e){return typeof e=="object"?e!==null:Q6(e)},Tf=$t,Z6=_t,eW=function(e){return Z6(e)?e:void 0},ts=function(e,t){return arguments.length<2?eW(Tf[e]):Tf[e]&&Tf[e][t]},tW=ts,nW=tW("navigator","userAgent")||"",_w=$t,$f=nW,Mw=_w.process,Nw=_w.Deno,jw=Mw&&Mw.versions||Nw&&Nw.version,Lw=jw&&jw.v8,sn,ns;Lw?(sn=Lw.split("."),ns=sn[0]<4?1:sn[0]+sn[1]):$f&&(sn=$f.match(/Edge\/(\d+)/),(!sn||sn[1]>=74)&&(sn=$f.match(/Chrome\/(\d+)/),sn&&(ns=sn[1])));var rW=ns&&+ns,Fw=rW,iW=qt,Bw=!!Object.getOwnPropertySymbols&&!iW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Fw&&Fw<41}),oW=Bw,zw=oW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",aW=_t,sW=ts,lW=zw,Ww=lW?function(e){return typeof e=="symbol"}:function(e){var t=sW("Symbol");return aW(t)&&Object(e)instanceof t},uW=function(e){try{return String(e)}catch{return"Object"}},cW=_t,fW=uW,dW=function(e){if(cW(e))return e;throw TypeError(fW(e)+" is not a function")},pW=dW,Uw=function(e,t){var n=e[t];return n==null?void 0:pW(n)},Of=_t,If=qi,hW=function(e,t){var n,r;if(t==="string"&&Of(n=e.toString)&&!If(r=n.call(e))||Of(n=e.valueOf)&&!If(r=n.call(e))||t!=="string"&&Of(n=e.toString)&&!If(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Hw={exports:{}},Vw=$t,Pf=function(e,t){try{Object.defineProperty(Vw,e,{value:t,configurable:!0,writable:!0})}catch{Vw[e]=t}return t},mW=$t,vW=Pf,qw="__core-js_shared__",gW=mW[qw]||vW(qw,{}),Af=gW,Kw=Af;(Hw.exports=function(e,t){return Kw[e]||(Kw[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Rf=Hw.exports,yW=es,Gw=function(e){return Object(yW(e))},bW=Gw,xW={}.hasOwnProperty,tr=Object.hasOwn||function(t,n){return xW.call(bW(t),n)},wW=0,SW=Math.random(),Yw=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++wW+SW).toString(36)},EW=$t,kW=Rf,Xw=tr,CW=Yw,Jw=Bw,TW=zw,Ki=kW("wks"),Gi=EW.Symbol,$W=TW?Gi:Gi&&Gi.withoutSetter||CW,Yi=function(e){return(!Xw(Ki,e)||!(Jw||typeof Ki[e]=="string"))&&(Jw&&Xw(Gi,e)?Ki[e]=Gi[e]:Ki[e]=$W("Symbol."+e)),Ki[e]},Qw=qi,Zw=Ww,OW=Uw,IW=hW,PW=Yi,AW=PW("toPrimitive"),RW=function(e,t){if(!Qw(e)||Zw(e))return e;var n=OW(e,AW),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Qw(r)||Zw(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),IW(e,t)},DW=RW,_W=Ww,e1=function(e){var t=DW(e,"string");return _W(t)?t:String(t)},MW=$t,t1=qi,Df=MW.document,NW=t1(Df)&&t1(Df.createElement),n1=function(e){return NW?Df.createElement(e):{}},jW=er,LW=qt,FW=n1,r1=!jW&&!LW(function(){return Object.defineProperty(FW("div"),"a",{get:function(){return 7}}).a!=7}),BW=er,zW=Pw,WW=Dw,UW=Cf,HW=e1,VW=tr,qW=r1,i1=Object.getOwnPropertyDescriptor;Ef.f=BW?i1:function(t,n){if(t=UW(t),n=HW(n),qW)try{return i1(t,n)}catch{}if(VW(t,n))return WW(!zW.f.call(t,n),t[n])};var Xi={},KW=qi,Dn=function(e){if(KW(e))return e;throw TypeError(String(e)+" is not an object")},GW=er,YW=r1,o1=Dn,XW=e1,a1=Object.defineProperty;Xi.f=GW?a1:function(t,n,r){if(o1(t),n=XW(n),o1(r),YW)try{return a1(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var JW=er,QW=Xi,ZW=Dw,rs=JW?function(e,t,n){return QW.f(e,t,ZW(1,n))}:function(e,t,n){return e[t]=n,e},s1={exports:{}},eU=_t,_f=Af,tU=Function.toString;eU(_f.inspectSource)||(_f.inspectSource=function(e){return tU.call(e)});var l1=_f.inspectSource,nU=$t,rU=_t,iU=l1,u1=nU.WeakMap,oU=rU(u1)&&/native code/.test(iU(u1)),aU=Rf,sU=Yw,c1=aU("keys"),f1=function(e){return c1[e]||(c1[e]=sU(e))},Mf={},lU=oU,uU=$t,cU=qi,fU=rs,Nf=tr,jf=Af,dU=f1,pU=Mf,d1="Object already initialized",hU=uU.WeakMap,is,Ji,os,mU=function(e){return os(e)?Ji(e):is(e,{})},vU=function(e){return function(t){var n;if(!cU(t)||(n=Ji(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(lU||jf.state){var nr=jf.state||(jf.state=new hU),gU=nr.get,p1=nr.has,yU=nr.set;is=function(e,t){if(p1.call(nr,e))throw new TypeError(d1);return t.facade=e,yU.call(nr,e,t),t},Ji=function(e){return gU.call(nr,e)||{}},os=function(e){return p1.call(nr,e)}}else{var jr=dU("state");pU[jr]=!0,is=function(e,t){if(Nf(e,jr))throw new TypeError(d1);return t.facade=e,fU(e,jr,t),t},Ji=function(e){return Nf(e,jr)?e[jr]:{}},os=function(e){return Nf(e,jr)}}var h1={set:is,get:Ji,has:os,enforce:mU,getterFor:vU},Lf=er,bU=tr,m1=Function.prototype,xU=Lf&&Object.getOwnPropertyDescriptor,Ff=bU(m1,"name"),wU=Ff&&(function(){}).name==="something",SU=Ff&&(!Lf||Lf&&xU(m1,"name").configurable),Bf={EXISTS:Ff,PROPER:wU,CONFIGURABLE:SU},EU=$t,v1=_t,kU=tr,g1=rs,CU=Pf,TU=l1,y1=h1,$U=Bf.CONFIGURABLE,OU=y1.get,IU=y1.enforce,PU=String(String).split("String");(s1.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,o=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(v1(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!kU(n,"name")||$U&&n.name!==s)&&g1(n,"name",s),l=IU(n),l.source||(l.source=PU.join(typeof s=="string"?s:""))),e===EU){o?e[t]=n:CU(t,n);return}else i?!a&&e[t]&&(o=!0):delete e[t];o?e[t]=n:g1(e,t,n)})(Function.prototype,"toString",function(){return v1(this)&&OU(this).source||TU(this)});var Qi=s1.exports,b1={},AU=Math.ceil,RU=Math.floor,as=function(e){var t=+e;return t!==t||t===0?0:(t>0?RU:AU)(t)},DU=as,_U=Math.max,MU=Math.min,NU=function(e,t){var n=DU(e);return n<0?_U(n+t,0):MU(n,t)},jU=as,LU=Math.min,x1=function(e){return e>0?LU(jU(e),9007199254740991):0},FU=x1,BU=function(e){return FU(e.length)},zU=Cf,WU=NU,UU=BU,w1=function(e){return function(t,n,r){var i=zU(t),o=UU(i),a=WU(r,o),s;if(e&&n!=n){for(;o>a;)if(s=i[a++],s!=s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},HU={includes:w1(!0),indexOf:w1(!1)},zf=tr,VU=Cf,qU=HU.indexOf,KU=Mf,S1=function(e,t){var n=VU(e),r=0,i=[],o;for(o in n)!zf(KU,o)&&zf(n,o)&&i.push(o);for(;t.length>r;)zf(n,o=t[r++])&&(~qU(i,o)||i.push(o));return i},Wf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],GU=S1,YU=Wf,XU=YU.concat("length","prototype");b1.f=Object.getOwnPropertyNames||function(t){return GU(t,XU)};var E1={};E1.f=Object.getOwnPropertySymbols;var JU=ts,QU=b1,ZU=E1,eH=Dn,tH=JU("Reflect","ownKeys")||function(t){var n=QU.f(eH(t)),r=ZU.f;return r?n.concat(r(t)):n},nH=tr,rH=tH,iH=Ef,oH=Xi,aH=function(e,t){for(var n=rH(t),r=oH.f,i=iH.f,o=0;o<n.length;o++){var a=n[o];nH(e,a)||r(e,a,i(t,a))}},sH=qt,lH=_t,uH=/#|\.prototype\./,Zi=function(e,t){var n=fH[cH(e)];return n==pH?!0:n==dH?!1:lH(t)?sH(t):!!t},cH=Zi.normalize=function(e){return String(e).replace(uH,".").toLowerCase()},fH=Zi.data={},dH=Zi.NATIVE="N",pH=Zi.POLYFILL="P",hH=Zi,Uf=$t,mH=Ef.f,vH=rs,gH=Qi,yH=Pf,bH=aH,xH=hH,wH=function(e,t){var n=e.target,r=e.global,i=e.stat,o,a,s,l,u,c;if(r?a=Uf:i?a=Uf[n]||yH(n,{}):a=(Uf[n]||{}).prototype,a)for(s in t){if(u=t[s],e.noTargetGet?(c=mH(a,s),l=c&&c.value):l=a[s],o=xH(r?s:n+(i?".":"#")+s,e.forced),!o&&l!==void 0){if(typeof u==typeof l)continue;bH(u,l)}(e.sham||l&&l.sham)&&vH(u,"sham",!0),gH(a,s,u,e)}},SH=Yi,EH=SH("toStringTag"),k1={};k1[EH]="z";var Hf=String(k1)==="[object z]",kH=Hf,CH=_t,ss=kf,TH=Yi,$H=TH("toStringTag"),OH=ss(function(){return arguments}())=="Arguments",IH=function(e,t){try{return e[t]}catch{}},C1=kH?ss:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=IH(t=Object(e),$H))=="string"?n:OH?ss(t):(r=ss(t))=="Object"&&CH(t.callee)?"Arguments":r},PH=C1,ls=function(e){if(PH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},AH=Dn,T1=function(){var e=AH(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Vf={},$1=qt,RH=$t,O1=RH.RegExp;Vf.UNSUPPORTED_Y=$1(function(){var e=O1("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Vf.BROKEN_CARET=$1(function(){var e=O1("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var DH=S1,_H=Wf,MH=Object.keys||function(t){return DH(t,_H)},NH=er,jH=Xi,LH=Dn,FH=MH,BH=NH?Object.defineProperties:function(t,n){LH(t);for(var r=FH(n),i=r.length,o=0,a;i>o;)jH.f(t,a=r[o++],n[a]);return t},zH=ts,WH=zH("document","documentElement"),UH=Dn,HH=BH,I1=Wf,VH=Mf,qH=WH,KH=n1,GH=f1,P1=">",A1="<",qf="prototype",Kf="script",R1=GH("IE_PROTO"),Gf=function(){},D1=function(e){return A1+Kf+P1+e+A1+"/"+Kf+P1},_1=function(e){e.write(D1("")),e.close();var t=e.parentWindow.Object;return e=null,t},YH=function(){var e=KH("iframe"),t="java"+Kf+":",n;return e.style.display="none",qH.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(D1("document.F=Object")),n.close(),n.F},us,cs=function(){try{us=new ActiveXObject("htmlfile")}catch{}cs=typeof document<"u"?document.domain&&us?_1(us):YH():_1(us);for(var e=I1.length;e--;)delete cs[qf][I1[e]];return cs()};VH[R1]=!0;var XH=Object.create||function(t,n){var r;return t!==null?(Gf[qf]=UH(t),r=new Gf,Gf[qf]=null,r[R1]=t):r=cs(),n===void 0?r:HH(r,n)},JH=qt,QH=$t,ZH=QH.RegExp,e9=JH(function(){var e=ZH(".","s");return!(e.dotAll&&e.exec(`
|
|
285
|
-
`)&&e.flags==="s")}),
|
|
286
|
-
`)&&(y="(?: "+y+")",b=" "+b,g++),s=new RegExp("^(?:"+y+")",h)),Jf&&(s=new RegExp("^"+y+"$(?!\\s)",h)),Xf&&(l=n.lastIndex),u=fs.call(m?s:n,b),m?u?(u.input=u.input.slice(g),u[0]=u[0].slice(g),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:Xf&&u&&(n.lastIndex=n.global?u.index+u[0].length:l),Jf&&u&&u.length>1&&d9.call(u[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(u[c]=void 0)}),u&&d)for(u.groups=f=l9(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=u[p[1]];return u});var Qf=Yf,h9=wH,j1=Qf;h9({target:"RegExp",proto:!0,forced:/./.exec!==j1},{exec:j1});var L1=Qi,m9=Qf,F1=qt,B1=Yi,v9=rs,g9=B1("species"),Zf=RegExp.prototype,y9=function(e,t,n,r){var i=B1(e),o=!F1(function(){var u={};return u[i]=function(){return 7},""[e](u)!=7}),a=o&&!F1(function(){var u=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[g9]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return u=!0,null},c[i](""),!u});if(!o||!a||n){var s=/./[i],l=t(i,""[e],function(u,c,f,p,d){var m=c.exec;return m===m9||m===Zf.exec?o&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:u.call(f,c,p)}:{done:!1}});L1(String.prototype,e,l[0]),L1(Zf,i,l[1])}r&&v9(Zf[i],"sham",!0)},b9=as,x9=ls,w9=es,z1=function(e){return function(t,n){var r=x9(w9(t)),i=b9(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=r.charCodeAt(i),a<55296||a>56319||i+1===o||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):a:e?r.slice(i,i+2):(a-55296<<10)+(s-56320)+65536)}},S9={codeAt:z1(!1),charAt:z1(!0)},E9=S9.charAt,k9=function(e,t,n){return t+(n?E9(e,t).length:1)},C9=Gw,T9=Math.floor,$9="".replace,O9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I9=/\$([$&'`]|\d{1,2})/g,P9=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=I9;return i!==void 0&&(i=C9(i),l=O9),$9.call(o,l,function(u,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return u;if(p>s){var d=T9(p/10);return d===0?u:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):u}f=r[p-1]}return f===void 0?"":f})},A9=Dn,R9=_t,D9=kf,_9=Qf,M9=function(e,t){var n=e.exec;if(R9(n)){var r=n.call(e,t);return r!==null&&A9(r),r}if(D9(e)==="RegExp")return _9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},N9=y9,j9=qt,L9=Dn,F9=_t,B9=as,z9=x1,Lr=ls,W9=es,U9=k9,H9=Uw,V9=P9,q9=M9,K9=Yi,ed=K9("replace"),G9=Math.max,Y9=Math.min,X9=function(e){return e===void 0?e:String(e)},J9=function(){return"a".replace(/./,"$0")==="$0"}(),W1=function(){return/./[ed]?/./[ed]("a","$0")==="":!1}(),Q9=!j9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});N9("replace",function(e,t,n){var r=W1?"$":"$0";return[function(o,a){var s=W9(this),l=o==null?void 0:H9(o,ed);return l?l.call(o,s,a):t.call(Lr(s),o,a)},function(i,o){var a=L9(this),s=Lr(i);if(typeof o=="string"&&o.indexOf(r)===-1&&o.indexOf("$<")===-1){var l=n(t,a,s,o);if(l.done)return l.value}var u=F9(o);u||(o=Lr(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=q9(a,s);if(d===null||(p.push(d),!c))break;var m=Lr(d[0]);m===""&&(a.lastIndex=U9(s,z9(a.lastIndex),f))}for(var h="",y=0,g=0;g<p.length;g++){d=p[g];for(var b=Lr(d[0]),w=G9(Y9(B9(d.index),s.length),0),C=[],S=1;S<d.length;S++)C.push(X9(d[S]));var E=d.groups;if(u){var O=[b].concat(C,w,s);E!==void 0&&O.push(E);var j=Lr(o.apply(void 0,O))}else j=V9(b,s,w,C,E,o);w>=y&&(h+=s.slice(y,w)+j,y=w+b.length)}return h+s.slice(y)}]},!Q9||!J9||W1);var eo=Ye,Z9=ec,eV=Yn,ds=function(e){return Z9.slice(0,e.length)===e},tV=function(){return ds("Bun/")?"BUN":ds("Cloudflare-Workers")?"CLOUDFLARE":ds("Deno/")?"DENO":ds("Node.js/")?"NODE":eo.Bun&&typeof Bun.version=="string"?"BUN":eo.Deno&&typeof Deno.version=="object"?"DENO":eV(eo.process)==="process"?"NODE":eo.window&&eo.document?"BROWSER":"REST"}(),nV=TypeError,rV=function(e,t){if(e<t)throw new nV("Not enough arguments");return e},U1=Ye,iV=Vu,oV=ct,aV=tV,sV=ec,lV=ja,uV=rV,cV=U1.Function,fV=/MSIE .\./.test(sV)||aV==="BUN"&&function(){var e=U1.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),H1=function(e,t){var n=t?2:1;return fV?function(r,i){var o=uV(arguments.length,1)>n,a=oV(r)?r:cV(r),s=o?lV(arguments,n):[],l=o?function(){iV(a,this,s)}:a;return t?e(l,i):e(l)}:e},dV=Pe,V1=Ye,pV=H1,q1=pV(V1.setInterval,!0);dV({global:!0,bind:!0,forced:V1.setInterval!==q1},{setInterval:q1});var hV=Pe,K1=Ye,mV=H1,G1=mV(K1.setTimeout,!0);hV({global:!0,bind:!0,forced:K1.setTimeout!==G1},{setTimeout:G1});var vV=ot,gV=vV.setInterval,yV=gV;const bV=be(yV);var xV=Xe,Y1=function(e,t){var n=[][e];return!!n&&xV(function(){n.call(null,t||function(){return 1},1)})},wV=Pe,SV=Ku,EV=Tb.indexOf,kV=Y1,td=SV([].indexOf),X1=!!td&&1/td([1],1,-0)<0,CV=X1||!kV("indexOf");wV({target:"Array",proto:!0,forced:CV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return X1?td(this,t,n)||0:EV(this,t,n)}});var TV=Zn,$V=TV("Array","indexOf"),OV=mn,IV=$V,nd=Array.prototype,PV=function(e){var t=e.indexOf;return e===nd||OV(nd,e)&&t===nd.indexOf?IV:t},AV=PV,RV=AV,DV=RV;const _V=be(DV);var J1=ka,MV=TypeError,NV=function(e,t){if(!delete e[t])throw new MV("Cannot delete property "+J1(t)+" of "+J1(e))},jV=Pe,LV=vn,FV=Ec,BV=Oa,zV=Xn,WV=uw,UV=gc,HV=Sc,VV=_i,rd=NV,qV=Pa,KV=qV("splice"),GV=Math.max,YV=Math.min;jV({target:"Array",proto:!0,forced:!KV},{splice:function(t,n){var r=LV(this),i=zV(r),o=FV(t,i),a=arguments.length,s,l,u,c,f,p;for(a===0?s=l=0:a===1?(s=0,l=i-o):(s=a-2,l=YV(GV(BV(n),0),i-o)),UV(i+s-l),u=HV(r,l),c=0;c<l;c++)f=o+c,f in r&&VV(u,c,r[f]);if(u.length=l,s<l){for(c=o;c<i-l;c++)f=c+l,p=c+s,f in r?r[p]=r[f]:rd(r,p);for(c=i;c>i-l+s;c--)rd(r,c-1)}else if(s>l)for(c=i-l;c>o;c--)f=c+l-1,p=c+s-1,f in r?r[p]=r[f]:rd(r,p);for(c=0;c<s;c++)r[c+o]=arguments[c+2];return WV(r,i-l+s),u}});var XV=Zn,JV=XV("Array","splice"),QV=mn,ZV=JV,id=Array.prototype,e7=function(e){var t=e.splice;return e===id||QV(id,e)&&t===id.splice?ZV:t},t7=e7,n7=t7,r7=n7;const i7=be(r7);var o7=Zn,a7=o7("Array","concat"),s7=mn,l7=a7,od=Array.prototype,u7=function(e){var t=e.concat;return e===od||s7(od,e)&&t===od.concat?l7:t},c7=u7,f7=c7,d7=f7;const Fe=be(d7);var p7=Pe,h7=Ve,Q1=Date,m7=h7(Q1.prototype.getTime);p7({target:"Date",stat:!0},{now:function(){return m7(new Q1)}});var v7=ot,g7=v7.Date.now,y7=g7,b7=y7,x7=b7;const _n=be(x7);var w7=Mc.forEach,S7=Y1,E7=S7("forEach"),k7=E7?[].forEach:function(t){return w7(this,t,arguments.length>1?arguments[1]:void 0)},C7=Pe,Z1=k7;C7({target:"Array",proto:!0,forced:[].forEach!==Z1},{forEach:Z1});var T7=Zn,$7=T7("Array","forEach"),O7=$7,I7=O7,P7=Mi,A7=Tt,R7=mn,D7=I7,ad=Array.prototype,_7={DOMTokenList:!0,NodeList:!0},M7=function(e){var t=e.forEach;return e===ad||R7(ad,e)&&t===ad.forEach||A7(_7,P7(e))?D7:t},N7=M7;const ps=be(N7);var j7=Pe,L7=vn,eS=Tc,F7=Xe,B7=F7(function(){eS(1)});j7({target:"Object",stat:!0,forced:B7},{keys:function(t){return eS(L7(t))}});var z7=ot,W7=z7.Object.keys,U7=W7,H7=U7,V7=H7;const q7=be(V7);var K7=ot,G7=K7.Object.getOwnPropertySymbols,Y7=G7,X7=Y7,J7=X7;const tS=be(J7);var Q7=Pe,Z7=Mc.filter,e8=Pa,t8=e8("filter");Q7({target:"Array",proto:!0,forced:!t8},{filter:function(t){return Z7(this,t,arguments.length>1?arguments[1]:void 0)}});var n8=Zn,r8=n8("Array","filter"),i8=mn,o8=r8,sd=Array.prototype,a8=function(e){var t=e.filter;return e===sd||i8(sd,e)&&t===sd.filter?o8:t},s8=a8,l8=s8,u8=l8;const c8=be(u8);var nS={exports:{}},f8=Pe,d8=Xe,p8=nn,rS=Ii.f,iS=gt,h8=!iS||d8(function(){rS(1)});f8({target:"Object",stat:!0,forced:h8,sham:!iS},{getOwnPropertyDescriptor:function(t,n){return rS(p8(t),n)}});var m8=ot,oS=m8.Object,v8=nS.exports=function(t,n){return oS.getOwnPropertyDescriptor(t,n)};oS.getOwnPropertyDescriptor.sham&&(v8.sham=!0);var g8=nS.exports,y8=g8,b8=y8,x8=b8;const aS=be(x8);var w8=rn,S8=Ve,E8=Na,k8=La,C8=Pn,T8=S8([].concat),$8=w8("Reflect","ownKeys")||function(t){var n=E8.f(C8(t)),r=k8.f;return r?T8(n,r(t)):n},O8=Pe,I8=gt,P8=$8,A8=nn,R8=Ii,D8=_i;O8({target:"Object",stat:!0,sham:!I8},{getOwnPropertyDescriptors:function(t){for(var n=A8(t),r=R8.f,i=P8(n),o={},a=0,s,l;i.length>a;)l=r(n,s=i[a++]),l!==void 0&&D8(o,s,l);return o}});var _8=ot,M8=_8.Object.getOwnPropertyDescriptors,N8=M8,j8=N8,L8=j8;const sS=be(L8);var lS={exports:{}},F8=Pe,B8=gt,uS=Aa.f;F8({target:"Object",stat:!0,forced:Object.defineProperties!==uS,sham:!B8},{defineProperties:uS});var z8=ot,cS=z8.Object,W8=lS.exports=function(t,n){return cS.defineProperties(t,n)};cS.defineProperties.sham&&(W8.sham=!0);var U8=lS.exports,H8=U8,V8=H8,q8=V8;const K8=be(q8);var G8=Iw;const Y8=be(G8);var X8=!1;function J8(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Q8(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Z8=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!X8:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Q8(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=J8(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ft="-ms-",hs="-moz-",Ee="-webkit-",fS="comm",ld="rule",ud="decl",eq="@import",dS="@keyframes",tq="@layer",nq=Math.abs,ms=String.fromCharCode,rq=Object.assign;function iq(e,t){return at(e,0)^45?(((t<<2^at(e,0))<<2^at(e,1))<<2^at(e,2))<<2^at(e,3):0}function pS(e){return e.trim()}function oq(e,t){return(e=t.exec(e))?e[0]:e}function ke(e,t,n){return e.replace(t,n)}function cd(e,t){return e.indexOf(t)}function at(e,t){return e.charCodeAt(t)|0}function to(e,t,n){return e.slice(t,n)}function ln(e){return e.length}function fd(e){return e.length}function vs(e,t){return t.push(e),e}function aq(e,t){return e.map(t).join("")}var gs=1,Fr=1,hS=0,bt=0,qe=0,Br="";function ys(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:gs,column:Fr,length:a,return:""}}function no(e,t){return rq(ys("",null,null,"",null,null,0),e,{length:-e.length},t)}function sq(){return qe}function lq(){return qe=bt>0?at(Br,--bt):0,Fr--,qe===10&&(Fr=1,gs--),qe}function Ot(){return qe=bt<hS?at(Br,bt++):0,Fr++,qe===10&&(Fr=1,gs++),qe}function un(){return at(Br,bt)}function bs(){return bt}function ro(e,t){return to(Br,e,t)}function io(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mS(e){return gs=Fr=1,hS=ln(Br=e),bt=0,[]}function vS(e){return Br="",e}function xs(e){return pS(ro(bt-1,dd(e===91?e+2:e===40?e+1:e)))}function uq(e){for(;(qe=un())&&qe<33;)Ot();return io(e)>2||io(qe)>3?"":" "}function cq(e,t){for(;--t&&Ot()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return ro(e,bs()+(t<6&&un()==32&&Ot()==32))}function dd(e){for(;Ot();)switch(qe){case e:return bt;case 34:case 39:e!==34&&e!==39&&dd(qe);break;case 40:e===41&&dd(e);break;case 92:Ot();break}return bt}function fq(e,t){for(;Ot()&&e+qe!==57;)if(e+qe===84&&un()===47)break;return"/*"+ro(t,bt-1)+"*"+ms(e===47?e:Ot())}function dq(e){for(;!io(un());)Ot();return ro(e,bt)}function pq(e){return vS(ws("",null,null,null,[""],e=mS(e),0,[0],e))}function ws(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,p=0,d=0,m=0,h=1,y=1,g=1,b=0,w="",C=i,S=o,E=r,O=w;y;)switch(m=b,b=Ot()){case 40:if(m!=108&&at(O,f-1)==58){cd(O+=ke(xs(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:O+=xs(b);break;case 9:case 10:case 13:case 32:O+=uq(m);break;case 92:O+=cq(bs()-1,7);continue;case 47:switch(un()){case 42:case 47:vs(hq(fq(Ot(),bs()),t,n),l);break;default:O+="/"}break;case 123*h:s[u++]=ln(O)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+c:g==-1&&(O=ke(O,/\f/g,"")),d>0&&ln(O)-f&&vs(d>32?yS(O+";",r,n,f-1):yS(ke(O," ","")+";",r,n,f-2),l);break;case 59:O+=";";default:if(vs(E=gS(O,t,n,u,c,i,s,w,C=[],S=[],f),o),b===123)if(c===0)ws(O,t,E,E,C,o,f,s,S);else switch(p===99&&at(O,3)===110?100:p){case 100:case 108:case 109:case 115:ws(e,E,E,r&&vs(gS(e,E,E,0,0,i,s,w,i,C=[],f),S),i,S,f,s,r?C:S);break;default:ws(O,E,E,E,[""],S,0,s,S)}}u=c=d=0,h=g=1,w=O="",f=a;break;case 58:f=1+ln(O),d=m;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&lq()==125)continue}switch(O+=ms(b),b*h){case 38:g=c>0?1:(O+="\f",-1);break;case 44:s[u++]=(ln(O)-1)*g,g=1;break;case 64:un()===45&&(O+=xs(Ot())),p=un(),c=f=ln(w=O+=dq(bs())),b++;break;case 45:m===45&&ln(O)==2&&(h=0)}}return o}function gS(e,t,n,r,i,o,a,s,l,u,c){for(var f=i-1,p=i===0?o:[""],d=fd(p),m=0,h=0,y=0;m<r;++m)for(var g=0,b=to(e,f+1,f=nq(h=a[m])),w=e;g<d;++g)(w=pS(h>0?p[g]+" "+b:ke(b,/&\f/g,p[g])))&&(l[y++]=w);return ys(e,t,n,i===0?ld:s,l,u,c)}function hq(e,t,n){return ys(e,t,n,fS,ms(sq()),to(e,2,-2),0)}function yS(e,t,n,r){return ys(e,t,n,ud,to(e,0,r),to(e,r+1,-1),r)}function zr(e,t){for(var n="",r=fd(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function mq(e,t,n,r){switch(e.type){case tq:if(e.children.length)break;case eq:case ud:return e.return=e.return||e.value;case fS:return"";case dS:return e.return=e.value+"{"+zr(e.children,r)+"}";case ld:e.value=e.props.join(",")}return ln(n=zr(e.children,r))?e.return=e.value+"{"+n+"}":""}function vq(e){var t=fd(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function gq(e){return function(t){t.root||(t=t.return)&&e(t)}}function yq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var bq=function(t,n,r){for(var i=0,o=0;i=o,o=un(),i===38&&o===12&&(n[r]=1),!io(o);)Ot();return ro(t,bt)},xq=function(t,n){var r=-1,i=44;do switch(io(i)){case 0:i===38&&un()===12&&(n[r]=1),t[r]+=bq(bt-1,n,r);break;case 2:t[r]+=xs(i);break;case 4:if(i===44){t[++r]=un()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ms(i)}while(i=Ot());return t},wq=function(t,n){return vS(xq(mS(t),n))},bS=new WeakMap,Sq=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!bS.get(r))&&!i){bS.set(t,!0);for(var o=[],a=wq(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},Eq=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xS(e,t){switch(iq(e,t)){case 5103:return Ee+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ee+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ee+e+hs+e+ft+e+e;case 6828:case 4268:return Ee+e+ft+e+e;case 6165:return Ee+e+ft+"flex-"+e+e;case 5187:return Ee+e+ke(e,/(\w+).+(:[^]+)/,Ee+"box-$1$2"+ft+"flex-$1$2")+e;case 5443:return Ee+e+ft+"flex-item-"+ke(e,/flex-|-self/,"")+e;case 4675:return Ee+e+ft+"flex-line-pack"+ke(e,/align-content|flex-|-self/,"")+e;case 5548:return Ee+e+ft+ke(e,"shrink","negative")+e;case 5292:return Ee+e+ft+ke(e,"basis","preferred-size")+e;case 6060:return Ee+"box-"+ke(e,"-grow","")+Ee+e+ft+ke(e,"grow","positive")+e;case 4554:return Ee+ke(e,/([^-])(transform)/g,"$1"+Ee+"$2")+e;case 6187:return ke(ke(ke(e,/(zoom-|grab)/,Ee+"$1"),/(image-set)/,Ee+"$1"),e,"")+e;case 5495:case 3959:return ke(e,/(image-set\([^]*)/,Ee+"$1$`$1");case 4968:return ke(ke(e,/(.+:)(flex-)?(.*)/,Ee+"box-pack:$3"+ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ee+e+e;case 4095:case 3583:case 4068:case 2532:return ke(e,/(.+)-inline(.+)/,Ee+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ln(e)-1-t>6)switch(at(e,t+1)){case 109:if(at(e,t+4)!==45)break;case 102:return ke(e,/(.+:)(.+)-([^]+)/,"$1"+Ee+"$2-$3$1"+hs+(at(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~cd(e,"stretch")?xS(ke(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(at(e,t+1)!==115)break;case 6444:switch(at(e,ln(e)-3-(~cd(e,"!important")&&10))){case 107:return ke(e,":",":"+Ee)+e;case 101:return ke(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ee+(at(e,14)===45?"inline-":"")+"box$3$1"+Ee+"$2$3$1"+ft+"$2box$3")+e}break;case 5936:switch(at(e,t+11)){case 114:return Ee+e+ft+ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ee+e+ft+ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ee+e+ft+ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ee+e+ft+e+e}return e}var kq=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ud:t.return=xS(t.value,t.length);break;case dS:return zr([no(t,{value:ke(t.value,"@","@"+Ee)})],i);case ld:if(t.length)return aq(t.props,function(o){switch(oq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zr([no(t,{props:[ke(o,/:(read-\w+)/,":"+hs+"$1")]})],i);case"::placeholder":return zr([no(t,{props:[ke(o,/:(plac\w+)/,":"+Ee+"input-$1")]}),no(t,{props:[ke(o,/:(plac\w+)/,":"+hs+"$1")]}),no(t,{props:[ke(o,/:(plac\w+)/,ft+"input-$1")]})],i)}return""})}},Cq=[kq],Tq=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||Cq,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),g=1;g<y.length;g++)o[y[g]]=!0;s.push(h)});var l,u=[Sq,Eq];{var c,f=[mq,gq(function(h){c.insert(h)})],p=vq(u.concat(i,f)),d=function(y){return zr(pq(y),p)};l=function(y,g,b,w){c=b,d(y?y+"{"+g.styles+"}":g.styles),w&&(m.inserted[g.name]=!0)}}var m={key:n,sheet:new Z8({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function $q(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Oq={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Iq=!1,Pq=/[A-Z]|^ms/g,Aq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wS=function(t){return t.charCodeAt(1)===45},SS=function(t){return t!=null&&typeof t!="boolean"},pd=yq(function(e){return wS(e)?e:e.replace(Pq,"-$&").toLowerCase()}),ES=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Aq,function(r,i,o){return Mn={name:i,styles:o,next:Mn},i})}return Oq[t]!==1&&!wS(t)&&typeof n=="number"&&n!==0?n+"px":n},Rq="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ss(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Mn={name:i.name,styles:i.styles,next:Mn},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Mn={name:a.name,styles:a.styles,next:Mn},a=a.next;var s=o.styles+";";return s}return Dq(e,t,n)}}var l=n;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function Dq(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ss(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":SS(s)&&(r+=pd(o)+":"+ES(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&Iq)throw new Error(Rq);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)SS(a[l])&&(r+=pd(o)+":"+ES(o,a[l])+";");else{var u=Ss(e,t,a);switch(o){case"animation":case"animationName":{r+=pd(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var kS=/label:\s*([^\s;{]+)\s*(;|$)/g,Mn;function hd(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Mn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Ss(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Ss(n,t,e[s]),r){var l=o;i+=l[s]}kS.lastIndex=0;for(var u="",c;(c=kS.exec(i))!==null;)u+="-"+c[1];var f=$q(i)+u;return{name:f,styles:i,next:Mn}}function CS(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var _q=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Mq=function(t,n,r){_q(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function TS(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function $S(e,t,n){var r=[],i=CS(e,r,n);return r.length<2?n:i+t(r)}var Nq=function(t){var n=Tq(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=hd(u,n.registered,void 0);return Mq(n,f),n.key+"-"+f.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=hd(u,n.registered),p="animation-"+f.name;return TS(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=hd(u,n.registered);TS(n,f)},a=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return $S(n.registered,r,jq(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:CS.bind(null,n.registered),merge:$S.bind(null,n.registered,r)}},jq=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Lq=Qi,md=Date.prototype,OS="Invalid Date",IS="toString",Fq=md[IS],Bq=md.getTime;String(new Date(NaN))!=OS&&Lq(md,IS,function(){var t=Bq.call(this);return t===t?Fq.call(this):OS});var zq=Hf,Wq=C1,Uq=zq?{}.toString:function(){return"[object "+Wq(this)+"]"},Hq=Hf,Vq=Qi,qq=Uq;Hq||Vq(Object.prototype,"toString",qq,{unsafe:!0});var Kq=Bf.PROPER,Gq=Qi,Yq=Dn,PS=ls,Xq=qt,Jq=T1,vd="toString",AS=RegExp.prototype,RS=AS[vd],Qq=Xq(function(){return RS.call({source:"a",flags:"b"})!="/a/b"}),Zq=Kq&&RS.name!=vd;(Qq||Zq)&&Gq(RegExp.prototype,vd,function(){var t=Yq(this),n=PS(t.source),r=t.flags,i=PS(r===void 0&&t instanceof RegExp&&!("flags"in AS)?Jq.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var DS=typeof window<"u"?window:self,eK=DS.crypto||DS.msCrypto,tK=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(eK);const nK=be(tK);function rK(){return nK().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var iK=pb;const _S=be(iK);function Oe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function MS(e,t){for(var n,r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];return Fe(n=[Fe(r="%c".concat(e,"%c ")).call(r,t)]).call(n,we(Oe("green","white")),o)}function oK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(o.length){var s=o,l=an(s,1),u=l[0];typeof u=="function"&&(o=u());var c=_S(o[0])?o:[o],f=c.length===1;ps(c).call(c,function(p,d){if(f){var m,h;(m=console).log.apply(m,we(MS.apply(void 0,Fe(h=[e]).call(h,we(p)))))}else if(d){var y;(y=console).log.apply(y,we(_S(p)?p:[p]))}else{var g,b;(g=console).groupCollapsed.apply(g,we(MS.apply(void 0,Fe(b=[e]).call(b,we(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var aK=er,sK=Bf.EXISTS,lK=Xi.f,NS=Function.prototype,uK=NS.toString,cK=/^\s*function ([^ (]*)/,fK="name";aK&&!sK&&lK(NS,fK,{configurable:!0,get:function(){try{return uK.call(this).match(cK)[1]}catch{return""}}});var dK=ot,pK=dK.setTimeout,hK=pK;const mK=be(hK);function vK(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=_n();s-n>t?(e.apply(void 0,o),n=s):(clearTimeout(r),r=mK(function(){e.apply(void 0,o),n=_n()},Math.max(0,t-s+n)))}}var jS=function(t){var n=t.debounce,r=t.name,i=t.onEvent,o=t.target,a=A.useRef();a.current=i;var s=A.useMemo(function(){return vK(function(u){var c=a.current;c&&c(u)},n)},[n,a]),l=A.useCallback(function(u){u.timeStampLow=_n(),s(u)},[s]);return A.useLayoutEffect(function(){return o.addEventListener(r,l,{passive:!0}),l({target:o,type:r}),function(){return o.removeEventListener(r,l)}},[r,l,o]),!1};jS.defaultProps={debounce:200};var gK=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},yK=Pe,bK=gK;yK({target:"Math",stat:!0},{sign:bK});var xK=ot,wK=xK.Math.sign,SK=wK,EK=SK,kK=EK;const CK=be(kK);function TK(e,t){var n=CK(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function $K(e,t,n,r){for(var i=e,o=0;o<r;o++)i=n(i,t);return i}var LS=function(t){var n=t.name,r=t.onEnd,i=t.target,o=t.value,a=A.useRef(),s=A.useCallback(function(u,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:_n();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=$K(c,m,TK,(_n()-d)/5);Math.abs(m-h)<1.5&&(h=m),i[u]=h,m===h?r&&r(!0):s(u,c,f,p+1,d)}}))},[a,r,i]),l=A.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return A.useLayoutEffect(function(){return s(n,i[n],o,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,i,o]),!1};LS.propTypes={name:Se.string.isRequired,onEnd:Se.func,target:Se.any.isRequired,value:Se.oneOfType([Se.number,Se.oneOf(["100%"])]).isRequired};function gd(e){var t=A.useState(e),n=an(t,2),r=n[0],i=n[1],o=A.useRef(),a=A.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),o.current=s,s}):(o.current=s,a(s))},[o]);return o.current=r,[r,i,o]}function FS(e,t){var n=q7(e);if(tS){var r=tS(e);t&&(r=c8(r).call(r,function(i){return aS(e,i).enumerable})),n.push.apply(n,r)}return n}function BS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;ps(r=FS(Object(n),!0)).call(r,function(o){F6(e,o,n[o])})}else if(sS)K8(e,sS(n));else{var i;ps(i=FS(Object(n))).call(i,function(o){Y8(e,o,aS(n,o))})}}return e}var OK=function(){return 1/0},zS=17,IK="bottom",Kt="top",WS=1,PK=34,US={};function AK(e,t){return e(),bV(e,t)}function HS(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,o=n.scrollTop,a=i-o-r<WS,s=o<WS,l=t===Kt?s:a,u=t!==Kt?s:a;return{atBottom:a,atEnd:l,atStart:u,atTop:s}}function oo(e,t){return e===(t===Kt?0:"100%")}var yd=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,o=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,u=t.scroller,c=A.useMemo(function(){return oK("<ScrollToBottom>",{force:o})},[o]);s=s===Kt?Kt:IK;var f=A.useRef(0),p=A.useRef(a),d=gd(s===Kt?0:"100%"),m=an(d,3),h=m[0],y=m[1],g=m[2],b=gd(null),w=an(b,3),C=w[0],S=w[1],E=w[2],O=A.useRef(0),j=A.useRef(0),M=A.useRef(0),$=A.useState(!0),D=an($,2),U=D[0],F=D[1],L=A.useState(!0),N=an(L,2),B=N[0],Y=N[1],H=A.useState(!0),R=an(H,2),v=R[0],P=R[1],I=A.useState(!1),x=an(I,2),_=x[0],V=x[1],K=gd(!0),G=an(K,3),X=G[0],Z=G[1],J=G[2],Q=A.useRef([]),q=A.useCallback(function(z){var ee=E.current;return Q.current.push(z),ee&&z({scrollTop:ee.scrollTop}),function(){var oe=Q.current,ue=_V(oe).call(oe,z);~ue&&i7(oe).call(oe,ue,1)}},[Q,E]),ne=A.useCallback(function(){var z=g.current;c(function(){var ee;return Fe(ee=["%cSpineTo%c: %conEnd%c is fired."]).call(ee,we(Oe("magenta")),we(Oe("orange")),[{animateTo:z}])}),f.current=_n(),oo(z,s)||Z(!1),y(null)},[g,c,f,s,y,Z]),ae=A.useCallback(function(z){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=ee.behavior,ue=E.current;if(typeof z!="number"&&z!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var he;return[Fe(he=["%cscrollTo%c: Will scroll to %c".concat(typeof z=="number"?z+"px":z.replace(/%/g,"%%"),"%c")]).call(he,we(Oe("lime","")),we(Oe("purple"))),{behavior:oe,nextAnimateTo:z,target:ue}]}),oe==="auto"?(ne(),ue&&(ue.scrollTop=z==="100%"?ue.scrollHeight-ue.offsetHeight:z)):(oe!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(z)),oo(z,s)&&(c(function(){var he;return[Fe(he=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(he,we(Oe("lime","")),we(Oe("purple"))),[{mode:s,nextAnimateTo:z}]]}),Z(!0))},[c,ne,s,y,Z,E]),fe=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;c(function(){var oe;return Fe(oe=["%cscrollToBottom%c: Called"]).call(oe,we(Oe("yellow","")))}),ee!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ae("100%",{behavior:ee||"smooth"})},[c,ae]),ie=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;c(function(){var oe;return Fe(oe=["%cscrollToTop%c: Called"]).call(oe,we(Oe("yellow","")))}),ee!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ae(0,{behavior:ee||"smooth"})},[c,ae]),pe=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;c(function(){var ue;return Fe(ue=["%cscrollToEnd%c: Called"]).call(ue,we(Oe("yellow","")))}),ee!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var oe={behavior:ee||"smooth"};s===Kt?ie(oe):fe(oe)},[c,s,fe,ie]),ge=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;c(function(){var ue;return Fe(ue=["%cscrollToStart%c: Called"]).call(ue,we(Oe("yellow","")))}),ee!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var oe={behavior:ee||"smooth"};s===Kt?fe(oe):ie(oe)},[c,s,fe,ie]),Me=A.useCallback(function(){var z=E.current;if(z){if(p.current==="auto"){c(function(){var nt;return Fe(nt=["%ctarget changed%c: Initial scroll"]).call(nt,we(Oe("blue")))}),z.scrollTop=s===Kt?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var ee=O.current,oe=z.offsetHeight,ue=z.scrollHeight,he=z.scrollTop,We=s===Kt?0:Math.max(0,ue-oe-he),Ue=Math.max(0,ee-he),ht=u({maxValue:We,minValue:Ue,offsetHeight:oe,scrollHeight:ue,scrollTop:he}),tt=Math.max(0,Math.min(We,ht)),Ie;s===Kt||tt!==We?Ie=he+tt:Ie="100%",c(function(){var nt,Ke,Ln;return[Fe(nt=[Fe(Ke=Fe(Ln="%cscrollToSticky%c: Will animate from %c".concat(ee,"px%c to %c")).call(Ln,typeof Ie=="number"?Ie+"px":Ie.replace(/%/g,"%%"),"%c (%c")).call(Ke,(Ie==="100%"?We:Ie)+ee,"px%c)")]).call(nt,we(Oe("orange")),we(Oe("purple")),we(Oe("purple")),we(Oe("purple"))),{animateFrom:ee,maxValue:We,minValue:Ue,nextAnimateTo:Ie,nextValue:tt,offsetHeight:oe,rawNextValue:ht,scrollHeight:ue,scrollTop:he}]}),ae(Ie,{behavior:"smooth"})}},[O,c,s,u,ae,E]),et=A.useCallback(function(z){var ee,oe=z.timeStampLow,ue=g.current,he=E.current,We=ue!==null;if(!(oe<=f.current||!he)){var Ue=HS({mode:s,target:he}),ht=Ue.atBottom,tt=Ue.atEnd,Ie=Ue.atStart,nt=Ue.atTop;F(ht),Y(tt),V(Ie),P(nt);var Ke=he.offsetHeight,Ln=he.scrollHeight,J0=j.current,Q0=M.current,qd=Ke!==J0,Kd=Ln!==Q0;if(qd&&(j.current=Ke),Kd&&(M.current=Ln),!qd&&!Kd){var Ms=We&&oo(ue,s)||tt;J.current!==Ms&&(c(function(){var or,Z0,eE,tE;return[Fe(or=["%conScroll%c: %csetSticky%c(%c".concat(Ms,"%c)")]).call(or,we(Oe("red")),we(Oe("red")),we(Oe("purple"))),Fe(Z0=[Fe(eE=Fe(tE="(animating = %c".concat(We,"%c && isEnd = %c")).call(tE,oo(ue,s),"%c) || atEnd = %c")).call(eE,tt,"%c")]).call(Z0,we(Oe("purple")),we(Oe("purple")),we(Oe("purple")),[{animating:We,animateTo:ue,atEnd:tt,mode:s,offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:J.current,nextSticky:Ms}])]}),Z(Ms))}else J.current&&(c(function(){var or;return[Fe(or=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(or,we(Oe("red")),we(Oe("orange")),[{offsetHeightChanged:qd,scrollHeightChanged:Kd}]),{nextOffsetHeight:Ke,prevOffsetHeight:J0,nextScrollHeight:Ln,prevScrollHeight:Q0}]}),Me());var YY=he.scrollTop;ps(ee=Q.current).call(ee,function(or){return or({scrollTop:YY})})}},[g,c,f,s,j,M,Q,Me,F,Y,V,P,Z,J,E]);A.useEffect(function(){if(C){var z=!1,ee=AK(function(){var oe=E.current,ue=g.current!==null;J.current?HS({mode:s,target:oe}).atEnd?z=!1:z?_n()-z>PK&&(ue||(O.current=oe.scrollTop,c(function(){var he;return Fe(he=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(he,we(Oe("navy")),we(Oe("orange")))}),Me()),z=!1):z=_n():oe.scrollHeight<=oe.offsetHeight&&!J.current&&(c(function(){var he;return[Fe(he=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(he,we(Oe("navy")),we(Oe("purple"))),[{offsetHeight:oe.offsetHeight,scrollHeight:oe.scrollHeight,sticky:J.current}]]}),Z(!0))},Math.max(zS,n)||zS);return function(){return clearInterval(ee)}}},[g,n,c,s,Me,Z,J,C,E]);var wt=A.useMemo(function(){var z=US[l]||(US[l]=Nq({key:"react-scroll-to-bottom--css-"+rK(),nonce:l}));return function(ee){return z.css(ee)+""}},[l]),Mt=A.useMemo(function(){return{observeScrollPosition:q,setTarget:S,styleToClassName:wt}},[q,S,wt]),St=A.useMemo(function(){return{atBottom:U,atEnd:B,atStart:_,atTop:v,mode:s}},[U,B,_,v,s]),re=A.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&oo(h,s),sticky:X}},[h,s,X]),le=A.useMemo(function(){return BS(BS({},St),re)},[St,re]),W=A.useMemo(function(){return{scrollTo:ae,scrollToBottom:fe,scrollToEnd:pe,scrollToStart:ge,scrollToTop:ie}},[ae,fe,pe,ge,ie]);return A.useEffect(function(){if(C){var z=function(){M.current=C.scrollHeight};return C.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return C.removeEventListener("focus",z)}}},[C]),c(function(){var z;return[Fe(z=["%cRender%c: Render"]).call(z,we(Oe("cyan",""))),{animateTo:h,animating:h!==null,sticky:X,target:C}]}),A.createElement(Qa.Provider,{value:Mt},A.createElement(gf.Provider,{value:W},A.createElement(xf.Provider,{value:le},A.createElement(yf.Provider,{value:St},A.createElement(bf.Provider,{value:re},r,C&&A.createElement(jS,{debounce:i,name:"scroll",onEvent:et,target:C}),C&&h!==null&&A.createElement(LS,{name:"scrollTop",onEnd:ne,target:C,value:h}))))))};yd.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:OK},yd.propTypes={checkInterval:Se.number,children:Se.any,debounce:Se.number,debug:Se.bool,initialScrollBehavior:Se.oneOf(["auto","smooth"]),mode:Se.oneOf(["bottom","top"]),nonce:Se.string,scroller:Se.func};var RK={height:"100%",overflowY:"auto",width:"100%"},bd=function(t){var n=t.children,r=t.className,i=A.useContext(Qa),o=i.setTarget,a=wf()(RK);return A.createElement("div",{className:cf(a,(r||"")+""),ref:o},n)};bd.defaultProps={children:void 0,className:void 0},bd.propTypes={children:Se.any,className:Se.string};var DK={position:"relative"},xd=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,o=t.scrollViewClassName,a=wf()(DK);return A.createElement("div",{className:cf(a,(r||"")+"")},A.createElement(bd,{className:(o||"")+""},n),A.createElement(Sf,{className:(i||"")+""}))};xd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},xd.propTypes={children:Se.any,className:Se.string,followButtonClassName:Se.string,scrollViewClassName:Se.string};var wd=function(t){var n=t.checkInterval,r=t.children,i=t.className,o=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,u=t.mode,c=t.nonce,f=t.scroller,p=t.scrollViewClassName;return A.createElement(yd,{checkInterval:n,debounce:o,debug:a,initialScrollBehavior:l,mode:u,nonce:c,scroller:f},A.createElement(xd,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};wd.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},wd.propTypes={checkInterval:Se.number,children:Se.any,className:Se.string,debounce:Se.number,debug:Se.bool,followButtonClassName:Se.string,initialScrollBehavior:Se.oneOf(["auto","smooth"]),mode:Se.oneOf(["bottom","top"]),nonce:Se.string,scroller:Se.func,scrollViewClassName:Se.string},BM();let VS=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Sd=A.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:u,showMarquee:c=!0,...f})=>{var h;const{messageList:p}=ye,d=A.useMemo(()=>FE(t),[t]),m=A.useMemo(()=>{var g;const y=d.filter(b=>b.direction==="outgoing"&&b.status!=="pending");return(g=y[y.length-1])==null?void 0:g.id},[d]);return T.jsxs(wd,{...f,className:Er(p.container.className,e),followButtonClassName:p.scrollDownButton.className,scrollViewClassName:p.viewPort.className,children:[r&&T.jsx("span",{...p.headerMessage,children:r}),c&&T.jsx(LM,{botAvatar:o,botDescription:a,botName:s}),d.map(y=>{var g;return T.jsx(Hu,{renderers:i,sendMessage:l,addMessageFeedback:u,isLastDeliveredMessage:y.id===m,...y},((g=y.metadata)==null?void 0:g.clientMessageId)||y.id)}),n&&T.jsx(Hu,{id:VS(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,block:void 0,sender:((h=t.filter(y=>y.direction==="incoming").at(-1))==null?void 0:h.sender)??{name:s||"Bot",avatar:o},children:T.jsx(Uu,{})})]})});Sd.displayName="MessageList";const _K=({className:e,...t})=>{const{className:n}=ye.loader;return T.jsx("div",{...t,className:Er(e,n)})};function qS({error:e,restartConversation:t}){let n,r;const{error:i}=ye;return e.type==="configuration"?(n="Configuration error",r=T.jsx(WP,{...i.icon})):e.type==="bot"?(n="Bot error",r=T.jsx(Wm,{...i.icon})):e.type==="network"?(n="Network error",r=T.jsx(XP,{...i.icon})):(n="Unexpected error",r=T.jsx(Wm,{...i.icon})),T.jsx(MK,{error:e,title:n,icon:r,restartConversation:t})}function MK({error:e,title:t,icon:n,restartConversation:r}){const{error:i}=ye;return T.jsxs("div",{...i.container,children:[T.jsxs("div",{...i.header,children:[`Webchat ${e.type} error`,r&&T.jsx(Wu,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}})]}),T.jsxs("div",{...i.content,children:[n,T.jsx("div",{...i.errorTitle,children:t}),T.jsx("div",{...i.errorMessage,children:e.message})]})]})}const KS=({connected:e,configuration:t,isTyping:n,messages:r,user:i,isLoading:o,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:u,error:c,participants:f,closeWindow:p,sendMessage:d,uploadFile:m,addMessageFeedback:h,restartConversation:y,...g})=>{const{color:b,fontFamily:w,radius:C,themeMode:S,variant:E,headerVariant:O,botAvatar:j,botDescription:M,botName:$,composerPlaceholder:D,footer:U,feedbackEnabled:F}=t,L={color:b,fontFamily:w,radius:C,themeMode:S,variant:E,headerVariant:O};F||(h=void 0);const N=A.useMemo(()=>i?hp(r,f,i.id,$,j):[],[j,$,r,i,f]);return T.jsxs(T.Fragment,{children:[T.jsx(xy,{...L}),T.jsx(Mu,{connected:e,allowFileUpload:u,uploadFile:m,...g,children:c?T.jsx(qS,{error:c,restartConversation:y}):T.jsxs(T.Fragment,{children:[T.jsx(Ay,{closeWindow:p,configuration:t,restartConversation:y}),o?T.jsx(_K,{}):T.jsx(Sd,{botAvatar:j,botDescription:M,botName:$,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:N}),T.jsx(Wg,{sendMessage:d,uploadFile:m,connected:e,isReadOnly:s,disableComposer:l,footer:U,composerPlaceholder:D,allowFileUpload:u})]})})]})};function NK(){const[e,t]=A.useState(!1),n=A.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}var jK=Object.defineProperty,LK=(e,t,n)=>t in e?jK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FK=(e,t,n)=>LK(e,t+"",n),BK=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},zK={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},WK=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},UK=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},HK=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},GS=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(UK(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=WK(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Es({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},Es=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},YS=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([u,c])=>{s=[...s,u,e?c:encodeURIComponent(c)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=HK(r),a=Object.entries(i).map(([s,l])=>Es({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},VK=/\{[^{}]+\}/g,qK=({path:e,url:t})=>{let n=t,r=t.match(VK);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,GS({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,YS({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${Es({name:a,value:l})}`);continue}let u=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,u)}return n},XS=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,GS({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,YS({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,Es({allowReserved:e,name:o,value:a})]}}return i.join("&")},KK=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},GK=async({security:e,...t})=>{for(let n of e){let r=await BK(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},JS=e=>YK({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:XS(e.querySerializer),url:e.url}),YK=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=qK({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},QS=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=ZS(e.headers,t.headers),r},ZS=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},Ed=class{constructor(){FK(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},XK=()=>({error:new Ed,request:new Ed,response:new Ed}),JK=XS({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),QK={"Content-Type":"application/json"},e0=(e={})=>({...zK,headers:QK,parseAs:"auto",querySerializer:JK,...e}),ZK=(e={})=>{let t=QS(e0(),e),n=()=>({...t}),r=a=>(t=QS(t,a),n()),i=XK(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:ZS(t.headers,a.headers)};s.security&&await GK({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=JS(s),u={redirect:"follow",...s},c=new Request(l,u);for(let y of i.request._fns)c=await y(c,s);let f=s.fetch,p=await f(c);for(let y of i.response._fns)p=await y(p,c,s);let d={request:c,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let y=(s.parseAs==="auto"?KK(p.headers.get("Content-Type")):s.parseAs)??"json";if(y==="stream")return{data:p.body,...d};let g=await p[y]();return y==="json"&&(s.responseValidator&&await s.responseValidator(g),s.responseTransformer&&(g=await s.responseTransformer(g))),{data:g,...d}}let m=await p.text();try{m=JSON.parse(m)}catch{}let h=m;for(let y of i.error._fns)h=await y(m,p,c,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:JS,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},eG=ZK,tG=e0;const Ae=eG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(tG({baseUrl:"https://webchat.botpress.cloud/"}))),nG=e=>(e.client??Ae).delete({url:"/conversations/{id}",...e}),rG=e=>(e.client??Ae).get({url:"/conversations/{id}",...e}),iG=e=>(e.client??Ae).get({url:"/conversations",...e}),oG=e=>(e.client??Ae).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),aG=e=>(e.client??Ae).get({url:"/conversations/{id}/messages",...e}),sG=e=>(e.client??Ae).get({url:"/conversations/{id}/participants",...e}),lG=e=>(e.client??Ae).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),uG=e=>(e.client??Ae).delete({url:"/conversations/{id}/participants/{userId}",...e}),cG=e=>(e.client??Ae).get({url:"/conversations/{id}/participants/{userId}",...e}),fG=e=>(e.client??Ae).delete({url:"/messages/{id}",...e}),dG=e=>(e.client??Ae).get({url:"/messages/{id}",...e}),pG=e=>(e.client??Ae).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hG=e=>(e.client??Ae).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),mG=e=>(e.client??Ae).delete({url:"/messages/{id}/feedback",...e}),vG=e=>(e.client??Ae).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),gG=e=>(e.client??Ae).delete({url:"/users/me",...e}),yG=e=>(e.client??Ae).get({url:"/users/me",...e}),bG=e=>(e.client??Ae).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),t0=e=>((e==null?void 0:e.client)??Ae).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xG=e=>(e.client??Ae).get({url:"/events/{id}",...e}),wG=e=>(e.client??Ae).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),SG=e=>(e.client??Ae).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let n0=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function kd(e){}function EG(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=kd,onError:n=kd,onRetry:r=kd,onComment:i}=e;let o="",a=!0,s,l="",u="";function c(h){const y=a?h.replace(/^\xEF\xBB\xBF/,""):h,[g,b]=kG(`${o}${y}`);for(const w of g)f(w);o=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const y=h.indexOf(":");if(y!==-1){const g=h.slice(0,y),b=h[y+1]===" "?2:1,w=h.slice(y+b);p(g,w,h);return}p(h,"",h)}function p(h,y,g){switch(h){case"event":u=y;break;case"data":l=`${l}${y}
|
|
287
|
-
`;break;case"id":s=
|
|
288
|
-
`)?l.slice(0,-1):l}),s=void 0,l="",u=""}function m(h={}){o&&h.consume&&f(o),a=!0,s=void 0,l="",u="",o=""}return{feed:c,reset:m}}function
|
|
309
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object")if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&r.push(l);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Kw);var y6=Kw.exports;const Rf=ke(y6);var Df={exports:{}},Mf,Gw;function Nf(){if(Gw)return Mf;Gw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Mf=e,Mf}var jf,Yw;function b6(){if(Yw)return jf;Yw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Nf(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var f;try{if(typeof o[c]!="function"){var p=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.");throw p.name="Invariant Violation",p}f=o[c](a,c,l,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},jf=i,jf}var Lf,Xw;function x6(){if(Xw)return Lf;Xw=1;var e=Ra(),t=xy(),n=Nf(),r=b6(),i=Function.call.bind(Object.prototype.hasOwnProperty),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Lf=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(_){var y=_&&(u&&_[u]||_[c]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:$(),elementType:S(),instanceOf:E,node:T(),objectOf:F,oneOf:O,oneOfType:D,shape:M,exact:H};function m(_,y){return _===y?_!==0||1/_===1/y:_!==_&&y!==y}function h(_){this.message=_,this.stack=""}h.prototype=Error.prototype;function g(_){if(process.env.NODE_ENV!=="production")var y={},R=0;function P(j,G,K,Y,Q,ee,J){if(Y=Y||p,ee=ee||K,J!==n){if(l){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var q=Y+":"+K;!y[q]&&R<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),y[q]=!0,R++)}}return G[K]==null?j?G[K]===null?new h("The "+Q+" `"+ee+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new h("The "+Q+" `"+ee+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:_(G,K,Y,Q,ee)}var w=P.bind(null,!1);return w.isRequired=P.bind(null,!0),w}function v(_){function y(R,P,w,j,G,K){var Y=R[P],Q=N(Y);if(Q!==_){var ee=W(Y);return new h("Invalid "+j+" `"+G+"` of type "+("`"+ee+"` supplied to `"+w+"`, expected ")+("`"+_+"`."))}return null}return g(y)}function b(){return g(a)}function x(_){function y(R,P,w,j,G){if(typeof _!="function")return new h("Property `"+G+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var K=R[P];if(!Array.isArray(K)){var Y=N(K);return new h("Invalid "+j+" `"+G+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected an array."))}for(var Q=0;Q<K.length;Q++){var ee=_(K,Q,w,j,G+"["+Q+"]",n);if(ee instanceof Error)return ee}return null}return g(y)}function $(){function _(y,R,P,w,j){var G=y[R];if(!s(G)){var K=N(G);return new h("Invalid "+w+" `"+j+"` of type "+("`"+K+"` supplied to `"+P+"`, expected a single ReactElement."))}return null}return g(_)}function S(){function _(y,R,P,w,j){var G=y[R];if(!e.isValidElementType(G)){var K=N(G);return new h("Invalid "+w+" `"+j+"` of type "+("`"+K+"` supplied to `"+P+"`, expected a single ReactElement type."))}return null}return g(_)}function E(_){function y(R,P,w,j,G){if(!(R[P]instanceof _)){var K=_.name||p,Y=V(R[P]);return new h("Invalid "+j+" `"+G+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected ")+("instance of `"+K+"`."))}return null}return g(y)}function O(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function y(R,P,w,j,G){for(var K=R[P],Y=0;Y<_.length;Y++)if(m(K,_[Y]))return null;var Q=JSON.stringify(_,function(J,Z){var q=W(Z);return q==="symbol"?String(Z):Z});return new h("Invalid "+j+" `"+G+"` of value `"+String(K)+"` "+("supplied to `"+w+"`, expected one of "+Q+"."))}return g(y)}function F(_){function y(R,P,w,j,G){if(typeof _!="function")return new h("Property `"+G+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var K=R[P],Y=N(K);if(Y!=="object")return new h("Invalid "+j+" `"+G+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected an object."));for(var Q in K)if(i(K,Q)){var ee=_(K,Q,w,j,G+"."+Q,n);if(ee instanceof Error)return ee}return null}return g(y)}function D(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var y=0;y<_.length;y++){var R=_[y];if(typeof R!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+X(R)+" at index "+y+"."),a}function P(w,j,G,K,Y){for(var Q=0;Q<_.length;Q++){var ee=_[Q];if(ee(w,j,G,K,Y,n)==null)return null}return new h("Invalid "+K+" `"+Y+"` supplied to "+("`"+G+"`."))}return g(P)}function T(){function _(y,R,P,w,j){return B(y[R])?null:new h("Invalid "+w+" `"+j+"` supplied to "+("`"+P+"`, expected a ReactNode."))}return g(_)}function M(_){function y(R,P,w,j,G){var K=R[P],Y=N(K);if(Y!=="object")return new h("Invalid "+j+" `"+G+"` of type `"+Y+"` "+("supplied to `"+w+"`, expected `object`."));for(var Q in _){var ee=_[Q];if(ee){var J=ee(K,Q,w,j,G+"."+Q,n);if(J)return J}}return null}return g(y)}function H(_){function y(R,P,w,j,G){var K=R[P],Y=N(K);if(Y!=="object")return new h("Invalid "+j+" `"+G+"` of type `"+Y+"` "+("supplied to `"+w+"`, expected `object`."));var Q=t({},R[P],_);for(var ee in Q){var J=_[ee];if(!J)return new h("Invalid "+j+" `"+G+"` key `"+ee+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(R[P],null," ")+`
|
|
310
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var Z=J(K,ee,w,j,G+"."+ee,n);if(Z)return Z}return null}return g(y)}function B(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(B);if(_===null||s(_))return!0;var y=f(_);if(y){var R=y.call(_),P;if(y!==_.entries){for(;!(P=R.next()).done;)if(!B(P.value))return!1}else for(;!(P=R.next()).done;){var w=P.value;if(w&&!B(w[1]))return!1}}else return!1;return!0;default:return!1}}function L(_,y){return _==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function N(_){var y=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":L(y,_)?"symbol":y}function W(_){if(typeof _>"u"||_===null)return""+_;var y=N(_);if(y==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return y}function X(_){var y=W(_);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function V(_){return!_.constructor||!_.constructor.name?p:_.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},Lf}var Ff,Jw;function w6(){if(Jw)return Ff;Jw=1;var e=Nf();function t(){}function n(){}return n.resetWarningCache=t,Ff=function(){function r(a,s,l,u,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Ff}if(process.env.NODE_ENV!=="production"){var S6=Ra(),E6=!0;Df.exports=x6()(S6.isElement,E6)}else Df.exports=w6()();var k6=Df.exports;const Oe=ke(k6);var Bf=I.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});Bf.displayName="ScrollToBottomFunctionContext";function C6(){return I.useContext(Bf)}function $6(){var e=C6(),t=e.scrollToEnd;return t}var zf=I.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});zf.displayName="ScrollToBottomState1Context";var Wf=I.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Wf.displayName="ScrollToBottomState2Context";var Uf=I.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Uf.displayName="ScrollToBottomStateContext";var Zw=[Uf,zf,Wf];function T6(e){return I.useContext(Zw[e]||Zw[0])}function O6(){var e=T6(2),t=e.sticky;return[t]}var xs=I.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});xs.displayName="ScrollToBottomInternalContext";function I6(){return I.useContext(xs)}function Hf(){var e=I6(),t=e.styleToClassName;return t}var P6={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},Vf=function(t){var n=t.children,r=t.className,i=O6(),o=bn(i,1),a=o[0],s=Hf()(P6),l=$6();return!a&&I.createElement("button",{className:Rf(s,(r||"")+""),onClick:l,type:"button"},n)};Vf.defaultProps={children:void 0,className:""},Vf.propTypes={children:Oe.any,className:Oe.string};var Qw={exports:{}},A6=Le,_6=At,e1=rn.f;A6({target:"Object",stat:!0,forced:Object.defineProperty!==e1,sham:!_6},{defineProperty:e1});var R6=mt,t1=R6.Object,D6=Qw.exports=function(t,n,r){return t1.defineProperty(t,n,r)};t1.defineProperty.sham&&(D6.sham=!0);var M6=Qw.exports,N6=M6,n1=N6,j6=n1,L6=j6,F6=L6,B6=F6,z6=B6;const W6=ke(z6);var U6=ro,H6=U6.f("iterator"),V6=H6,q6=V6,K6=q6,G6=K6,Y6=G6,X6=Y6,J6=X6;const Z6=ke(J6);function co(e){"@babel/helpers - typeof";return co=typeof ei=="function"&&typeof Z6=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ei=="function"&&t.constructor===ei&&t!==ei.prototype?"symbol":typeof t},co(e)}var Q6=ro,eW=Q6.f("toPrimitive"),tW=eW,nW=tW,rW=nW,iW=rW,oW=iW,aW=oW,sW=aW;const lW=ke(sW);function uW(e,t){if(co(e)!="object"||!e)return e;var n=e[lW];if(n!==void 0){var r=n.call(e,t||"default");if(co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cW(e){var t=uW(e,"string");return co(t)=="symbol"?t:t+""}function fW(e,t,n){return(t=cW(t))in e?W6(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dW(e){if(zb(e))return _f(e)}function pW(e){if(typeof ei<"u"&&Mw(e)!=null||e["@@iterator"]!=null)return Vw(e)}function hW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
311
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $e(e){return dW(e)||pW(e)||qw(e)||hW()}var ws=function(e){return e&&e.Math==Math&&e},Bt=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof Xt=="object"&&Xt)||function(){return this}()||Function("return this")(),qf={},an=function(e){try{return!!e()}catch{return!0}},mW=an,mr=!mW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),r1={},i1={}.propertyIsEnumerable,o1=Object.getOwnPropertyDescriptor,vW=o1&&!i1.call({1:2},1);r1.f=vW?function(t){var n=o1(this,t);return!!n&&n.enumerable}:i1;var a1=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},gW={}.toString,Kf=function(e){return gW.call(e).slice(8,-1)},yW=an,bW=Kf,xW="".split,wW=yW(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return bW(e)=="String"?xW.call(e,""):Object(e)}:Object,Ss=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},SW=wW,EW=Ss,Gf=function(e){return SW(EW(e))},Kt=function(e){return typeof e=="function"},kW=Kt,fo=function(e){return typeof e=="object"?e!==null:kW(e)},Yf=Bt,CW=Kt,$W=function(e){return CW(e)?e:void 0},Es=function(e,t){return arguments.length<2?$W(Yf[e]):Yf[e]&&Yf[e][t]},TW=Es,OW=TW("navigator","userAgent")||"",s1=Bt,Xf=OW,l1=s1.process,u1=s1.Deno,c1=l1&&l1.versions||u1&&u1.version,f1=c1&&c1.v8,xn,ks;f1?(xn=f1.split("."),ks=xn[0]<4?1:xn[0]+xn[1]):Xf&&(xn=Xf.match(/Edge\/(\d+)/),(!xn||xn[1]>=74)&&(xn=Xf.match(/Chrome\/(\d+)/),xn&&(ks=xn[1])));var IW=ks&&+ks,d1=IW,PW=an,p1=!!Object.getOwnPropertySymbols&&!PW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&d1&&d1<41}),AW=p1,h1=AW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",_W=Kt,RW=Es,DW=h1,m1=DW?function(e){return typeof e=="symbol"}:function(e){var t=RW("Symbol");return _W(t)&&Object(e)instanceof t},MW=function(e){try{return String(e)}catch{return"Object"}},NW=Kt,jW=MW,LW=function(e){if(NW(e))return e;throw TypeError(jW(e)+" is not a function")},FW=LW,v1=function(e,t){var n=e[t];return n==null?void 0:FW(n)},Jf=Kt,Zf=fo,BW=function(e,t){var n,r;if(t==="string"&&Jf(n=e.toString)&&!Zf(r=n.call(e))||Jf(n=e.valueOf)&&!Zf(r=n.call(e))||t!=="string"&&Jf(n=e.toString)&&!Zf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},g1={exports:{}},y1=Bt,Qf=function(e,t){try{Object.defineProperty(y1,e,{value:t,configurable:!0,writable:!0})}catch{y1[e]=t}return t},zW=Bt,WW=Qf,b1="__core-js_shared__",UW=zW[b1]||WW(b1,{}),ed=UW,x1=ed;(g1.exports=function(e,t){return x1[e]||(x1[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var td=g1.exports,HW=Ss,w1=function(e){return Object(HW(e))},VW=w1,qW={}.hasOwnProperty,vr=Object.hasOwn||function(t,n){return qW.call(VW(t),n)},KW=0,GW=Math.random(),S1=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++KW+GW).toString(36)},YW=Bt,XW=td,E1=vr,JW=S1,k1=p1,ZW=h1,po=XW("wks"),ho=YW.Symbol,QW=ZW?ho:ho&&ho.withoutSetter||JW,mo=function(e){return(!E1(po,e)||!(k1||typeof po[e]=="string"))&&(k1&&E1(ho,e)?po[e]=ho[e]:po[e]=QW("Symbol."+e)),po[e]},C1=fo,$1=m1,eU=v1,tU=BW,nU=mo,rU=nU("toPrimitive"),iU=function(e,t){if(!C1(e)||$1(e))return e;var n=eU(e,rU),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!C1(r)||$1(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),tU(e,t)},oU=iU,aU=m1,T1=function(e){var t=oU(e,"string");return aU(t)?t:String(t)},sU=Bt,O1=fo,nd=sU.document,lU=O1(nd)&&O1(nd.createElement),I1=function(e){return lU?nd.createElement(e):{}},uU=mr,cU=an,fU=I1,P1=!uU&&!cU(function(){return Object.defineProperty(fU("div"),"a",{get:function(){return 7}}).a!=7}),dU=mr,pU=r1,hU=a1,mU=Gf,vU=T1,gU=vr,yU=P1,A1=Object.getOwnPropertyDescriptor;qf.f=dU?A1:function(t,n){if(t=mU(t),n=vU(n),yU)try{return A1(t,n)}catch{}if(gU(t,n))return hU(!pU.f.call(t,n),t[n])};var vo={},bU=fo,Gn=function(e){if(bU(e))return e;throw TypeError(String(e)+" is not an object")},xU=mr,wU=P1,_1=Gn,SU=T1,R1=Object.defineProperty;vo.f=xU?R1:function(t,n,r){if(_1(t),n=SU(n),_1(r),wU)try{return R1(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var EU=mr,kU=vo,CU=a1,Cs=EU?function(e,t,n){return kU.f(e,t,CU(1,n))}:function(e,t,n){return e[t]=n,e},D1={exports:{}},$U=Kt,rd=ed,TU=Function.toString;$U(rd.inspectSource)||(rd.inspectSource=function(e){return TU.call(e)});var M1=rd.inspectSource,OU=Bt,IU=Kt,PU=M1,N1=OU.WeakMap,AU=IU(N1)&&/native code/.test(PU(N1)),_U=td,RU=S1,j1=_U("keys"),L1=function(e){return j1[e]||(j1[e]=RU(e))},id={},DU=AU,MU=Bt,NU=fo,jU=Cs,od=vr,ad=ed,LU=L1,FU=id,F1="Object already initialized",BU=MU.WeakMap,$s,go,Ts,zU=function(e){return Ts(e)?go(e):$s(e,{})},WU=function(e){return function(t){var n;if(!NU(t)||(n=go(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(DU||ad.state){var gr=ad.state||(ad.state=new BU),UU=gr.get,B1=gr.has,HU=gr.set;$s=function(e,t){if(B1.call(gr,e))throw new TypeError(F1);return t.facade=e,HU.call(gr,e,t),t},go=function(e){return UU.call(gr,e)||{}},Ts=function(e){return B1.call(gr,e)}}else{var ti=LU("state");FU[ti]=!0,$s=function(e,t){if(od(e,ti))throw new TypeError(F1);return t.facade=e,jU(e,ti,t),t},go=function(e){return od(e,ti)?e[ti]:{}},Ts=function(e){return od(e,ti)}}var z1={set:$s,get:go,has:Ts,enforce:zU,getterFor:WU},sd=mr,VU=vr,W1=Function.prototype,qU=sd&&Object.getOwnPropertyDescriptor,ld=VU(W1,"name"),KU=ld&&(function(){}).name==="something",GU=ld&&(!sd||sd&&qU(W1,"name").configurable),ud={EXISTS:ld,PROPER:KU,CONFIGURABLE:GU},YU=Bt,U1=Kt,XU=vr,H1=Cs,JU=Qf,ZU=M1,V1=z1,QU=ud.CONFIGURABLE,eH=V1.get,tH=V1.enforce,nH=String(String).split("String");(D1.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,o=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(U1(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!XU(n,"name")||QU&&n.name!==s)&&H1(n,"name",s),l=tH(n),l.source||(l.source=nH.join(typeof s=="string"?s:""))),e===YU){o?e[t]=n:JU(t,n);return}else i?!a&&e[t]&&(o=!0):delete e[t];o?e[t]=n:H1(e,t,n)})(Function.prototype,"toString",function(){return U1(this)&&eH(this).source||ZU(this)});var yo=D1.exports,q1={},rH=Math.ceil,iH=Math.floor,Os=function(e){var t=+e;return t!==t||t===0?0:(t>0?iH:rH)(t)},oH=Os,aH=Math.max,sH=Math.min,lH=function(e,t){var n=oH(e);return n<0?aH(n+t,0):sH(n,t)},uH=Os,cH=Math.min,K1=function(e){return e>0?cH(uH(e),9007199254740991):0},fH=K1,dH=function(e){return fH(e.length)},pH=Gf,hH=lH,mH=dH,G1=function(e){return function(t,n,r){var i=pH(t),o=mH(i),a=hH(r,o),s;if(e&&n!=n){for(;o>a;)if(s=i[a++],s!=s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},vH={includes:G1(!0),indexOf:G1(!1)},cd=vr,gH=Gf,yH=vH.indexOf,bH=id,Y1=function(e,t){var n=gH(e),r=0,i=[],o;for(o in n)!cd(bH,o)&&cd(n,o)&&i.push(o);for(;t.length>r;)cd(n,o=t[r++])&&(~yH(i,o)||i.push(o));return i},fd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xH=Y1,wH=fd,SH=wH.concat("length","prototype");q1.f=Object.getOwnPropertyNames||function(t){return xH(t,SH)};var X1={};X1.f=Object.getOwnPropertySymbols;var EH=Es,kH=q1,CH=X1,$H=Gn,TH=EH("Reflect","ownKeys")||function(t){var n=kH.f($H(t)),r=CH.f;return r?n.concat(r(t)):n},OH=vr,IH=TH,PH=qf,AH=vo,_H=function(e,t){for(var n=IH(t),r=AH.f,i=PH.f,o=0;o<n.length;o++){var a=n[o];OH(e,a)||r(e,a,i(t,a))}},RH=an,DH=Kt,MH=/#|\.prototype\./,bo=function(e,t){var n=jH[NH(e)];return n==FH?!0:n==LH?!1:DH(t)?RH(t):!!t},NH=bo.normalize=function(e){return String(e).replace(MH,".").toLowerCase()},jH=bo.data={},LH=bo.NATIVE="N",FH=bo.POLYFILL="P",BH=bo,dd=Bt,zH=qf.f,WH=Cs,UH=yo,HH=Qf,VH=_H,qH=BH,KH=function(e,t){var n=e.target,r=e.global,i=e.stat,o,a,s,l,u,c;if(r?a=dd:i?a=dd[n]||HH(n,{}):a=(dd[n]||{}).prototype,a)for(s in t){if(u=t[s],e.noTargetGet?(c=zH(a,s),l=c&&c.value):l=a[s],o=qH(r?s:n+(i?".":"#")+s,e.forced),!o&&l!==void 0){if(typeof u==typeof l)continue;VH(u,l)}(e.sham||l&&l.sham)&&WH(u,"sham",!0),UH(a,s,u,e)}},GH=mo,YH=GH("toStringTag"),J1={};J1[YH]="z";var pd=String(J1)==="[object z]",XH=pd,JH=Kt,Is=Kf,ZH=mo,QH=ZH("toStringTag"),e9=Is(function(){return arguments}())=="Arguments",t9=function(e,t){try{return e[t]}catch{}},Z1=XH?Is:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=t9(t=Object(e),QH))=="string"?n:e9?Is(t):(r=Is(t))=="Object"&&JH(t.callee)?"Arguments":r},n9=Z1,Ps=function(e){if(n9(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},r9=Gn,Q1=function(){var e=r9(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},hd={},eS=an,i9=Bt,tS=i9.RegExp;hd.UNSUPPORTED_Y=eS(function(){var e=tS("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),hd.BROKEN_CARET=eS(function(){var e=tS("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var o9=Y1,a9=fd,s9=Object.keys||function(t){return o9(t,a9)},l9=mr,u9=vo,c9=Gn,f9=s9,d9=l9?Object.defineProperties:function(t,n){c9(t);for(var r=f9(n),i=r.length,o=0,a;i>o;)u9.f(t,a=r[o++],n[a]);return t},p9=Es,h9=p9("document","documentElement"),m9=Gn,v9=d9,nS=fd,g9=id,y9=h9,b9=I1,x9=L1,rS=">",iS="<",md="prototype",vd="script",oS=x9("IE_PROTO"),gd=function(){},aS=function(e){return iS+vd+rS+e+iS+"/"+vd+rS},sS=function(e){e.write(aS("")),e.close();var t=e.parentWindow.Object;return e=null,t},w9=function(){var e=b9("iframe"),t="java"+vd+":",n;return e.style.display="none",y9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(aS("document.F=Object")),n.close(),n.F},As,_s=function(){try{As=new ActiveXObject("htmlfile")}catch{}_s=typeof document<"u"?document.domain&&As?sS(As):w9():sS(As);for(var e=nS.length;e--;)delete _s[md][nS[e]];return _s()};g9[oS]=!0;var S9=Object.create||function(t,n){var r;return t!==null?(gd[md]=m9(t),r=new gd,gd[md]=null,r[oS]=t):r=_s(),n===void 0?r:v9(r,n)},E9=an,k9=Bt,C9=k9.RegExp,$9=E9(function(){var e=C9(".","s");return!(e.dotAll&&e.exec(`
|
|
312
|
+
`)&&e.flags==="s")}),T9=an,O9=Bt,I9=O9.RegExp,P9=T9(function(){var e=I9("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),A9=Ps,_9=Q1,lS=hd,R9=td,D9=S9,M9=z1.get,N9=$9,j9=P9,Rs=RegExp.prototype.exec,L9=R9("native-string-replace",String.prototype.replace),yd=Rs,bd=function(){var e=/a/,t=/b*/g;return Rs.call(e,"a"),Rs.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),uS=lS.UNSUPPORTED_Y||lS.BROKEN_CARET,xd=/()??/.exec("")[1]!==void 0,F9=bd||xd||uS||N9||j9;F9&&(yd=function(t){var n=this,r=M9(n),i=A9(t),o=r.raw,a,s,l,u,c,f,p;if(o)return o.lastIndex=n.lastIndex,a=yd.call(o,i),n.lastIndex=o.lastIndex,a;var d=r.groups,m=uS&&n.sticky,h=_9.call(n),g=n.source,v=0,b=i;if(m&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
|
|
313
|
+
`)&&(g="(?: "+g+")",b=" "+b,v++),s=new RegExp("^(?:"+g+")",h)),xd&&(s=new RegExp("^"+g+"$(?!\\s)",h)),bd&&(l=n.lastIndex),u=Rs.call(m?s:n,b),m?u?(u.input=u.input.slice(v),u[0]=u[0].slice(v),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:bd&&u&&(n.lastIndex=n.global?u.index+u[0].length:l),xd&&u&&u.length>1&&L9.call(u[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(u[c]=void 0)}),u&&d)for(u.groups=f=D9(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=u[p[1]];return u});var wd=yd,B9=KH,cS=wd;B9({target:"RegExp",proto:!0,forced:/./.exec!==cS},{exec:cS});var fS=yo,z9=wd,dS=an,pS=mo,W9=Cs,U9=pS("species"),Sd=RegExp.prototype,H9=function(e,t,n,r){var i=pS(e),o=!dS(function(){var u={};return u[i]=function(){return 7},""[e](u)!=7}),a=o&&!dS(function(){var u=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[U9]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return u=!0,null},c[i](""),!u});if(!o||!a||n){var s=/./[i],l=t(i,""[e],function(u,c,f,p,d){var m=c.exec;return m===z9||m===Sd.exec?o&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:u.call(f,c,p)}:{done:!1}});fS(String.prototype,e,l[0]),fS(Sd,i,l[1])}r&&W9(Sd[i],"sham",!0)},V9=Os,q9=Ps,K9=Ss,hS=function(e){return function(t,n){var r=q9(K9(t)),i=V9(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=r.charCodeAt(i),a<55296||a>56319||i+1===o||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):a:e?r.slice(i,i+2):(a-55296<<10)+(s-56320)+65536)}},G9={codeAt:hS(!1),charAt:hS(!0)},Y9=G9.charAt,X9=function(e,t,n){return t+(n?Y9(e,t).length:1)},J9=w1,Z9=Math.floor,Q9="".replace,eV=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,tV=/\$([$&'`]|\d{1,2})/g,nV=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=tV;return i!==void 0&&(i=J9(i),l=eV),Q9.call(o,l,function(u,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return u;if(p>s){var d=Z9(p/10);return d===0?u:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):u}f=r[p-1]}return f===void 0?"":f})},rV=Gn,iV=Kt,oV=Kf,aV=wd,sV=function(e,t){var n=e.exec;if(iV(n)){var r=n.call(e,t);return r!==null&&rV(r),r}if(oV(e)==="RegExp")return aV.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},lV=H9,uV=an,cV=Gn,fV=Kt,dV=Os,pV=K1,ni=Ps,hV=Ss,mV=X9,vV=v1,gV=nV,yV=sV,bV=mo,Ed=bV("replace"),xV=Math.max,wV=Math.min,SV=function(e){return e===void 0?e:String(e)},EV=function(){return"a".replace(/./,"$0")==="$0"}(),mS=function(){return/./[Ed]?/./[Ed]("a","$0")==="":!1}(),kV=!uV(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});lV("replace",function(e,t,n){var r=mS?"$":"$0";return[function(o,a){var s=hV(this),l=o==null?void 0:vV(o,Ed);return l?l.call(o,s,a):t.call(ni(s),o,a)},function(i,o){var a=cV(this),s=ni(i);if(typeof o=="string"&&o.indexOf(r)===-1&&o.indexOf("$<")===-1){var l=n(t,a,s,o);if(l.done)return l.value}var u=fV(o);u||(o=ni(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=yV(a,s);if(d===null||(p.push(d),!c))break;var m=ni(d[0]);m===""&&(a.lastIndex=mV(s,pV(a.lastIndex),f))}for(var h="",g=0,v=0;v<p.length;v++){d=p[v];for(var b=ni(d[0]),x=xV(wV(dV(d.index),s.length),0),$=[],S=1;S<d.length;S++)$.push(SV(d[S]));var E=d.groups;if(u){var O=[b].concat($,x,s);E!==void 0&&O.push(E);var F=ni(o.apply(void 0,O))}else F=gV(b,s,x,$,E,o);x>=g&&(h+=s.slice(g,x)+F,g=x+b.length)}return h+s.slice(g)}]},!kV||!EV||mS);var xo=lt,CV=Ec,$V=cr,Ds=function(e){return CV.slice(0,e.length)===e},TV=function(){return Ds("Bun/")?"BUN":Ds("Cloudflare-Workers")?"CLOUDFLARE":Ds("Deno/")?"DENO":Ds("Node.js/")?"NODE":xo.Bun&&typeof Bun.version=="string"?"BUN":xo.Deno&&typeof Deno.version=="object"?"DENO":$V(xo.process)==="process"?"NODE":xo.window&&xo.document?"BROWSER":"REST"}(),OV=TypeError,IV=function(e,t){if(e<t)throw new OV("Not enough arguments");return e},vS=lt,PV=hc,AV=wt,_V=TV,RV=Ec,DV=os,MV=IV,NV=vS.Function,jV=/MSIE .\./.test(RV)||_V==="BUN"&&function(){var e=vS.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),gS=function(e,t){var n=t?2:1;return jV?function(r,i){var o=MV(arguments.length,1)>n,a=AV(r)?r:NV(r),s=o?DV(arguments,n):[],l=o?function(){PV(a,this,s)}:a;return t?e(l,i):e(l)}:e},LV=Le,yS=lt,FV=gS,bS=FV(yS.setInterval,!0);LV({global:!0,bind:!0,forced:yS.setInterval!==bS},{setInterval:bS});var BV=Le,xS=lt,zV=gS,wS=zV(xS.setTimeout,!0);BV({global:!0,bind:!0,forced:xS.setTimeout!==wS},{setTimeout:wS});var WV=mt,UV=WV.setInterval,HV=UV;const VV=ke(HV);var qV=ut,SS=function(e,t){var n=[][e];return!!n&&qV(function(){n.call(null,t||function(){return 1},1)})},KV=Le,GV=vc,YV=Qb.indexOf,XV=SS,kd=GV([].indexOf),ES=!!kd&&1/kd([1],1,-0)<0,JV=ES||!XV("indexOf");KV({target:"Array",proto:!0,forced:JV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return ES?kd(this,t,n)||0:YV(this,t,n)}});var ZV=hr,QV=ZV("Array","indexOf"),e7=In,t7=QV,Cd=Array.prototype,n7=function(e){var t=e.indexOf;return e===Cd||e7(Cd,e)&&t===Cd.indexOf?t7:t},r7=n7,i7=r7,o7=i7;const a7=ke(o7);var kS=qa,s7=TypeError,l7=function(e,t){if(!delete e[t])throw new s7("Cannot delete property "+kS(t)+" of "+kS(e))},u7=Le,c7=Pn,f7=qc,d7=Xa,p7=fr,h7=Nw,m7=Bc,v7=Vc,g7=Qi,$d=l7,y7=Za,b7=y7("splice"),x7=Math.max,w7=Math.min;u7({target:"Array",proto:!0,forced:!b7},{splice:function(t,n){var r=c7(this),i=p7(r),o=f7(t,i),a=arguments.length,s,l,u,c,f,p;for(a===0?s=l=0:a===1?(s=0,l=i-o):(s=a-2,l=w7(x7(d7(n),0),i-o)),m7(i+s-l),u=v7(r,l),c=0;c<l;c++)f=o+c,f in r&&g7(u,c,r[f]);if(u.length=l,s<l){for(c=o;c<i-l;c++)f=c+l,p=c+s,f in r?r[p]=r[f]:$d(r,p);for(c=i;c>i-l+s;c--)$d(r,c-1)}else if(s>l)for(c=i-l;c>o;c--)f=c+l-1,p=c+s-1,f in r?r[p]=r[f]:$d(r,p);for(c=0;c<s;c++)r[c+o]=arguments[c+2];return h7(r,i-l+s),u}});var S7=hr,E7=S7("Array","splice"),k7=In,C7=E7,Td=Array.prototype,$7=function(e){var t=e.splice;return e===Td||k7(Td,e)&&t===Td.splice?C7:t},T7=$7,O7=T7,I7=O7;const P7=ke(I7);var A7=hr,_7=A7("Array","concat"),R7=In,D7=_7,Od=Array.prototype,M7=function(e){var t=e.concat;return e===Od||R7(Od,e)&&t===Od.concat?D7:t},N7=M7,j7=N7,L7=j7;const Ke=ke(L7);var F7=Le,B7=tt,CS=Date,z7=B7(CS.prototype.getTime);F7({target:"Date",stat:!0},{now:function(){return z7(new CS)}});var W7=mt,U7=W7.Date.now,H7=U7,V7=H7,q7=V7;const Yn=ke(q7);var K7=of.forEach,G7=SS,Y7=G7("forEach"),X7=Y7?[].forEach:function(t){return K7(this,t,arguments.length>1?arguments[1]:void 0)},J7=Le,$S=X7;J7({target:"Array",proto:!0,forced:[].forEach!==$S},{forEach:$S});var Z7=hr,Q7=Z7("Array","forEach"),e8=Q7,t8=e8,n8=eo,r8=Ft,i8=In,o8=t8,Id=Array.prototype,a8={DOMTokenList:!0,NodeList:!0},s8=function(e){var t=e.forEach;return e===Id||i8(Id,e)&&t===Id.forEach||r8(a8,n8(e))?o8:t},l8=s8;const Ms=ke(l8);var u8=Le,c8=Pn,TS=Yc,f8=ut,d8=f8(function(){TS(1)});u8({target:"Object",stat:!0,forced:d8},{keys:function(t){return TS(c8(t))}});var p8=mt,h8=p8.Object.keys,m8=h8,v8=m8,g8=v8;const y8=ke(g8);var b8=mt,x8=b8.Object.getOwnPropertySymbols,w8=x8,S8=w8,E8=S8;const OS=ke(E8);var k8=Le,C8=of.filter,$8=Za,T8=$8("filter");k8({target:"Array",proto:!0,forced:!T8},{filter:function(t){return C8(this,t,arguments.length>1?arguments[1]:void 0)}});var O8=hr,I8=O8("Array","filter"),P8=In,A8=I8,Pd=Array.prototype,_8=function(e){var t=e.filter;return e===Pd||P8(Pd,e)&&t===Pd.filter?A8:t},R8=_8,D8=R8,M8=D8;const N8=ke(M8);var IS={exports:{}},j8=Le,L8=ut,F8=vn,PS=Gi.f,AS=At,B8=!AS||L8(function(){PS(1)});j8({target:"Object",stat:!0,forced:B8,sham:!AS},{getOwnPropertyDescriptor:function(t,n){return PS(F8(t),n)}});var z8=mt,_S=z8.Object,W8=IS.exports=function(t,n){return _S.getOwnPropertyDescriptor(t,n)};_S.getOwnPropertyDescriptor.sham&&(W8.sham=!0);var U8=IS.exports,H8=U8,V8=H8,q8=V8;const RS=ke(q8);var K8=gn,G8=tt,Y8=is,X8=as,J8=Vn,Z8=G8([].concat),Q8=K8("Reflect","ownKeys")||function(t){var n=Y8.f(J8(t)),r=X8.f;return r?Z8(n,r(t)):n},eq=Le,tq=At,nq=Q8,rq=vn,iq=Gi,oq=Qi;eq({target:"Object",stat:!0,sham:!tq},{getOwnPropertyDescriptors:function(t){for(var n=rq(t),r=iq.f,i=nq(n),o={},a=0,s,l;i.length>a;)l=r(n,s=i[a++]),l!==void 0&&oq(o,s,l);return o}});var aq=mt,sq=aq.Object.getOwnPropertyDescriptors,lq=sq,uq=lq,cq=uq;const DS=ke(cq);var MS={exports:{}},fq=Le,dq=At,NS=Qa.f;fq({target:"Object",stat:!0,forced:Object.defineProperties!==NS,sham:!dq},{defineProperties:NS});var pq=mt,jS=pq.Object,hq=MS.exports=function(t,n){return jS.defineProperties(t,n)};jS.defineProperties.sham&&(hq.sham=!0);var mq=MS.exports,vq=mq,gq=vq,yq=gq;const bq=ke(yq);var xq=n1;const wq=ke(xq);var Sq=!1;function Eq(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function kq(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Cq=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!Sq:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(kq(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Eq(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),St="-ms-",Ns="-moz-",Pe="-webkit-",LS="comm",Ad="rule",_d="decl",$q="@import",FS="@keyframes",Tq="@layer",Oq=Math.abs,js=String.fromCharCode,Iq=Object.assign;function Pq(e,t){return vt(e,0)^45?(((t<<2^vt(e,0))<<2^vt(e,1))<<2^vt(e,2))<<2^vt(e,3):0}function BS(e){return e.trim()}function Aq(e,t){return(e=t.exec(e))?e[0]:e}function Ae(e,t,n){return e.replace(t,n)}function Rd(e,t){return e.indexOf(t)}function vt(e,t){return e.charCodeAt(t)|0}function wo(e,t,n){return e.slice(t,n)}function wn(e){return e.length}function Dd(e){return e.length}function Ls(e,t){return t.push(e),e}function _q(e,t){return e.map(t).join("")}var Fs=1,ri=1,zS=0,Rt=0,nt=0,ii="";function Bs(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Fs,column:ri,length:a,return:""}}function So(e,t){return Iq(Bs("",null,null,"",null,null,0),e,{length:-e.length},t)}function Rq(){return nt}function Dq(){return nt=Rt>0?vt(ii,--Rt):0,ri--,nt===10&&(ri=1,Fs--),nt}function zt(){return nt=Rt<zS?vt(ii,Rt++):0,ri++,nt===10&&(ri=1,Fs++),nt}function Sn(){return vt(ii,Rt)}function zs(){return Rt}function Eo(e,t){return wo(ii,e,t)}function ko(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function WS(e){return Fs=ri=1,zS=wn(ii=e),Rt=0,[]}function US(e){return ii="",e}function Ws(e){return BS(Eo(Rt-1,Md(e===91?e+2:e===40?e+1:e)))}function Mq(e){for(;(nt=Sn())&&nt<33;)zt();return ko(e)>2||ko(nt)>3?"":" "}function Nq(e,t){for(;--t&&zt()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return Eo(e,zs()+(t<6&&Sn()==32&&zt()==32))}function Md(e){for(;zt();)switch(nt){case e:return Rt;case 34:case 39:e!==34&&e!==39&&Md(nt);break;case 40:e===41&&Md(e);break;case 92:zt();break}return Rt}function jq(e,t){for(;zt()&&e+nt!==57;)if(e+nt===84&&Sn()===47)break;return"/*"+Eo(t,Rt-1)+"*"+js(e===47?e:zt())}function Lq(e){for(;!ko(Sn());)zt();return Eo(e,Rt)}function Fq(e){return US(Us("",null,null,null,[""],e=WS(e),0,[0],e))}function Us(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,p=0,d=0,m=0,h=1,g=1,v=1,b=0,x="",$=i,S=o,E=r,O=x;g;)switch(m=b,b=zt()){case 40:if(m!=108&&vt(O,f-1)==58){Rd(O+=Ae(Ws(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=Ws(b);break;case 9:case 10:case 13:case 32:O+=Mq(m);break;case 92:O+=Nq(zs()-1,7);continue;case 47:switch(Sn()){case 42:case 47:Ls(Bq(jq(zt(),zs()),t,n),l);break;default:O+="/"}break;case 123*h:s[u++]=wn(O)*v;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:v==-1&&(O=Ae(O,/\f/g,"")),d>0&&wn(O)-f&&Ls(d>32?VS(O+";",r,n,f-1):VS(Ae(O," ","")+";",r,n,f-2),l);break;case 59:O+=";";default:if(Ls(E=HS(O,t,n,u,c,i,s,x,$=[],S=[],f),o),b===123)if(c===0)Us(O,t,E,E,$,o,f,s,S);else switch(p===99&&vt(O,3)===110?100:p){case 100:case 108:case 109:case 115:Us(e,E,E,r&&Ls(HS(e,E,E,0,0,i,s,x,i,$=[],f),S),i,S,f,s,r?$:S);break;default:Us(O,E,E,E,[""],S,0,s,S)}}u=c=d=0,h=v=1,x=O="",f=a;break;case 58:f=1+wn(O),d=m;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&Dq()==125)continue}switch(O+=js(b),b*h){case 38:v=c>0?1:(O+="\f",-1);break;case 44:s[u++]=(wn(O)-1)*v,v=1;break;case 64:Sn()===45&&(O+=Ws(zt())),p=Sn(),c=f=wn(x=O+=Lq(zs())),b++;break;case 45:m===45&&wn(O)==2&&(h=0)}}return o}function HS(e,t,n,r,i,o,a,s,l,u,c){for(var f=i-1,p=i===0?o:[""],d=Dd(p),m=0,h=0,g=0;m<r;++m)for(var v=0,b=wo(e,f+1,f=Oq(h=a[m])),x=e;v<d;++v)(x=BS(h>0?p[v]+" "+b:Ae(b,/&\f/g,p[v])))&&(l[g++]=x);return Bs(e,t,n,i===0?Ad:s,l,u,c)}function Bq(e,t,n){return Bs(e,t,n,LS,js(Rq()),wo(e,2,-2),0)}function VS(e,t,n,r){return Bs(e,t,n,_d,wo(e,0,r),wo(e,r+1,-1),r)}function oi(e,t){for(var n="",r=Dd(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function zq(e,t,n,r){switch(e.type){case Tq:if(e.children.length)break;case $q:case _d:return e.return=e.return||e.value;case LS:return"";case FS:return e.return=e.value+"{"+oi(e.children,r)+"}";case Ad:e.value=e.props.join(",")}return wn(n=oi(e.children,r))?e.return=e.value+"{"+n+"}":""}function Wq(e){var t=Dd(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function Uq(e){return function(t){t.root||(t=t.return)&&e(t)}}function Hq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Vq=function(t,n,r){for(var i=0,o=0;i=o,o=Sn(),i===38&&o===12&&(n[r]=1),!ko(o);)zt();return Eo(t,Rt)},qq=function(t,n){var r=-1,i=44;do switch(ko(i)){case 0:i===38&&Sn()===12&&(n[r]=1),t[r]+=Vq(Rt-1,n,r);break;case 2:t[r]+=Ws(i);break;case 4:if(i===44){t[++r]=Sn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=js(i)}while(i=zt());return t},Kq=function(t,n){return US(qq(WS(t),n))},qS=new WeakMap,Gq=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!qS.get(r))&&!i){qS.set(t,!0);for(var o=[],a=Kq(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},Yq=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function KS(e,t){switch(Pq(e,t)){case 5103:return Pe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Pe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Pe+e+Ns+e+St+e+e;case 6828:case 4268:return Pe+e+St+e+e;case 6165:return Pe+e+St+"flex-"+e+e;case 5187:return Pe+e+Ae(e,/(\w+).+(:[^]+)/,Pe+"box-$1$2"+St+"flex-$1$2")+e;case 5443:return Pe+e+St+"flex-item-"+Ae(e,/flex-|-self/,"")+e;case 4675:return Pe+e+St+"flex-line-pack"+Ae(e,/align-content|flex-|-self/,"")+e;case 5548:return Pe+e+St+Ae(e,"shrink","negative")+e;case 5292:return Pe+e+St+Ae(e,"basis","preferred-size")+e;case 6060:return Pe+"box-"+Ae(e,"-grow","")+Pe+e+St+Ae(e,"grow","positive")+e;case 4554:return Pe+Ae(e,/([^-])(transform)/g,"$1"+Pe+"$2")+e;case 6187:return Ae(Ae(Ae(e,/(zoom-|grab)/,Pe+"$1"),/(image-set)/,Pe+"$1"),e,"")+e;case 5495:case 3959:return Ae(e,/(image-set\([^]*)/,Pe+"$1$`$1");case 4968:return Ae(Ae(e,/(.+:)(flex-)?(.*)/,Pe+"box-pack:$3"+St+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Pe+e+e;case 4095:case 3583:case 4068:case 2532:return Ae(e,/(.+)-inline(.+)/,Pe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(wn(e)-1-t>6)switch(vt(e,t+1)){case 109:if(vt(e,t+4)!==45)break;case 102:return Ae(e,/(.+:)(.+)-([^]+)/,"$1"+Pe+"$2-$3$1"+Ns+(vt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Rd(e,"stretch")?KS(Ae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(vt(e,t+1)!==115)break;case 6444:switch(vt(e,wn(e)-3-(~Rd(e,"!important")&&10))){case 107:return Ae(e,":",":"+Pe)+e;case 101:return Ae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Pe+(vt(e,14)===45?"inline-":"")+"box$3$1"+Pe+"$2$3$1"+St+"$2box$3")+e}break;case 5936:switch(vt(e,t+11)){case 114:return Pe+e+St+Ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Pe+e+St+Ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Pe+e+St+Ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Pe+e+St+e+e}return e}var Xq=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case _d:t.return=KS(t.value,t.length);break;case FS:return oi([So(t,{value:Ae(t.value,"@","@"+Pe)})],i);case Ad:if(t.length)return _q(t.props,function(o){switch(Aq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oi([So(t,{props:[Ae(o,/:(read-\w+)/,":"+Ns+"$1")]})],i);case"::placeholder":return oi([So(t,{props:[Ae(o,/:(plac\w+)/,":"+Pe+"input-$1")]}),So(t,{props:[Ae(o,/:(plac\w+)/,":"+Ns+"$1")]}),So(t,{props:[Ae(o,/:(plac\w+)/,St+"input-$1")]})],i)}return""})}},Jq=[Xq],Zq=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||Jq,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),v=1;v<g.length;v++)o[g[v]]=!0;s.push(h)});var l,u=[Gq,Yq];{var c,f=[zq,Uq(function(h){c.insert(h)})],p=Wq(u.concat(i,f)),d=function(g){return oi(Fq(g),p)};l=function(g,v,b,x){c=b,d(g?g+"{"+v.styles+"}":v.styles),x&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new Cq({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function Qq(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eK={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tK=!1,nK=/[A-Z]|^ms/g,rK=/_EMO_([^_]+?)_([^]*?)_EMO_/g,GS=function(t){return t.charCodeAt(1)===45},YS=function(t){return t!=null&&typeof t!="boolean"},Nd=Hq(function(e){return GS(e)?e:e.replace(nK,"-$&").toLowerCase()}),XS=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(rK,function(r,i,o){return Xn={name:i,styles:o,next:Xn},i})}return eK[t]!==1&&!GS(t)&&typeof n=="number"&&n!==0?n+"px":n},iK="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Hs(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Xn={name:i.name,styles:i.styles,next:Xn},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Xn={name:a.name,styles:a.styles,next:Xn},a=a.next;var s=o.styles+";";return s}return oK(e,t,n)}}var l=n;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function oK(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Hs(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":YS(s)&&(r+=Nd(o)+":"+XS(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&tK)throw new Error(iK);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)YS(a[l])&&(r+=Nd(o)+":"+XS(o,a[l])+";");else{var u=Hs(e,t,a);switch(o){case"animation":case"animationName":{r+=Nd(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var JS=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function jd(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Xn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Hs(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Hs(n,t,e[s]),r){var l=o;i+=l[s]}JS.lastIndex=0;for(var u="",c;(c=JS.exec(i))!==null;)u+="-"+c[1];var f=Qq(i)+u;return{name:f,styles:i,next:Xn}}function ZS(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var aK=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},sK=function(t,n,r){aK(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function QS(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function e0(e,t,n){var r=[],i=ZS(e,r,n);return r.length<2?n:i+t(r)}var lK=function(t){var n=Zq(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=jd(u,n.registered,void 0);return sK(n,f),n.key+"-"+f.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=jd(u,n.registered),p="animation-"+f.name;return QS(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=jd(u,n.registered);QS(n,f)},a=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return e0(n.registered,r,uK(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:ZS.bind(null,n.registered),merge:e0.bind(null,n.registered,r)}},uK=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},cK=yo,Ld=Date.prototype,t0="Invalid Date",n0="toString",fK=Ld[n0],dK=Ld.getTime;String(new Date(NaN))!=t0&&cK(Ld,n0,function(){var t=dK.call(this);return t===t?fK.call(this):t0});var pK=pd,hK=Z1,mK=pK?{}.toString:function(){return"[object "+hK(this)+"]"},vK=pd,gK=yo,yK=mK;vK||gK(Object.prototype,"toString",yK,{unsafe:!0});var bK=ud.PROPER,xK=yo,wK=Gn,r0=Ps,SK=an,EK=Q1,Fd="toString",i0=RegExp.prototype,o0=i0[Fd],kK=SK(function(){return o0.call({source:"a",flags:"b"})!="/a/b"}),CK=bK&&o0.name!=Fd;(kK||CK)&&xK(RegExp.prototype,Fd,function(){var t=wK(this),n=r0(t.source),r=t.flags,i=r0(r===void 0&&t instanceof RegExp&&!("flags"in i0)?EK.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var a0=typeof window<"u"?window:self,$K=a0.crypto||a0.msCrypto,TK=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}($K);const OK=ke(TK);function IK(){return OK().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var PK=Bb;const s0=ke(PK);function je(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function l0(e,t){for(var n,r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];return Ke(n=[Ke(r="%c".concat(e,"%c ")).call(r,t)]).call(n,$e(je("green","white")),o)}function AK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(o.length){var s=o,l=bn(s,1),u=l[0];typeof u=="function"&&(o=u());var c=s0(o[0])?o:[o],f=c.length===1;Ms(c).call(c,function(p,d){if(f){var m,h;(m=console).log.apply(m,$e(l0.apply(void 0,Ke(h=[e]).call(h,$e(p)))))}else if(d){var g;(g=console).log.apply(g,$e(s0(p)?p:[p]))}else{var v,b;(v=console).groupCollapsed.apply(v,$e(l0.apply(void 0,Ke(b=[e]).call(b,$e(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var _K=mr,RK=ud.EXISTS,DK=vo.f,u0=Function.prototype,MK=u0.toString,NK=/^\s*function ([^ (]*)/,jK="name";_K&&!RK&&DK(u0,jK,{configurable:!0,get:function(){try{return MK.call(this).match(NK)[1]}catch{return""}}});var LK=mt,FK=LK.setTimeout,BK=FK;const zK=ke(BK);function WK(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Yn();s-n>t?(e.apply(void 0,o),n=s):(clearTimeout(r),r=zK(function(){e.apply(void 0,o),n=Yn()},Math.max(0,t-s+n)))}}var c0=function(t){var n=t.debounce,r=t.name,i=t.onEvent,o=t.target,a=I.useRef();a.current=i;var s=I.useMemo(function(){return WK(function(u){var c=a.current;c&&c(u)},n)},[n,a]),l=I.useCallback(function(u){u.timeStampLow=Yn(),s(u)},[s]);return I.useLayoutEffect(function(){return o.addEventListener(r,l,{passive:!0}),l({target:o,type:r}),function(){return o.removeEventListener(r,l)}},[r,l,o]),!1};c0.defaultProps={debounce:200};var UK=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},HK=Le,VK=UK;HK({target:"Math",stat:!0},{sign:VK});var qK=mt,KK=qK.Math.sign,GK=KK,YK=GK,XK=YK;const JK=ke(XK);function ZK(e,t){var n=JK(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function QK(e,t,n,r){for(var i=e,o=0;o<r;o++)i=n(i,t);return i}var f0=function(t){var n=t.name,r=t.onEnd,i=t.target,o=t.value,a=I.useRef(),s=I.useCallback(function(u,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Yn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=QK(c,m,ZK,(Yn()-d)/5);Math.abs(m-h)<1.5&&(h=m),i[u]=h,m===h?r&&r(!0):s(u,c,f,p+1,d)}}))},[a,r,i]),l=I.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return I.useLayoutEffect(function(){return s(n,i[n],o,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,i,o]),!1};f0.propTypes={name:Oe.string.isRequired,onEnd:Oe.func,target:Oe.any.isRequired,value:Oe.oneOfType([Oe.number,Oe.oneOf(["100%"])]).isRequired};function Bd(e){var t=I.useState(e),n=bn(t,2),r=n[0],i=n[1],o=I.useRef(),a=I.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),o.current=s,s}):(o.current=s,a(s))},[o]);return o.current=r,[r,i,o]}function d0(e,t){var n=y8(e);if(OS){var r=OS(e);t&&(r=N8(r).call(r,function(i){return RS(e,i).enumerable})),n.push.apply(n,r)}return n}function p0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Ms(r=d0(Object(n),!0)).call(r,function(o){fW(e,o,n[o])})}else if(DS)bq(e,DS(n));else{var i;Ms(i=d0(Object(n))).call(i,function(o){wq(e,o,RS(n,o))})}}return e}var eG=function(){return 1/0},h0=17,tG="bottom",sn="top",m0=1,nG=34,v0={};function rG(e,t){return e(),VV(e,t)}function g0(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,o=n.scrollTop,a=i-o-r<m0,s=o<m0,l=t===sn?s:a,u=t!==sn?s:a;return{atBottom:a,atEnd:l,atStart:u,atTop:s}}function Co(e,t){return e===(t===sn?0:"100%")}var zd=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,o=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,u=t.scroller,c=I.useMemo(function(){return AK("<ScrollToBottom>",{force:o})},[o]);s=s===sn?sn:tG;var f=I.useRef(0),p=I.useRef(a),d=Bd(s===sn?0:"100%"),m=bn(d,3),h=m[0],g=m[1],v=m[2],b=Bd(null),x=bn(b,3),$=x[0],S=x[1],E=x[2],O=I.useRef(0),F=I.useRef(0),D=I.useRef(0),T=I.useState(!0),M=bn(T,2),H=M[0],B=M[1],L=I.useState(!0),N=bn(L,2),W=N[0],X=N[1],V=I.useState(!0),_=bn(V,2),y=_[0],R=_[1],P=I.useState(!1),w=bn(P,2),j=w[0],G=w[1],K=Bd(!0),Y=bn(K,3),Q=Y[0],ee=Y[1],J=Y[2],Z=I.useRef([]),q=I.useCallback(function(z){var ne=E.current;return Z.current.push(z),ne&&z({scrollTop:ne.scrollTop}),function(){var se=Z.current,de=a7(se).call(se,z);~de&&P7(se).call(se,de,1)}},[Z,E]),ie=I.useCallback(function(){var z=v.current;c(function(){var ne;return Ke(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,$e(je("magenta")),$e(je("orange")),[{animateTo:z}])}),f.current=Yn(),Co(z,s)||ee(!1),g(null)},[v,c,f,s,g,ee]),le=I.useCallback(function(z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=ne.behavior,de=E.current;if(typeof z!="number"&&z!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var ge;return[Ke(ge=["%cscrollTo%c: Will scroll to %c".concat(typeof z=="number"?z+"px":z.replace(/%/g,"%%"),"%c")]).call(ge,$e(je("lime","")),$e(je("purple"))),{behavior:se,nextAnimateTo:z,target:de}]}),se==="auto"?(ie(),de&&(de.scrollTop=z==="100%"?de.scrollHeight-de.offsetHeight:z)):(se!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),g(z)),Co(z,s)&&(c(function(){var ge;return[Ke(ge=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ge,$e(je("lime","")),$e(je("purple"))),[{mode:s,nextAnimateTo:z}]]}),ee(!0))},[c,ie,s,g,ee,E]),pe=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var se;return Ke(se=["%cscrollToBottom%c: Called"]).call(se,$e(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),le("100%",{behavior:ne||"smooth"})},[c,le]),ae=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var se;return Ke(se=["%cscrollToTop%c: Called"]).call(se,$e(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),le(0,{behavior:ne||"smooth"})},[c,le]),ve=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var de;return Ke(de=["%cscrollToEnd%c: Called"]).call(de,$e(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:ne||"smooth"};s===sn?ae(se):pe(se)},[c,s,pe,ae]),be=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var de;return Ke(de=["%cscrollToStart%c: Called"]).call(de,$e(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:ne||"smooth"};s===sn?pe(se):ae(se)},[c,s,pe,ae]),_e=I.useCallback(function(){var z=E.current;if(z){if(p.current==="auto"){c(function(){var ot;return Ke(ot=["%ctarget changed%c: Initial scroll"]).call(ot,$e(je("blue")))}),z.scrollTop=s===sn?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var ne=O.current,se=z.offsetHeight,de=z.scrollHeight,ge=z.scrollTop,Ye=s===sn?0:Math.max(0,de-se-ge),Xe=Math.max(0,ne-ge),gt=u({maxValue:Ye,minValue:Xe,offsetHeight:se,scrollHeight:de,scrollTop:ge}),it=Math.max(0,Math.min(Ye,gt)),Re;s===sn||it!==Ye?Re=ge+it:Re="100%",c(function(){var ot,Ze,Gt;return[Ke(ot=[Ke(Ze=Ke(Gt="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(Gt,typeof Re=="number"?Re+"px":Re.replace(/%/g,"%%"),"%c (%c")).call(Ze,(Re==="100%"?Ye:Re)+ne,"px%c)")]).call(ot,$e(je("orange")),$e(je("purple")),$e(je("purple")),$e(je("purple"))),{animateFrom:ne,maxValue:Ye,minValue:Xe,nextAnimateTo:Re,nextValue:it,offsetHeight:se,rawNextValue:gt,scrollHeight:de,scrollTop:ge}]}),le(Re,{behavior:"smooth"})}},[O,c,s,u,le,E]),rt=I.useCallback(function(z){var ne,se=z.timeStampLow,de=v.current,ge=E.current,Ye=de!==null;if(!(se<=f.current||!ge)){var Xe=g0({mode:s,target:ge}),gt=Xe.atBottom,it=Xe.atEnd,Re=Xe.atStart,ot=Xe.atTop;B(gt),X(it),G(Re),R(ot);var Ze=ge.offsetHeight,Gt=ge.scrollHeight,Po=F.current,Dn=D.current,xr=Ze!==Po,wr=Gt!==Dn;if(xr&&(F.current=Ze),wr&&(D.current=Gt),!xr&&!wr){var Sr=Ye&&Co(de,s)||it;J.current!==Sr&&(c(function(){var kn,rl,Ao,_o;return[Ke(kn=["%conScroll%c: %csetSticky%c(%c".concat(Sr,"%c)")]).call(kn,$e(je("red")),$e(je("red")),$e(je("purple"))),Ke(rl=[Ke(Ao=Ke(_o="(animating = %c".concat(Ye,"%c && isEnd = %c")).call(_o,Co(de,s),"%c) || atEnd = %c")).call(Ao,it,"%c")]).call(rl,$e(je("purple")),$e(je("purple")),$e(je("purple")),[{animating:Ye,animateTo:de,atEnd:it,mode:s,offsetHeight:ge.offsetHeight,scrollHeight:ge.scrollHeight,sticky:J.current,nextSticky:Sr}])]}),ee(Sr))}else J.current&&(c(function(){var kn;return[Ke(kn=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(kn,$e(je("red")),$e(je("orange")),[{offsetHeightChanged:xr,scrollHeightChanged:wr}]),{nextOffsetHeight:Ze,prevOffsetHeight:Po,nextScrollHeight:Gt,prevScrollHeight:Dn}]}),_e());var gp=ge.scrollTop;Ms(ne=Z.current).call(ne,function(kn){return kn({scrollTop:gp})})}},[v,c,f,s,F,D,Z,_e,B,X,G,R,ee,J,E]);I.useEffect(function(){if($){var z=!1,ne=rG(function(){var se=E.current,de=v.current!==null;J.current?g0({mode:s,target:se}).atEnd?z=!1:z?Yn()-z>nG&&(de||(O.current=se.scrollTop,c(function(){var ge;return Ke(ge=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ge,$e(je("navy")),$e(je("orange")))}),_e()),z=!1):z=Yn():se.scrollHeight<=se.offsetHeight&&!J.current&&(c(function(){var ge;return[Ke(ge=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ge,$e(je("navy")),$e(je("purple"))),[{offsetHeight:se.offsetHeight,scrollHeight:se.scrollHeight,sticky:J.current}]]}),ee(!0))},Math.max(h0,n)||h0);return function(){return clearInterval(ne)}}},[v,n,c,s,_e,ee,J,$,E]);var Et=I.useMemo(function(){var z=v0[l]||(v0[l]=lK({key:"react-scroll-to-bottom--css-"+IK(),nonce:l}));return function(ne){return z.css(ne)+""}},[l]),kt=I.useMemo(function(){return{observeScrollPosition:q,setTarget:S,styleToClassName:Et}},[q,S,Et]),Ct=I.useMemo(function(){return{atBottom:H,atEnd:W,atStart:j,atTop:y,mode:s}},[H,W,j,y,s]),oe=I.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&Co(h,s),sticky:Q}},[h,s,Q]),fe=I.useMemo(function(){return p0(p0({},Ct),oe)},[Ct,oe]),U=I.useMemo(function(){return{scrollTo:le,scrollToBottom:pe,scrollToEnd:ve,scrollToStart:be,scrollToTop:ae}},[le,pe,ve,be,ae]);return I.useEffect(function(){if($){var z=function(){D.current=$.scrollHeight};return $.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return $.removeEventListener("focus",z)}}},[$]),c(function(){var z;return[Ke(z=["%cRender%c: Render"]).call(z,$e(je("cyan",""))),{animateTo:h,animating:h!==null,sticky:Q,target:$}]}),I.createElement(xs.Provider,{value:kt},I.createElement(Bf.Provider,{value:U},I.createElement(Uf.Provider,{value:fe},I.createElement(zf.Provider,{value:Ct},I.createElement(Wf.Provider,{value:oe},r,$&&I.createElement(c0,{debounce:i,name:"scroll",onEvent:rt,target:$}),$&&h!==null&&I.createElement(f0,{name:"scrollTop",onEnd:ie,target:$,value:h}))))))};zd.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:eG},zd.propTypes={checkInterval:Oe.number,children:Oe.any,debounce:Oe.number,debug:Oe.bool,initialScrollBehavior:Oe.oneOf(["auto","smooth"]),mode:Oe.oneOf(["bottom","top"]),nonce:Oe.string,scroller:Oe.func};var iG={height:"100%",overflowY:"auto",width:"100%"},Wd=function(t){var n=t.children,r=t.className,i=I.useContext(xs),o=i.setTarget,a=Hf()(iG);return I.createElement("div",{className:Rf(a,(r||"")+""),ref:o},n)};Wd.defaultProps={children:void 0,className:void 0},Wd.propTypes={children:Oe.any,className:Oe.string};var oG={position:"relative"},Ud=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,o=t.scrollViewClassName,a=Hf()(oG);return I.createElement("div",{className:Rf(a,(r||"")+"")},I.createElement(Wd,{className:(o||"")+""},n),I.createElement(Vf,{className:(i||"")+""}))};Ud.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Ud.propTypes={children:Oe.any,className:Oe.string,followButtonClassName:Oe.string,scrollViewClassName:Oe.string};var Hd=function(t){var n=t.checkInterval,r=t.children,i=t.className,o=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,u=t.mode,c=t.nonce,f=t.scroller,p=t.scrollViewClassName;return I.createElement(zd,{checkInterval:n,debounce:o,debug:a,initialScrollBehavior:l,mode:u,nonce:c,scroller:f},I.createElement(Ud,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};Hd.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},Hd.propTypes={checkInterval:Oe.number,children:Oe.any,className:Oe.string,debounce:Oe.number,debug:Oe.bool,followButtonClassName:Oe.string,initialScrollBehavior:Oe.oneOf(["auto","smooth"]),mode:Oe.oneOf(["bottom","top"]),nonce:Oe.string,scroller:Oe.func,scrollViewClassName:Oe.string},d2();let y0=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Vd=I.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:u,showMarquee:c=!0,...f})=>{var h;const{messageList:p}=Se,d=I.useMemo(()=>uk(t),[t]),m=I.useMemo(()=>{var v;const g=d.filter(b=>b.direction==="outgoing"&&b.status!=="pending");return(v=g[g.length-1])==null?void 0:v.id},[d]);return C.jsxs(Hd,{...f,className:zr(p.container.className,e),followButtonClassName:p.scrollDownButton.className,scrollViewClassName:p.viewPort.className,children:[r&&C.jsx("span",{...p.headerMessage,children:r}),c&&C.jsx(c2,{botAvatar:o,botDescription:a,botName:s}),d.map(g=>{var v;return C.jsx(pc,{renderers:i,sendMessage:l,addMessageFeedback:u,isLastDeliveredMessage:g.id===m,...g},((v=g.metadata)==null?void 0:v.clientMessageId)||g.id)}),n&&C.jsx(pc,{id:y0(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,block:void 0,sender:((h=t.filter(g=>g.direction==="incoming").at(-1))==null?void 0:h.sender)??{name:s||"Bot",avatar:o},children:C.jsx(dc,{})})]})});Vd.displayName="MessageList";const aG=({className:e,...t})=>{const{className:n}=Se.loader;return C.jsx("div",{...t,className:zr(e,n)})};function b0({error:e,restartConversation:t}){let n,r;const{error:i}=Se;return e.type==="configuration"?(n="Configuration error",r=C.jsx(hA,{...i.icon})):e.type==="bot"?(n="Bot error",r=C.jsx(hv,{...i.icon})):e.type==="network"?(n="Network error",r=C.jsx(EA,{...i.icon})):e.type==="disconnected"?(n="Disconnected",r=C.jsx(xA,{...i.icon})):(n="Unexpected error",r=C.jsx(hv,{...i.icon})),C.jsx(sG,{error:e,title:n,icon:r,restartConversation:t})}function sG({error:e,title:t,icon:n,restartConversation:r}){const{error:i}=Se;return C.jsxs("div",{...i.container,children:[C.jsxs("div",{...i.header,children:[`Webchat ${e.type} error`,r&&C.jsx(fc,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}})]}),C.jsxs("div",{...i.content,children:[n,C.jsx("div",{...i.errorTitle,children:t}),C.jsx("div",{...i.errorMessage,children:e.message}),e.id&&C.jsx("div",{...i.id,children:e.id})]})]})}const x0=({connected:e,configuration:t,isTyping:n,messages:r,user:i,isLoading:o,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:u,error:c,participants:f,closeWindow:p,sendMessage:d,uploadFile:m,addMessageFeedback:h,restartConversation:g,...v})=>{const{color:b,fontFamily:x,radius:$,themeMode:S,variant:E,headerVariant:O,botAvatar:F,botDescription:D,botName:T,composerPlaceholder:M,footer:H,feedbackEnabled:B}=t,L={color:b,fontFamily:x,radius:$,themeMode:S,variant:E,headerVariant:O};B||(h=void 0);const N=I.useMemo(()=>i?Fp(r,f,i.id,T,F):[],[F,T,r,i,f]);return C.jsxs(C.Fragment,{children:[C.jsx(Ky,{...L}),C.jsx(rc,{connected:e,allowFileUpload:u,uploadFile:m,...v,children:c?C.jsx(b0,{error:c,restartConversation:g}):C.jsxs(C.Fragment,{children:[C.jsx(ib,{closeWindow:p,configuration:t,restartConversation:g}),o?C.jsx(aG,{}):C.jsx(Vd,{botAvatar:F,botDescription:D,botName:T,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:N}),C.jsx(my,{sendMessage:d,uploadFile:m,connected:e,isReadOnly:s,disableComposer:l,footer:H,composerPlaceholder:M,allowFileUpload:u})]})})]})};function lG(){const[e,t]=I.useState(!1),n=I.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}var uG=Object.defineProperty,cG=(e,t,n)=>t in e?uG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fG=(e,t,n)=>cG(e,t+"",n),dG=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},pG={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},hG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},mG=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},vG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},w0=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(mG(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=hG(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Vs({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},Vs=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},S0=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([u,c])=>{s=[...s,u,e?c:encodeURIComponent(c)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=vG(r),a=Object.entries(i).map(([s,l])=>Vs({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},gG=/\{[^{}]+\}/g,yG=({path:e,url:t})=>{let n=t,r=t.match(gG);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,w0({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,S0({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${Vs({name:a,value:l})}`);continue}let u=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,u)}return n},E0=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,w0({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,S0({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,Vs({allowReserved:e,name:o,value:a})]}}return i.join("&")},bG=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},xG=async({security:e,...t})=>{for(let n of e){let r=await dG(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},k0=e=>wG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:E0(e.querySerializer),url:e.url}),wG=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=yG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},C0=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=$0(e.headers,t.headers),r},$0=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},qd=class{constructor(){fG(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},SG=()=>({error:new qd,request:new qd,response:new qd}),EG=E0({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),kG={"Content-Type":"application/json"},T0=(e={})=>({...pG,headers:kG,parseAs:"auto",querySerializer:EG,...e}),CG=(e={})=>{let t=C0(T0(),e),n=()=>({...t}),r=a=>(t=C0(t,a),n()),i=SG(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:$0(t.headers,a.headers)};s.security&&await xG({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=k0(s),u={redirect:"follow",...s},c=new Request(l,u);for(let g of i.request._fns)c=await g(c,s);let f=s.fetch,p=await f(c);for(let g of i.response._fns)p=await g(p,c,s);let d={request:c,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?bG(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let v=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(v),s.responseTransformer&&(v=await s.responseTransformer(v))),{data:v,...d}}let m=await p.text();try{m=JSON.parse(m)}catch{}let h=m;for(let g of i.error._fns)h=await g(m,p,c,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:k0,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},$G=CG,TG=T0;const Fe=$G((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(TG({baseUrl:"https://webchat.botpress.cloud/"}))),OG=e=>(e.client??Fe).delete({url:"/conversations/{id}",...e}),IG=e=>(e.client??Fe).get({url:"/conversations/{id}",...e}),PG=e=>(e.client??Fe).get({url:"/conversations",...e}),AG=e=>(e.client??Fe).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),_G=e=>(e.client??Fe).get({url:"/conversations/{id}/messages",...e}),RG=e=>(e.client??Fe).get({url:"/conversations/{id}/participants",...e}),DG=e=>(e.client??Fe).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),MG=e=>(e.client??Fe).delete({url:"/conversations/{id}/participants/{userId}",...e}),NG=e=>(e.client??Fe).get({url:"/conversations/{id}/participants/{userId}",...e}),jG=e=>(e.client??Fe).delete({url:"/messages/{id}",...e}),LG=e=>(e.client??Fe).get({url:"/messages/{id}",...e}),FG=e=>(e.client??Fe).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),BG=e=>(e.client??Fe).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),zG=e=>(e.client??Fe).delete({url:"/messages/{id}/feedback",...e}),WG=e=>(e.client??Fe).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),UG=e=>(e.client??Fe).delete({url:"/users/me",...e}),HG=e=>(e.client??Fe).get({url:"/users/me",...e}),VG=e=>(e.client??Fe).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),O0=e=>((e==null?void 0:e.client)??Fe).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),qG=e=>(e.client??Fe).get({url:"/events/{id}",...e}),KG=e=>(e.client??Fe).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),GG=e=>(e.client??Fe).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let I0=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function Kd(e){}function YG(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Kd,onError:n=Kd,onRetry:r=Kd,onComment:i}=e;let o="",a=!0,s,l="",u="";function c(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[v,b]=XG(`${o}${g}`);for(const x of v)f(x);o=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const v=h.slice(0,g),b=h[g+1]===" "?2:1,x=h.slice(g+b);p(v,x,h);return}p(h,"",h)}function p(h,g,v){switch(h){case"event":u=g;break;case"data":l=`${l}${g}
|
|
314
|
+
`;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new I0(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:v}));break;default:n(new I0(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:v}));break}}function d(){l.length>0&&t({id:s,event:u||void 0,data:l.endsWith(`
|
|
315
|
+
`)?l.slice(0,-1):l}),s=void 0,l="",u=""}function m(h={}){o&&h.consume&&f(o),a=!0,s=void 0,l="",u="",o=""}return{feed:c,reset:m}}function XG(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),o=e.indexOf(`
|
|
289
316
|
`,r);let a=-1;if(i!==-1&&o!==-1?a=Math.min(i,o):i!==-1?a=i:o!==-1&&(a=o),a===-1){n=e.slice(r);break}else{const s=e.slice(r,a);t.push(s),r=a+1,e[r-1]==="\r"&&e[r]===`
|
|
290
|
-
`&&r++}}return[t,n]}class r0 extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(i0(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(i0(this),n)}}function CG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Cd(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Cd).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Cd(e.cause)}`:e.message:`${e}`}function i0(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var o0=e=>{throw TypeError(e)},Td=(e,t,n)=>t.has(e)||o0("Cannot "+n),ve=(e,t,n)=>(Td(e,t,"read from private field"),n?n.call(e):t.get(e)),Je=(e,t,n)=>t.has(e)?o0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ne=(e,t,n,r)=>(Td(e,t,"write to private field"),t.set(e,n),n),bn=(e,t,n)=>(Td(e,t,"access private method"),n),xt,rr,Wr,ks,Cs,ao,Ur,so,Nn,Hr,Vr,qr,lo,Gt,$d,Od,Id,a0,Pd,Ad,uo,Rd,Dd;class Ts extends EventTarget{constructor(t,n){var r,i;super(),Je(this,Gt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Je(this,xt),Je(this,rr),Je(this,Wr),Je(this,ks),Je(this,Cs),Je(this,ao),Je(this,Ur),Je(this,so,null),Je(this,Nn),Je(this,Hr),Je(this,Vr,null),Je(this,qr,null),Je(this,lo,null),Je(this,Od,async o=>{var a;ve(this,Hr).reset();const{body:s,redirected:l,status:u,headers:c}=o;if(u===204){bn(this,Gt,uo).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?Ne(this,Wr,new URL(o.url)):Ne(this,Wr,void 0),u!==200){bn(this,Gt,uo).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){bn(this,Gt,uo).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(ve(this,xt)===this.CLOSED)return;Ne(this,xt,this.OPEN);const f=new Event("open");if((a=ve(this,lo))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){bn(this,Gt,uo).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const p=new TextDecoder,d=s.getReader();let m=!0;do{const{done:h,value:y}=await d.read();y&&ve(this,Hr).feed(p.decode(y,{stream:!h})),h&&(m=!1,ve(this,Hr).reset(),bn(this,Gt,Rd).call(this))}while(m)}),Je(this,Id,o=>{Ne(this,Nn,void 0),!(o.name==="AbortError"||o.type==="aborted")&&bn(this,Gt,Rd).call(this,Cd(o))}),Je(this,Pd,o=>{typeof o.id=="string"&&Ne(this,so,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:ve(this,Wr)?ve(this,Wr).origin:ve(this,rr).origin,lastEventId:o.id||""});ve(this,qr)&&(!o.event||o.event==="message")&&ve(this,qr).call(this,a),this.dispatchEvent(a)}),Je(this,Ad,o=>{Ne(this,ao,o)}),Je(this,Dd,()=>{Ne(this,Ur,void 0),ve(this,xt)===this.CONNECTING&&bn(this,Gt,$d).call(this)});try{if(t instanceof URL)Ne(this,rr,t);else if(typeof t=="string")Ne(this,rr,new URL(t,TG()));else throw new Error("Invalid URL")}catch{throw CG("An invalid or illegal string was specified")}Ne(this,Hr,EG({onEvent:ve(this,Pd),onRetry:ve(this,Ad)})),Ne(this,xt,this.CONNECTING),Ne(this,ao,3e3),Ne(this,Cs,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),Ne(this,ks,(i=n==null?void 0:n.withCredentials)!=null?i:!1),bn(this,Gt,$d).call(this)}get readyState(){return ve(this,xt)}get url(){return ve(this,rr).href}get withCredentials(){return ve(this,ks)}get onerror(){return ve(this,Vr)}set onerror(t){Ne(this,Vr,t)}get onmessage(){return ve(this,qr)}set onmessage(t){Ne(this,qr,t)}get onopen(){return ve(this,lo)}set onopen(t){Ne(this,lo,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){ve(this,Ur)&&clearTimeout(ve(this,Ur)),ve(this,xt)!==this.CLOSED&&(ve(this,Nn)&&ve(this,Nn).abort(),Ne(this,xt,this.CLOSED),Ne(this,Nn,void 0))}}xt=new WeakMap,rr=new WeakMap,Wr=new WeakMap,ks=new WeakMap,Cs=new WeakMap,ao=new WeakMap,Ur=new WeakMap,so=new WeakMap,Nn=new WeakMap,Hr=new WeakMap,Vr=new WeakMap,qr=new WeakMap,lo=new WeakMap,Gt=new WeakSet,$d=function(){Ne(this,xt,this.CONNECTING),Ne(this,Nn,new AbortController),ve(this,Cs)(ve(this,rr),bn(this,Gt,a0).call(this)).then(ve(this,Od)).catch(ve(this,Id))},Od=new WeakMap,Id=new WeakMap,a0=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ve(this,so)?{"Last-Event-ID":ve(this,so)}:void 0},cache:"no-store",signal:(e=ve(this,Nn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Pd=new WeakMap,Ad=new WeakMap,uo=function(e,t){var n;ve(this,xt)!==this.CLOSED&&Ne(this,xt,this.CLOSED);const r=new r0("error",{code:t,message:e});(n=ve(this,Vr))==null||n.call(this,r),this.dispatchEvent(r)},Rd=function(e,t){var n;if(ve(this,xt)===this.CLOSED)return;Ne(this,xt,this.CONNECTING);const r=new r0("error",{code:t,message:e});(n=ve(this,Vr))==null||n.call(this,r),this.dispatchEvent(r),Ne(this,Ur,setTimeout(ve(this,Dd),ve(this,ao)))},Dd=new WeakMap,Ts.CONNECTING=0,Ts.OPEN=1,Ts.CLOSED=2;function TG(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function s0(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const $G=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var i;return(i=e[t])==null?void 0:i.delete(n)}},emit:(t,n)=>{var r,i;(r=e[t])==null||r.forEach(o=>o(n)),(i=e["*"])==null||i.forEach(o=>o({type:t,payload:n}))}}},Be=e=>e.data,l0={throwOnError:!0},OG=({clientId:e,apiUrl:t})=>{const n=`${t||Ae.getConfig().baseUrl}/${e}`;Ae.interceptors.response._fns.length===0&&Ae.interceptors.response.use(s0);const r={...l0,baseUrl:n};return t0({...r,body:{}}).then(Be)},IG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},i=`${n||Ae.getConfig().baseUrl}/${t}`,o={...l0,baseUrl:i};return Ae.interceptors.response._fns.length===0&&Ae.interceptors.response.use(s0),{createConversation:()=>oG({...o,headers:r,body:{}}).then(Be),getConversation:({conversationId:a})=>rG({...o,headers:r,path:{id:a}}).then(Be),deleteConversation:({conversationId:a})=>nG({...o,headers:r,path:{id:a}}).then(Be),listConversations:({nextToken:a})=>iG({...o,headers:r,query:{nextToken:a}}).then(Be),listConversationMessages:({conversationId:a,nextToken:s})=>aG({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Be),addParticipant:({conversationId:a,userId:s})=>lG({...o,headers:r,path:{id:a},body:{userId:s}}).then(Be),removeParticipant:({conversationId:a,userId:s})=>uG({...o,headers:r,path:{id:a,userId:s}}).then(Be),getParticipant:({conversationId:a,userId:s})=>cG({...o,headers:r,path:{id:a,userId:s}}).then(Be),listParticipants:({conversationId:a,nextToken:s})=>sG({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Be),createMessage:a=>hG({...o,headers:r,body:a}).then(Be),updateMessage:({messageId:a,...s})=>pG({...o,headers:r,path:{id:a},body:s}).then(Be),getMessage:({messageId:a})=>dG({...o,headers:r,path:{id:a}}).then(Be),deleteMessage:({messageId:a})=>fG({...o,headers:r,path:{id:a}}).then(Be),createFile:a=>SG({...o,headers:r,body:a}).then(Be),createUser:a=>t0({...o,headers:r,body:a}).then(Be),getUser:()=>yG({...o,headers:r}).then(Be),updateUser:a=>bG({...o,headers:r,body:a}).then(Be),deleteUser:()=>gG({...o,headers:r}).then(Be),createEvent:a=>wG({...o,headers:r,body:a}).then(Be),getEvent:({eventId:a})=>xG({...o,headers:r,path:{id:a}}).then(Be),addMessageFeedback:({messageId:a,...s})=>vG({...o,headers:r,path:{id:a},body:s}).then(Be),removeMessageFeedback:({messageId:a})=>mG({...o,headers:r,path:{id:a}}).then(Be),listenConversation:({conversationId:a})=>{let s=0,l=null;const u=$G(),c=()=>{l&&l.close();const f=`${i}/conversations/${a}/listen`;l=new Ts(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>u.emit("open"),l.onerror=p=>{u.emit("error",p),s<10&&(s++,setTimeout(()=>c(),3e3))},l.onmessage=p=>{const d=PG(p.data);u.emit(d.type,d.data)}};return c(),u.on}}},PG=e=>{try{return JSON.parse(e)}catch{return e}};function u0({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const o=pv(n,r),a=o(I=>I.conversationId),s=o(I=>I.user),l=o(I=>I.setConversationId),u=o(I=>I.setUser),c=Vn(I=>I.messages),f=Vn(I=>I.saveMessage),p=Vn(I=>I.updateMessage),d=Vn(I=>I.fetchMessages),m=Vn(I=>I.setMessages),h=Vn(I=>I.clearMessages),y=Vn(I=>I.isFetching),g=Lo(I=>I.participants),b=Lo(I=>I.setParticipants),w=Lo(I=>I.addParticipant),C=Lo(I=>I.removeParticipant),[S,E]=A.useState("connecting"),{isTyping:O,setIsTyping:j}=NK(),M=A.useMemo(()=>hv(),[]),[$,D]=A.useState(i.conversationId),[U,F]=A.useState(i.user),[L,N]=A.useState(void 0),[B,Y]=A.useState(!1),[H,R]=A.useState(void 0),v=A.useRef(!1);if(A.useEffect(()=>{R(void 0)},[i.conversationId,i.user,t,e]),xv(async()=>{if(!t){R({type:"configuration",message:wp});return}if(!e||!e.startsWith("https://")){R({type:"configuration",message:Sp});return}async function I(){const x=i.user||s;let _=x,V=i.conversationId||a;const K=!!V;if(!_){const{key:Z,user:J}=await OG({clientId:t,apiUrl:e});_={userId:J.id,userToken:Z}}const G=IG({userKey:_.userToken,clientId:t,apiUrl:e});if((!V||!x)&&(V=await c0(G),Y(!0)),K){const Z=await d({client:G,conversationId:V});m(Z)}else h();const{participants:X}=await G.listParticipants({conversationId:V});b(X),N(G),D(V),l(V),F(_),u(_),E("connected")}try{if(v.current)return;v.current=!0,await I(),v.current=!1}catch(x){h(),R(po(x)),E("error")}},[i.user,i.conversationId]),A.useEffect(()=>{if(!L||!$)return;const I=L.listenConversation({conversationId:$}),x=[I("open",()=>{E("connected"),B&&(L.createEvent({conversationId:$,payload:{type:"conversation_started",data:{}}}),M.emit("conversation"),Y(!1))}),I("error",_=>{R(V=>V||po(_)),M.emit("error",new Error(`Connection to conversation lost: ${_.message}`)),E("error")}),I("message_created",_=>{const V=No(_);(U==null?void 0:U.userId)!==V.authorId&&(j(!1),M.emit("isTyping",{isTyping:!1,timeout:0})),f(V),M.emit("message",V)}),I("message_status_changed",_=>{_.newStatus==="processing"&&(j(!0),M.emit("isTyping",{isTyping:!0,timeout:5e3}),p(_.message.metadata.clientMessageId,{status:_.newStatus}))}),I("participant_added",_=>{w(_.participant),M.emit("participantAdded",_.participant)}),I("participant_removed",_=>{C(_.participantId),M.emit("participantRemoved",_.participantId)}),I("webchat_visibility",_=>M.emit("webchatVisibility",_.visibility)),I("webchat_config",_=>M.emit("webchatConfig",_.config)),I("custom",_=>M.emit("customEvent",_.event))];return()=>{x.forEach(_=>_())}},[$,L]),H)return{clientState:"error",on:M.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:y,participants:[],error:H};if(S==="connecting"||!U||!$||!L)return{clientState:"connecting",on:M.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:y,participants:[]};const P={sendMessage:async I=>{const x=VS(),_={id:x,createdAt:new Date().toISOString(),userId:U.userId,conversationId:$,payload:I,metadata:{clientMessageId:x,delivered:!1}},V=No(_);V.status="pending",f(V),await L.createMessage({conversationId:$,payload:I,metadata:{clientMessageId:x}}).catch(K=>M.emit("error",K))},sendEvent:async I=>{await L.createEvent({conversationId:$,payload:{type:"custom",data:I}})},uploadFile:async I=>{const{size:x,name:_}=I,K=await(ne=>new Promise((ae,fe)=>{const ie=new FileReader;ie.onload=pe=>{var ge;return ae((ge=pe.target)==null?void 0:ge.result)},ie.onerror=pe=>{var ge;return fe((ge=pe.target)==null?void 0:ge.error)},ie.readAsArrayBuffer(ne)}))(I),G=new Date;G.setDate(G.getDate()+30);const{file:{uploadUrl:X,contentType:Z,url:J}}=await L.createFile({size:x,key:_,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:G.toISOString()});await fetch(X,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:K});const Q=Z.split("/").shift()??"",q=xp(Q)?Q:"file";return{fileUrl:J,name:_,type:q}},addMessageFeedback:async(I,x)=>{p(I,{feedback:x.value}),await L.addMessageFeedback({messageId:I,...x})},getUser:async()=>{const{user:I}=await L.getUser();return I},updateUser:async I=>{const{user:x}=await L.updateUser({name:I.name,pictureUrl:I.pictureUrl,userData:I.data});return x}};return{clientState:S,on:M.on,client:P,messages:c,conversationId:$,newConversation:async()=>{try{h(),j(!1);const I=await c0(L);Y(!0),D(I),l(I)}catch(I){R(po(I))}},user:s,isTyping:O,isFetchingMessages:y,participants:g,error:H}}const c0=async e=>{const{conversation:t}=await e.createConversation();return t.id},AG=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:u,client:c,isFetchingMessages:f,isTyping:p,newConversation:d,messages:m,participants:h,user:y,error:g}=u0({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:b,uploadFile:w,addMessageFeedback:C}=c??{};return T.jsx(KS,{configuration:n??{},user:y!=null&&y.userId?{id:y==null?void 0:y.userId}:void 0,isLoading:f||u==="connecting",isTyping:p,connected:u==="connected"?!0:u==="disconnected"?!1:void 0,messages:m,sendMessage:b,uploadFile:w,addMessageFeedback:C,allowFileUpload:r,restartConversation:d,participants:h,error:g,...s})};function RG(e,t=globalThis==null?void 0:globalThis.document){const n=xn(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var DG="DismissableLayer",_d="dismissableLayer.update",_G="dismissableLayer.pointerDownOutside",MG="dismissableLayer.focusOutside",f0,d0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,u=k.useContext(d0),[c,f]=k.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=k.useState({}),m=In(t,O=>f(O)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),b=c?h.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=b>=g,S=LG(O=>{const j=O.target,M=[...u.branches].some($=>$.contains(j));!C||M||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},p),E=FG(O=>{const j=O.target;[...u.branches].some($=>$.contains(j))||(o==null||o(O),a==null||a(O),O.defaultPrevented||s==null||s())},p);return RG(O=>{b===u.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},p),k.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(f0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),h0(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=f0)}},[c,p,n,u]),k.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),h0())},[c,u]),k.useEffect(()=>{const O=()=>d({});return document.addEventListener(_d,O),()=>document.removeEventListener(_d,O)},[]),T.jsx(zt.div,{...l,ref:m,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:hn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:hn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:hn(e.onPointerDownCapture,S.onPointerDownCapture)})});p0.displayName=DG;var NG="DismissableLayerBranch",jG=k.forwardRef((e,t)=>{const n=k.useContext(d0),r=k.useRef(null),i=In(t,r);return k.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(zt.div,{...e,ref:i})});jG.displayName=NG;function LG(e,t=globalThis==null?void 0:globalThis.document){const n=xn(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){m0(_G,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function FG(e,t=globalThis==null?void 0:globalThis.document){const n=xn(e),r=k.useRef(!1);return k.useEffect(()=>{const i=o=>{o.target&&!r.current&&m0(MG,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function h0(){const e=new CustomEvent(_d);document.dispatchEvent(e)}function m0(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?TM(i,o):i.dispatchEvent(o)}var Md="focusScope.autoFocusOnMount",Nd="focusScope.autoFocusOnUnmount",v0={bubbles:!1,cancelable:!0},BG="FocusScope",g0=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=k.useState(null),u=xn(i),c=xn(o),f=k.useRef(null),p=In(t,h=>l(h)),d=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:jn(f.current,{select:!0})},y=function(w){if(d.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||jn(f.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&jn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(g);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[r,s,d.paused]),k.useEffect(()=>{if(s){x0.add(d);const h=document.activeElement;if(!s.contains(h)){const g=new CustomEvent(Md,v0);s.addEventListener(Md,u),s.dispatchEvent(g),g.defaultPrevented||(zG(qG(y0(s)),{select:!0}),document.activeElement===h&&jn(s))}return()=>{s.removeEventListener(Md,u),setTimeout(()=>{const g=new CustomEvent(Nd,v0);s.addEventListener(Nd,c),s.dispatchEvent(g),g.defaultPrevented||jn(h??document.body,{select:!0}),s.removeEventListener(Nd,c),x0.remove(d)},0)}}},[s,u,c,d]);const m=k.useCallback(h=>{if(!n&&!r||d.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const b=h.currentTarget,[w,C]=WG(b);w&&C?!h.shiftKey&&g===C?(h.preventDefault(),n&&jn(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&jn(C,{select:!0})):g===b&&h.preventDefault()}},[n,r,d.paused]);return T.jsx(zt.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});g0.displayName=BG;function zG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(jn(r,{select:t}),document.activeElement!==n)return}function WG(e){const t=y0(e),n=b0(t,e),r=b0(t.reverse(),e);return[n,r]}function y0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function b0(e,t){for(const n of e)if(!UG(n,{upTo:t}))return n}function UG(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HG(e){return e instanceof HTMLInputElement&&"select"in e}function jn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&HG(e)&&t&&e.select()}}var x0=VG();function VG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=w0(e,t),e.unshift(t)},remove(t){var n;e=w0(e,t),(n=e[0])==null||n.resume()}}}function w0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qG(e){return e.filter(t=>t.tagName!=="A")}var jd=0;function KG(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??S0()),document.body.insertAdjacentElement("beforeend",e[1]??S0()),jd++,()=>{jd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jd--}},[])}function S0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $s="right-scroll-bar-position",Os="width-before-scroll-bar",GG="with-scroll-bars-hidden",YG="--removed-body-scroll-bar-size";function Ld(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XG(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var JG=typeof window<"u"?k.useLayoutEffect:k.useEffect,E0=new WeakMap;function QG(e,t){var n=XG(null,function(r){return e.forEach(function(i){return Ld(i,r)})});return JG(function(){var r=E0.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||Ld(s,null)}),o.forEach(function(s){i.has(s)||Ld(s,a)})}E0.set(n,e)},[e]),n}function ZG(e){return e}function eY(e,t){t===void 0&&(t=ZG);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function tY(e){e===void 0&&(e={});var t=eY(null);return t.options=Rt({async:!0,ssr:!1},e),t}var k0=function(e){var t=e.sideCar,n=yv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,Rt({},n))};k0.isSideCarExport=!0;function nY(e,t){return e.useMedium(t),k0}var C0=tY(),Fd=function(){},Is=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:Fd,onWheelCapture:Fd,onTouchMoveCapture:Fd}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,g=y===void 0?"div":y,b=e.gapMode,w=yv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,S=QG([n,t]),E=Rt(Rt({},w),i);return k.createElement(k.Fragment,null,c&&k.createElement(C,{sideCar:C0,removeScrollBar:u,shards:f,noIsolation:d,inert:m,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?k.cloneElement(k.Children.only(s),Rt(Rt({},E),{ref:S})):k.createElement(g,Rt({},E,{className:l,ref:S}),s))});Is.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Is.classNames={fullWidth:Os,zeroRight:$s};var rY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rY();return t&&e.setAttribute("nonce",t),e}function oY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function aY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=iY())&&(oY(t,n),aY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lY=function(){var e=sY();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},T0=function(){var e=lY(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},uY={left:0,top:0,right:0,gap:0},Bd=function(e){return parseInt(e||"",10)||0},cY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Bd(n),Bd(r),Bd(i)]},fY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uY;var t=cY(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dY=T0(),Kr="data-scroll-locked",pY=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
291
|
-
.`.concat(
|
|
317
|
+
`&&r++}}return[t,n]}class P0 extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(A0(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(A0(this),n)}}function JG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Gd(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Gd).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Gd(e.cause)}`:e.message:`${e}`}function A0(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var _0=e=>{throw TypeError(e)},Yd=(e,t,n)=>t.has(e)||_0("Cannot "+n),we=(e,t,n)=>(Yd(e,t,"read from private field"),n?n.call(e):t.get(e)),ct=(e,t,n)=>t.has(e)?_0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,r)=>(Yd(e,t,"write to private field"),t.set(e,n),n),Rn=(e,t,n)=>(Yd(e,t,"access private method"),n),Dt,yr,ai,qs,Ks,$o,si,To,Jn,li,ui,ci,Oo,ln,Xd,Jd,Zd,R0,Qd,ep,Io,tp,np;class Gs extends EventTarget{constructor(t,n){var r,i;super(),ct(this,ln),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ct(this,Dt),ct(this,yr),ct(this,ai),ct(this,qs),ct(this,Ks),ct(this,$o),ct(this,si),ct(this,To,null),ct(this,Jn),ct(this,li),ct(this,ui,null),ct(this,ci,null),ct(this,Oo,null),ct(this,Jd,async o=>{var a;we(this,li).reset();const{body:s,redirected:l,status:u,headers:c}=o;if(u===204){Rn(this,ln,Io).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?He(this,ai,new URL(o.url)):He(this,ai,void 0),u!==200){Rn(this,ln,Io).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){Rn(this,ln,Io).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(we(this,Dt)===this.CLOSED)return;He(this,Dt,this.OPEN);const f=new Event("open");if((a=we(this,Oo))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){Rn(this,ln,Io).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const p=new TextDecoder,d=s.getReader();let m=!0;do{const{done:h,value:g}=await d.read();g&&we(this,li).feed(p.decode(g,{stream:!h})),h&&(m=!1,we(this,li).reset(),Rn(this,ln,tp).call(this))}while(m)}),ct(this,Zd,o=>{He(this,Jn,void 0),!(o.name==="AbortError"||o.type==="aborted")&&Rn(this,ln,tp).call(this,Gd(o))}),ct(this,Qd,o=>{typeof o.id=="string"&&He(this,To,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:we(this,ai)?we(this,ai).origin:we(this,yr).origin,lastEventId:o.id||""});we(this,ci)&&(!o.event||o.event==="message")&&we(this,ci).call(this,a),this.dispatchEvent(a)}),ct(this,ep,o=>{He(this,$o,o)}),ct(this,np,()=>{He(this,si,void 0),we(this,Dt)===this.CONNECTING&&Rn(this,ln,Xd).call(this)});try{if(t instanceof URL)He(this,yr,t);else if(typeof t=="string")He(this,yr,new URL(t,ZG()));else throw new Error("Invalid URL")}catch{throw JG("An invalid or illegal string was specified")}He(this,li,YG({onEvent:we(this,Qd),onRetry:we(this,ep)})),He(this,Dt,this.CONNECTING),He(this,$o,3e3),He(this,Ks,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),He(this,qs,(i=n==null?void 0:n.withCredentials)!=null?i:!1),Rn(this,ln,Xd).call(this)}get readyState(){return we(this,Dt)}get url(){return we(this,yr).href}get withCredentials(){return we(this,qs)}get onerror(){return we(this,ui)}set onerror(t){He(this,ui,t)}get onmessage(){return we(this,ci)}set onmessage(t){He(this,ci,t)}get onopen(){return we(this,Oo)}set onopen(t){He(this,Oo,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){we(this,si)&&clearTimeout(we(this,si)),we(this,Dt)!==this.CLOSED&&(we(this,Jn)&&we(this,Jn).abort(),He(this,Dt,this.CLOSED),He(this,Jn,void 0))}}Dt=new WeakMap,yr=new WeakMap,ai=new WeakMap,qs=new WeakMap,Ks=new WeakMap,$o=new WeakMap,si=new WeakMap,To=new WeakMap,Jn=new WeakMap,li=new WeakMap,ui=new WeakMap,ci=new WeakMap,Oo=new WeakMap,ln=new WeakSet,Xd=function(){He(this,Dt,this.CONNECTING),He(this,Jn,new AbortController),we(this,Ks)(we(this,yr),Rn(this,ln,R0).call(this)).then(we(this,Jd)).catch(we(this,Zd))},Jd=new WeakMap,Zd=new WeakMap,R0=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...we(this,To)?{"Last-Event-ID":we(this,To)}:void 0},cache:"no-store",signal:(e=we(this,Jn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Qd=new WeakMap,ep=new WeakMap,Io=function(e,t){var n;we(this,Dt)!==this.CLOSED&&He(this,Dt,this.CLOSED);const r=new P0("error",{code:t,message:e});(n=we(this,ui))==null||n.call(this,r),this.dispatchEvent(r)},tp=function(e,t){var n;if(we(this,Dt)===this.CLOSED)return;He(this,Dt,this.CONNECTING);const r=new P0("error",{code:t,message:e});(n=we(this,ui))==null||n.call(this,r),this.dispatchEvent(r),He(this,si,setTimeout(we(this,np),we(this,$o)))},np=new WeakMap,Gs.CONNECTING=0,Gs.OPEN=1,Gs.CLOSED=2;function ZG(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function D0(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const QG=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var i;return(i=e[t])==null?void 0:i.delete(n)}},emit:(t,n)=>{var r,i;(r=e[t])==null||r.forEach(o=>o(n)),(i=e["*"])==null||i.forEach(o=>o({type:t,payload:n}))}}},Ge=e=>e.data,M0={throwOnError:!0},eY=({clientId:e,apiUrl:t})=>{const n=`${t||Fe.getConfig().baseUrl}/${e}`;Fe.interceptors.response._fns.length===0&&Fe.interceptors.response.use(D0);const r={...M0,baseUrl:n};return O0({...r,body:{}}).then(Ge)},tY=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},i=`${n||Fe.getConfig().baseUrl}/${t}`,o={...M0,baseUrl:i};return Fe.interceptors.response._fns.length===0&&Fe.interceptors.response.use(D0),{createConversation:()=>AG({...o,headers:r,body:{}}).then(Ge),getConversation:({conversationId:a})=>IG({...o,headers:r,path:{id:a}}).then(Ge),deleteConversation:({conversationId:a})=>OG({...o,headers:r,path:{id:a}}).then(Ge),listConversations:({nextToken:a})=>PG({...o,headers:r,query:{nextToken:a}}).then(Ge),listConversationMessages:({conversationId:a,nextToken:s})=>_G({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Ge),addParticipant:({conversationId:a,userId:s})=>DG({...o,headers:r,path:{id:a},body:{userId:s}}).then(Ge),removeParticipant:({conversationId:a,userId:s})=>MG({...o,headers:r,path:{id:a,userId:s}}).then(Ge),getParticipant:({conversationId:a,userId:s})=>NG({...o,headers:r,path:{id:a,userId:s}}).then(Ge),listParticipants:({conversationId:a,nextToken:s})=>RG({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Ge),createMessage:a=>BG({...o,headers:r,body:a}).then(Ge),updateMessage:({messageId:a,...s})=>FG({...o,headers:r,path:{id:a},body:s}).then(Ge),getMessage:({messageId:a})=>LG({...o,headers:r,path:{id:a}}).then(Ge),deleteMessage:({messageId:a})=>jG({...o,headers:r,path:{id:a}}).then(Ge),createFile:a=>GG({...o,headers:r,body:a}).then(Ge),createUser:a=>O0({...o,headers:r,body:a}).then(Ge),getUser:()=>HG({...o,headers:r}).then(Ge),updateUser:a=>VG({...o,headers:r,body:a}).then(Ge),deleteUser:()=>UG({...o,headers:r}).then(Ge),createEvent:a=>KG({...o,headers:r,body:a}).then(Ge),getEvent:({eventId:a})=>qG({...o,headers:r,path:{id:a}}).then(Ge),addMessageFeedback:({messageId:a,...s})=>WG({...o,headers:r,path:{id:a},body:s}).then(Ge),removeMessageFeedback:({messageId:a})=>zG({...o,headers:r,path:{id:a}}).then(Ge),listenConversation:({conversationId:a})=>{let s=0,l=null;const u=QG(),c=()=>{l&&l.close();const f=`${i}/conversations/${a}/listen`;l=new Gs(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>u.emit("open"),l.onerror=p=>{u.emit("error",p),s<10&&(s++,setTimeout(()=>c(),3e3))},l.onmessage=p=>{const d=nY(p.data);u.emit(d.type,d.data)}};return c(),u.on}}},nY=e=>{try{return JSON.parse(e)}catch{return e}};function N0({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const o=Bv(n,r),a=o(P=>P.conversationId),s=o(P=>P.user),l=o(P=>P.setConversationId),u=o(P=>P.setUser),c=ar(P=>P.messages),f=ar(P=>P.saveMessage),p=ar(P=>P.updateMessage),d=ar(P=>P.fetchMessages),m=ar(P=>P.setMessages),h=ar(P=>P.clearMessages),g=ar(P=>P.isFetching),v=aa(P=>P.participants),b=aa(P=>P.setParticipants),x=aa(P=>P.addParticipant),$=aa(P=>P.removeParticipant),[S,E]=I.useState("connecting"),{isTyping:O,setIsTyping:F}=lG(),D=I.useMemo(()=>zv(),[]),[T,M]=I.useState(i.conversationId),[H,B]=I.useState(i.user),[L,N]=I.useState(void 0),[W,X]=I.useState(!1),[V,_]=I.useState(void 0),y=I.useRef(!1);if(I.useEffect(()=>{_(void 0)},[i.conversationId,i.user,t,e]),Kv(async()=>{if(!t){_({type:"configuration",message:qp});return}if(!e||!e.startsWith("https://")){_({type:"configuration",message:Kp});return}async function P(){const w=i.user||s;let j=w,G=i.conversationId||a;const K=!!G;if(!j){const{key:ee,user:J}=await eY({clientId:t,apiUrl:e});j={userId:J.id,userToken:ee}}const Y=tY({userKey:j.userToken,clientId:t,apiUrl:e});if((!G||!w)&&(G=await j0(Y),X(!0)),K){const ee=await d({client:Y,conversationId:G});m(ee)}else h();const{participants:Q}=await Y.listParticipants({conversationId:G});b(Q),N(Y),M(G),l(G),B(j),u(j),E("connected")}try{if(y.current)return;y.current=!0,await P(),y.current=!1}catch(w){h(),_(Mo(w)),E("error")}},[i.user,i.conversationId]),I.useEffect(()=>{if(!L||!T)return;const P=L.listenConversation({conversationId:T}),w=[P("open",()=>{E("connected"),W&&(L.createEvent({conversationId:T,payload:{type:"conversation_started",data:{}}}),D.emit("conversation",T),X(!1))}),P("error",j=>{_(G=>G||Mo(j)),D.emit("error",new Error(`Connection to conversation lost: ${j.message}`)),E("error")}),P("message_created",j=>{const G=ia(j);(H==null?void 0:H.userId)!==G.authorId&&(F(!1),D.emit("isTyping",{isTyping:!1,timeout:0})),f(G),D.emit("message",G)}),P("message_status_changed",j=>{j.newStatus==="processing"&&(F(!0),D.emit("isTyping",{isTyping:!0,timeout:5e3}),p(j.message.metadata.clientMessageId,{status:j.newStatus}))}),P("participant_added",j=>{x(j.participant),D.emit("participantAdded",j.participant)}),P("participant_removed",j=>{$(j.participantId),D.emit("participantRemoved",j.participantId)}),P("webchat_visibility",j=>D.emit("webchatVisibility",j.visibility)),P("webchat_config",j=>D.emit("webchatConfig",j.config)),P("custom",j=>D.emit("customEvent",j.event))];return()=>{w.forEach(j=>j())}},[T,L]),V)return{clientState:"error",on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:g,participants:[],error:V};if(S==="connecting"||!H||!T||!L)return{clientState:"connecting",on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:g,participants:[]};const R={sendMessage:async P=>{const w=y0(),j={id:w,createdAt:new Date().toISOString(),userId:H.userId,conversationId:T,payload:P,metadata:{clientMessageId:w,delivered:!1}},G=ia(j);G.status="pending",f(G),await L.createMessage({conversationId:T,payload:P,metadata:{clientMessageId:w}}).catch(K=>D.emit("error",K))},sendEvent:async P=>{await L.createEvent({conversationId:T,payload:{type:"custom",data:P}})},uploadFile:async P=>{const{size:w,name:j}=P,K=await(ie=>new Promise((le,pe)=>{const ae=new FileReader;ae.onload=ve=>{var be;return le((be=ve.target)==null?void 0:be.result)},ae.onerror=ve=>{var be;return pe((be=ve.target)==null?void 0:be.error)},ae.readAsArrayBuffer(ie)}))(P),Y=new Date;Y.setDate(Y.getDate()+30);const{file:{uploadUrl:Q,contentType:ee,url:J}}=await L.createFile({size:w,key:j,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:Y.toISOString()});await fetch(Q,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":ee},body:K});const Z=ee.split("/").shift()??"",q=Vp(Z)?Z:"file";return{fileUrl:J,name:j,type:q}},addMessageFeedback:async(P,w)=>{p(P,{feedback:w.value}),await L.addMessageFeedback({messageId:P,...w})},getUser:async()=>{const{user:P}=await L.getUser();return P},updateUser:async P=>{const{user:w}=await L.updateUser({name:P.name,pictureUrl:P.pictureUrl,userData:P.data});return w}};return{clientState:S,on:D.on,client:R,messages:c,conversationId:T,newConversation:async()=>{try{h(),F(!1);const P=await j0(L);X(!0),M(P),l(P)}catch(P){_(Mo(P))}},user:s,isTyping:O,isFetchingMessages:g,participants:v,error:V}}const j0=async e=>{const{conversation:t}=await e.createConversation();return t.id},rY=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:u,client:c,isFetchingMessages:f,isTyping:p,newConversation:d,messages:m,participants:h,user:g,error:v}=N0({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:b,uploadFile:x,addMessageFeedback:$}=c??{};return C.jsx(x0,{configuration:n??{},user:g!=null&&g.userId?{id:g==null?void 0:g.userId}:void 0,isLoading:f||u==="connecting",isTyping:p,connected:u==="connected"?!0:u==="disconnected"?!1:void 0,messages:m,sendMessage:b,uploadFile:x,addMessageFeedback:$,allowFileUpload:r,restartConversation:d,participants:h,error:v,...s})};var rp=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(oY);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(ip,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(ip,{...r,ref:t,children:n})});rp.displayName="Slot";var ip=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=sY(n),o=aY(r,n.props);return n.type!==k.Fragment&&(o.ref=t?ic(t,i):i),k.cloneElement(n,o)}return k.Children.count(n)>1?k.Children.only(null):null});ip.displayName="SlotClone";var iY=({children:e})=>C.jsx(C.Fragment,{children:e});function oY(e){return k.isValidElement(e)&&e.type===iY}function aY(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function sY(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zn=lY.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?rp:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function uY(e,t){e&&xp.flushSync(()=>e.dispatchEvent(t))}function cY(e,t=globalThis==null?void 0:globalThis.document){const n=Mn(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var fY="DismissableLayer",op="dismissableLayer.update",dY="dismissableLayer.pointerDownOutside",pY="dismissableLayer.focusOutside",L0,F0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,u=k.useContext(F0),[c,f]=k.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=k.useState({}),m=Hn(t,O=>f(O)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),b=c?h.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,$=b>=v,S=vY(O=>{const F=O.target,D=[...u.branches].some(T=>T.contains(F));!$||D||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},p),E=gY(O=>{const F=O.target;[...u.branches].some(T=>T.contains(F))||(o==null||o(O),a==null||a(O),O.defaultPrevented||s==null||s())},p);return cY(O=>{b===u.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},p),k.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(L0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),z0(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=L0)}},[c,p,n,u]),k.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),z0())},[c,u]),k.useEffect(()=>{const O=()=>d({});return document.addEventListener(op,O),()=>document.removeEventListener(op,O)},[]),C.jsx(Zn.div,{...l,ref:m,style:{pointerEvents:x?$?"auto":"none":void 0,...e.style},onFocusCapture:On(e.onFocusCapture,E.onFocusCapture),onBlurCapture:On(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:On(e.onPointerDownCapture,S.onPointerDownCapture)})});B0.displayName=fY;var hY="DismissableLayerBranch",mY=k.forwardRef((e,t)=>{const n=k.useContext(F0),r=k.useRef(null),i=Hn(t,r);return k.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),C.jsx(Zn.div,{...e,ref:i})});mY.displayName=hY;function vY(e,t=globalThis==null?void 0:globalThis.document){const n=Mn(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){W0(dY,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gY(e,t=globalThis==null?void 0:globalThis.document){const n=Mn(e),r=k.useRef(!1);return k.useEffect(()=>{const i=o=>{o.target&&!r.current&&W0(pY,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function z0(){const e=new CustomEvent(op);document.dispatchEvent(e)}function W0(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?uY(i,o):i.dispatchEvent(o)}var ap="focusScope.autoFocusOnMount",sp="focusScope.autoFocusOnUnmount",U0={bubbles:!1,cancelable:!0},yY="FocusScope",H0=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=k.useState(null),u=Mn(i),c=Mn(o),f=k.useRef(null),p=Hn(t,h=>l(h)),d=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let h=function(x){if(d.paused||!s)return;const $=x.target;s.contains($)?f.current=$:Qn(f.current,{select:!0})},g=function(x){if(d.paused||!s)return;const $=x.relatedTarget;$!==null&&(s.contains($)||Qn(f.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Qn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),k.useEffect(()=>{if(s){K0.add(d);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(ap,U0);s.addEventListener(ap,u),s.dispatchEvent(v),v.defaultPrevented||(bY(kY(V0(s)),{select:!0}),document.activeElement===h&&Qn(s))}return()=>{s.removeEventListener(ap,u),setTimeout(()=>{const v=new CustomEvent(sp,U0);s.addEventListener(sp,c),s.dispatchEvent(v),v.defaultPrevented||Qn(h??document.body,{select:!0}),s.removeEventListener(sp,c),K0.remove(d)},0)}}},[s,u,c,d]);const m=k.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(g&&v){const b=h.currentTarget,[x,$]=xY(b);x&&$?!h.shiftKey&&v===$?(h.preventDefault(),n&&Qn(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),n&&Qn($,{select:!0})):v===b&&h.preventDefault()}},[n,r,d.paused]);return C.jsx(Zn.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});H0.displayName=yY;function bY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qn(r,{select:t}),document.activeElement!==n)return}function xY(e){const t=V0(e),n=q0(t,e),r=q0(t.reverse(),e);return[n,r]}function V0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function q0(e,t){for(const n of e)if(!wY(n,{upTo:t}))return n}function wY(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function SY(e){return e instanceof HTMLInputElement&&"select"in e}function Qn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&SY(e)&&t&&e.select()}}var K0=EY();function EY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=G0(e,t),e.unshift(t)},remove(t){var n;e=G0(e,t),(n=e[0])==null||n.resume()}}}function G0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kY(e){return e.filter(t=>t.tagName!=="A")}var lp=0;function CY(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Y0()),document.body.insertAdjacentElement("beforeend",e[1]??Y0()),lp++,()=>{lp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lp--}},[])}function Y0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ys="right-scroll-bar-position",Xs="width-before-scroll-bar",$Y="with-scroll-bars-hidden",TY="--removed-body-scroll-bar-size";function up(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function OY(e,t){var n=I.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var IY=typeof window<"u"?k.useLayoutEffect:k.useEffect,X0=new WeakMap;function PY(e,t){var n=OY(null,function(r){return e.forEach(function(i){return up(i,r)})});return IY(function(){var r=X0.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||up(s,null)}),o.forEach(function(s){i.has(s)||up(s,a)})}X0.set(n,e)},[e]),n}function AY(e){return e}function _Y(e,t){t===void 0&&(t=AY);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function RY(e){e===void 0&&(e={});var t=_Y(null);return t.options=Vt({async:!0,ssr:!1},e),t}var J0=function(e){var t=e.sideCar,n=Vv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,Vt({},n))};J0.isSideCarExport=!0;function DY(e,t){return e.useMedium(t),J0}var Z0=RY(),cp=function(){},Js=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:cp,onWheelCapture:cp,onTouchMoveCapture:cp}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,m=e.inert,h=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,b=e.gapMode,x=Vv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),$=p,S=PY([n,t]),E=Vt(Vt({},x),i);return k.createElement(k.Fragment,null,c&&k.createElement($,{sideCar:Z0,removeScrollBar:u,shards:f,noIsolation:d,inert:m,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?k.cloneElement(k.Children.only(s),Vt(Vt({},E),{ref:S})):k.createElement(v,Vt({},E,{className:l,ref:S}),s))});Js.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Js.classNames={fullWidth:Xs,zeroRight:Ys};var MY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=MY();return t&&e.setAttribute("nonce",t),e}function jY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function LY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=NY())&&(jY(t,n),LY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},BY=function(){var e=FY();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Q0=function(){var e=BY(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},zY={left:0,top:0,right:0,gap:0},fp=function(e){return parseInt(e||"",10)||0},WY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[fp(n),fp(r),fp(i)]},UY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zY;var t=WY(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},HY=Q0(),fi="data-scroll-locked",VY=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
318
|
+
.`.concat($Y,` {
|
|
292
319
|
overflow: hidden `).concat(r,`;
|
|
293
320
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
294
321
|
}
|
|
295
|
-
body[`).concat(
|
|
322
|
+
body[`).concat(fi,`] {
|
|
296
323
|
overflow: hidden `).concat(r,`;
|
|
297
324
|
overscroll-behavior: contain;
|
|
298
325
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -305,30 +332,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
305
332
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
306
333
|
}
|
|
307
334
|
|
|
308
|
-
.`).concat(
|
|
335
|
+
.`).concat(Ys,` {
|
|
309
336
|
right: `).concat(s,"px ").concat(r,`;
|
|
310
337
|
}
|
|
311
338
|
|
|
312
|
-
.`).concat(
|
|
339
|
+
.`).concat(Xs,` {
|
|
313
340
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
314
341
|
}
|
|
315
342
|
|
|
316
|
-
.`).concat(
|
|
343
|
+
.`).concat(Ys," .").concat(Ys,` {
|
|
317
344
|
right: 0 `).concat(r,`;
|
|
318
345
|
}
|
|
319
346
|
|
|
320
|
-
.`).concat(
|
|
347
|
+
.`).concat(Xs," .").concat(Xs,` {
|
|
321
348
|
margin-right: 0 `).concat(r,`;
|
|
322
349
|
}
|
|
323
350
|
|
|
324
|
-
body[`).concat(
|
|
325
|
-
`).concat(
|
|
351
|
+
body[`).concat(fi,`] {
|
|
352
|
+
`).concat(TY,": ").concat(s,`px;
|
|
326
353
|
}
|
|
327
|
-
`)}
|
|
354
|
+
`)},eE=function(){var e=parseInt(document.body.getAttribute(fi)||"0",10);return isFinite(e)?e:0},qY=function(){k.useEffect(function(){return document.body.setAttribute(fi,(eE()+1).toString()),function(){var e=eE()-1;e<=0?document.body.removeAttribute(fi):document.body.setAttribute(fi,e.toString())}},[])},KY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;qY();var o=k.useMemo(function(){return UY(i)},[i]);return k.createElement(HY,{styles:VY(o,!t,i,n?"":"!important")})},dp=!1;if(typeof window<"u")try{var Zs=Object.defineProperty({},"passive",{get:function(){return dp=!0,!0}});window.addEventListener("test",Zs,Zs),window.removeEventListener("test",Zs,Zs)}catch{dp=!1}var di=dp?{passive:!1}:!1,GY=function(e){return e.tagName==="TEXTAREA"},tE=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!GY(e)&&n[t]==="visible")},YY=function(e){return tE(e,"overflowY")},XY=function(e){return tE(e,"overflowX")},nE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=rE(e,r);if(i){var o=iE(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},JY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ZY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rE=function(e,t){return e==="v"?YY(t):XY(t)},iE=function(e,t){return e==="v"?JY(t):ZY(t)},QY=function(e,t){return e==="h"&&t==="rtl"?-1:1},eX=function(e,t,n,r,i){var o=QY(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,c=a>0,f=0,p=0;do{var d=iE(e,s),m=d[0],h=d[1],g=d[2],v=h-g-o*m;(m||v)&&rE(e,s)&&(f+=v,p+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(p)<1||!i))&&(u=!0),u},Qs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oE=function(e){return[e.deltaX,e.deltaY]},aE=function(e){return e&&"current"in e?e.current:e},tX=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nX=function(e){return`
|
|
328
355
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
329
356
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
330
|
-
`)},
|
|
357
|
+
`)},rX=0,pi=[];function iX(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),i=k.useState(rX++)[0],o=k.useState(Q0)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=du([e.lockRef.current],(e.shards||[]).map(aE),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var v=Qs(h),b=n.current,x="deltaX"in h?h.deltaX:b[0]-v[0],$="deltaY"in h?h.deltaY:b[1]-v[1],S,E=h.target,O=Math.abs(x)>Math.abs($)?"h":"v";if("touches"in h&&O==="h"&&E.type==="range")return!1;var F=nE(O,E);if(!F)return!0;if(F?S=O:(S=O==="v"?"h":"v",F=nE(O,E)),!F)return!1;if(!r.current&&"changedTouches"in h&&(x||$)&&(r.current=S),!S)return!0;var D=r.current||S;return eX(D,g,h,D==="h"?x:$,!0)},[]),l=k.useCallback(function(h){var g=h;if(!(!pi.length||pi[pi.length-1]!==o)){var v="deltaY"in g?oE(g):Qs(g),b=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&tX(S.delta,v)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(a.current.shards||[]).map(aE).filter(Boolean).filter(function(S){return S.contains(g.target)}),$=x.length>0?s(g,x[0]):!a.current.noIsolation;$&&g.cancelable&&g.preventDefault()}}},[]),u=k.useCallback(function(h,g,v,b){var x={name:h,delta:g,target:v,should:b,shadowParent:oX(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function($){return $!==x})},1)},[]),c=k.useCallback(function(h){n.current=Qs(h),r.current=void 0},[]),f=k.useCallback(function(h){u(h.type,oE(h),h.target,s(h,e.lockRef.current))},[]),p=k.useCallback(function(h){u(h.type,Qs(h),h.target,s(h,e.lockRef.current))},[]);k.useEffect(function(){return pi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,di),document.addEventListener("touchmove",l,di),document.addEventListener("touchstart",c,di),function(){pi=pi.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,di),document.removeEventListener("touchmove",l,di),document.removeEventListener("touchstart",c,di)}},[]);var d=e.removeScrollBar,m=e.inert;return k.createElement(k.Fragment,null,m?k.createElement(o,{styles:nX(i)}):null,d?k.createElement(KY,{gapMode:e.gapMode}):null)}function oX(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aX=DY(Z0,iX);var sE=k.forwardRef(function(e,t){return k.createElement(Js,Vt({},e,{ref:t,sideCar:aX}))});sE.classNames=Js.classNames;var sX=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hi=new WeakMap,el=new WeakMap,tl={},pp=0,lE=function(e){return e&&(e.host||lE(e.parentNode))},lX=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=lE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uX=function(e,t,n,r){var i=lX(t,Array.isArray(e)?e:[e]);tl[n]||(tl[n]=new WeakMap);var o=tl[n],a=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",h=(hi.get(p)||0)+1,g=(o.get(p)||0)+1;hi.set(p,h),o.set(p,g),a.push(p),h===1&&m&&el.set(p,!0),g===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),s.clear(),pp++,function(){a.forEach(function(f){var p=hi.get(f)-1,d=o.get(f)-1;hi.set(f,p),o.set(f,d),p||(el.has(f)||f.removeAttribute(r),el.delete(f)),d||f.removeAttribute(n)}),pp--,pp||(hi=new WeakMap,hi=new WeakMap,el=new WeakMap,tl={})}},cX=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=sX(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),uX(r,i,n,"aria-hidden")):function(){return null}},hp="Dialog",[uE,MJ]=Xy(hp),[fX,En]=uE(hp),cE=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=k.useRef(null),l=k.useRef(null),[u=!1,c]=Jy({prop:r,defaultProp:i,onChange:o});return C.jsx(fX,{scope:t,triggerRef:s,contentRef:l,contentId:za(),titleId:za(),descriptionId:za(),open:u,onOpenChange:c,onOpenToggle:k.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};cE.displayName=hp;var fE="DialogTrigger",dE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=En(fE,n),o=Hn(t,i.triggerRef);return C.jsx(Zn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vp(i.open),...r,ref:o,onClick:On(e.onClick,i.onOpenToggle)})});dE.displayName=fE;var dX="DialogPortal",[NJ,pE]=uE(dX,{forceMount:void 0}),nl="DialogOverlay",hE=k.forwardRef((e,t)=>{const n=pE(nl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=En(nl,e.__scopeDialog);return o.modal?C.jsx(Fa,{present:r||o.open,children:C.jsx(pX,{...i,ref:t})}):null});hE.displayName=nl;var pX=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=En(nl,n);return C.jsx(sE,{as:rp,allowPinchZoom:!0,shards:[i.contentRef],children:C.jsx(Zn.div,{"data-state":vp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),br="DialogContent",mE=k.forwardRef((e,t)=>{const n=pE(br,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=En(br,e.__scopeDialog);return C.jsx(Fa,{present:r||o.open,children:o.modal?C.jsx(hX,{...i,ref:t}):C.jsx(mX,{...i,ref:t})})});mE.displayName=br;var hX=k.forwardRef((e,t)=>{const n=En(br,e.__scopeDialog),r=k.useRef(null),i=Hn(t,n.contentRef,r);return k.useEffect(()=>{const o=r.current;if(o)return cX(o)},[]),C.jsx(vE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:On(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:On(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:On(e.onFocusOutside,o=>o.preventDefault())})}),mX=k.forwardRef((e,t)=>{const n=En(br,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return C.jsx(vE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),vE=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=En(br,n),l=k.useRef(null),u=Hn(t,l);return CY(),C.jsxs(C.Fragment,{children:[C.jsx(H0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:C.jsx(B0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":vp(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(vX,{titleId:s.titleId}),C.jsx(yX,{contentRef:l,descriptionId:s.descriptionId})]})]})}),mp="DialogTitle",gE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=En(mp,n);return C.jsx(Zn.h2,{id:i.titleId,...r,ref:t})});gE.displayName=mp;var yE="DialogDescription",bE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=En(yE,n);return C.jsx(Zn.p,{id:i.descriptionId,...r,ref:t})});bE.displayName=yE;var xE="DialogClose",wE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=En(xE,n);return C.jsx(Zn.button,{type:"button",...r,ref:t,onClick:On(e.onClick,()=>i.onOpenChange(!1))})});wE.displayName=xE;function vp(e){return e?"open":"closed"}var SE="DialogTitleWarning",[jJ,EE]=VM(SE,{contentName:br,titleName:mp,docsSlug:"dialog"}),vX=({titleId:e})=>{const t=EE(SE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
331
358
|
|
|
332
359
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
333
360
|
|
|
334
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
361
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gX="DialogDescriptionWarning",yX=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${EE(gX).contentName}}.`;return k.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bX=cE,xX=dE,wX=hE,SX=mE,EX=gE,kX=bE,CX=wE;function mi({open:e,onOpenChange:t,children:n}){const{modal:r}=Se;return C.jsxs(bX,{open:e,onOpenChange:t,children:[C.jsx(wX,{...r==null?void 0:r.overlay}),n]})}function $X({children:e,title:t,description:n,confirmButton:r,onConfirm:i,cancelButton:o,hideModal:a}){const{modal:s}=Se;return C.jsx(C.Fragment,{children:C.jsxs(SX,{...s.dialog.container,children:[C.jsx(EX,{...s.dialog.title,children:t}),C.jsx(kX,{...s.dialog.description,children:n}),C.jsx("div",{...s.dialog.content.container,children:e}),C.jsxs("div",{...s.dialog.button.container,children:[C.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:i,children:r}),C.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:a,children:o})]})]})})}mi.Button=xX,mi.Close=CX,mi.Content=$X,ce.Avatar=No,ce.BOT_IS_BLOCKED=Xp,ce.Block=lr,ce.CONFIG_ACCESS_DENIED=wk,ce.Chat=x0,ce.Composer=my,ce.Container=rc,ce.ErrorState=b0,ce.Fab=Yy,ce.Header=ib,ce.INVALID_API_URL=Kp,ce.INVALID_BOTPRESS_URL=Yp,ce.INVALID_CLIENT_ID=Gp,ce.INVALID_CONFIGURATION=xk,ce.INVALID_CONFIG_URL=bk,ce.INVALID_MESSAGE_CONTENT_TYPE=th,ce.MISSING_API_URL=vk,ce.MISSING_BOT_ID=gk,ce.MISSING_CLIENT_ID=qp,ce.MISSING_CONFIG_URL=yk,ce.Message=pc,ce.MessageList=Vd,ce.Modal=mi,ce.ModalProvider=nc,ce.NETWORK_ERROR=Qp,ce.NOT_A_PARTICIPANT=Zp,ce.QUOTA_EXCEEDED=Jp,ce.RestartConversationButton=fc,ce.SSE_DISCONNECTED_ERROR=eh,ce.StylesheetProvider=Ky,ce.TypingIndicator=dc,ce.Webchat=rY,ce.commonApiErrorMap=pl,ce.enrichMessage=Fp,ce.fileTypes=Hp,ce.generateThemeStylesheet=Up,ce.getUseWebchatClientStore=Bv,ce.handleIntegrationError=Mo,ce.integrationMessagePayloadToBlockPayload=Av,ce.integrationMessageToBlockMessage=ia,ce.isCommonApiErrorType=rh,ce.isEventError=oh,ce.isFileType=Vp,ce.isIntegrationError=ih,ce.isWebhookHandlerErrorType=nh,ce.renderers=ay,ce.useWebchat=N0,ce.useWebchatStore=oa,ce.webchatClasses=Se,ce.webhookHandlerErrorMap=dl,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});
|