@botpress/webchat 3.2.10 → 3.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(se,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],E):(se=typeof globalThis<"u"?globalThis:se||self,E(se.Webchat={},se.ReactJsxRuntime,se.React,se.ReactDOM))})(this,function(se,E,I,tp){"use strict";var yQ=Object.defineProperty;var bQ=(se,E,I)=>E in se?yQ(se,E,{enumerable:!0,configurable:!0,writable:!0,value:I}):se[E]=I;var Ms=(se,E,I)=>bQ(se,typeof E!="symbol"?E+"":E,I);var Ns=typeof document<"u"?document.currentScript:null;function np(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 C=np(I),rp=np(tp);function mE(e,t=[]){let n=[];function r(i,a){const s=C.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:d,...v}=f,h=(p==null?void 0:p[e][l])||s,g=C.useMemo(()=>v,Object.values(v));return E.jsx(h.Provider,{value:g,children:d})}function u(f,p){const d=(p==null?void 0:p[e][l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,gE(o,...t)]}function gE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function bn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ir=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function yE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bE(...e){return t=>e.forEach(n=>yE(n,t))}var op=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(SE);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(Rs,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(Rs,{...r,ref:t,children:n})});op.displayName="Slot";var Rs=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=EE(n);return C.cloneElement(n,{...xE(r,n.props),ref:t?bE(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});Rs.displayName="SlotClone";var wE=({children:e})=>E.jsx(E.Fragment,{children:e});function SE(e){return C.isValidElement(e)&&e.type===wE}function xE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function EE(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ls=kE.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?op:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Fs="Avatar",[CE,wQ]=mE(Fs),[AE,ip]=CE(Fs),Bs=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=C.useState("idle");return E.jsx(AE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:E.jsx(Ls.span,{...r,ref:t})})});Bs.displayName=Fs;var ap="AvatarImage",js=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=ip(ap,n),s=$E(r),l=bn(c=>{o(c),a.onImageLoadingStatusChange(c)});return ir(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?E.jsx(Ls.img,{...i,ref:t,src:r}):null});js.displayName=ap;var sp="AvatarFallback",zs=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=ip(sp,n),[a,s]=C.useState(r===void 0);return C.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&i.imageLoadingStatus!=="loaded"?E.jsx(Ls.span,{...o,ref:t}):null});zs.displayName=sp;function $E(e){const[t,n]=C.useState("idle");return ir(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function lp(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;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 o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var up={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",c="day",u="week",f="month",p="quarter",d="year",v="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+)?$/,m=/\[([^\]]+)]|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(F){var D=["th","st","nd","rd"],M=F%100;return"["+F+(D[(M-20)%10]||D[M]||D[0])+"]"}},w=function(F,D,M){var G=String(F);return!G||G.length>=D?F:""+Array(D+1-G.length).join(M)+F},A={s:w,z:function(F){var D=-F.utcOffset(),M=Math.abs(D),G=Math.floor(M/60),z=M%60;return(D<=0?"+":"-")+w(G,2,"0")+":"+w(z,2,"0")},m:function F(D,M){if(D.date()<M.date())return-F(M,D);var G=12*(M.year()-D.year())+(M.month()-D.month()),z=D.clone().add(G,f),O=M-z<0,y=D.clone().add(G+(O?-1:1),f);return+(-(G+(M-z)/(O?z-y:y-z))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:d,w:u,d:c,D:v,h:l,m:s,s:a,ms:i,Q:p}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},x="en",k={};k[x]=b;var $="$isDayjsObject",R=function(F){return F instanceof L||!(!F||!F[$])},W=function F(D,M,G){var z;if(!D)return x;if(typeof D=="string"){var O=D.toLowerCase();k[O]&&(z=O),M&&(k[O]=M,z=O);var y=D.split("-");if(!z&&y.length>1)return F(y[0])}else{var P=D.name;k[P]=D,z=P}return!G&&z&&(x=z),z||!G&&x},T=function(F,D){if(R(F))return F.clone();var M=typeof D=="object"?D:{};return M.date=F,M.args=arguments,new L(M)},_=A;_.l=W,_.i=R,_.w=function(F,D){return T(F,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var L=function(){function F(M){this.$L=W(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[$]=!0}var D=F.prototype;return D.parse=function(M){this.$d=function(G){var z=G.date,O=G.utc;if(z===null)return new Date(NaN);if(_.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var y=z.match(g);if(y){var P=y[2]-1||0,B=(y[7]||"0").substring(0,3);return O?new Date(Date.UTC(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,B)):new Date(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,B)}}return new Date(z)}(M),this.init()},D.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},D.$utils=function(){return _},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(M,G){var z=T(M);return this.startOf(G)<=z&&z<=this.endOf(G)},D.isAfter=function(M,G){return T(M)<this.startOf(G)},D.isBefore=function(M,G){return this.endOf(G)<T(M)},D.$g=function(M,G,z){return _.u(M)?this[G]:this.set(z,M)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(M,G){var z=this,O=!!_.u(G)||G,y=_.p(M),P=function(te,J){var X=_.w(z.$u?Date.UTC(z.$y,J,te):new Date(z.$y,J,te),z);return O?X:X.endOf(c)},B=function(te,J){return _.w(z.toDate()[te].apply(z.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(J)),z)},S=this.$W,H=this.$M,Y=this.$D,q="set"+(this.$u?"UTC":"");switch(y){case d:return O?P(1,0):P(31,11);case f:return O?P(1,H):P(0,H+1);case u:var Q=this.$locale().weekStart||0,ee=(S<Q?S+7:S)-Q;return P(O?Y-ee:Y+(6-ee),H);case c:case v:return B(q+"Hours",0);case l:return B(q+"Minutes",1);case s:return B(q+"Seconds",2);case a:return B(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(M){return this.startOf(M,!1)},D.$set=function(M,G){var z,O=_.p(M),y="set"+(this.$u?"UTC":""),P=(z={},z[c]=y+"Date",z[v]=y+"Date",z[f]=y+"Month",z[d]=y+"FullYear",z[l]=y+"Hours",z[s]=y+"Minutes",z[a]=y+"Seconds",z[i]=y+"Milliseconds",z)[O],B=O===c?this.$D+(G-this.$W):G;if(O===f||O===d){var S=this.clone().set(v,1);S.$d[P](B),S.init(),this.$d=S.set(v,Math.min(this.$D,S.daysInMonth())).$d}else P&&this.$d[P](B);return this.init(),this},D.set=function(M,G){return this.clone().$set(M,G)},D.get=function(M){return this[_.p(M)]()},D.add=function(M,G){var z,O=this;M=Number(M);var y=_.p(G),P=function(H){var Y=T(O);return _.w(Y.date(Y.date()+Math.round(H*M)),O)};if(y===f)return this.set(f,this.$M+M);if(y===d)return this.set(d,this.$y+M);if(y===c)return P(1);if(y===u)return P(7);var B=(z={},z[s]=r,z[l]=o,z[a]=n,z)[y]||1,S=this.$d.getTime()+M*B;return _.w(S,this)},D.subtract=function(M,G){return this.add(-1*M,G)},D.format=function(M){var G=this,z=this.$locale();if(!this.isValid())return z.invalidDate||h;var O=M||"YYYY-MM-DDTHH:mm:ssZ",y=_.z(this),P=this.$H,B=this.$m,S=this.$M,H=z.weekdays,Y=z.months,q=z.meridiem,Q=function(J,X,K,oe){return J&&(J[X]||J(G,O))||K[X].slice(0,oe)},ee=function(J){return _.s(P%12||12,J,"0")},te=q||function(J,X,K){var oe=J<12?"AM":"PM";return K?oe.toLowerCase():oe};return O.replace(m,function(J,X){return X||function(K){switch(K){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return S+1;case"MM":return _.s(S+1,2,"0");case"MMM":return Q(z.monthsShort,S,Y,3);case"MMMM":return Q(Y,S);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Q(z.weekdaysMin,G.$W,H,2);case"ddd":return Q(z.weekdaysShort,G.$W,H,3);case"dddd":return H[G.$W];case"H":return String(P);case"HH":return _.s(P,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return te(P,B,!0);case"A":return te(P,B,!1);case"m":return String(B);case"mm":return _.s(B,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return y}return null}(J)||y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(M,G,z){var O,y=this,P=_.p(G),B=T(M),S=(B.utcOffset()-this.utcOffset())*r,H=this-B,Y=function(){return _.m(y,B)};switch(P){case d:O=Y()/12;break;case f:O=Y();break;case p:O=Y()/3;break;case u:O=(H-S)/6048e5;break;case c:O=(H-S)/864e5;break;case l:O=H/o;break;case s:O=H/r;break;case a:O=H/n;break;default:O=H}return z?O:_.a(O)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return k[this.$L]},D.locale=function(M,G){if(!M)return this.$L;var z=this.clone(),O=W(M,G,!0);return O&&(z.$L=O),z},D.clone=function(){return _.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},F}(),N=L.prototype;return T.prototype=N,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",d],["$D",v]].forEach(function(F){N[F[1]]=function(D){return this.$g(D,F[0],F[1])}}),T.extend=function(F,D){return F.$i||(F(D,L,T),F.$i=!0),T},T.locale=W,T.isDayjs=R,T.unix=function(F){return T(1e3*F)},T.en=k[x],T.Ls=k,T.p={},T})})(up);var TE=up.exports;const di=be(TE);var fp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(fp);var IE=fp.exports;const OE=be(IE);var dp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(dp);var PE=dp.exports;const DE=be(PE);di.extend(OE),di.extend(DE);function pp(e,t,n,r,o){return e.map(i=>{const{authorId:a}=i,s=a===n?"outgoing":"incoming",l=t.find(u=>u.id===a);let c;return l&&l.id===n?c={name:l.name||"You",avatar:l.pictureUrl}:l?c={name:l.name||"Agent",avatar:l.pictureUrl}:c={name:r||"Bot",avatar:o},{...i,direction:s,sender:c}})}function _E(e,t="day"){var r,o,i;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(hp(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(o=e[a])==null?void 0:o.timestamp,l=(i=e[a+1])==null?void 0:i.timestamp;!di(s).isSame(l,t)&&l&&n.push(hp(l))}return n}function hp(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=di(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 ME(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 NE(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function RE(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function LE(e,t){return e.map(n=>Math.round(n*t))}const Xr=e=>t=>RE(t,e),eo=e=>t=>LE(t,e),FE={50:Xr(.95),100:Xr(.9),200:Xr(.75),300:Xr(.6),400:Xr(.3),500:e=>e,600:eo(.9),700:eo(.6),800:eo(.45),900:eo(.3),950:eo(.2)};function mp(e,t=FE){const n={},r=ME(e);for(const[o,i]of Object.entries(t))n[o]=NE(i(r));return n}const gp=()=>{const e={};return{on:(o,i)=>{var a;return e[o]||(e[o]=new Set),(a=e[o])==null||a.add(i),()=>{var s;return(s=e[o])==null?void 0:s.delete(i)}},emit:(o,i)=>{var a,s;(a=e[o])==null||a.forEach(l=>l(i)),(s=e["*"])==null||s.forEach(l=>l({type:o,payload:i}))},removeAllListeners:o=>{var i;o?(i=e[o])==null||i.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}};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 o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function BE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const jE=(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 yp(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const zE=2.4,UE=.2126729,WE=.7151522,HE=.072175,VE=.56,KE=.57,qE=.62,GE=.65,pi=.022,bp=1.414,YE=1.14,QE=1.14,JE=.035991,ZE=.035991,XE=27.7847239587675,ek=27.7847239587675,wp=.027,Sp=.027,xp=.001,tk=5e-4;function Ep(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**zE;return UE*o(t)+WE*o(n)+HE*o(r)}function kp(e,t){if(!e||!t)return 0;let n=Ep(Us(e)),r=Ep(Us(t)),o=0,i=0;return n=n>pi?n:n+(pi-n)**bp,r=r>pi?r:r+(pi-r)**bp,Math.abs(r-n)<tk?0:(r>n?(o=(r**VE-n**KE)*YE,i=o<xp?0:o<JE?o-o*XE*wp:o-wp):(o=(r**GE-n**qE)*QE,i=o>-xp?0:o>-ZE?o-o*ek*Sp:o+Sp),Math.abs(i*100))}function Cp(e){const{fontFamily:t,...n}=e,r=Ap(n);return lp(":root",r)+lp(".bpReset",{"font-family":`'${t}', sans-serif`})}function Ap(e){const{radius:t,themeMode:n,color:r,variant:o,headerVariant:i}=e;let a={},s={};if(r){const p=mp(r),d=n==="dark"?yp(p):p,v=mp(BE(jE(Us(r)))),h=n==="dark"?yp(v):v,g=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:g}).reduce((b,[w,A])=>({...b,[`--bpPrimary-${w}`]:A}),{});const m=Object.entries({...h,1:g}).reduce((b,[w,A])=>({...b,[`--bpGray-${w}`]:A}),{});a={...s,...m}}t&&(a={...a,"--bpRadius-scale":t.toString()});const l=n==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=s?kp(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",u=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":s?kp(s["--bpPrimary-500"],s["--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)"},f=i==="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":l.bg,"--header-bg-hover":l.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{...a,...u,...f}}const nk=(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 o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))}),$p=["audio","file","image","video"],Tp=e=>$p.includes(e),Ip="The Client ID is required to initialize the webchat.",rk="The API url is required to initialize the webchat.",ok="The Bot ID is required to initialize the webchat.",ik="No config URL provided.",Op=`Invalid API URL.
1
+ (function(le,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],E):(le=typeof globalThis<"u"?globalThis:le||self,E(le.Webchat={},le.ReactJsxRuntime,le.React,le.ReactDOM))})(this,function(le,E,I,tp){"use strict";var gQ=Object.defineProperty;var yQ=(le,E,I)=>E in le?gQ(le,E,{enumerable:!0,configurable:!0,writable:!0,value:I}):le[E]=I;var Ms=(le,E,I)=>yQ(le,typeof E!="symbol"?E+"":E,I);var Ns=typeof document<"u"?document.currentScript:null;function np(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 C=np(I),rp=np(tp);function mE(e,t=[]){let n=[];function r(i,a){const s=C.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:d,...v}=f,h=(p==null?void 0:p[e][l])||s,g=C.useMemo(()=>v,Object.values(v));return E.jsx(h.Provider,{value:g,children:d})}function u(f,p){const d=(p==null?void 0:p[e][l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,gE(o,...t)]}function gE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function bn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ir=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function yE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bE(...e){return t=>e.forEach(n=>yE(n,t))}var op=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(SE);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(Rs,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(Rs,{...r,ref:t,children:n})});op.displayName="Slot";var Rs=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=EE(n);return C.cloneElement(n,{...xE(r,n.props),ref:t?bE(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});Rs.displayName="SlotClone";var wE=({children:e})=>E.jsx(E.Fragment,{children:e});function SE(e){return C.isValidElement(e)&&e.type===wE}function xE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function EE(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ls=kE.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?op:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Fs="Avatar",[CE,bQ]=mE(Fs),[AE,ip]=CE(Fs),Bs=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=C.useState("idle");return E.jsx(AE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:E.jsx(Ls.span,{...r,ref:t})})});Bs.displayName=Fs;var ap="AvatarImage",js=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=ip(ap,n),s=$E(r),l=bn(c=>{o(c),a.onImageLoadingStatusChange(c)});return ir(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?E.jsx(Ls.img,{...i,ref:t,src:r}):null});js.displayName=ap;var sp="AvatarFallback",zs=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=ip(sp,n),[a,s]=C.useState(r===void 0);return C.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&i.imageLoadingStatus!=="loaded"?E.jsx(Ls.span,{...o,ref:t}):null});zs.displayName=sp;function $E(e){const[t,n]=C.useState("idle");return ir(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function lp(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;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 o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var up={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",c="day",u="week",f="month",p="quarter",d="year",v="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+)?$/,m=/\[([^\]]+)]|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(B){var D=["th","st","nd","rd"],M=B%100;return"["+B+(D[(M-20)%10]||D[M]||D[0])+"]"}},w=function(B,D,M){var G=String(B);return!G||G.length>=D?B:""+Array(D+1-G.length).join(M)+B},A={s:w,z:function(B){var D=-B.utcOffset(),M=Math.abs(D),G=Math.floor(M/60),U=M%60;return(D<=0?"+":"-")+w(G,2,"0")+":"+w(U,2,"0")},m:function B(D,M){if(D.date()<M.date())return-B(M,D);var G=12*(M.year()-D.year())+(M.month()-D.month()),U=D.clone().add(G,f),O=M-U<0,y=D.clone().add(G+(O?-1:1),f);return+(-(G+(M-U)/(O?U-y:y-U))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y:d,w:u,d:c,D:v,h:l,m:s,s:a,ms:i,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},x="en",k={};k[x]=b;var $="$isDayjsObject",R=function(B){return B instanceof F||!(!B||!B[$])},H=function B(D,M,G){var U;if(!D)return x;if(typeof D=="string"){var O=D.toLowerCase();k[O]&&(U=O),M&&(k[O]=M,U=O);var y=D.split("-");if(!U&&y.length>1)return B(y[0])}else{var P=D.name;k[P]=D,U=P}return!G&&U&&(x=U),U||!G&&x},T=function(B,D){if(R(B))return B.clone();var M=typeof D=="object"?D:{};return M.date=B,M.args=arguments,new F(M)},_=A;_.l=H,_.i=R,_.w=function(B,D){return T(B,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var F=function(){function B(M){this.$L=H(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[$]=!0}var D=B.prototype;return D.parse=function(M){this.$d=function(G){var U=G.date,O=G.utc;if(U===null)return new Date(NaN);if(_.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var y=U.match(g);if(y){var P=y[2]-1||0,j=(y[7]||"0").substring(0,3);return O?new Date(Date.UTC(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,j)):new Date(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,j)}}return new Date(U)}(M),this.init()},D.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},D.$utils=function(){return _},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(M,G){var U=T(M);return this.startOf(G)<=U&&U<=this.endOf(G)},D.isAfter=function(M,G){return T(M)<this.startOf(G)},D.isBefore=function(M,G){return this.endOf(G)<T(M)},D.$g=function(M,G,U){return _.u(M)?this[G]:this.set(U,M)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(M,G){var U=this,O=!!_.u(G)||G,y=_.p(M),P=function(ee,J){var Z=_.w(U.$u?Date.UTC(U.$y,J,ee):new Date(U.$y,J,ee),U);return O?Z:Z.endOf(c)},j=function(ee,J){return _.w(U.toDate()[ee].apply(U.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(J)),U)},S=this.$W,V=this.$M,Y=this.$D,q="set"+(this.$u?"UTC":"");switch(y){case d:return O?P(1,0):P(31,11);case f:return O?P(1,V):P(0,V+1);case u:var Q=this.$locale().weekStart||0,X=(S<Q?S+7:S)-Q;return P(O?Y-X:Y+(6-X),V);case c:case v:return j(q+"Hours",0);case l:return j(q+"Minutes",1);case s:return j(q+"Seconds",2);case a:return j(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(M){return this.startOf(M,!1)},D.$set=function(M,G){var U,O=_.p(M),y="set"+(this.$u?"UTC":""),P=(U={},U[c]=y+"Date",U[v]=y+"Date",U[f]=y+"Month",U[d]=y+"FullYear",U[l]=y+"Hours",U[s]=y+"Minutes",U[a]=y+"Seconds",U[i]=y+"Milliseconds",U)[O],j=O===c?this.$D+(G-this.$W):G;if(O===f||O===d){var S=this.clone().set(v,1);S.$d[P](j),S.init(),this.$d=S.set(v,Math.min(this.$D,S.daysInMonth())).$d}else P&&this.$d[P](j);return this.init(),this},D.set=function(M,G){return this.clone().$set(M,G)},D.get=function(M){return this[_.p(M)]()},D.add=function(M,G){var U,O=this;M=Number(M);var y=_.p(G),P=function(V){var Y=T(O);return _.w(Y.date(Y.date()+Math.round(V*M)),O)};if(y===f)return this.set(f,this.$M+M);if(y===d)return this.set(d,this.$y+M);if(y===c)return P(1);if(y===u)return P(7);var j=(U={},U[s]=r,U[l]=o,U[a]=n,U)[y]||1,S=this.$d.getTime()+M*j;return _.w(S,this)},D.subtract=function(M,G){return this.add(-1*M,G)},D.format=function(M){var G=this,U=this.$locale();if(!this.isValid())return U.invalidDate||h;var O=M||"YYYY-MM-DDTHH:mm:ssZ",y=_.z(this),P=this.$H,j=this.$m,S=this.$M,V=U.weekdays,Y=U.months,q=U.meridiem,Q=function(J,Z,K,L){return J&&(J[Z]||J(G,O))||K[Z].slice(0,L)},X=function(J){return _.s(P%12||12,J,"0")},ee=q||function(J,Z,K){var L=J<12?"AM":"PM";return K?L.toLowerCase():L};return O.replace(m,function(J,Z){return Z||function(K){switch(K){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return S+1;case"MM":return _.s(S+1,2,"0");case"MMM":return Q(U.monthsShort,S,Y,3);case"MMMM":return Q(Y,S);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Q(U.weekdaysMin,G.$W,V,2);case"ddd":return Q(U.weekdaysShort,G.$W,V,3);case"dddd":return V[G.$W];case"H":return String(P);case"HH":return _.s(P,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return ee(P,j,!0);case"A":return ee(P,j,!1);case"m":return String(j);case"mm":return _.s(j,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return y}return null}(J)||y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(M,G,U){var O,y=this,P=_.p(G),j=T(M),S=(j.utcOffset()-this.utcOffset())*r,V=this-j,Y=function(){return _.m(y,j)};switch(P){case d:O=Y()/12;break;case f:O=Y();break;case p:O=Y()/3;break;case u:O=(V-S)/6048e5;break;case c:O=(V-S)/864e5;break;case l:O=V/o;break;case s:O=V/r;break;case a:O=V/n;break;default:O=V}return U?O:_.a(O)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return k[this.$L]},D.locale=function(M,G){if(!M)return this.$L;var U=this.clone(),O=H(M,G,!0);return O&&(U.$L=O),U},D.clone=function(){return _.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},B}(),N=F.prototype;return T.prototype=N,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",d],["$D",v]].forEach(function(B){N[B[1]]=function(D){return this.$g(D,B[0],B[1])}}),T.extend=function(B,D){return B.$i||(B(D,F,T),B.$i=!0),T},T.locale=H,T.isDayjs=R,T.unix=function(B){return T(1e3*B)},T.en=k[x],T.Ls=k,T.p={},T})})(up);var TE=up.exports;const di=be(TE);var fp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(fp);var IE=fp.exports;const OE=be(IE);var dp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(dp);var PE=dp.exports;const DE=be(PE);di.extend(OE),di.extend(DE);function pp(e,t,n,r,o){return e.map(i=>{const{authorId:a}=i,s=a===n?"outgoing":"incoming",l=t.find(u=>u.id===a);let c;return l&&l.id===n?c={name:l.name||"You",avatar:l.pictureUrl}:l?c={name:l.name||"Agent",avatar:l.pictureUrl}:c={name:r||"Bot",avatar:o},{...i,direction:s,sender:c}})}function _E(e,t="day"){var r,o,i;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(hp(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(o=e[a])==null?void 0:o.timestamp,l=(i=e[a+1])==null?void 0:i.timestamp;!di(s).isSame(l,t)&&l&&n.push(hp(l))}return n}function hp(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=di(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 ME(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 NE(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function RE(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function LE(e,t){return e.map(n=>Math.round(n*t))}const Xr=e=>t=>RE(t,e),eo=e=>t=>LE(t,e),FE={50:Xr(.95),100:Xr(.9),200:Xr(.75),300:Xr(.6),400:Xr(.3),500:e=>e,600:eo(.9),700:eo(.6),800:eo(.45),900:eo(.3),950:eo(.2)};function mp(e,t=FE){const n={},r=ME(e);for(const[o,i]of Object.entries(t))n[o]=NE(i(r));return n}const gp=()=>{const e={};return{on:(o,i)=>{var a;return e[o]||(e[o]=new Set),(a=e[o])==null||a.add(i),()=>{var s;return(s=e[o])==null?void 0:s.delete(i)}},emit:(o,i)=>{var a,s;(a=e[o])==null||a.forEach(l=>l(i)),(s=e["*"])==null||s.forEach(l=>l({type:o,payload:i}))},removeAllListeners:o=>{var i;o?(i=e[o])==null||i.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}};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 o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function BE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const jE=(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 yp(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const zE=2.4,UE=.2126729,WE=.7151522,HE=.072175,VE=.56,KE=.57,qE=.62,GE=.65,pi=.022,bp=1.414,YE=1.14,QE=1.14,JE=.035991,ZE=.035991,XE=27.7847239587675,ek=27.7847239587675,wp=.027,Sp=.027,xp=.001,tk=5e-4;function Ep(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**zE;return UE*o(t)+WE*o(n)+HE*o(r)}function kp(e,t){if(!e||!t)return 0;let n=Ep(Us(e)),r=Ep(Us(t)),o=0,i=0;return n=n>pi?n:n+(pi-n)**bp,r=r>pi?r:r+(pi-r)**bp,Math.abs(r-n)<tk?0:(r>n?(o=(r**VE-n**KE)*YE,i=o<xp?0:o<JE?o-o*XE*wp:o-wp):(o=(r**GE-n**qE)*QE,i=o>-xp?0:o>-ZE?o-o*ek*Sp:o+Sp),Math.abs(i*100))}function Cp(e){const{fontFamily:t,...n}=e,r=Ap(n);return lp(":root",r)+lp(".bpReset",{"font-family":`'${t}', sans-serif`})}function Ap(e){const{radius:t,themeMode:n,color:r,variant:o,headerVariant:i}=e;let a={},s={};if(r){const p=mp(r),d=n==="dark"?yp(p):p,v=mp(BE(jE(Us(r)))),h=n==="dark"?yp(v):v,g=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:g}).reduce((b,[w,A])=>({...b,[`--bpPrimary-${w}`]:A}),{});const m=Object.entries({...h,1:g}).reduce((b,[w,A])=>({...b,[`--bpGray-${w}`]:A}),{});a={...s,...m}}t&&(a={...a,"--bpRadius-scale":t.toString()});const l=n==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=s?kp(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",u=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":s?kp(s["--bpPrimary-500"],s["--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)"},f=i==="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":l.bg,"--header-bg-hover":l.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{...a,...u,...f}}const nk=(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 o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))}),$p=["audio","file","image","video"],Tp=e=>$p.includes(e),Ip="The Client ID is required to initialize the webchat.",rk="The API url is required to initialize the webchat.",ok="The Bot ID is required to initialize the webchat.",ik="No config URL provided.",Op=`Invalid API URL.
2
2
  Please use a valid API URL.`,Pp=`Invalid Client ID.
3
3
  Please use a valid Botpress Client ID.`,Dp=`Invalid URL.
4
4
  Please make sure your client ID and API URL are valid`,ak=`Invalid config URL.
@@ -7,20 +7,20 @@ Please make sure your config file is valid`,lk="Access denied to configuration f
7
7
  Please check back later.`,Mp=`This bot has temporarily paused.
8
8
  Please check back later.`,Np="Something went wrong. To fix it, please clear your browser's local and session storage and then refresh the page",Rp="Please check your internet connection and refresh the page.",Lp=`You've been disconnected from the conversation.
9
9
  Please refresh the page.`,Fp=`Unable to process the message.
10
- Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",message:Pp},Forbidden:{type:"bot",message:_p}},Hs={MethodNotFound:{type:"configuration",message:Dp},QuotaExceeded:{type:"bot",message:Mp},Forbidden:{type:"bot",message:Np}};function Bp(e){return e in Ws}function jp(e){return e in Hs}function zp(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function Up(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const ck=["networkerror","failedtofetch","errorininputstream"],hi=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return zp(e)?e.message.includes("[Webhook Handler]")&&Bp(e.type)?t={id:e.id,...Ws[e.type]}:jp(e.type)?t={id:e.id,...Hs[e.type]}:t={id:e.id,type:e.type,message:e.message}:Up(e)?Wp(e.message)?t={type:"disconnected",message:Lp}:Hp(e.message).includes("invalidcontenttype")?t={type:"bot",message:Fp}:t={type:"event",message:e.message}:e instanceof Error&&Wp(e.message)&&(t={type:"network",message:Rp}),t};function Wp(e){return ck.some(t=>Hp(e).includes(t))}function Hp(e){return e.replaceAll(" ","").toLowerCase()}const to=I.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=cp(e??"",15);return E.jsxs(Bs,{ref:a,"data-color":s,...n,...i,children:[E.jsx(js,{src:t,...r}),E.jsx(zs,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});to.displayName="Avatar";function SQ(){}function xQ(){}function uk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pk={};function Vp(e,t){return(pk.jsx?dk:fk).test(e)}const hk=/[ \t\n\f\r]/g;function vk(e){return typeof e=="object"?e.type==="text"?Kp(e.value):!1:Kp(e)}function Kp(e){return e.replace(hk,"")===""}class no{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}no.prototype.property={},no.prototype.normal={},no.prototype.space=null;function qp(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new no(n,r,t)}function Vs(e){return e.toLowerCase()}class Ot{constructor(t,n){this.property=t,this.attribute=n}}Ot.prototype.space=null,Ot.prototype.boolean=!1,Ot.prototype.booleanish=!1,Ot.prototype.overloadedBoolean=!1,Ot.prototype.number=!1,Ot.prototype.commaSeparated=!1,Ot.prototype.spaceSeparated=!1,Ot.prototype.commaOrSpaceSeparated=!1,Ot.prototype.mustUseProperty=!1,Ot.prototype.defined=!1;let mk=0;const he=jn(),He=jn(),Gp=jn(),re=jn(),Ne=jn(),ar=jn(),kt=jn();function jn(){return 2**++mk}const Ks=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:He,commaOrSpaceSeparated:kt,commaSeparated:ar,number:re,overloadedBoolean:Gp,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),qs=Object.keys(Ks);class Gs extends Ot{constructor(t,n,r,o){let i=-1;if(super(t,n),Yp(this,"space",o),typeof r=="number")for(;++i<qs.length;){const a=qs[i];Yp(this,qs[i],(r&Ks[a])===Ks[a])}}}Gs.prototype.defined=!0;function Yp(e,t,n){n&&(e[t]=n)}const gk={}.hasOwnProperty;function sr(e){const t={},n={};let r;for(r in e.properties)if(gk.call(e.properties,r)){const o=e.properties[r],i=new Gs(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Vs(r)]=r,n[Vs(i.attribute)]=r}return new no(t,n,e.space)}const Qp=sr({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}}),Jp=sr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Zp(e,t){return t in e?e[t]:t}function Xp(e,t){return Zp(e,t.toLowerCase())}const eh=sr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Xp,properties:{xmlns:null,xmlnsXLink:null}}),th=sr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:He,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:Ne,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:re,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:Ne,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:He,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),yk=sr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Xp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ar,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:Ne,autoFocus:he,autoPlay:he,blocking:Ne,capture:null,charSet:null,checked:he,cite:null,className:Ne,cols:re,colSpan:null,content:null,contentEditable:He,controls:he,controlsList:Ne,coords:re|ar,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:Gp,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:Ne,height:re,hidden:he,high:re,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:he,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:re,pattern:null,ping:Ne,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:Ne,required:he,reversed:he,rows:re,rowSpan:re,sandbox:Ne,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:He,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:he,useMap:null,value:He,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,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:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:He,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:he,disableRemotePlayback:he,prefix:null,property:null,results:re,security:null,unselectable:null}}),bk=sr({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:Zp,properties:{about:kt,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:Ne,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:he,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:ar,g2:ar,glyphName:ar,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:kt,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:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kt,rev:kt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kt,requiredFeatures:kt,requiredFonts:kt,requiredFormats:kt,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:kt,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:kt,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:kt,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}}),wk=/^data[-\w.:]+$/i,nh=/-[a-z]/g,Sk=/[A-Z]/g;function xk(e,t){const n=Vs(t);let r=t,o=Ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wk.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(nh,kk);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!nh.test(i)){let a=i.replace(Sk,Ek);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Gs}return new o(r,t)}function Ek(e){return"-"+e.toLowerCase()}function kk(e){return e.charAt(1).toUpperCase()}const Ck={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"},Ak=qp([Jp,Qp,eh,th,yk],"html"),Ys=qp([Jp,Qp,eh,th,bk],"svg");function $k(e){return e.join(" ").trim()}var rh={},oh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Tk=/\n/g,Ik=/^\s*/,Ok=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Pk=/^:\s*/,Dk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_k=/^[;\s]*/,Mk=/^\s+|\s+$/g,Nk=`
11
- `,ih="/",ah="*",zn="",Rk="comment",Lk="declaration",Fk=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 o(v){var h=v.match(Tk);h&&(n+=h.length);var g=v.lastIndexOf(Nk);r=~g?v.length-g:r+v.length}function i(){var v={line:n,column:r};return function(h){return h.position=new a(v),c(),h}}function a(v){this.start=v,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(v){var h=new Error(t.source+":"+n+":"+r+": "+v);if(h.reason=v,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(v){var h=v.exec(e);if(h){var g=h[0];return o(g),e=e.slice(g.length),h}}function c(){l(Ik)}function u(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=i();if(!(ih!=e.charAt(0)||ah!=e.charAt(1))){for(var h=2;zn!=e.charAt(h)&&(ah!=e.charAt(h)||ih!=e.charAt(h+1));)++h;if(h+=2,zn===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,o(g),e=e.slice(h),r+=2,v({type:Rk,comment:g})}}function p(){var v=i(),h=l(Ok);if(h){if(f(),!l(Pk))return s("property missing ':'");var g=l(Dk),m=v({type:Lk,property:sh(h[0].replace(oh,zn)),value:g?sh(g[0].replace(oh,zn)):zn});return l(_k),m}}function d(){var v=[];u(v);for(var h;h=p();)h!==!1&&(v.push(h),u(v));return v}return c(),d()};function sh(e){return e?e.replace(Mk,zn):zn}var Bk=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rh,"__esModule",{value:!0});var lh=rh.default=zk,jk=Bk(Fk);function zk(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,jk.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}const Uk=lh.default||lh,ch=uh("end"),Qs=uh("start");function uh(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 Wk(e){const t=Qs(e),n=ch(e);if(t&&n)return{start:t,end:n}}function ro(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fh(e.position):"start"in e||"end"in e?fh(e):"line"in e||"column"in e?Js(e):""}function Js(e){return dh(e&&e.line)+":"+dh(e&&e.column)}function fh(e){return Js(e&&e.start)+"-"+Js(e&&e.end)}function dh(e){return e&&typeof e=="number"?e:1}class ct extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=ro(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}ct.prototype.file="",ct.prototype.name="",ct.prototype.reason="",ct.prototype.message="",ct.prototype.stack="",ct.prototype.column=void 0,ct.prototype.line=void 0,ct.prototype.ancestors=void 0,ct.prototype.cause=void 0,ct.prototype.fatal=void 0,ct.prototype.place=void 0,ct.prototype.ruleId=void 0,ct.prototype.source=void 0;const Zs={}.hasOwnProperty,Hk=new Map,Vk=/[A-Z]/g,Kk=/-([a-z])/g,qk=new Set(["table","tbody","thead","tfoot","tr"]),Gk=new Set(["td","th"]),ph="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yk(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=rC(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=nC(n,t.jsx,t.jsxs)}const o={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"?Ys:Ak,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=hh(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function hh(e,t,n){if(t.type==="element")return Qk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Xk(e,t,n);if(t.type==="mdxjsEsm")return Zk(e,t);if(t.type==="root")return eC(e,t,n);if(t.type==="text")return tC(e,t)}function Qk(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const i=mh(e,t.tagName,!1),a=oC(e,t);let s=el(e,t);return qk.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!vk(l):!0})),vh(e,a,i,t),Xs(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Jk(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)}oo(e,t.position)}function Zk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oo(e,t.position)}function Xk(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:mh(e,t.name,!0),a=iC(e,t),s=el(e,t);return vh(e,a,i,t),Xs(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function eC(e,t,n){const r={};return Xs(r,el(e,t)),e.create(t,e.Fragment,r,n)}function tC(e,t){return t.value}function vh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nC(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function rC(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=Qs(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function oC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Zs.call(t.properties,o)){const i=aC(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Gk.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function iC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else oo(e,t.position);else{const o=r.name;let i;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,i=e.evaluater.evaluateExpression(s.expression)}else oo(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function el(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Hk;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=hh(e,i,a);s!==void 0&&n.push(s)}return n}function aC(e,t,n){const r=xk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?uk(n):$k(n)),r.property==="style"){let o=typeof n=="object"?n:sC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=lC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Ck[r.property]||r.property:r.attribute,n]}}function sC(e,t){const n={};try{Uk(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new ct("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,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(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(Kk,uC)),n[a]=i}}function mh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Vp(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Vp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Zs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);oo(e)}function oo(e,t){const n=new ct("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 lC(e){const t={};let n;for(n in e)Zs.call(e,n)&&(t[cC(n)]=e[n]);return t}function cC(e){let t=e.replace(Vk,fC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uC(e,t){return t.toUpperCase()}function fC(e){return"-"+e.toLowerCase()}const tl={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"]},dC={};function nl(e,t){const n=dC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gh(e,r,o)}function gh(e,t,n){if(pC(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 yh(e.children,t,n)}return Array.isArray(e)?yh(e,t,n):""}function yh(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=gh(e[o],t,n);return r.join("")}function pC(e){return!!(e&&typeof e=="object")}const bh=document.createElement("i");function rl(e){const t="&"+e+";";bh.innerHTML=t;const n=bh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pt(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o: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);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Dt(e,t){return e.length>0?(Pt(e,e.length,0,t),e):t}const wh={}.hasOwnProperty;function Sh(e){const t={};let n=-1;for(;++n<e.length;)hC(t,e[n]);return t}function hC(e,t){let n;for(n in t){const o=(wh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){wh.call(o,a)||(o[a]=[]);const s=i[a];vC(o[a],Array.isArray(s)?s:s?[s]:[])}}}function vC(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 xh(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 Lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ht=wn(/[A-Za-z]/),ut=wn(/[\dA-Za-z]/),mC=wn(/[#-'*+\--9=?A-Z^-~]/);function vi(e){return e!==null&&(e<32||e===127)}const ol=wn(/\d/),gC=wn(/[\dA-Fa-f]/),yC=wn(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function _e(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const mi=wn(new RegExp("\\p{P}|\\p{S}","u")),Un=wn(/\s/);function wn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lr(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&ut(e.charCodeAt(n+1))&&ut(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function we(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return ge(l)?(e.enter(n),s(l)):t(l)}function s(l){return ge(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const bC={tokenize:wC};function wC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(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 de(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const SC={tokenize:xC},Eh={tokenize:EC};function xC(e){const t=this,n=[];let r=0,o,i,a;return s;function s(w){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const A=t.events.length;let x=A,k;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){k=t.events[x][1].end;break}m(r);let $=A;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},k),$++;return Pt(t.events,x+1,0,t.events.slice(A)),t.events.length=$,c(w)}return s(w)}function c(w){if(r===n.length){if(!o)return p(w);if(o.currentConstruct&&o.currentConstruct.concrete)return v(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Eh,u,f)(w)}function u(w){return o&&b(),m(r),p(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(w)}function p(w){return t.containerState={},e.attempt(Eh,d,v)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function v(w){if(w===null){o&&b(),m(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),h(w)}function h(w){if(w===null){g(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return de(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,A){const x=t.sliceStream(w);if(A&&x.push(null),w.previous=i,i&&(i.next=w),i=w,o.defineSkip(w.start),o.write(x),t.parser.lazy[w.start.line]){let k=o.events.length;for(;k--;)if(o.events[k][1].start.offset<a&&(!o.events[k][1].end||o.events[k][1].end.offset>a))return;const $=t.events.length;let R=$,W,T;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(W){T=t.events[R][1].end;break}W=!0}for(m(r),k=$;k<t.events.length;)t.events[k][1].end=Object.assign({},T),k++;Pt(t.events,R+1,0,t.events.slice($)),t.events.length=k}}function m(w){let A=n.length;for(;A-- >w;){const x=n[A];t.containerState=x[1],x[0].exit.call(t,e)}n.length=w}function b(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function EC(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(e){if(e===null||_e(e)||Un(e))return 1;if(mi(e))return 2}function yi(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const il={name:"attention",tokenize:CC,resolveAll:kC};function kC(e,t){let n=-1,r,o,i,a,s,l,c,u;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);kh(f,-l),kh(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},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={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),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Dt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Dt(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=Dt(c,yi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Dt(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Dt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Pt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function CC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=gi(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=gi(l),f=!u||u===2&&o||n.includes(l),p=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?f:f&&(o||!p)),c._close=!!(i===42?p:p&&(u||!f)),t(l)}}function kh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AC={name:"autolink",tokenize:$C};function $C(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return ht(d)?(e.consume(d),a):d===64?n(d):c(d)}function a(d){return d===43||d===45||d===46||ut(d)?(r=1,s(d)):c(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||ut(d))&&r++<32?(e.consume(d),s):(r=0,c(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||vi(d)?n(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),u):mC(d)?(e.consume(d),c):n(d)}function u(d){return ut(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):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||ut(d))&&r++<63){const v=d===45?p:f;return e.consume(d),v}return n(d)}}const io={tokenize:TC,partial:!0};function TC(e,t,n){return r;function r(i){return ge(i)?we(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||de(i)?t(i):n(i)}}const Ch={name:"blockQuote",tokenize:IC,continuation:{tokenize:OC},exit:PC};function IC(e,t,n){const r=this;return o;function o(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"),i}return n(a)}function i(a){return ge(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function OC(e,t,n){const r=this;return o;function o(a){return ge(a)?we(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Ch,t,n)(a)}}function PC(e){e.exit("blockQuote")}const Ah={name:"characterEscape",tokenize:DC};function DC(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return yC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const $h={name:"characterReference",tokenize:_C};function _C(e,t,n){const r=this;let o=0,i,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"),c):(e.enter("characterReferenceValue"),i=31,a=ut,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=gC,u):(e.enter("characterReferenceValue"),i=7,a=ol,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===ut&&!rl(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Th={tokenize:NC,partial:!0},Ih={name:"codeFenced",tokenize:MC,concrete:!0};function MC(e,t,n){const r=this,o={tokenize:x,partial:!0};let i=0,a=0,s;return l;function l(k){return c(k)}function c(k){const $=r.events[r.events.length-1];return i=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===s?(a++,e.consume(k),u):a<3?n(k):(e.exit("codeFencedFenceSequence"),ge(k)?we(e,f,"whitespace")(k):f(k))}function f(k){return k===null||de(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Th,h,A)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):ge(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,d,"whitespace")(k)):k===96&&k===s?n(k):(e.consume(k),p)}function d(k){return k===null||de(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===null||de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===s?n(k):(e.consume(k),v)}function h(k){return e.attempt(o,A,g)(k)}function g(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return i>0&&ge(k)?we(e,b,"linePrefix",i+1)(k):b(k)}function b(k){return k===null||de(k)?e.check(Th,h,A)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||de(k)?(e.exit("codeFlowValue"),b(k)):(e.consume(k),w)}function A(k){return e.exit("codeFenced"),t(k)}function x(k,$,R){let W=0;return T;function T(D){return k.enter("lineEnding"),k.consume(D),k.exit("lineEnding"),_}function _(D){return k.enter("codeFencedFence"),ge(D)?we(k,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):L(D)}function L(D){return D===s?(k.enter("codeFencedFenceSequence"),N(D)):R(D)}function N(D){return D===s?(W++,k.consume(D),N):W>=a?(k.exit("codeFencedFenceSequence"),ge(D)?we(k,F,"whitespace")(D):F(D)):R(D)}function F(D){return D===null||de(D)?(k.exit("codeFencedFence"),$(D)):R(D)}}}function NC(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const al={name:"codeIndented",tokenize:LC},RC={tokenize:FC,partial:!0};function LC(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),we(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):de(c)?e.attempt(RC,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||de(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function FC(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):de(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):we(e,i,"linePrefix",5)(a)}function i(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):de(a)?o(a):n(a)}}const BC={name:"codeText",tokenize:UC,resolve:jC,previous:zC};function jC(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function zC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UC(e,t,n){let r=0,o,i;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?(i=e.enter("codeTextSequence"),o=0,u(f)):de(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||de(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}class WC{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 o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ao(this.left,r),i.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),ao(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ao(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);ao(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ao(this.left,n.reverse())}}}function ao(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 Oh(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new WC(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,HC(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},u.get(o)[1].start),s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return Pt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function HC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,f,p=-1,d=n,v=0,h=0;const g=[h];for(;d;){for(;e.get(++o)[1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),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 m=s.slice(g[p],g[p+1]),b=i.pop();l.push([b,b+m.length-1]),e.splice(b,2,m)}for(l.reverse(),p=-1;++p<l.length;)c[v+l[p][0]]=v+l[p][1],v+=l[p][1]-l[p][0]-1;return c}const VC={tokenize:GC,resolve:qC},KC={tokenize:YC,partial:!0};function qC(e){return Oh(e),e}function GC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):de(s)?e.check(KC,a,i)(s):(e.consume(s),o)}function i(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,o}}function YC(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),we(e,i,"linePrefix")}function i(a){if(a===null||de(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 Ph(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(m){return m===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(m),e.exit(i),p):m===null||m===32||m===41||vi(m)?n(m):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(m))}function p(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||de(m)?n(m):(e.consume(m),m===92?v:d)}function v(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function h(m){return!u&&(m===null||m===41||_e(m))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(m)):u<c&&m===40?(e.consume(m),u++,h):m===41?(e.consume(m),u--,h):m===null||m===32||m===40||vi(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===40||m===41||m===92?(e.consume(m),h):h(m)}}function Dh(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(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(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):de(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||de(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),l||(l=!ge(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function _h(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===a?(e.exit(i),l(a)):p===null?n(p):de(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),we(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||de(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function so(e,t){let n;return r;function r(o){return de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ge(o)?we(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const QC={name:"definition",tokenize:ZC},JC={tokenize:XC,partial:!0};function ZC(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return Dh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Lt(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 _e(d)?so(e,c)(d):c(d)}function c(d){return Ph(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(JC,f,f)(d)}function f(d){return ge(d)?we(e,p,"whitespace")(d):p(d)}function p(d){return d===null||de(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function XC(e,t,n){return r;function r(s){return _e(s)?so(e,o)(s):n(s)}function o(s){return _h(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return ge(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||de(s)?t(s):n(s)}}const eA={name:"hardBreakEscape",tokenize:tA};function tA(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return de(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const nA={name:"headingAtx",tokenize:oA,resolve:rA};function rA(e,t){let n=e.length-2,r=3,o,i;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&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pt(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function oA(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||_e(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||de(u)?(e.exit("atxHeading"),t(u)):ge(u)?we(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||_e(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const iA=["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"],Mh=["pre","script","style","textarea"],aA={name:"htmlFlow",tokenize:uA,resolveTo:cA,concrete:!0},sA={tokenize:dA,partial:!0},lA={tokenize:fA,partial:!0};function cA(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 uA(e,t,n){const r=this;let o,i,a,s,l;return c;function c(S){return u(S)}function u(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),i=!0,h):S===63?(e.consume(S),o=3,r.interrupt?t:y):ht(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function p(S){return S===45?(e.consume(S),o=2,d):S===91?(e.consume(S),o=5,s=0,v):ht(S)?(e.consume(S),o=4,r.interrupt?t:y):n(S)}function d(S){return S===45?(e.consume(S),r.interrupt?t:y):n(S)}function v(S){const H="CDATA[";return S===H.charCodeAt(s++)?(e.consume(S),s===H.length?r.interrupt?t:L:v):n(S)}function h(S){return ht(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function g(S){if(S===null||S===47||S===62||_e(S)){const H=S===47,Y=a.toLowerCase();return!H&&!i&&Mh.includes(Y)?(o=1,r.interrupt?t(S):L(S)):iA.includes(a.toLowerCase())?(o=6,H?(e.consume(S),m):r.interrupt?t(S):L(S)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):i?b(S):w(S))}return S===45||ut(S)?(e.consume(S),a+=String.fromCharCode(S),g):n(S)}function m(S){return S===62?(e.consume(S),r.interrupt?t:L):n(S)}function b(S){return ge(S)?(e.consume(S),b):T(S)}function w(S){return S===47?(e.consume(S),T):S===58||S===95||ht(S)?(e.consume(S),A):ge(S)?(e.consume(S),w):T(S)}function A(S){return S===45||S===46||S===58||S===95||ut(S)?(e.consume(S),A):x(S)}function x(S){return S===61?(e.consume(S),k):ge(S)?(e.consume(S),x):w(S)}function k(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,$):ge(S)?(e.consume(S),k):R(S)}function $(S){return S===l?(e.consume(S),l=null,W):S===null||de(S)?n(S):(e.consume(S),$)}function R(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||_e(S)?x(S):(e.consume(S),R)}function W(S){return S===47||S===62||ge(S)?w(S):n(S)}function T(S){return S===62?(e.consume(S),_):n(S)}function _(S){return S===null||de(S)?L(S):ge(S)?(e.consume(S),_):n(S)}function L(S){return S===45&&o===2?(e.consume(S),M):S===60&&o===1?(e.consume(S),G):S===62&&o===4?(e.consume(S),P):S===63&&o===3?(e.consume(S),y):S===93&&o===5?(e.consume(S),O):de(S)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(sA,B,N)(S)):S===null||de(S)?(e.exit("htmlFlowData"),N(S)):(e.consume(S),L)}function N(S){return e.check(lA,F,B)(S)}function F(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),D}function D(S){return S===null||de(S)?N(S):(e.enter("htmlFlowData"),L(S))}function M(S){return S===45?(e.consume(S),y):L(S)}function G(S){return S===47?(e.consume(S),a="",z):L(S)}function z(S){if(S===62){const H=a.toLowerCase();return Mh.includes(H)?(e.consume(S),P):L(S)}return ht(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),z):L(S)}function O(S){return S===93?(e.consume(S),y):L(S)}function y(S){return S===62?(e.consume(S),P):S===45&&o===2?(e.consume(S),y):L(S)}function P(S){return S===null||de(S)?(e.exit("htmlFlowData"),B(S)):(e.consume(S),P)}function B(S){return e.exit("htmlFlow"),t(S)}}function fA(e,t,n){const r=this;return o;function o(a){return de(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function dA(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(io,t,n)}}const pA={name:"htmlText",tokenize:hA};function hA(e,t,n){const r=this;let o,i,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),c):y===47?(e.consume(y),x):y===63?(e.consume(y),w):ht(y)?(e.consume(y),R):n(y)}function c(y){return y===45?(e.consume(y),u):y===91?(e.consume(y),i=0,v):ht(y)?(e.consume(y),b):n(y)}function u(y){return y===45?(e.consume(y),d):n(y)}function f(y){return y===null?n(y):y===45?(e.consume(y),p):de(y)?(a=f,G(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?M(y):y===45?p(y):f(y)}function v(y){const P="CDATA[";return y===P.charCodeAt(i++)?(e.consume(y),i===P.length?h:v):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):de(y)?(a=h,G(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),m):h(y)}function m(y){return y===62?M(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?M(y):de(y)?(a=b,G(y)):(e.consume(y),b)}function w(y){return y===null?n(y):y===63?(e.consume(y),A):de(y)?(a=w,G(y)):(e.consume(y),w)}function A(y){return y===62?M(y):w(y)}function x(y){return ht(y)?(e.consume(y),k):n(y)}function k(y){return y===45||ut(y)?(e.consume(y),k):$(y)}function $(y){return de(y)?(a=$,G(y)):ge(y)?(e.consume(y),$):M(y)}function R(y){return y===45||ut(y)?(e.consume(y),R):y===47||y===62||_e(y)?W(y):n(y)}function W(y){return y===47?(e.consume(y),M):y===58||y===95||ht(y)?(e.consume(y),T):de(y)?(a=W,G(y)):ge(y)?(e.consume(y),W):M(y)}function T(y){return y===45||y===46||y===58||y===95||ut(y)?(e.consume(y),T):_(y)}function _(y){return y===61?(e.consume(y),L):de(y)?(a=_,G(y)):ge(y)?(e.consume(y),_):W(y)}function L(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),o=y,N):de(y)?(a=L,G(y)):ge(y)?(e.consume(y),L):(e.consume(y),F)}function N(y){return y===o?(e.consume(y),o=void 0,D):y===null?n(y):de(y)?(a=N,G(y)):(e.consume(y),N)}function F(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||_e(y)?W(y):(e.consume(y),F)}function D(y){return y===47||y===62||_e(y)?W(y):n(y)}function M(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function G(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),z}function z(y){return ge(y)?we(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):O(y)}function O(y){return e.enter("htmlTextData"),a(y)}}const sl={name:"labelEnd",tokenize:wA,resolveTo:bA,resolveAll:yA},vA={tokenize:SA},mA={tokenize:xA},gA={tokenize:EA};function yA(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 bA(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=Dt(s,e.slice(i+1,i+r+3)),s=Dt(s,[["enter",u,t]]),s=Dt(s,yi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Dt(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=Dt(s,e.slice(a+1)),s=Dt(s,[["exit",l,t]]),Pt(e,i,e.length,s),e}function wA(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Lt(r.sliceSerialize({start:i.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(vA,u,a?u:f)(p):p===91?e.attempt(mA,u,a?c:f)(p):a?u(p):f(p)}function c(p){return e.attempt(gA,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function SA(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return _e(f)?so(e,i)(f):i(f)}function i(f){return f===41?u(f):Ph(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return _e(f)?so(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?_h(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return _e(f)?so(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function xA(e,t,n){const r=this;return o;function o(s){return Dh.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function EA(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const kA={name:"labelStartImage",tokenize:CA,resolveAll:sl.resolveAll};function CA(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(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 AA={name:"labelStartLink",tokenize:$A,resolveAll:sl.resolveAll};function $A(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ll={name:"lineEnding",tokenize:TA};function TA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}const bi={name:"thematicBreak",tokenize:IA};function IA(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||de(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?we(e,s,"whitespace")(c):s(c))}}const gt={name:"list",tokenize:DA,continuation:{tokenize:_A},exit:NA},OA={tokenize:RA,partial:!0},PA={tokenize:MA,partial:!0};function DA(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const v=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:ol(d)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bi,n,c)(d):c(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"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(io,r.interrupt?n:u,e.attempt(OA,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return ge(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function _A(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(io,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!ge(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(PA,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(gt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function MA(e,t,n){const r=this;return we(e,o,"listItemIndent",r.containerState.size+1);function o(i){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(i):n(i)}}function NA(e){e.exit(this.containerState.type)}function RA(e,t,n){const r=this;return we(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!ge(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Nh={name:"setextUnderline",tokenize:FA,resolveTo:LA};function LA(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function FA(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ge(c)?we(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||de(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const BA={tokenize:jA};function jA(e){const t=this,n=e.attempt(io,r,e.attempt(this.parser.constructs.flowInitial,o,we(e,e.attempt(this.parser.constructs.flow,o,e.attempt(VC,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zA={resolveAll:Lh()},UA=Rh("string"),WA=Rh("text");function Rh(e){return{tokenize:t,resolveAll:Lh(e==="text"?HA:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=o[u];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 Lh(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function HA(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],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(s){const c={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+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function VA(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const l={consume:b,enter:w,exit:A,attempt:$(x),check:$(k),interrupt:$(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:v,defineSkip:h,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function f(_){return a=Dt(a,_),g(),a[a.length-1]!==null?[]:(R(t,0),c.events=yi(i,c.events,c),c.events)}function p(_,L){return qA(d(_),L)}function d(_){return KA(a,_)}function v(){const{line:_,column:L,offset:N,_index:F,_bufferIndex:D}=r;return{line:_,column:L,offset:N,_index:F,_bufferIndex:D}}function h(_){o[_.line]=_.column,T()}function g(){let _;for(;r._index<a.length;){const L=a[r._index];if(typeof L=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<L.length;)m(L.charCodeAt(r._bufferIndex));else m(L)}}function m(_){u=u(_)}function b(_){de(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,T()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=_}function w(_,L){const N=L||{};return N.type=_,N.start=v(),c.events.push(["enter",N,c]),s.push(N),N}function A(_){const L=s.pop();return L.end=v(),c.events.push(["exit",L,c]),L}function x(_,L){R(_,L.from)}function k(_,L){L.restore()}function $(_,L){return N;function N(F,D,M){let G,z,O,y;return Array.isArray(F)?B(F):"tokenize"in F?B([F]):P(F);function P(q){return Q;function Q(ee){const te=ee!==null&&q[ee],J=ee!==null&&q.null,X=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(J)?J:J?[J]:[]];return B(X)(ee)}}function B(q){return G=q,z=0,q.length===0?M:S(q[z])}function S(q){return Q;function Q(ee){return y=W(),O=q,q.partial||(c.currentConstruct=q),q.name&&c.parser.constructs.disable.null.includes(q.name)?Y():q.tokenize.call(L?Object.assign(Object.create(c),L):c,l,H,Y)(ee)}}function H(q){return _(O,y),D}function Y(q){return y.restore(),++z<G.length?S(G[z]):M}}}function R(_,L){_.resolveAll&&!i.includes(_)&&i.push(_),_.resolve&&Pt(c.events,L,c.events.length-L,_.resolve(c.events.slice(L),c)),_.resolveTo&&(c.events=_.resolveTo(c.events,c))}function W(){const _=v(),L=c.previous,N=c.currentConstruct,F=c.events.length,D=Array.from(s);return{restore:M,from:F};function M(){r=_,c.previous=L,c.currentConstruct=N,c.events.length=F,s=D,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function KA(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function qA(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
10
+ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",message:Pp},Forbidden:{type:"bot",message:_p}},Hs={MethodNotFound:{type:"configuration",message:Dp},QuotaExceeded:{type:"bot",message:Mp},Forbidden:{type:"bot",message:Np}};function Bp(e){return e in Ws}function jp(e){return e in Hs}function zp(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function Up(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const ck=["networkerror","failedtofetch","errorininputstream"],hi=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return zp(e)?e.message.includes("[Webhook Handler]")&&Bp(e.type)?t={id:e.id,...Ws[e.type]}:jp(e.type)?t={id:e.id,...Hs[e.type]}:t={id:e.id,type:e.type,message:e.message}:Up(e)?Wp(e.message)?t={type:"disconnected",message:Lp}:Hp(e.message).includes("invalidcontenttype")?t={type:"bot",message:Fp}:t={type:"event",message:e.message}:e instanceof Error&&Wp(e.message)&&(t={type:"network",message:Rp}),t};function Wp(e){return ck.some(t=>Hp(e).includes(t))}function Hp(e){return e.replaceAll(" ","").toLowerCase()}const to=I.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=cp(e??"",15);return E.jsxs(Bs,{ref:a,"data-color":s,...n,...i,children:[E.jsx(js,{src:t,...r}),E.jsx(zs,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});to.displayName="Avatar";function wQ(){}function SQ(){}function uk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pk={};function Vp(e,t){return(pk.jsx?dk:fk).test(e)}const hk=/[ \t\n\f\r]/g;function vk(e){return typeof e=="object"?e.type==="text"?Kp(e.value):!1:Kp(e)}function Kp(e){return e.replace(hk,"")===""}class no{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}no.prototype.property={},no.prototype.normal={},no.prototype.space=null;function qp(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new no(n,r,t)}function Vs(e){return e.toLowerCase()}class Ot{constructor(t,n){this.property=t,this.attribute=n}}Ot.prototype.space=null,Ot.prototype.boolean=!1,Ot.prototype.booleanish=!1,Ot.prototype.overloadedBoolean=!1,Ot.prototype.number=!1,Ot.prototype.commaSeparated=!1,Ot.prototype.spaceSeparated=!1,Ot.prototype.commaOrSpaceSeparated=!1,Ot.prototype.mustUseProperty=!1,Ot.prototype.defined=!1;let mk=0;const pe=jn(),Ve=jn(),Gp=jn(),re=jn(),Ne=jn(),ar=jn(),kt=jn();function jn(){return 2**++mk}const Ks=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ve,commaOrSpaceSeparated:kt,commaSeparated:ar,number:re,overloadedBoolean:Gp,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),qs=Object.keys(Ks);class Gs extends Ot{constructor(t,n,r,o){let i=-1;if(super(t,n),Yp(this,"space",o),typeof r=="number")for(;++i<qs.length;){const a=qs[i];Yp(this,qs[i],(r&Ks[a])===Ks[a])}}}Gs.prototype.defined=!0;function Yp(e,t,n){n&&(e[t]=n)}const gk={}.hasOwnProperty;function sr(e){const t={},n={};let r;for(r in e.properties)if(gk.call(e.properties,r)){const o=e.properties[r],i=new Gs(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Vs(r)]=r,n[Vs(i.attribute)]=r}return new no(t,n,e.space)}const Qp=sr({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}}),Jp=sr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Zp(e,t){return t in e?e[t]:t}function Xp(e,t){return Zp(e,t.toLowerCase())}const eh=sr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Xp,properties:{xmlns:null,xmlnsXLink:null}}),th=sr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ve,ariaAutoComplete:null,ariaBusy:Ve,ariaChecked:Ve,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Ve,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Ve,ariaFlowTo:Ne,ariaGrabbed:Ve,ariaHasPopup:null,ariaHidden:Ve,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:re,ariaLive:null,ariaModal:Ve,ariaMultiLine:Ve,ariaMultiSelectable:Ve,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Ve,ariaReadOnly:Ve,ariaRelevant:null,ariaRequired:Ve,ariaRoleDescription:Ne,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Ve,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),yk=sr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Xp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ar,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Ne,autoFocus:pe,autoPlay:pe,blocking:Ne,capture:null,charSet:null,checked:pe,cite:null,className:Ne,cols:re,colSpan:null,content:null,contentEditable:Ve,controls:pe,controlsList:Ne,coords:re|ar,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Gp,draggable:Ve,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Ne,height:re,hidden:pe,high:re,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:pe,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,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:pe,optimum:re,pattern:null,ping:Ne,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Ne,required:pe,reversed:pe,rows:re,rowSpan:re,sandbox:Ne,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Ve,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:pe,useMap:null,value:Ve,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,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:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Ve,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:pe,disableRemotePlayback:pe,prefix:null,property:null,results:re,security:null,unselectable:null}}),bk=sr({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:Zp,properties:{about:kt,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:Ne,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:pe,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:ar,g2:ar,glyphName:ar,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:kt,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:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kt,rev:kt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kt,requiredFeatures:kt,requiredFonts:kt,requiredFormats:kt,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:kt,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:kt,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:kt,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}}),wk=/^data[-\w.:]+$/i,nh=/-[a-z]/g,Sk=/[A-Z]/g;function xk(e,t){const n=Vs(t);let r=t,o=Ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wk.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(nh,kk);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!nh.test(i)){let a=i.replace(Sk,Ek);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Gs}return new o(r,t)}function Ek(e){return"-"+e.toLowerCase()}function kk(e){return e.charAt(1).toUpperCase()}const Ck={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"},Ak=qp([Jp,Qp,eh,th,yk],"html"),Ys=qp([Jp,Qp,eh,th,bk],"svg");function $k(e){return e.join(" ").trim()}var rh={},oh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Tk=/\n/g,Ik=/^\s*/,Ok=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Pk=/^:\s*/,Dk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_k=/^[;\s]*/,Mk=/^\s+|\s+$/g,Nk=`
11
+ `,ih="/",ah="*",zn="",Rk="comment",Lk="declaration",Fk=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 o(v){var h=v.match(Tk);h&&(n+=h.length);var g=v.lastIndexOf(Nk);r=~g?v.length-g:r+v.length}function i(){var v={line:n,column:r};return function(h){return h.position=new a(v),c(),h}}function a(v){this.start=v,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(v){var h=new Error(t.source+":"+n+":"+r+": "+v);if(h.reason=v,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(v){var h=v.exec(e);if(h){var g=h[0];return o(g),e=e.slice(g.length),h}}function c(){l(Ik)}function u(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=i();if(!(ih!=e.charAt(0)||ah!=e.charAt(1))){for(var h=2;zn!=e.charAt(h)&&(ah!=e.charAt(h)||ih!=e.charAt(h+1));)++h;if(h+=2,zn===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,o(g),e=e.slice(h),r+=2,v({type:Rk,comment:g})}}function p(){var v=i(),h=l(Ok);if(h){if(f(),!l(Pk))return s("property missing ':'");var g=l(Dk),m=v({type:Lk,property:sh(h[0].replace(oh,zn)),value:g?sh(g[0].replace(oh,zn)):zn});return l(_k),m}}function d(){var v=[];u(v);for(var h;h=p();)h!==!1&&(v.push(h),u(v));return v}return c(),d()};function sh(e){return e?e.replace(Mk,zn):zn}var Bk=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rh,"__esModule",{value:!0});var lh=rh.default=zk,jk=Bk(Fk);function zk(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,jk.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}const Uk=lh.default||lh,ch=uh("end"),Qs=uh("start");function uh(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 Wk(e){const t=Qs(e),n=ch(e);if(t&&n)return{start:t,end:n}}function ro(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fh(e.position):"start"in e||"end"in e?fh(e):"line"in e||"column"in e?Js(e):""}function Js(e){return dh(e&&e.line)+":"+dh(e&&e.column)}function fh(e){return Js(e&&e.start)+"-"+Js(e&&e.end)}function dh(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 o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=ro(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.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,Hk=new Map,Vk=/[A-Z]/g,Kk=/-([a-z])/g,qk=new Set(["table","tbody","thead","tfoot","tr"]),Gk=new Set(["td","th"]),ph="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yk(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=rC(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=nC(n,t.jsx,t.jsxs)}const o={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"?Ys:Ak,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=hh(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function hh(e,t,n){if(t.type==="element")return Qk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Xk(e,t,n);if(t.type==="mdxjsEsm")return Zk(e,t);if(t.type==="root")return eC(e,t,n);if(t.type==="text")return tC(e,t)}function Qk(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const i=mh(e,t.tagName,!1),a=oC(e,t);let s=el(e,t);return qk.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!vk(l):!0})),vh(e,a,i,t),Xs(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Jk(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)}oo(e,t.position)}function Zk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oo(e,t.position)}function Xk(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:mh(e,t.name,!0),a=iC(e,t),s=el(e,t);return vh(e,a,i,t),Xs(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function eC(e,t,n){const r={};return Xs(r,el(e,t)),e.create(t,e.Fragment,r,n)}function tC(e,t){return t.value}function vh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nC(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function rC(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=Qs(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function oC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Zs.call(t.properties,o)){const i=aC(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Gk.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function iC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else oo(e,t.position);else{const o=r.name;let i;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,i=e.evaluater.evaluateExpression(s.expression)}else oo(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function el(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Hk;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=hh(e,i,a);s!==void 0&&n.push(s)}return n}function aC(e,t,n){const r=xk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?uk(n):$k(n)),r.property==="style"){let o=typeof n=="object"?n:sC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=lC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Ck[r.property]||r.property:r.attribute,n]}}function sC(e,t){const n={};try{Uk(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new st("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,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(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(Kk,uC)),n[a]=i}}function mh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Vp(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Vp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Zs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);oo(e)}function oo(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=ph+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lC(e){const t={};let n;for(n in e)Zs.call(e,n)&&(t[cC(n)]=e[n]);return t}function cC(e){let t=e.replace(Vk,fC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uC(e,t){return t.toUpperCase()}function fC(e){return"-"+e.toLowerCase()}const tl={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"]},dC={};function nl(e,t){const n=dC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gh(e,r,o)}function gh(e,t,n){if(pC(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 yh(e.children,t,n)}return Array.isArray(e)?yh(e,t,n):""}function yh(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=gh(e[o],t,n);return r.join("")}function pC(e){return!!(e&&typeof e=="object")}const bh=document.createElement("i");function rl(e){const t="&"+e+";";bh.innerHTML=t;const n=bh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pt(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o: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);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Dt(e,t){return e.length>0?(Pt(e,e.length,0,t),e):t}const wh={}.hasOwnProperty;function Sh(e){const t={};let n=-1;for(;++n<e.length;)hC(t,e[n]);return t}function hC(e,t){let n;for(n in t){const o=(wh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){wh.call(o,a)||(o[a]=[]);const s=i[a];vC(o[a],Array.isArray(s)?s:s?[s]:[])}}}function vC(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 xh(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 Lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ht=wn(/[A-Za-z]/),lt=wn(/[\dA-Za-z]/),mC=wn(/[#-'*+\--9=?A-Z^-~]/);function vi(e){return e!==null&&(e<32||e===127)}const ol=wn(/\d/),gC=wn(/[\dA-Fa-f]/),yC=wn(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function _e(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const mi=wn(new RegExp("\\p{P}|\\p{S}","u")),Un=wn(/\s/);function wn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lr(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&lt(e.charCodeAt(n+1))&&lt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function we(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return ge(l)?(e.enter(n),s(l)):t(l)}function s(l){return ge(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const bC={tokenize:wC};function wC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(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 fe(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const SC={tokenize:xC},Eh={tokenize:EC};function xC(e){const t=this,n=[];let r=0,o,i,a;return s;function s(w){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const A=t.events.length;let x=A,k;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){k=t.events[x][1].end;break}m(r);let $=A;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},k),$++;return Pt(t.events,x+1,0,t.events.slice(A)),t.events.length=$,c(w)}return s(w)}function c(w){if(r===n.length){if(!o)return p(w);if(o.currentConstruct&&o.currentConstruct.concrete)return v(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Eh,u,f)(w)}function u(w){return o&&b(),m(r),p(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(w)}function p(w){return t.containerState={},e.attempt(Eh,d,v)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function v(w){if(w===null){o&&b(),m(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),h(w)}function h(w){if(w===null){g(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return fe(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,A){const x=t.sliceStream(w);if(A&&x.push(null),w.previous=i,i&&(i.next=w),i=w,o.defineSkip(w.start),o.write(x),t.parser.lazy[w.start.line]){let k=o.events.length;for(;k--;)if(o.events[k][1].start.offset<a&&(!o.events[k][1].end||o.events[k][1].end.offset>a))return;const $=t.events.length;let R=$,H,T;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(H){T=t.events[R][1].end;break}H=!0}for(m(r),k=$;k<t.events.length;)t.events[k][1].end=Object.assign({},T),k++;Pt(t.events,R+1,0,t.events.slice($)),t.events.length=k}}function m(w){let A=n.length;for(;A-- >w;){const x=n[A];t.containerState=x[1],x[0].exit.call(t,e)}n.length=w}function b(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function EC(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(e){if(e===null||_e(e)||Un(e))return 1;if(mi(e))return 2}function yi(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const il={name:"attention",tokenize:CC,resolveAll:kC};function kC(e,t){let n=-1,r,o,i,a,s,l,c,u;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);kh(f,-l),kh(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},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={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),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Dt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Dt(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=Dt(c,yi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Dt(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Dt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Pt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function CC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=gi(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=gi(l),f=!u||u===2&&o||n.includes(l),p=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?f:f&&(o||!p)),c._close=!!(i===42?p:p&&(u||!f)),t(l)}}function kh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AC={name:"autolink",tokenize:$C};function $C(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return ht(d)?(e.consume(d),a):d===64?n(d):c(d)}function a(d){return d===43||d===45||d===46||lt(d)?(r=1,s(d)):c(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,c(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||vi(d)?n(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),u):mC(d)?(e.consume(d),c):n(d)}function u(d){return lt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):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 v=d===45?p:f;return e.consume(d),v}return n(d)}}const io={tokenize:TC,partial:!0};function TC(e,t,n){return r;function r(i){return ge(i)?we(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||fe(i)?t(i):n(i)}}const Ch={name:"blockQuote",tokenize:IC,continuation:{tokenize:OC},exit:PC};function IC(e,t,n){const r=this;return o;function o(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"),i}return n(a)}function i(a){return ge(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function OC(e,t,n){const r=this;return o;function o(a){return ge(a)?we(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Ch,t,n)(a)}}function PC(e){e.exit("blockQuote")}const Ah={name:"characterEscape",tokenize:DC};function DC(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return yC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const $h={name:"characterReference",tokenize:_C};function _C(e,t,n){const r=this;let o=0,i,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"),c):(e.enter("characterReferenceValue"),i=31,a=lt,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=gC,u):(e.enter("characterReferenceValue"),i=7,a=ol,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===lt&&!rl(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Th={tokenize:NC,partial:!0},Ih={name:"codeFenced",tokenize:MC,concrete:!0};function MC(e,t,n){const r=this,o={tokenize:x,partial:!0};let i=0,a=0,s;return l;function l(k){return c(k)}function c(k){const $=r.events[r.events.length-1];return i=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===s?(a++,e.consume(k),u):a<3?n(k):(e.exit("codeFencedFenceSequence"),ge(k)?we(e,f,"whitespace")(k):f(k))}function f(k){return k===null||fe(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Th,h,A)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||fe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):ge(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,d,"whitespace")(k)):k===96&&k===s?n(k):(e.consume(k),p)}function d(k){return k===null||fe(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===null||fe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===s?n(k):(e.consume(k),v)}function h(k){return e.attempt(o,A,g)(k)}function g(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return i>0&&ge(k)?we(e,b,"linePrefix",i+1)(k):b(k)}function b(k){return k===null||fe(k)?e.check(Th,h,A)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||fe(k)?(e.exit("codeFlowValue"),b(k)):(e.consume(k),w)}function A(k){return e.exit("codeFenced"),t(k)}function x(k,$,R){let H=0;return T;function T(D){return k.enter("lineEnding"),k.consume(D),k.exit("lineEnding"),_}function _(D){return k.enter("codeFencedFence"),ge(D)?we(k,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):F(D)}function F(D){return D===s?(k.enter("codeFencedFenceSequence"),N(D)):R(D)}function N(D){return D===s?(H++,k.consume(D),N):H>=a?(k.exit("codeFencedFenceSequence"),ge(D)?we(k,B,"whitespace")(D):B(D)):R(D)}function B(D){return D===null||fe(D)?(k.exit("codeFencedFence"),$(D)):R(D)}}}function NC(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const al={name:"codeIndented",tokenize:LC},RC={tokenize:FC,partial:!0};function LC(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),we(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):fe(c)?e.attempt(RC,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||fe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function FC(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):we(e,i,"linePrefix",5)(a)}function i(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):fe(a)?o(a):n(a)}}const BC={name:"codeText",tokenize:UC,resolve:jC,previous:zC};function jC(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function zC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UC(e,t,n){let r=0,o,i;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?(i=e.enter("codeTextSequence"),o=0,u(f)):fe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||fe(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}class WC{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 o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ao(this.left,r),i.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),ao(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ao(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);ao(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ao(this.left,n.reverse())}}}function ao(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 Oh(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new WC(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,HC(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},u.get(o)[1].start),s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return Pt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function HC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,f,p=-1,d=n,v=0,h=0;const g=[h];for(;d;){for(;e.get(++o)[1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),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 m=s.slice(g[p],g[p+1]),b=i.pop();l.push([b,b+m.length-1]),e.splice(b,2,m)}for(l.reverse(),p=-1;++p<l.length;)c[v+l[p][0]]=v+l[p][1],v+=l[p][1]-l[p][0]-1;return c}const VC={tokenize:GC,resolve:qC},KC={tokenize:YC,partial:!0};function qC(e){return Oh(e),e}function GC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):fe(s)?e.check(KC,a,i)(s):(e.consume(s),o)}function i(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,o}}function YC(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),we(e,i,"linePrefix")}function i(a){if(a===null||fe(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 Ph(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(m){return m===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(m),e.exit(i),p):m===null||m===32||m===41||vi(m)?n(m):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(m))}function p(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||fe(m)?n(m):(e.consume(m),m===92?v:d)}function v(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function h(m){return!u&&(m===null||m===41||_e(m))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(m)):u<c&&m===40?(e.consume(m),u++,h):m===41?(e.consume(m),u--,h):m===null||m===32||m===40||vi(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===40||m===41||m===92?(e.consume(m),h):h(m)}}function Dh(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(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(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||fe(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),l||(l=!ge(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function _h(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===a?(e.exit(i),l(a)):p===null?n(p):fe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),we(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||fe(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function so(e,t){let n;return r;function r(o){return fe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ge(o)?we(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const QC={name:"definition",tokenize:ZC},JC={tokenize:XC,partial:!0};function ZC(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return Dh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Lt(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 _e(d)?so(e,c)(d):c(d)}function c(d){return Ph(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(JC,f,f)(d)}function f(d){return ge(d)?we(e,p,"whitespace")(d):p(d)}function p(d){return d===null||fe(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function XC(e,t,n){return r;function r(s){return _e(s)?so(e,o)(s):n(s)}function o(s){return _h(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return ge(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||fe(s)?t(s):n(s)}}const eA={name:"hardBreakEscape",tokenize:tA};function tA(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return fe(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const nA={name:"headingAtx",tokenize:oA,resolve:rA};function rA(e,t){let n=e.length-2,r=3,o,i;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&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pt(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function oA(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||_e(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||fe(u)?(e.exit("atxHeading"),t(u)):ge(u)?we(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||_e(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const iA=["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"],Mh=["pre","script","style","textarea"],aA={name:"htmlFlow",tokenize:uA,resolveTo:cA,concrete:!0},sA={tokenize:dA,partial:!0},lA={tokenize:fA,partial:!0};function cA(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 uA(e,t,n){const r=this;let o,i,a,s,l;return c;function c(S){return u(S)}function u(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),i=!0,h):S===63?(e.consume(S),o=3,r.interrupt?t:y):ht(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function p(S){return S===45?(e.consume(S),o=2,d):S===91?(e.consume(S),o=5,s=0,v):ht(S)?(e.consume(S),o=4,r.interrupt?t:y):n(S)}function d(S){return S===45?(e.consume(S),r.interrupt?t:y):n(S)}function v(S){const V="CDATA[";return S===V.charCodeAt(s++)?(e.consume(S),s===V.length?r.interrupt?t:F:v):n(S)}function h(S){return ht(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function g(S){if(S===null||S===47||S===62||_e(S)){const V=S===47,Y=a.toLowerCase();return!V&&!i&&Mh.includes(Y)?(o=1,r.interrupt?t(S):F(S)):iA.includes(a.toLowerCase())?(o=6,V?(e.consume(S),m):r.interrupt?t(S):F(S)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):i?b(S):w(S))}return S===45||lt(S)?(e.consume(S),a+=String.fromCharCode(S),g):n(S)}function m(S){return S===62?(e.consume(S),r.interrupt?t:F):n(S)}function b(S){return ge(S)?(e.consume(S),b):T(S)}function w(S){return S===47?(e.consume(S),T):S===58||S===95||ht(S)?(e.consume(S),A):ge(S)?(e.consume(S),w):T(S)}function A(S){return S===45||S===46||S===58||S===95||lt(S)?(e.consume(S),A):x(S)}function x(S){return S===61?(e.consume(S),k):ge(S)?(e.consume(S),x):w(S)}function k(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,$):ge(S)?(e.consume(S),k):R(S)}function $(S){return S===l?(e.consume(S),l=null,H):S===null||fe(S)?n(S):(e.consume(S),$)}function R(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||_e(S)?x(S):(e.consume(S),R)}function H(S){return S===47||S===62||ge(S)?w(S):n(S)}function T(S){return S===62?(e.consume(S),_):n(S)}function _(S){return S===null||fe(S)?F(S):ge(S)?(e.consume(S),_):n(S)}function F(S){return S===45&&o===2?(e.consume(S),M):S===60&&o===1?(e.consume(S),G):S===62&&o===4?(e.consume(S),P):S===63&&o===3?(e.consume(S),y):S===93&&o===5?(e.consume(S),O):fe(S)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(sA,j,N)(S)):S===null||fe(S)?(e.exit("htmlFlowData"),N(S)):(e.consume(S),F)}function N(S){return e.check(lA,B,j)(S)}function B(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),D}function D(S){return S===null||fe(S)?N(S):(e.enter("htmlFlowData"),F(S))}function M(S){return S===45?(e.consume(S),y):F(S)}function G(S){return S===47?(e.consume(S),a="",U):F(S)}function U(S){if(S===62){const V=a.toLowerCase();return Mh.includes(V)?(e.consume(S),P):F(S)}return ht(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),U):F(S)}function O(S){return S===93?(e.consume(S),y):F(S)}function y(S){return S===62?(e.consume(S),P):S===45&&o===2?(e.consume(S),y):F(S)}function P(S){return S===null||fe(S)?(e.exit("htmlFlowData"),j(S)):(e.consume(S),P)}function j(S){return e.exit("htmlFlow"),t(S)}}function fA(e,t,n){const r=this;return o;function o(a){return fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function dA(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(io,t,n)}}const pA={name:"htmlText",tokenize:hA};function hA(e,t,n){const r=this;let o,i,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),c):y===47?(e.consume(y),x):y===63?(e.consume(y),w):ht(y)?(e.consume(y),R):n(y)}function c(y){return y===45?(e.consume(y),u):y===91?(e.consume(y),i=0,v):ht(y)?(e.consume(y),b):n(y)}function u(y){return y===45?(e.consume(y),d):n(y)}function f(y){return y===null?n(y):y===45?(e.consume(y),p):fe(y)?(a=f,G(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?M(y):y===45?p(y):f(y)}function v(y){const P="CDATA[";return y===P.charCodeAt(i++)?(e.consume(y),i===P.length?h:v):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):fe(y)?(a=h,G(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),m):h(y)}function m(y){return y===62?M(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?M(y):fe(y)?(a=b,G(y)):(e.consume(y),b)}function w(y){return y===null?n(y):y===63?(e.consume(y),A):fe(y)?(a=w,G(y)):(e.consume(y),w)}function A(y){return y===62?M(y):w(y)}function x(y){return ht(y)?(e.consume(y),k):n(y)}function k(y){return y===45||lt(y)?(e.consume(y),k):$(y)}function $(y){return fe(y)?(a=$,G(y)):ge(y)?(e.consume(y),$):M(y)}function R(y){return y===45||lt(y)?(e.consume(y),R):y===47||y===62||_e(y)?H(y):n(y)}function H(y){return y===47?(e.consume(y),M):y===58||y===95||ht(y)?(e.consume(y),T):fe(y)?(a=H,G(y)):ge(y)?(e.consume(y),H):M(y)}function T(y){return y===45||y===46||y===58||y===95||lt(y)?(e.consume(y),T):_(y)}function _(y){return y===61?(e.consume(y),F):fe(y)?(a=_,G(y)):ge(y)?(e.consume(y),_):H(y)}function F(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),o=y,N):fe(y)?(a=F,G(y)):ge(y)?(e.consume(y),F):(e.consume(y),B)}function N(y){return y===o?(e.consume(y),o=void 0,D):y===null?n(y):fe(y)?(a=N,G(y)):(e.consume(y),N)}function B(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||_e(y)?H(y):(e.consume(y),B)}function D(y){return y===47||y===62||_e(y)?H(y):n(y)}function M(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function G(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),U}function U(y){return ge(y)?we(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):O(y)}function O(y){return e.enter("htmlTextData"),a(y)}}const sl={name:"labelEnd",tokenize:wA,resolveTo:bA,resolveAll:yA},vA={tokenize:SA},mA={tokenize:xA},gA={tokenize:EA};function yA(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 bA(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=Dt(s,e.slice(i+1,i+r+3)),s=Dt(s,[["enter",u,t]]),s=Dt(s,yi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Dt(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=Dt(s,e.slice(a+1)),s=Dt(s,[["exit",l,t]]),Pt(e,i,e.length,s),e}function wA(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Lt(r.sliceSerialize({start:i.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(vA,u,a?u:f)(p):p===91?e.attempt(mA,u,a?c:f)(p):a?u(p):f(p)}function c(p){return e.attempt(gA,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function SA(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return _e(f)?so(e,i)(f):i(f)}function i(f){return f===41?u(f):Ph(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return _e(f)?so(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?_h(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return _e(f)?so(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function xA(e,t,n){const r=this;return o;function o(s){return Dh.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function EA(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const kA={name:"labelStartImage",tokenize:CA,resolveAll:sl.resolveAll};function CA(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(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 AA={name:"labelStartLink",tokenize:$A,resolveAll:sl.resolveAll};function $A(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ll={name:"lineEnding",tokenize:TA};function TA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}const bi={name:"thematicBreak",tokenize:IA};function IA(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||fe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?we(e,s,"whitespace")(c):s(c))}}const yt={name:"list",tokenize:DA,continuation:{tokenize:_A},exit:NA},OA={tokenize:RA,partial:!0},PA={tokenize:MA,partial:!0};function DA(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const v=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:ol(d)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bi,n,c)(d):c(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"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(io,r.interrupt?n:u,e.attempt(OA,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return ge(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function _A(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(io,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!ge(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(PA,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(yt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function MA(e,t,n){const r=this;return we(e,o,"listItemIndent",r.containerState.size+1);function o(i){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(i):n(i)}}function NA(e){e.exit(this.containerState.type)}function RA(e,t,n){const r=this;return we(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!ge(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Nh={name:"setextUnderline",tokenize:FA,resolveTo:LA};function LA(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function FA(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ge(c)?we(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const BA={tokenize:jA};function jA(e){const t=this,n=e.attempt(io,r,e.attempt(this.parser.constructs.flowInitial,o,we(e,e.attempt(this.parser.constructs.flow,o,e.attempt(VC,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zA={resolveAll:Lh()},UA=Rh("string"),WA=Rh("text");function Rh(e){return{tokenize:t,resolveAll:Lh(e==="text"?HA:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=o[u];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 Lh(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function HA(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],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(s){const c={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+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function VA(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const l={consume:b,enter:w,exit:A,attempt:$(x),check:$(k),interrupt:$(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:v,defineSkip:h,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function f(_){return a=Dt(a,_),g(),a[a.length-1]!==null?[]:(R(t,0),c.events=yi(i,c.events,c),c.events)}function p(_,F){return qA(d(_),F)}function d(_){return KA(a,_)}function v(){const{line:_,column:F,offset:N,_index:B,_bufferIndex:D}=r;return{line:_,column:F,offset:N,_index:B,_bufferIndex:D}}function h(_){o[_.line]=_.column,T()}function g(){let _;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<F.length;)m(F.charCodeAt(r._bufferIndex));else m(F)}}function m(_){u=u(_)}function b(_){fe(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,T()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=_}function w(_,F){const N=F||{};return N.type=_,N.start=v(),c.events.push(["enter",N,c]),s.push(N),N}function A(_){const F=s.pop();return F.end=v(),c.events.push(["exit",F,c]),F}function x(_,F){R(_,F.from)}function k(_,F){F.restore()}function $(_,F){return N;function N(B,D,M){let G,U,O,y;return Array.isArray(B)?j(B):"tokenize"in B?j([B]):P(B);function P(q){return Q;function Q(X){const ee=X!==null&&q[X],J=X!==null&&q.null,Z=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(J)?J:J?[J]:[]];return j(Z)(X)}}function j(q){return G=q,U=0,q.length===0?M:S(q[U])}function S(q){return Q;function Q(X){return y=H(),O=q,q.partial||(c.currentConstruct=q),q.name&&c.parser.constructs.disable.null.includes(q.name)?Y():q.tokenize.call(F?Object.assign(Object.create(c),F):c,l,V,Y)(X)}}function V(q){return _(O,y),D}function Y(q){return y.restore(),++U<G.length?S(G[U]):M}}}function R(_,F){_.resolveAll&&!i.includes(_)&&i.push(_),_.resolve&&Pt(c.events,F,c.events.length-F,_.resolve(c.events.slice(F),c)),_.resolveTo&&(c.events=_.resolveTo(c.events,c))}function H(){const _=v(),F=c.previous,N=c.currentConstruct,B=c.events.length,D=Array.from(s);return{restore:M,from:B};function M(){r=_,c.previous=F,c.currentConstruct=N,c.events.length=B,s=D,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function KA(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function qA(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
12
12
  `;break}case-3:{a=`\r
13
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const GA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:QC},disable:{null:[]},document:{42:gt,43:gt,45:gt,48:gt,49:gt,50:gt,51:gt,52:gt,53:gt,54:gt,55:gt,56:gt,57:gt,62:Ch},flow:{35:nA,42:bi,45:[Nh,bi],60:aA,61:Nh,95:bi,96:Ih,126:Ih},flowInitial:{[-2]:al,[-1]:al,32:al},insideSpan:{null:[il,zA]},string:{38:$h,92:Ah},text:{[-5]:ll,[-4]:ll,[-3]:ll,33:kA,38:$h,42:il,60:[AC,pA],91:AA,92:[eA,Ah],93:sl,95:il,96:BC}},Symbol.toStringTag,{value:"Module"}));function YA(e){const n=Sh([GA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(bC),document:o(SC),flow:o(BA),string:o(UA),text:o(WA)};return r;function o(i){return a;function a(s){return VA(r,i,s)}}}function QA(e){for(;!Oh(e););return e}const Fh=/[\0\t\n\r]/g;function JA(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Fh.lastIndex=f,c=Fh.exec(i),p=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(p),!c){t=i.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(i.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)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 ZA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XA(e){return e.replace(ZA,e$)}function e$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return xh(n.slice(i?2:1),i?16:10)}return rl(n)||e}const Bh={}.hasOwnProperty;function t$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),n$(n)(QA(YA(n).document().write(JA()(e,t,!0))))}function n$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(xe),autolinkProtocol:W,autolinkEmail:W,atxHeading:i(le),blockQuote:i(J),characterEscape:W,characterReference:W,codeFenced:i(X),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(X,a),codeText:i(K,a),codeTextData:W,data:W,codeFlowValue:W,definition:i(oe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(V),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i(fe,a),htmlFlowData:W,htmlText:i(fe,a),htmlTextData:W,image:i(pe),label:a,link:i(xe),listItem:i(st),listItemValue:p,listOrdered:i(qe,f),listUnordered:i(qe),paragraph:i(Et),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(le),strong:i(lt),thematicBreak:i(ue)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:te,autolinkProtocol:ee,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:q,characterReference:Q,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:v,codeFlowValue:T,codeIndented:l(m),codeText:l(D),codeTextData:T,data:T,definition:l(),definitionDestinationString:A,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(L),hardBreakTrailing:l(L),htmlFlow:l(N),htmlFlowData:T,htmlText:l(F),htmlTextData:T,image:l(G),label:O,labelText:z,lineEnding:_,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:H,resourceDestinationString:y,resourceTitleString:P,resource:B,setextHeading:l(R),setextHeadingLineSequence:$,setextHeadingText:k,strong:l(),thematicBreak:l()}};jh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let j={type:"root",children:[]};const ne={stack:[j],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},ae=[];let ce=-1;for(;++ce<U.length;)if(U[ce][1].type==="listOrdered"||U[ce][1].type==="listUnordered")if(U[ce][0]==="enter")ae.push(ce);else{const ve=ae.pop();ce=o(U,ve,ce)}for(ce=-1;++ce<U.length;){const ve=t[U[ce][0]];Bh.call(ve,U[ce][1].type)&&ve[U[ce][1].type].call(Object.assign({sliceSerialize:U[ce][2].sliceSerialize},ne),U[ce][1])}if(ne.tokenStack.length>0){const ve=ne.tokenStack[ne.tokenStack.length-1];(ve[1]||zh).call(ne,void 0,ve[0])}for(j.position={start:Sn(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Sn(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)j=t.transforms[ce](j)||j;return j}function o(U,j,ne){let ae=j-1,ce=-1,ve=!1,Ue,We,mt,tt;for(;++ae<=ne;){const Pe=U[ae];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?ce++:ce--,tt=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(Ue&&!tt&&!ce&&!mt&&(mt=ae),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!ce&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||ce===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(Ue){let nt=ae;for(We=void 0;nt--;){const Ge=U[nt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;We&&(U[We][1].type="lineEndingBlank",ve=!0),Ge[1].type="lineEnding",We=nt}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}mt&&(!We||mt<We)&&(Ue._spread=!0),Ue.end=Object.assign({},We?U[We][1].start:Pe[1].end),U.splice(We||ae,0,["exit",Ue,Pe[2]]),ae++,ne++}if(Pe[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};Ue=nt,U.splice(ae,0,["enter",nt,Pe[2]]),ae++,ne++,mt=void 0,tt=!0}}}return U[j][1]._spread=ve,ne}function i(U,j){return ne;function ne(ae){s.call(this,U(ae),ae),j&&j.call(this,ae)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(U,j,ne){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([j,ne]),U.position={start:Sn(j.start),end:void 0}}function l(U){return j;function j(ne){U&&U.call(this,ne),c.call(this,ne)}}function c(U,j){const ne=this.stack.pop(),ae=this.tokenStack.pop();if(ae)ae[0].type!==U.type&&(j?j.call(this,U,ae[0]):(ae[1]||zh).call(this,U,ae[0]));else throw new Error("Cannot close `"+U.type+"` ("+ro({start:U.start,end:U.end})+"): it’s not open");ne.position.end=Sn(U.end)}function u(){return nl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const j=this.stack[this.stack.length-2];j.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function d(){const U=this.resume(),j=this.stack[this.stack.length-1];j.lang=U}function v(){const U=this.resume(),j=this.stack[this.stack.length-1];j.meta=U}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const U=this.resume(),j=this.stack[this.stack.length-1];j.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const U=this.resume(),j=this.stack[this.stack.length-1];j.value=U.replace(/(\r?\n|\r)$/g,"")}function b(U){const j=this.resume(),ne=this.stack[this.stack.length-1];ne.label=j,ne.identifier=Lt(this.sliceSerialize(U)).toLowerCase()}function w(){const U=this.resume(),j=this.stack[this.stack.length-1];j.title=U}function A(){const U=this.resume(),j=this.stack[this.stack.length-1];j.url=U}function x(U){const j=this.stack[this.stack.length-1];if(!j.depth){const ne=this.sliceSerialize(U).length;j.depth=ne}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function $(U){const j=this.stack[this.stack.length-1];j.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function W(U){const ne=this.stack[this.stack.length-1].children;let ae=ne[ne.length-1];(!ae||ae.type!=="text")&&(ae=ie(),ae.position={start:Sn(U.start),end:void 0},ne.push(ae)),this.stack.push(ae)}function T(U){const j=this.stack.pop();j.value+=this.sliceSerialize(U),j.position.end=Sn(U.end)}function _(U){const j=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=j.children[j.children.length-1];ne.position.end=Sn(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(j.type)&&(W.call(this,U),T.call(this,U))}function L(){this.data.atHardBreak=!0}function N(){const U=this.resume(),j=this.stack[this.stack.length-1];j.value=U}function F(){const U=this.resume(),j=this.stack[this.stack.length-1];j.value=U}function D(){const U=this.resume(),j=this.stack[this.stack.length-1];j.value=U}function M(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const j=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=j,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function G(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const j=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=j,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function z(U){const j=this.sliceSerialize(U),ne=this.stack[this.stack.length-2];ne.label=XA(j),ne.identifier=Lt(j).toLowerCase()}function O(){const U=this.stack[this.stack.length-1],j=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const ae=U.children;ne.children=ae}else ne.alt=j}function y(){const U=this.resume(),j=this.stack[this.stack.length-1];j.url=U}function P(){const U=this.resume(),j=this.stack[this.stack.length-1];j.title=U}function B(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function H(U){const j=this.resume(),ne=this.stack[this.stack.length-1];ne.label=j,ne.identifier=Lt(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function Y(U){this.data.characterReferenceType=U.type}function q(U){const j=this.sliceSerialize(U),ne=this.data.characterReferenceType;let ae;ne?(ae=xh(j,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ae=rl(j);const ce=this.stack[this.stack.length-1];ce.value+=ae}function Q(U){const j=this.stack.pop();j.position.end=Sn(U.end)}function ee(U){T.call(this,U);const j=this.stack[this.stack.length-1];j.url=this.sliceSerialize(U)}function te(U){T.call(this,U);const j=this.stack[this.stack.length-1];j.url="mailto:"+this.sliceSerialize(U)}function J(){return{type:"blockquote",children:[]}}function X(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function V(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function fe(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function xe(){return{type:"link",title:null,url:"",children:[]}}function qe(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function st(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}function Sn(e){return{line:e.line,column:e.column,offset:e.offset}}function jh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jh(e,r):r$(e,r)}}function r$(e,t){let n;for(n in t)if(Bh.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 zh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ro({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ro({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ro({start:t.start,end:t.end})+") is still open")}function o$(e){const t=this;t.parser=n;function n(r){return t$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function i$(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 a$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
13
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const GA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:QC},disable:{null:[]},document:{42:yt,43:yt,45:yt,48:yt,49:yt,50:yt,51:yt,52:yt,53:yt,54:yt,55:yt,56:yt,57:yt,62:Ch},flow:{35:nA,42:bi,45:[Nh,bi],60:aA,61:Nh,95:bi,96:Ih,126:Ih},flowInitial:{[-2]:al,[-1]:al,32:al},insideSpan:{null:[il,zA]},string:{38:$h,92:Ah},text:{[-5]:ll,[-4]:ll,[-3]:ll,33:kA,38:$h,42:il,60:[AC,pA],91:AA,92:[eA,Ah],93:sl,95:il,96:BC}},Symbol.toStringTag,{value:"Module"}));function YA(e){const n=Sh([GA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(bC),document:o(SC),flow:o(BA),string:o(UA),text:o(WA)};return r;function o(i){return a;function a(s){return VA(r,i,s)}}}function QA(e){for(;!Oh(e););return e}const Fh=/[\0\t\n\r]/g;function JA(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Fh.lastIndex=f,c=Fh.exec(i),p=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(p),!c){t=i.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(i.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)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 ZA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XA(e){return e.replace(ZA,e$)}function e$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return xh(n.slice(i?2:1),i?16:10)}return rl(n)||e}const Bh={}.hasOwnProperty;function t$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),n$(n)(QA(YA(n).document().write(JA()(e,t,!0))))}function n$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(De),autolinkProtocol:H,autolinkEmail:H,atxHeading:i(ae),blockQuote:i(J),characterEscape:H,characterReference:H,codeFenced:i(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Z,a),codeText:i(K,a),codeTextData:H,data:H,codeFlowValue:H,definition:i(L),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(oe),hardBreakEscape:i(ne),hardBreakTrailing:i(ne),htmlFlow:i(de,a),htmlFlowData:H,htmlText:i(de,a),htmlTextData:H,image:i(me),label:a,link:i(De),listItem:i(dt),listItemValue:p,listOrdered:i(Ue,f),listUnordered:i(Ue),paragraph:i(mt),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ae),strong:i(pt),thematicBreak:i(ce)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:ee,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:q,characterReference:Q,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:v,codeFlowValue:T,codeIndented:l(m),codeText:l(D),codeTextData:T,data:T,definition:l(),definitionDestinationString:A,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(N),htmlFlowData:T,htmlText:l(B),htmlTextData:T,image:l(G),label:O,labelText:U,lineEnding:_,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:y,resourceTitleString:P,resource:j,setextHeading:l(R),setextHeadingLineSequence:$,setextHeadingText:k,strong:l(),thematicBreak:l()}};jh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let z={type:"root",children:[]};const te={stack:[z],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},se=[];let ue=-1;for(;++ue<W.length;)if(W[ue][1].type==="listOrdered"||W[ue][1].type==="listUnordered")if(W[ue][0]==="enter")se.push(ue);else{const he=se.pop();ue=o(W,he,ue)}for(ue=-1;++ue<W.length;){const he=t[W[ue][0]];Bh.call(he,W[ue][1].type)&&he[W[ue][1].type].call(Object.assign({sliceSerialize:W[ue][2].sliceSerialize},te),W[ue][1])}if(te.tokenStack.length>0){const he=te.tokenStack[te.tokenStack.length-1];(he[1]||zh).call(te,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 o(W,z,te){let se=z-1,ue=-1,he=!1,We,He,gt,tt;for(;++se<=te;){const Oe=W[se];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?ue++:ue--,tt=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(We&&!tt&&!ue&&!gt&&(gt=se),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!ue&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||ue===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(We){let nt=se;for(He=void 0;nt--;){const Ge=W[nt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;He&&(W[He][1].type="lineEndingBlank",he=!0),Ge[1].type="lineEnding",He=nt}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}gt&&(!He||gt<He)&&(We._spread=!0),We.end=Object.assign({},He?W[He][1].start:Oe[1].end),W.splice(He||se,0,["exit",We,Oe[2]]),se++,te++}if(Oe[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};We=nt,W.splice(se,0,["enter",nt,Oe[2]]),se++,te++,gt=void 0,tt=!0}}}return W[z][1]._spread=he,te}function i(W,z){return te;function te(se){s.call(this,W(se),se),z&&z.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,z,te){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([z,te]),W.position={start:Sn(z.start),end:void 0}}function l(W){return z;function z(te){W&&W.call(this,te),c.call(this,te)}}function c(W,z){const te=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==W.type&&(z?z.call(this,W,se[0]):(se[1]||zh).call(this,W,se[0]));else throw new Error("Cannot close `"+W.type+"` ("+ro({start:W.start,end:W.end})+"): it’s not open");te.position.end=Sn(W.end)}function u(){return nl(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 v(){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 g(){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 m(){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(),te=this.stack[this.stack.length-1];te.label=z,te.identifier=Lt(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function A(){const W=this.resume(),z=this.stack[this.stack.length-1];z.url=W}function x(W){const z=this.stack[this.stack.length-1];if(!z.depth){const te=this.sliceSerialize(W).length;z.depth=te}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function $(W){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function H(W){const te=this.stack[this.stack.length-1].children;let se=te[te.length-1];(!se||se.type!=="text")&&(se=ie(),se.position={start:Sn(W.start),end:void 0},te.push(se)),this.stack.push(se)}function T(W){const z=this.stack.pop();z.value+=this.sliceSerialize(W),z.position.end=Sn(W.end)}function _(W){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const te=z.children[z.children.length-1];te.position.end=Sn(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(H.call(this,W),T.call(this,W))}function F(){this.data.atHardBreak=!0}function N(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function B(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function D(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function M(){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 G(){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 U(W){const z=this.sliceSerialize(W),te=this.stack[this.stack.length-2];te.label=XA(z),te.identifier=Lt(z).toLowerCase()}function O(){const W=this.stack[this.stack.length-1],z=this.resume(),te=this.stack[this.stack.length-1];if(this.data.inReference=!0,te.type==="link"){const se=W.children;te.children=se}else te.alt=z}function y(){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 j(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function V(W){const z=this.resume(),te=this.stack[this.stack.length-1];te.label=z,te.identifier=Lt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function Y(W){this.data.characterReferenceType=W.type}function q(W){const z=this.sliceSerialize(W),te=this.data.characterReferenceType;let se;te?(se=xh(z,te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=rl(z);const ue=this.stack[this.stack.length-1];ue.value+=se}function Q(W){const z=this.stack.pop();z.position.end=Sn(W.end)}function X(W){T.call(this,W);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(W)}function ee(W){T.call(this,W);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(W)}function J(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function L(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function oe(){return{type:"emphasis",children:[]}}function ae(){return{type:"heading",depth:0,children:[]}}function ne(){return{type:"break"}}function de(){return{type:"html",value:""}}function me(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function Ue(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function dt(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function mt(){return{type:"paragraph",children:[]}}function pt(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Sn(e){return{line:e.line,column:e.column,offset:e.offset}}function jh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jh(e,r):r$(e,r)}}function r$(e,t){let n;for(n in t)if(Bh.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 zh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ro({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ro({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ro({start:t.start,end:t.end})+") is still open")}function o$(e){const t=this;t.parser=n;function n(r){return t$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function i$(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 a$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
14
14
  `}]}function s$(e,t){const n=t.value?t.value+`
15
15
  `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function l$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=lr(r.toLowerCase()),i=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=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function f$(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 d$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Uh(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 o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function p$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Uh(e,t);const o={src:lr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function h$(e,t){const n={src:lr(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 v$(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 m$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Uh(e,t);const o={href:lr(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function g$(e,t){const n={href:lr(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 y$(e,t,n){const r=e.all(t),o=n?b$(n):Wh(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(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:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
16
16
  `}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
17
17
  `});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function b$(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=Wh(n[r])}return t}function Wh(e){const t=e.spread;return t??e.children.length>1}function w$(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];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 i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function S$(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x$(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function E$(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k$(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Qs(t.children[1]),l=ch(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function C$(e,t,n){const r=n?n.children:void 0,i=(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 c=[];for(;++l<s;){const f=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let v={type:"element",tagName:i,properties:p,children:[]};f&&(v.children=e.all(f),e.patch(f,v),v=e.applyData(f,v)),c.push(v)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function A$(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Hh=9,Vh=32;function $$(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Kh(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Kh(t.slice(o),o>0,!1)),i.join("")}function Kh(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Hh||i===Vh;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Hh||i===Vh;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function T$(e,t){const n={type:"text",value:$$(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function I$(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const O$={blockquote:i$,break:a$,code:s$,delete:l$,emphasis:c$,footnoteReference:u$,heading:f$,html:d$,imageReference:p$,image:h$,inlineCode:v$,linkReference:m$,link:g$,listItem:y$,list:w$,paragraph:S$,root:x$,strong:E$,table:k$,tableCell:A$,tableRow:C$,text:T$,thematicBreak:I$,toml:wi,yaml:wi,definition:wi,footnoteDefinition:wi};function wi(){}const qh=-1,Si=0,xi=1,Ei=2,cl=3,ul=4,fl=5,dl=6,Gh=7,Yh=8,Qh=typeof self=="object"?self:globalThis,P$=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case Si:case qh:return n(a,o);case xi:{const s=n([],o);for(const l of a)s.push(r(l));return s}case Ei:{const s=n({},o);for(const[l,c]of a)s[r(l)]=r(c);return s}case cl:return n(new Date(a),o);case ul:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case fl:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case dl:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case Gh:{const{name:s,message:l}=a;return n(new Qh[s](l),o)}case Yh:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new Qh[i](a),o)};return r},Jh=e=>P$(new Map,e)(0),cr="",{toString:D$}={},{keys:_$}=Object,lo=e=>{const t=typeof e;if(t!=="object"||!e)return[Si,t];const n=D$.call(e).slice(8,-1);switch(n){case"Array":return[xi,cr];case"Object":return[Ei,cr];case"Date":return[cl,cr];case"RegExp":return[ul,cr];case"Map":return[fl,cr];case"Set":return[dl,cr]}return n.includes("Array")?[xi,n]:n.includes("Error")?[Gh,n]:[Ei,n]},ki=([e,t])=>e===Si&&(t==="function"||t==="symbol"),M$=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=lo(a);switch(s){case Si:{let u=a;switch(l){case"bigint":s=Yh,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return o([qh],a)}return o([s,u],a)}case xi:{if(l)return o([l,[...a]],a);const u=[],f=o([s,u],a);for(const p of a)u.push(i(p));return f}case Ei:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],f=o([s,u],a);for(const p of _$(a))(e||!ki(lo(a[p])))&&u.push([i(p),i(a[p])]);return f}case cl:return o([s,a.toISOString()],a);case ul:{const{source:u,flags:f}=a;return o([s,{source:u,flags:f}],a)}case fl:{const u=[],f=o([s,u],a);for(const[p,d]of a)(e||!(ki(lo(p))||ki(lo(d))))&&u.push([i(p),i(d)]);return f}case dl:{const u=[],f=o([s,u],a);for(const p of a)(e||!ki(lo(p)))&&u.push(i(p));return f}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Zh=(e,{json:t,lossy:n}={})=>{const r=[];return M$(!(t||n),!!t,new Map,r)(e),r},Ci=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jh(Zh(e,t)):structuredClone(e):(e,t)=>Jh(Zh(e,t));function N$(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 R$(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function L$(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||N$,r=e.options.footnoteBackLabel||R$,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),f=String(c.identifier).toUpperCase(),p=lr(f.toLowerCase());let d=0;const v=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){v.length>0&&v.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,d);typeof b=="string"&&(b={type:"text",value:b}),v.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=u[u.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(...v)}else u.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(c,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ci(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
18
18
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
19
- `}]}}const Ai=function(e){if(e==null)return z$;if(typeof e=="function")return $i(e);if(typeof e=="object")return Array.isArray(e)?F$(e):B$(e);if(typeof e=="string")return j$(e);throw new Error("Expected function, string, or object as test")};function F$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ai(e[n]);return $i(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function B$(e){const t=e;return $i(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function j$(e){return $i(t);function t(n){return n&&n.type===e}}function $i(e){return t;function t(n,r,o){return!!(U$(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function z$(){return!0}function U$(e){return e!==null&&typeof e=="object"&&"type"in e}function DQ(e){return e}const Xh=[],W$=!0,pl=!1,H$="skip";function ev(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Ai(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){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=Xh,v,h,g;if((!t||i(l,c,u[u.length-1]||void 0))&&(d=V$(n(l,u)),d[0]===pl))return d;if("children"in l&&l.children){const m=l;if(m.children&&d[0]!==H$)for(h=(r?m.children.length:-1)+a,g=u.concat(m);h>-1&&h<m.children.length;){const b=m.children[h];if(v=s(b,h,g)(),v[0]===pl)return v;h=typeof v[1]=="number"?v[1]:h+a}}return d}}}function V$(e){return Array.isArray(e)?e:typeof e=="number"?[W$,e]:e==null?Xh:[e]}function hl(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),ev(e,i,s,o);function s(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return a(l,f,u)}}const vl={}.hasOwnProperty,K$={};function q$(e,t){const n=t||K$,r=new Map,o=new Map,i=new Map,a={...O$,...n.handlers},s={all:c,applyData:Y$,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:G$,wrap:J$};return hl(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),s;function l(u,f){const p=u.type,d=s.handlers[p];if(vl.call(s.handlers,p)&&d)return d(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in u){const{children:h,...g}=u,m=Ci(g);return m.children=s.all(u),m}return Ci(u)}return(s.options.unknownHandler||Q$)(s,u,f)}function c(u){const f=[];if("children"in u){const p=u.children;let d=-1;for(;++d<p.length;){const v=s.one(p[d],u);if(v){if(d&&p[d-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=tv(v.value)),!Array.isArray(v)&&v.type==="element")){const h=v.children[0];h&&h.type==="text"&&(h.value=tv(h.value))}Array.isArray(v)?f.push(...v):f.push(v)}}}return f}}function G$(e,t){e.position&&(t.position=Wk(e))}function Y$(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=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"&&i&&Object.assign(n.properties,Ci(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Q$(e,t){const n=t.data||{},r="value"in t&&!(vl.call(n,"hProperties")||vl.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 J$(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
19
+ `}]}}const Ai=function(e){if(e==null)return z$;if(typeof e=="function")return $i(e);if(typeof e=="object")return Array.isArray(e)?F$(e):B$(e);if(typeof e=="string")return j$(e);throw new Error("Expected function, string, or object as test")};function F$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ai(e[n]);return $i(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function B$(e){const t=e;return $i(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function j$(e){return $i(t);function t(n){return n&&n.type===e}}function $i(e){return t;function t(n,r,o){return!!(U$(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function z$(){return!0}function U$(e){return e!==null&&typeof e=="object"&&"type"in e}function PQ(e){return e}const Xh=[],W$=!0,pl=!1,H$="skip";function ev(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Ai(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){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=Xh,v,h,g;if((!t||i(l,c,u[u.length-1]||void 0))&&(d=V$(n(l,u)),d[0]===pl))return d;if("children"in l&&l.children){const m=l;if(m.children&&d[0]!==H$)for(h=(r?m.children.length:-1)+a,g=u.concat(m);h>-1&&h<m.children.length;){const b=m.children[h];if(v=s(b,h,g)(),v[0]===pl)return v;h=typeof v[1]=="number"?v[1]:h+a}}return d}}}function V$(e){return Array.isArray(e)?e:typeof e=="number"?[W$,e]:e==null?Xh:[e]}function hl(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),ev(e,i,s,o);function s(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return a(l,f,u)}}const vl={}.hasOwnProperty,K$={};function q$(e,t){const n=t||K$,r=new Map,o=new Map,i=new Map,a={...O$,...n.handlers},s={all:c,applyData:Y$,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:G$,wrap:J$};return hl(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),s;function l(u,f){const p=u.type,d=s.handlers[p];if(vl.call(s.handlers,p)&&d)return d(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in u){const{children:h,...g}=u,m=Ci(g);return m.children=s.all(u),m}return Ci(u)}return(s.options.unknownHandler||Q$)(s,u,f)}function c(u){const f=[];if("children"in u){const p=u.children;let d=-1;for(;++d<p.length;){const v=s.one(p[d],u);if(v){if(d&&p[d-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=tv(v.value)),!Array.isArray(v)&&v.type==="element")){const h=v.children[0];h&&h.type==="text"&&(h.value=tv(h.value))}Array.isArray(v)?f.push(...v):f.push(v)}}}return f}}function G$(e,t){e.position&&(t.position=Wk(e))}function Y$(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=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"&&i&&Object.assign(n.properties,Ci(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Q$(e,t){const n=t.data||{},r="value"in t&&!(vl.call(n,"hProperties")||vl.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 J$(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
20
20
  `});++r<e.length;)r&&n.push({type:"text",value:`
21
21
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
22
22
  `}),n}function tv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nv(e,t){const n=q$(e,t),r=n.one(e,void 0),o=L$(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
23
- `},o),i}function Z$(e,t){return e&&"run"in e?async function(n,r){const o=nv(n,{file:r,...t});await e.run(o,r)}:function(n,r){return nv(n,{file:r,...e||t})}}function rv(e){if(e)throw e}var Ti=Object.prototype.hasOwnProperty,ov=Object.prototype.toString,iv=Object.defineProperty,av=Object.getOwnPropertyDescriptor,sv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ov.call(t)==="[object Array]"},lv=function(t){if(!t||ov.call(t)!=="[object Object]")return!1;var n=Ti.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ti.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Ti.call(t,o)},cv=function(t,n){iv&&n.name==="__proto__"?iv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},uv=function(t,n){if(n==="__proto__")if(Ti.call(t,n)){if(av)return av(t,n).value}else return;return t[n]},X$=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=uv(s,n),o=uv(t,n),s!==o&&(u&&o&&(lv(o)||(i=sv(o)))?(i?(i=!1,a=r&&sv(r)?r:[]):a=r&&lv(r)?r:{},cv(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&cv(s,{name:n,newValue:o}));return s};const ml=be(X$);function gl(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 eT(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let f=-1;if(l){a(l);return}for(;++f<o.length;)(c[f]===null||c[f]===void 0)&&(c[f]=o[f]);o=c,u?tT(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function tT(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Gt={basename:nT,dirname:rT,extname:oT,join:iT,sep:"/"};function nT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');co(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function rT(e){if(co(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 oT(e){co(e);let t=e.length,n=-1,r=0,o=-1,i=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?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function iT(...e){let t=-1,n;for(;++t<e.length;)co(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":aT(n)}function aT(e){co(e);const t=e.codePointAt(0)===47;let n=sT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sT(e,t){let n="",r=0,o=-1,i=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(!(o===a-1||i===1))if(o!==a-1&&i===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("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function co(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lT={cwd:cT};function cT(){return"/"}function yl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uT(e){if(typeof e=="string")e=new URL(e);else if(!yl(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 fT(e)}function fT(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const bl=["history","path","basename","stem","extname","dirname"];class fv{constructor(t){let n;t?yl(t)?n={path:t}:typeof t=="string"||dT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":lT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<bl.length;){const i=bl[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)bl.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Gt.basename(this.path):void 0}set basename(t){Sl(t,"basename"),wl(t,"basename"),this.path=Gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gt.dirname(this.path):void 0}set dirname(t){dv(this.basename,"dirname"),this.path=Gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gt.extname(this.path):void 0}set extname(t){if(wl(t,"extname"),dv(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=Gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yl(t)&&(t=uT(t)),Sl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gt.basename(this.path,this.extname):void 0}set stem(t){Sl(t,"stem"),wl(t,"stem"),this.path=Gt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new ct(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}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(Gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gt.sep+"`")}function Sl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function dv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function dT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pT=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},hT={}.hasOwnProperty;class xl extends pT{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=eT()}copy(){const t=new xl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ml(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Cl("data",this.frozen),this.namespace[t]=n,this):hT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Cl("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ii(t),r=this.parser||this.Parser;return El("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),El("process",this.parser||this.Parser),kl("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ii(t),l=r.parse(s);r.run(l,s,function(u,f,p){if(u||!f||!p)return c(u);const d=f,v=r.stringify(d,p);gT(v)?p.value=v:p.result=v,c(u,p)});function c(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),El("processSync",this.parser||this.Parser),kl("processSync",this.compiler||this.Compiler),this.process(t,o),hv("processSync","process",n),r;function o(i,a){n=!0,rv(i),r=a}}run(t,n,r){pv(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Ii(n);o.run(t,l,c);function c(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),hv("runSync","run",r),o;function i(a,s){rv(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ii(n),o=this.compiler||this.Compiler;return kl("stringify",o),pv(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Cl("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 i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(o.settings=ml(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[d,...v]=u;const h=r[p][1];gl(h)&&gl(d)&&(d=ml(!0,h,d)),r[p]=[c,d,...v]}}}}const vT=new xl().freeze();function El(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 Cl(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 pv(e){if(!gl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ii(e){return mT(e)?e:new fv(e)}function mT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gT(e){return typeof e=="string"||yT(e)}function yT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vv=[],mv={allowDangerousHtml:!0},wT=/^(https?|ircs?|mailto|xmpp)$/i,ST=[{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 gv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||vv,l=e.remarkPlugins||vv,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mv}:mv,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||yv,d=vT().use(o$).use(l).use(Z$,c).use(s),v=new fv;typeof r=="string"&&(v.value=r);for(const b of ST)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+bT+b.id,void 0);const h=d.parse(v);let g=d.runSync(h,v);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:g.type==="root"?g.children:[g]}),hl(g,m),Yk(g,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function m(b,w,A){if(b.type==="raw"&&A&&typeof w=="number")return u?A.children.splice(w,1):A.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let x;for(x in tl)if(Object.hasOwn(tl,x)&&Object.hasOwn(b.properties,x)){const k=b.properties[x],$=tl[x];($===null||$.includes(b.tagName))&&(b.properties[x]=p(String(k||""),x,b))}}if(b.type==="element"){let x=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!x&&n&&typeof w=="number"&&(x=!n(b,w,A)),x&&A&&typeof w=="number")return f&&b.children?A.children.splice(w,1,...b.children):A.children.splice(w,1),w}}}function yv(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||wT.test(e.slice(0,t))?e:""}function xT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bv(e,t,n){const o=Ai((n||{}).ignore||[]),i=ET(t);let a=-1;for(;++a<i.length;)ev(e,"text",s);function s(c,u){let f=-1,p;for(;++f<u.length;){const d=u[f],v=p?p.children:void 0;if(o(d,v?v.indexOf(d):void 0,p))return;p=d}if(p)return l(c,u)}function l(c,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let v=0;const g=f.children.indexOf(c);let m=!1,b=[];p.lastIndex=0;let w=p.exec(c.value);for(;w;){const A=w.index,x={index:w.index,input:w.input,stack:[...u,c]};let k=d(...w,x);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=A+1:(v!==A&&b.push({type:"text",value:c.value.slice(v,A)}),Array.isArray(k)?b.push(...k):k&&b.push(k),v=A+w[0].length,m=!0),!p.global)break;w=p.exec(c.value)}return m?(v<c.value.length&&b.push({type:"text",value:c.value.slice(v)}),f.children.splice(g,1,...b)):b=[c],g+b.length}}function ET(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 o=n[r];t.push([kT(o[0]),CT(o[1])])}return t}function kT(e){return typeof e=="string"?new RegExp(xT(e),"g"):e}function CT(e){return typeof e=="function"?e:function(){return e}}function AT(e){bv(e,[/\r?\n|\r/g,$T])}function $T(){return{type:"break"}}function TT(){return function(e){AT(e)}}function wv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const Al="phrasing",$l=["autolink","link","image","label"];function IT(){return{transforms:[RT],enter:{literalAutolink:PT,literalAutolinkEmail:Tl,literalAutolinkHttp:Tl,literalAutolinkWww:Tl},exit:{literalAutolink:NT,literalAutolinkEmail:MT,literalAutolinkHttp:DT,literalAutolinkWww:_T}}}function OT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Al,notInConstruct:$l},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Al,notInConstruct:$l},{character:":",before:"[ps]",after:"\\/",inConstruct:Al,notInConstruct:$l}]}}function PT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Tl(e){this.config.enter.autolinkProtocol.call(this,e)}function DT(e){this.config.exit.autolinkProtocol.call(this,e)}function _T(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 MT(e){this.config.exit.autolinkEmail.call(this,e)}function NT(e){this.exit(e)}function RT(e){bv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FT]],{ignore:["link","linkReference"]})}function LT(e,t,n,r,o){let i="";if(!Sv(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!BT(n)))return!1;const a=jT(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function FT(e,t,n,r){return!Sv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BT(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 jT(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 o=wv(e,"(");let i=wv(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function Sv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Un(n)||mi(n))&&(!t||n!==47)}xv.peek=JT;function zT(){return{enter:{gfmFootnoteDefinition:WT,gfmFootnoteDefinitionLabelString:HT,gfmFootnoteCall:qT,gfmFootnoteCallString:GT},exit:{gfmFootnoteDefinition:KT,gfmFootnoteDefinitionLabelString:VT,gfmFootnoteCall:QT,gfmFootnoteCallString:YT}}}function UT(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ZT,footnoteReference:xv}}}function WT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function HT(){this.buffer()}function VT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function KT(e){this.exit(e)}function qT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function GT(){this.buffer()}function YT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function QT(e){this.exit(e)}function xv(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function JT(){return"["}function ZT(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),XT)),a(),i}function XT(e,t,n){return t===0?e:(n?"":" ")+e}const eI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ev.peek=iI;function tI(){return{canContainEols:["delete"],enter:{strikethrough:rI},exit:{strikethrough:oI}}}function nI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eI}],handlers:{delete:Ev}}}function rI(e){this.enter({type:"delete",children:[]},e)}function oI(e){this.exit(e)}function Ev(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function iI(){return"~"}function aI(e){return e.length}function sI(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||aI,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const h=[],g=[];let m=-1;for(e[u].length>c&&(c=e[u].length);++m<e[u].length;){const b=lI(e[u][m]);if(n.alignDelimiters!==!1){const w=o(b);g[m]=w,(l[m]===void 0||w>l[m])&&(l[m]=w)}h.push(b)}a[u]=h,s[u]=g}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)i[f]=kv(r[f]);else{const h=kv(r);for(;++f<c;)i[f]=h}f=-1;const p=[],d=[];for(;++f<c;){const h=i[f];let g="",m="";h===99?(g=":",m=":"):h===108?g=":":h===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-m.length);const w=g+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=g.length+b+m.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=w}a.splice(1,0,p),s.splice(1,0,d),u=-1;const v=[];for(;++u<a.length;){const h=a[u],g=s[u];f=-1;const m=[];for(;++f<c;){const b=h[f]||"";let w="",A="";if(n.alignDelimiters!==!1){const x=l[f]-(g[f]||0),k=i[f];k===114?w=" ".repeat(x):k===99?x%2?(w=" ".repeat(x/2+.5),A=" ".repeat(x/2-.5)):(w=" ".repeat(x/2),A=w):A=" ".repeat(x)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(w),m.push(b),n.alignDelimiters!==!1&&m.push(A),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&m.push("|")}v.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return v.join(`
23
+ `},o),i}function Z$(e,t){return e&&"run"in e?async function(n,r){const o=nv(n,{file:r,...t});await e.run(o,r)}:function(n,r){return nv(n,{file:r,...e||t})}}function rv(e){if(e)throw e}var Ti=Object.prototype.hasOwnProperty,ov=Object.prototype.toString,iv=Object.defineProperty,av=Object.getOwnPropertyDescriptor,sv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ov.call(t)==="[object Array]"},lv=function(t){if(!t||ov.call(t)!=="[object Object]")return!1;var n=Ti.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ti.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Ti.call(t,o)},cv=function(t,n){iv&&n.name==="__proto__"?iv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},uv=function(t,n){if(n==="__proto__")if(Ti.call(t,n)){if(av)return av(t,n).value}else return;return t[n]},X$=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=uv(s,n),o=uv(t,n),s!==o&&(u&&o&&(lv(o)||(i=sv(o)))?(i?(i=!1,a=r&&sv(r)?r:[]):a=r&&lv(r)?r:{},cv(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&cv(s,{name:n,newValue:o}));return s};const ml=be(X$);function gl(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 eT(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let f=-1;if(l){a(l);return}for(;++f<o.length;)(c[f]===null||c[f]===void 0)&&(c[f]=o[f]);o=c,u?tT(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function tT(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Gt={basename:nT,dirname:rT,extname:oT,join:iT,sep:"/"};function nT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');co(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function rT(e){if(co(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 oT(e){co(e);let t=e.length,n=-1,r=0,o=-1,i=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?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function iT(...e){let t=-1,n;for(;++t<e.length;)co(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":aT(n)}function aT(e){co(e);const t=e.codePointAt(0)===47;let n=sT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sT(e,t){let n="",r=0,o=-1,i=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(!(o===a-1||i===1))if(o!==a-1&&i===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("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function co(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lT={cwd:cT};function cT(){return"/"}function yl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uT(e){if(typeof e=="string")e=new URL(e);else if(!yl(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 fT(e)}function fT(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const bl=["history","path","basename","stem","extname","dirname"];class fv{constructor(t){let n;t?yl(t)?n={path:t}:typeof t=="string"||dT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":lT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<bl.length;){const i=bl[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)bl.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Gt.basename(this.path):void 0}set basename(t){Sl(t,"basename"),wl(t,"basename"),this.path=Gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gt.dirname(this.path):void 0}set dirname(t){dv(this.basename,"dirname"),this.path=Gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gt.extname(this.path):void 0}set extname(t){if(wl(t,"extname"),dv(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=Gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yl(t)&&(t=uT(t)),Sl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gt.basename(this.path,this.extname):void 0}set stem(t){Sl(t,"stem"),wl(t,"stem"),this.path=Gt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new st(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}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(Gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gt.sep+"`")}function Sl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function dv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function dT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pT=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},hT={}.hasOwnProperty;class xl extends pT{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=eT()}copy(){const t=new xl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ml(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Cl("data",this.frozen),this.namespace[t]=n,this):hT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Cl("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ii(t),r=this.parser||this.Parser;return El("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),El("process",this.parser||this.Parser),kl("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ii(t),l=r.parse(s);r.run(l,s,function(u,f,p){if(u||!f||!p)return c(u);const d=f,v=r.stringify(d,p);gT(v)?p.value=v:p.result=v,c(u,p)});function c(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),El("processSync",this.parser||this.Parser),kl("processSync",this.compiler||this.Compiler),this.process(t,o),hv("processSync","process",n),r;function o(i,a){n=!0,rv(i),r=a}}run(t,n,r){pv(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Ii(n);o.run(t,l,c);function c(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),hv("runSync","run",r),o;function i(a,s){rv(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ii(n),o=this.compiler||this.Compiler;return kl("stringify",o),pv(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Cl("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 i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(o.settings=ml(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[d,...v]=u;const h=r[p][1];gl(h)&&gl(d)&&(d=ml(!0,h,d)),r[p]=[c,d,...v]}}}}const vT=new xl().freeze();function El(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 Cl(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 pv(e){if(!gl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ii(e){return mT(e)?e:new fv(e)}function mT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gT(e){return typeof e=="string"||yT(e)}function yT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vv=[],mv={allowDangerousHtml:!0},wT=/^(https?|ircs?|mailto|xmpp)$/i,ST=[{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 gv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||vv,l=e.remarkPlugins||vv,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mv}:mv,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||yv,d=vT().use(o$).use(l).use(Z$,c).use(s),v=new fv;typeof r=="string"&&(v.value=r);for(const b of ST)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+bT+b.id,void 0);const h=d.parse(v);let g=d.runSync(h,v);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:g.type==="root"?g.children:[g]}),hl(g,m),Yk(g,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function m(b,w,A){if(b.type==="raw"&&A&&typeof w=="number")return u?A.children.splice(w,1):A.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let x;for(x in tl)if(Object.hasOwn(tl,x)&&Object.hasOwn(b.properties,x)){const k=b.properties[x],$=tl[x];($===null||$.includes(b.tagName))&&(b.properties[x]=p(String(k||""),x,b))}}if(b.type==="element"){let x=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!x&&n&&typeof w=="number"&&(x=!n(b,w,A)),x&&A&&typeof w=="number")return f&&b.children?A.children.splice(w,1,...b.children):A.children.splice(w,1),w}}}function yv(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||wT.test(e.slice(0,t))?e:""}function xT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bv(e,t,n){const o=Ai((n||{}).ignore||[]),i=ET(t);let a=-1;for(;++a<i.length;)ev(e,"text",s);function s(c,u){let f=-1,p;for(;++f<u.length;){const d=u[f],v=p?p.children:void 0;if(o(d,v?v.indexOf(d):void 0,p))return;p=d}if(p)return l(c,u)}function l(c,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let v=0;const g=f.children.indexOf(c);let m=!1,b=[];p.lastIndex=0;let w=p.exec(c.value);for(;w;){const A=w.index,x={index:w.index,input:w.input,stack:[...u,c]};let k=d(...w,x);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=A+1:(v!==A&&b.push({type:"text",value:c.value.slice(v,A)}),Array.isArray(k)?b.push(...k):k&&b.push(k),v=A+w[0].length,m=!0),!p.global)break;w=p.exec(c.value)}return m?(v<c.value.length&&b.push({type:"text",value:c.value.slice(v)}),f.children.splice(g,1,...b)):b=[c],g+b.length}}function ET(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 o=n[r];t.push([kT(o[0]),CT(o[1])])}return t}function kT(e){return typeof e=="string"?new RegExp(xT(e),"g"):e}function CT(e){return typeof e=="function"?e:function(){return e}}function AT(e){bv(e,[/\r?\n|\r/g,$T])}function $T(){return{type:"break"}}function TT(){return function(e){AT(e)}}function wv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const Al="phrasing",$l=["autolink","link","image","label"];function IT(){return{transforms:[RT],enter:{literalAutolink:PT,literalAutolinkEmail:Tl,literalAutolinkHttp:Tl,literalAutolinkWww:Tl},exit:{literalAutolink:NT,literalAutolinkEmail:MT,literalAutolinkHttp:DT,literalAutolinkWww:_T}}}function OT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Al,notInConstruct:$l},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Al,notInConstruct:$l},{character:":",before:"[ps]",after:"\\/",inConstruct:Al,notInConstruct:$l}]}}function PT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Tl(e){this.config.enter.autolinkProtocol.call(this,e)}function DT(e){this.config.exit.autolinkProtocol.call(this,e)}function _T(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 MT(e){this.config.exit.autolinkEmail.call(this,e)}function NT(e){this.exit(e)}function RT(e){bv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FT]],{ignore:["link","linkReference"]})}function LT(e,t,n,r,o){let i="";if(!Sv(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!BT(n)))return!1;const a=jT(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function FT(e,t,n,r){return!Sv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BT(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 jT(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 o=wv(e,"(");let i=wv(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function Sv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Un(n)||mi(n))&&(!t||n!==47)}xv.peek=JT;function zT(){return{enter:{gfmFootnoteDefinition:WT,gfmFootnoteDefinitionLabelString:HT,gfmFootnoteCall:qT,gfmFootnoteCallString:GT},exit:{gfmFootnoteDefinition:KT,gfmFootnoteDefinitionLabelString:VT,gfmFootnoteCall:QT,gfmFootnoteCallString:YT}}}function UT(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ZT,footnoteReference:xv}}}function WT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function HT(){this.buffer()}function VT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function KT(e){this.exit(e)}function qT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function GT(){this.buffer()}function YT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function QT(e){this.exit(e)}function xv(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function JT(){return"["}function ZT(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),XT)),a(),i}function XT(e,t,n){return t===0?e:(n?"":" ")+e}const eI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ev.peek=iI;function tI(){return{canContainEols:["delete"],enter:{strikethrough:rI},exit:{strikethrough:oI}}}function nI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eI}],handlers:{delete:Ev}}}function rI(e){this.enter({type:"delete",children:[]},e)}function oI(e){this.exit(e)}function Ev(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function iI(){return"~"}function aI(e){return e.length}function sI(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||aI,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const h=[],g=[];let m=-1;for(e[u].length>c&&(c=e[u].length);++m<e[u].length;){const b=lI(e[u][m]);if(n.alignDelimiters!==!1){const w=o(b);g[m]=w,(l[m]===void 0||w>l[m])&&(l[m]=w)}h.push(b)}a[u]=h,s[u]=g}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)i[f]=kv(r[f]);else{const h=kv(r);for(;++f<c;)i[f]=h}f=-1;const p=[],d=[];for(;++f<c;){const h=i[f];let g="",m="";h===99?(g=":",m=":"):h===108?g=":":h===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-m.length);const w=g+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=g.length+b+m.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=w}a.splice(1,0,p),s.splice(1,0,d),u=-1;const v=[];for(;++u<a.length;){const h=a[u],g=s[u];f=-1;const m=[];for(;++f<c;){const b=h[f]||"";let w="",A="";if(n.alignDelimiters!==!1){const x=l[f]-(g[f]||0),k=i[f];k===114?w=" ".repeat(x):k===99?x%2?(w=" ".repeat(x/2+.5),A=" ".repeat(x/2-.5)):(w=" ".repeat(x/2),A=w):A=" ".repeat(x)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(w),m.push(b),n.alignDelimiters!==!1&&m.push(A),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&m.push("|")}v.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return v.join(`
24
24
  `)}function lI(e){return e==null?"":String(e)}function kv(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 cI(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),uI);return o(),a}function uI(e,t,n){return">"+(n?"":" ")+e}function fI(e,t){return Cv(e,t.inConstruct,!0)&&!Cv(e,t.notInConstruct,!1)}function Cv(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 Av(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
25
25
  `&&fI(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
26
26
  `}function dI(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function pI(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 hI(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 vI(e,t,n,r){const o=hI(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(pI(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(i,mI);return f(),p}const s=n.createTracker(r),l=o.repeat(Math.max(dI(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
@@ -34,7 +34,7 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
34
34
  `))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
35
35
  `,...i.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}Tv.peek=xI;function Tv(e){return e.value||""}function xI(){return"<"}Iv.peek=EI;function Iv(e,t,n,r){const o=Il(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function EI(){return"!"}Ov.peek=kI;function Ov(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function kI(){return"!"}Pv.peek=CI;function Pv(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function CI(){return"`"}function Dv(e,t){const n=nl(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))}_v.peek=AI;function _v(e,t,n,r){const o=Il(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Dv(e,n)){const u=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=u,f}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function AI(e,t,n){return Dv(e,n)?"<":"["}Mv.peek=$I;function Mv(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function $I(){return"["}function Ol(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 TI(e){const t=Ol(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 II(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 Nv(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 OI(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?II(n):Ol(n);const s=e.ordered?a==="."?")":".":TI(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.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),Nv(n)===a&&u){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 c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function PI(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 DI(e,t,n,r){const o=PI(n);let i=n.bulletCurrent||Ol(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?i:i+" ".repeat(a-i.length))+f}}function _I(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const MI=Ai(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function NI(e,t,n,r){return(e.children.some(function(a){return MI(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function RI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Rv.peek=LI;function Rv(e,t,n,r){const o=RI(n),i=n.enter("strong"),a=n.createTracker(r);let s=a.move(o+o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function LI(e,t,n){return n.options.strong||"*"}function FI(e,t,n,r){return n.safe(e.value,r)}function BI(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 jI(e,t,n){const r=(Nv(n)+(n.options.ruleSpaces?" ":"")).repeat(BI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Lv={blockquote:cI,break:Av,code:vI,definition:gI,emphasis:$v,hardBreak:Av,heading:SI,html:Tv,image:Iv,imageReference:Ov,inlineCode:Pv,link:_v,linkReference:Mv,list:OI,listItem:DI,paragraph:_I,root:NI,strong:Rv,text:FI,thematicBreak:jI};function zI(){return{enter:{table:UI,tableData:Fv,tableHeader:Fv,tableRow:HI},exit:{codeText:VI,table:WI,tableData:Pl,tableHeader:Pl,tableRow:Pl}}}function UI(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 WI(e){this.exit(e),this.data.inTable=void 0}function HI(e){this.enter({type:"tableRow",children:[]},e)}function Pl(e){this.exit(e)}function Fv(e){this.enter({type:"tableCell",children:[]},e)}function VI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function KI(e,t){return t==="|"?t:e}function qI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
36
36
  `,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,v,h,g){return c(u(d,h,g),d.align)}function s(d,v,h,g){const m=f(d,h,g),b=c([m]);return b.slice(0,b.indexOf(`
37
- `))}function l(d,v,h,g){const m=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...g,before:i,after:i});return b(),m(),w}function c(d,v){return sI(d,{align:v,alignDelimiters:r,padding:n,stringLength:o})}function u(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("table");for(;++m<g.length;)b[m]=f(g[m],v,h);return w(),b}function f(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("tableRow");for(;++m<g.length;)b[m]=l(g[m],d,v,h);return w(),b}function p(d,v,h){let g=Lv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function GI(){return{exit:{taskListCheckValueChecked:Bv,taskListCheckValueUnchecked:Bv,paragraph:QI}}}function YI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JI}}}function Bv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QI(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 o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];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 JI(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Lv.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function ZI(){return[IT(),zT(),tI(),zI(),GI()]}function XI(e){return{extensions:[OT(),UT(),nI(),qI(e),YI()]}}const eO={tokenize:aO,partial:!0},jv={tokenize:sO,partial:!0},zv={tokenize:lO,partial:!0},Uv={tokenize:cO,partial:!0},tO={tokenize:uO,partial:!0},Wv={name:"wwwAutolink",tokenize:oO,previous:Vv},Hv={name:"protocolAutolink",tokenize:iO,previous:Kv},un={name:"emailAutolink",tokenize:rO,previous:qv},Yt={};function nO(){return{text:Yt}}let Wn=48;for(;Wn<123;)Yt[Wn]=un,Wn++,Wn===58?Wn=65:Wn===91&&(Wn=97);Yt[43]=un,Yt[45]=un,Yt[46]=un,Yt[95]=un,Yt[72]=[un,Hv],Yt[104]=[un,Hv],Yt[87]=[un,Wv],Yt[119]=[un,Wv];function rO(e,t,n){const r=this;let o,i;return a;function a(f){return!Dl(f)||!qv.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(tO,u,c)(f):f===45||f===95||ut(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),o=!0,l}function u(f){return i&&o&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function oO(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Vv.call(r,r.previous)||_l(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(eO,e.attempt(jv,e.attempt(zv,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function iO(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&Kv.call(r,r.previous)&&!_l(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ht(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):n(f)}function c(f){return f===null||vi(f)||_e(f)||Un(f)||mi(f)?n(f):e.attempt(jv,e.attempt(zv,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function aO(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function sO(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Uv,l,s)(c):c===null||_e(c)||Un(c)||c!==45&&mi(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function lO(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(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(Uv,t,i)(a):a===null||_e(a)||Un(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function cO(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),i):s===93?(e.consume(s),o):s===60||s===null||_e(s)||Un(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||_e(s)||Un(s)?t(s):r(s)}function i(s){return ht(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):n(s)}}function uO(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return ut(i)?n(i):t(i)}}function Vv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_e(e)}function Kv(e){return!ht(e)}function qv(e){return!(e===47||Dl(e))}function Dl(e){return e===43||e===45||e===46||e===95||ut(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 fO={tokenize:bO,partial:!0};function dO(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mO,continuation:{tokenize:gO},exit:yO}},text:{91:{name:"gfmFootnoteCall",tokenize:vO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pO,resolveTo:hO}}}}function pO(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][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 c=Lt(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function hO(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function vO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=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",c)}function c(f){if(i>999||f===93&&!a||f===null||f===91||_e(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Lt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return _e(f)||(a=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function mO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(v)}function u(v){if(a>999||v===93&&!s||v===null||v===91||_e(v))return n(v);if(v===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return i=Lt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return _e(v)||(s=!0),a++,e.consume(v),v===92?f:u}function f(v){return v===91||v===92||v===93?(e.consume(v),a++,u):u(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),o.includes(i)||o.push(i),we(e,d,"gfmFootnoteDefinitionWhitespace")):n(v)}function d(v){return t(v)}}function gO(e,t,n){return e.check(io,t,e.attempt(fO,t,n))}function yO(e){e.exit("gfmFootnoteDefinition")}function bO(e,t,n){const r=this;return we(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function wO(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pt(p,p.length,0,yi(d,a.slice(c+1,l),s)),Pt(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Pt(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let f=0;return p;function p(v){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(v):(a.enter("strikethroughSequenceTemporary"),d(v))}function d(v){const h=gi(c);if(v===126)return f>1?l(v):(a.consume(v),f++,d);if(f<2&&!n)return l(v);const g=a.exit("strikethroughSequenceTemporary"),m=gi(v);return g._open=!m||m===2&&!!h,g._close=!h||h===2&&!!m,s(v)}}}class SO{constructor(){this.map=[]}add(t,n,r){xO(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[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 o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function xO(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function EO(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function kO(){return{flow:{null:{name:"table",tokenize:CO,resolveAll:AO}}}}function CO(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let _=r.events.length-1;for(;_>-1;){const F=r.events[_][1].type;if(F==="lineEnding"||F==="linePrefix")_--;else break}const L=_>-1?r.events[_][1].type:null,N=L==="tableHead"||L==="tableRow"?k:l;return N===k&&r.parser.lazy[r.now().line]?n(T):N(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):de(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):ge(T)?we(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||_e(T)?(e.exit("data"),u(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,ge(T)?we(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):v(T))}function v(T){return T===45||T===58?g(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):x(T)}function h(T){return ge(T)?we(e,g,"whitespace")(T):g(T)}function g(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),m):T===45?(i+=1,m(T)):T===null||de(T)?A(T):x(T)}function m(T){return T===45?(e.enter("tableDelimiterFiller"),b(T)):x(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"),w):(e.exit("tableDelimiterFiller"),w(T))}function w(T){return ge(T)?we(e,A,"whitespace")(T):A(T)}function A(T){return T===124?v(T):T===null||de(T)?!a||o!==i?x(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):x(T)}function x(T){return n(T)}function k(T){return e.enter("tableRow"),$(T)}function $(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),$):T===null||de(T)?(e.exit("tableRow"),t(T)):ge(T)?we(e,$,"whitespace")(T):(e.enter("data"),R(T))}function R(T){return T===null||T===124||_e(T)?(e.exit("data"),$(T)):(e.consume(T),T===92?W:R)}function W(T){return T===92||T===124?(e.consume(T),R):R(T)}}function AO(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,f;const p=new SO;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Gv(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",c,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])),o=v.type==="tableDelimiterRow"?2:u?3:1):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=Oi(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=Oi(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):v.type==="tableHead"?(s=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],f=Oi(p,t,i,o,n,f)):a[1]!==0&&(f=Oi(p,t,a,o,n,f)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Gv(p,t,l,c,u),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=EO(t.events,n))}return e}function Oi(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ur(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ur(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ur(t.events,n[2]),u=ur(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};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 v=n[2]+1,h=n[3]-n[2]-1;e.add(v,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},ur(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Gv(e,t,n,r,o){const i=[],a=ur(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ur(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $O={name:"tasklistCheck",tokenize:IO};function TO(){return{text:{91:$O}}}function IO(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return _e(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 de(l)?t(l):ge(l)?e.check({tokenize:OO},t,n)(l):n(l)}}function OO(e,t,n){return we(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function PO(e){return Sh([nO(),dO(),wO(e),kO(),TO()])}const DO={};function _O(e){const t=this,n=e||DO,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(PO(n)),i.push(ZI()),a.push(XI(n))}const me={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"}}},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"}}}},messagePreview:{container:{className:"bpMessagePreviewContainer"},message:{className:"bpMessagePreviewMessage"},description:{className:"bpMessagePreviewDescription"},closeButton:{className:"bpMessagePreviewCloseButton"},avatar:{container:{className:"bpMessagePreviewAvatarContainer"},image:{className:"bpMessagePreviewAvatarImage"},fallback:{className:"bpMessagePreviewAvatarFallback"}}},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"}},toggleSound:{className:"bpHeaderSoundToggleButton"},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:{container:{className:"bpErrorHeader"},actions:{className:"bpErrorHeaderActions"}},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}},proactiveBubble:{container:{className:"bpProactiveBubbleContainer"},content:{className:"bpProactiveBubbleContent"},layout:{className:"bpProactiveBubbleLayout"},icon:{className:"bpProactiveBubbleIcon"},message:{className:"bpProactiveBubbleMessage"},closeButton:{className:"bpProactiveBubbleCloseButton"},arrow:{className:"bpProactiveBubbleArrow"}}};/**
37
+ `))}function l(d,v,h,g){const m=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...g,before:i,after:i});return b(),m(),w}function c(d,v){return sI(d,{align:v,alignDelimiters:r,padding:n,stringLength:o})}function u(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("table");for(;++m<g.length;)b[m]=f(g[m],v,h);return w(),b}function f(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("tableRow");for(;++m<g.length;)b[m]=l(g[m],d,v,h);return w(),b}function p(d,v,h){let g=Lv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function GI(){return{exit:{taskListCheckValueChecked:Bv,taskListCheckValueUnchecked:Bv,paragraph:QI}}}function YI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JI}}}function Bv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QI(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 o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];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 JI(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Lv.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function ZI(){return[IT(),zT(),tI(),zI(),GI()]}function XI(e){return{extensions:[OT(),UT(),nI(),qI(e),YI()]}}const eO={tokenize:aO,partial:!0},jv={tokenize:sO,partial:!0},zv={tokenize:lO,partial:!0},Uv={tokenize:cO,partial:!0},tO={tokenize:uO,partial:!0},Wv={name:"wwwAutolink",tokenize:oO,previous:Vv},Hv={name:"protocolAutolink",tokenize:iO,previous:Kv},un={name:"emailAutolink",tokenize:rO,previous:qv},Yt={};function nO(){return{text:Yt}}let Wn=48;for(;Wn<123;)Yt[Wn]=un,Wn++,Wn===58?Wn=65:Wn===91&&(Wn=97);Yt[43]=un,Yt[45]=un,Yt[46]=un,Yt[95]=un,Yt[72]=[un,Hv],Yt[104]=[un,Hv],Yt[87]=[un,Wv],Yt[119]=[un,Wv];function rO(e,t,n){const r=this;let o,i;return a;function a(f){return!Dl(f)||!qv.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(tO,u,c)(f):f===45||f===95||lt(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),o=!0,l}function u(f){return i&&o&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function oO(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Vv.call(r,r.previous)||_l(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(eO,e.attempt(jv,e.attempt(zv,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function iO(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&Kv.call(r,r.previous)&&!_l(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ht(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):n(f)}function c(f){return f===null||vi(f)||_e(f)||Un(f)||mi(f)?n(f):e.attempt(jv,e.attempt(zv,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function aO(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function sO(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Uv,l,s)(c):c===null||_e(c)||Un(c)||c!==45&&mi(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function lO(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(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(Uv,t,i)(a):a===null||_e(a)||Un(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function cO(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),i):s===93?(e.consume(s),o):s===60||s===null||_e(s)||Un(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||_e(s)||Un(s)?t(s):r(s)}function i(s){return ht(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):n(s)}}function uO(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return lt(i)?n(i):t(i)}}function Vv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_e(e)}function Kv(e){return!ht(e)}function qv(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 fO={tokenize:bO,partial:!0};function dO(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mO,continuation:{tokenize:gO},exit:yO}},text:{91:{name:"gfmFootnoteCall",tokenize:vO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pO,resolveTo:hO}}}}function pO(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][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 c=Lt(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function hO(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function vO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=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",c)}function c(f){if(i>999||f===93&&!a||f===null||f===91||_e(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Lt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return _e(f)||(a=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function mO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(v)}function u(v){if(a>999||v===93&&!s||v===null||v===91||_e(v))return n(v);if(v===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return i=Lt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return _e(v)||(s=!0),a++,e.consume(v),v===92?f:u}function f(v){return v===91||v===92||v===93?(e.consume(v),a++,u):u(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),o.includes(i)||o.push(i),we(e,d,"gfmFootnoteDefinitionWhitespace")):n(v)}function d(v){return t(v)}}function gO(e,t,n){return e.check(io,t,e.attempt(fO,t,n))}function yO(e){e.exit("gfmFootnoteDefinition")}function bO(e,t,n){const r=this;return we(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function wO(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pt(p,p.length,0,yi(d,a.slice(c+1,l),s)),Pt(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Pt(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let f=0;return p;function p(v){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(v):(a.enter("strikethroughSequenceTemporary"),d(v))}function d(v){const h=gi(c);if(v===126)return f>1?l(v):(a.consume(v),f++,d);if(f<2&&!n)return l(v);const g=a.exit("strikethroughSequenceTemporary"),m=gi(v);return g._open=!m||m===2&&!!h,g._close=!h||h===2&&!!m,s(v)}}}class SO{constructor(){this.map=[]}add(t,n,r){xO(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[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 o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function xO(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function EO(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function kO(){return{flow:{null:{name:"table",tokenize:CO,resolveAll:AO}}}}function CO(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let _=r.events.length-1;for(;_>-1;){const B=r.events[_][1].type;if(B==="lineEnding"||B==="linePrefix")_--;else break}const F=_>-1?r.events[_][1].type:null,N=F==="tableHead"||F==="tableRow"?k:l;return N===k&&r.parser.lazy[r.now().line]?n(T):N(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):fe(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):ge(T)?we(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||_e(T)?(e.exit("data"),u(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,ge(T)?we(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):v(T))}function v(T){return T===45||T===58?g(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):x(T)}function h(T){return ge(T)?we(e,g,"whitespace")(T):g(T)}function g(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),m):T===45?(i+=1,m(T)):T===null||fe(T)?A(T):x(T)}function m(T){return T===45?(e.enter("tableDelimiterFiller"),b(T)):x(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"),w):(e.exit("tableDelimiterFiller"),w(T))}function w(T){return ge(T)?we(e,A,"whitespace")(T):A(T)}function A(T){return T===124?v(T):T===null||fe(T)?!a||o!==i?x(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):x(T)}function x(T){return n(T)}function k(T){return e.enter("tableRow"),$(T)}function $(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),$):T===null||fe(T)?(e.exit("tableRow"),t(T)):ge(T)?we(e,$,"whitespace")(T):(e.enter("data"),R(T))}function R(T){return T===null||T===124||_e(T)?(e.exit("data"),$(T)):(e.consume(T),T===92?H:R)}function H(T){return T===92||T===124?(e.consume(T),R):R(T)}}function AO(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,f;const p=new SO;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Gv(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",c,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])),o=v.type==="tableDelimiterRow"?2:u?3:1):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=Oi(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=Oi(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):v.type==="tableHead"?(s=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],f=Oi(p,t,i,o,n,f)):a[1]!==0&&(f=Oi(p,t,a,o,n,f)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Gv(p,t,l,c,u),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=EO(t.events,n))}return e}function Oi(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ur(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ur(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ur(t.events,n[2]),u=ur(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};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 v=n[2]+1,h=n[3]-n[2]-1;e.add(v,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},ur(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Gv(e,t,n,r,o){const i=[],a=ur(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ur(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $O={name:"tasklistCheck",tokenize:IO};function TO(){return{text:{91:$O}}}function IO(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return _e(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 fe(l)?t(l):ge(l)?e.check({tokenize:OO},t,n)(l):n(l)}}function OO(e,t,n){return we(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function PO(e){return Sh([nO(),dO(),wO(e),kO(),TO()])}const DO={};function _O(e){const t=this,n=e||DO,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(PO(n)),i.push(ZI()),a.push(XI(n))}const ve={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"}}},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"}}}},messagePreview:{container:{className:"bpMessagePreviewContainer"},message:{className:"bpMessagePreviewMessage"},description:{className:"bpMessagePreviewDescription"},closeButton:{className:"bpMessagePreviewCloseButton"},avatar:{container:{className:"bpMessagePreviewAvatarContainer"},image:{className:"bpMessagePreviewAvatarImage"},fallback:{className:"bpMessagePreviewAvatarFallback"}}},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"}},toggleSound:{className:"bpHeaderSoundToggleButton"},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:{container:{className:"bpErrorHeader"},actions:{className:"bpErrorHeaderActions"}},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}},proactiveBubble:{container:{className:"bpProactiveBubbleContainer"},content:{className:"bpProactiveBubbleContent"},layout:{className:"bpProactiveBubbleLayout"},icon:{className:"bpProactiveBubbleIcon"},message:{className:"bpProactiveBubbleMessage"},closeButton:{className:"bpProactiveBubbleCloseButton"},arrow:{className:"bpProactiveBubbleArrow"}}};/**
38
38
  * @license lucide-react v0.525.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
@@ -54,167 +54,167 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const ke=(e,t)=>{const n=I.forwardRef(({className:r,...o},i)=>I.createElement(FO,{ref:i,iconNode:t,className:Qv(`lucide-${MO(Yv(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Yv(e),n};/**
57
+ */const Ee=(e,t)=>{const n=I.forwardRef(({className:r,...o},i)=>I.createElement(FO,{ref:i,iconNode:t,className:Qv(`lucide-${MO(Yv(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Yv(e),n};/**
58
58
  * @license lucide-react v0.525.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const BO=ke("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
62
+ */const BO=Ee("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
63
63
  * @license lucide-react v0.525.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const Jv=ke("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"}]]);/**
67
+ */const Jv=Ee("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"}]]);/**
68
68
  * @license lucide-react v0.525.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const jO=ke("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
72
+ */const jO=Ee("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
73
73
  * @license lucide-react v0.525.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const zO=ke("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
77
+ */const zO=Ee("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
78
78
  * @license lucide-react v0.525.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const UO=ke("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
82
+ */const UO=Ee("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
83
83
  * @license lucide-react v0.525.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const WO=ke("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
87
+ */const WO=Ee("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
88
88
  * @license lucide-react v0.525.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const HO=ke("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"}]]);/**
92
+ */const HO=Ee("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"}]]);/**
93
93
  * @license lucide-react v0.525.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Zv=ke("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"}]]);/**
97
+ */const Zv=Ee("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"}]]);/**
98
98
  * @license lucide-react v0.525.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const VO=ke("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"}]]);/**
102
+ */const VO=Ee("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"}]]);/**
103
103
  * @license lucide-react v0.525.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const KO=ke("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"}]]);/**
107
+ */const KO=Ee("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"}]]);/**
108
108
  * @license lucide-react v0.525.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const qO=ke("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"}]]);/**
112
+ */const qO=Ee("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"}]]);/**
113
113
  * @license lucide-react v0.525.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const Xv=ke("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"}]]);/**
117
+ */const Xv=Ee("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"}]]);/**
118
118
  * @license lucide-react v0.525.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const GO=ke("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"}]]);/**
122
+ */const GO=Ee("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"}]]);/**
123
123
  * @license lucide-react v0.525.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const YO=ke("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"}]]);/**
127
+ */const YO=Ee("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"}]]);/**
128
128
  * @license lucide-react v0.525.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const em=ke("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"}]]);/**
132
+ */const em=Ee("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"}]]);/**
133
133
  * @license lucide-react v0.525.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const QO=ke("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"}]]);/**
137
+ */const QO=Ee("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"}]]);/**
138
138
  * @license lucide-react v0.525.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const JO=ke("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"}]]);/**
142
+ */const JO=Ee("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"}]]);/**
143
143
  * @license lucide-react v0.525.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const ZO=ke("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"}]]);/**
147
+ */const ZO=Ee("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"}]]);/**
148
148
  * @license lucide-react v0.525.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const XO=ke("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"}]]);/**
152
+ */const XO=Ee("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"}]]);/**
153
153
  * @license lucide-react v0.525.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const eP=ke("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"}]]);/**
157
+ */const eP=Ee("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"}]]);/**
158
158
  * @license lucide-react v0.525.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const tP=ke("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"}]]);/**
162
+ */const tP=Ee("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"}]]);/**
163
163
  * @license lucide-react v0.525.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const nP=ke("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"}]]);/**
167
+ */const nP=Ee("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"}]]);/**
168
168
  * @license lucide-react v0.525.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const rP=ke("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
172
+ */const rP=Ee("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
173
173
  * @license lucide-react v0.525.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const oP=ke("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"}]]);/**
177
+ */const oP=Ee("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"}]]);/**
178
178
  * @license lucide-react v0.525.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const iP=ke("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"}]]);/**
182
+ */const iP=Ee("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"}]]);/**
183
183
  * @license lucide-react v0.525.0 - ISC
184
184
  *
185
185
  * This source code is licensed under the ISC license.
186
186
  * See the LICENSE file in the root directory of this source tree.
187
- */const aP=ke("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"}]]);/**
187
+ */const aP=Ee("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"}]]);/**
188
188
  * @license lucide-react v0.525.0 - ISC
189
189
  *
190
190
  * This source code is licensed under the ISC license.
191
191
  * See the LICENSE file in the root directory of this source tree.
192
- */const sP=ke("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"}]]);/**
192
+ */const sP=Ee("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"}]]);/**
193
193
  * @license lucide-react v0.525.0 - ISC
194
194
  *
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
- */const lP=ke("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"}]]);/**
197
+ */const lP=Ee("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"}]]);/**
198
198
  * @license lucide-react v0.525.0 - ISC
199
199
  *
200
200
  * This source code is licensed under the ISC license.
201
201
  * See the LICENSE file in the root directory of this source tree.
202
- */const tm=ke("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"}]]);/**
202
+ */const tm=Ee("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"}]]);/**
203
203
  * @license lucide-react v0.525.0 - ISC
204
204
  *
205
205
  * This source code is licensed under the ISC license.
206
206
  * See the LICENSE file in the root directory of this source tree.
207
- */const cP=ke("volume-x",[["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"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
207
+ */const cP=Ee("volume-x",[["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"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
208
208
  * @license lucide-react v0.525.0 - ISC
209
209
  *
210
210
  * This source code is licensed under the ISC license.
211
211
  * See the LICENSE file in the root directory of this source tree.
212
- */const uP=ke("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"}]]);/**
212
+ */const uP=Ee("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"}]]);/**
213
213
  * @license lucide-react v0.525.0 - ISC
214
214
  *
215
215
  * This source code is licensed under the ISC license.
216
216
  * See the LICENSE file in the root directory of this source tree.
217
- */const nm=ke("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fP=({text:e})=>{const{message:{blocks:{text:t}}}=me,[n,r]=I.useState(new Map);function o(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 c=l[1];c&&!s.includes(c)&&s.push(c)}s.forEach(c=>{o(c)})},[e]);const i={h1:({node:a,...s})=>E.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>E.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>E.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>E.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>E.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>E.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>E.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>E.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...c})=>E.jsx("a",{...c,...t.link,onMouseUp:u=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?E.jsx("div",{"data-error":!0,...t.image,children:E.jsx(em,{strokeWidth:"1"})}):E.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>E.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>E.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>E.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>E.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{var v,h;const l=a==null?void 0:a.children[0],c=dP(((h=(v=l==null?void 0:l.properties)==null?void 0:v.className)==null?void 0:h[0])||""),[u,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(m=>{console.error("Failed to copy code to clipboard:",m)})};return E.jsxs("div",{...t.codeBlockContainer,children:[E.jsxs("div",{...t.codeBlockTitle,children:[c?E.jsx("span",{children:c}):"Code",u?E.jsx(jO,{...t.codeBlockCopyIcon}):E.jsx(GO,{...t.codeBlockCopyIcon,onClick:d})]}),E.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>E.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>E.jsx("code",{...s,...t.code}),table:({node:a,...s})=>E.jsx("div",{...t.tableContainer,children:E.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>E.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>E.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>E.jsx("td",{...s,...t.tableData})};return E.jsx(gv,{urlTransform:a=>a.startsWith("tel:")?a:yv(a),components:i,remarkPlugins:[_O,TT],children:e})},dP=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},pP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},rm=e=>{let t;const n=new Set,r=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,d))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(pP?"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()}},c=t=e(r,o,l);return l},hP=e=>e?rm(e):rm;var Ml={exports:{}},Nl={},Pi={exports:{}},Rl={};/**
217
+ */const nm=Ee("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fP=({text:e})=>{const{message:{blocks:{text:t}}}=ve,[n,r]=I.useState(new Map);function o(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 c=l[1];c&&!s.includes(c)&&s.push(c)}s.forEach(c=>{o(c)})},[e]);const i={h1:({node:a,...s})=>E.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>E.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>E.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>E.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>E.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>E.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>E.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>E.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...c})=>E.jsx("a",{...c,...t.link,onMouseUp:u=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?E.jsx("div",{"data-error":!0,...t.image,children:E.jsx(em,{strokeWidth:"1"})}):E.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>E.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>E.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>E.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>E.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{var v,h;const l=a==null?void 0:a.children[0],c=dP(((h=(v=l==null?void 0:l.properties)==null?void 0:v.className)==null?void 0:h[0])||""),[u,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(m=>{console.error("Failed to copy code to clipboard:",m)})};return E.jsxs("div",{...t.codeBlockContainer,children:[E.jsxs("div",{...t.codeBlockTitle,children:[c?E.jsx("span",{children:c}):"Code",u?E.jsx(jO,{...t.codeBlockCopyIcon}):E.jsx(GO,{...t.codeBlockCopyIcon,onClick:d})]}),E.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>E.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>E.jsx("code",{...s,...t.code}),table:({node:a,...s})=>E.jsx("div",{...t.tableContainer,children:E.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>E.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>E.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>E.jsx("td",{...s,...t.tableData})};return E.jsx(gv,{urlTransform:a=>a.startsWith("tel:")?a:yv(a),components:i,remarkPlugins:[_O,TT],children:e})},dP=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},pP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},rm=e=>{let t;const n=new Set,r=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,d))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(pP?"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()}},c=t=e(r,o,l);return l},hP=e=>e?rm(e):rm;var Ml={exports:{}},Nl={},Pi={exports:{}},Rl={};/**
218
218
  * @license React
219
219
  * use-sync-external-store-shim.production.min.js
220
220
  *
@@ -230,7 +230,7 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
230
230
  *
231
231
  * This source code is licensed under the MIT license found in the
232
232
  * LICENSE file in the root directory of this source tree.
233
- */var im;function mP(){return im||(im=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(w){{for(var A=arguments.length,x=new Array(A>1?A-1:0),k=1;k<A;k++)x[k-1]=arguments[k];r("error",w,x)}}function r(w,A,x){{var k=t.ReactDebugCurrentFrame,$=k.getStackAddendum();$!==""&&(A+="%s",x=x.concat([$]));var R=x.map(function(W){return String(W)});R.unshift("Warning: "+A),Function.prototype.apply.call(console[w],console,R)}}function o(w,A){return w===A&&(w!==0||1/w===1/A)||w!==w&&A!==A}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function p(w,A,x){u||e.startTransition!==void 0&&(u=!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 k=A();if(!f){var $=A();i(k,$)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var R=a({inst:{value:k,getSnapshot:A}}),W=R[0].inst,T=R[1];return l(function(){W.value=k,W.getSnapshot=A,d(W)&&T({inst:W})},[w,k,A]),s(function(){d(W)&&T({inst:W});var _=function(){d(W)&&T({inst:W})};return w(_)},[w]),c(k),k}function d(w){var A=w.getSnapshot,x=w.value;try{var k=A();return!i(x,k)}catch{return!0}}function v(w,A,x){return A()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,m=g?v:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;Ll.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ll}var am;function sm(){return am||(am=1,process.env.NODE_ENV==="production"?Pi.exports=vP():Pi.exports=mP()),Pi.exports}/**
233
+ */var im;function mP(){return im||(im=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(w){{for(var A=arguments.length,x=new Array(A>1?A-1:0),k=1;k<A;k++)x[k-1]=arguments[k];r("error",w,x)}}function r(w,A,x){{var k=t.ReactDebugCurrentFrame,$=k.getStackAddendum();$!==""&&(A+="%s",x=x.concat([$]));var R=x.map(function(H){return String(H)});R.unshift("Warning: "+A),Function.prototype.apply.call(console[w],console,R)}}function o(w,A){return w===A&&(w!==0||1/w===1/A)||w!==w&&A!==A}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function p(w,A,x){u||e.startTransition!==void 0&&(u=!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 k=A();if(!f){var $=A();i(k,$)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var R=a({inst:{value:k,getSnapshot:A}}),H=R[0].inst,T=R[1];return l(function(){H.value=k,H.getSnapshot=A,d(H)&&T({inst:H})},[w,k,A]),s(function(){d(H)&&T({inst:H});var _=function(){d(H)&&T({inst:H})};return w(_)},[w]),c(k),k}function d(w){var A=w.getSnapshot,x=w.value;try{var k=A();return!i(x,k)}catch{return!0}}function v(w,A,x){return A()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,m=g?v:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;Ll.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ll}var am;function sm(){return am||(am=1,process.env.NODE_ENV==="production"?Pi.exports=vP():Pi.exports=mP()),Pi.exports}/**
234
234
  * @license React
235
235
  * use-sync-external-store-shim/with-selector.production.min.js
236
236
  *
@@ -246,52 +246,52 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
246
246
  *
247
247
  * This source code is licensed under the MIT license found in the
248
248
  * LICENSE file in the root directory of this source tree.
249
- */var cm;function yP(){return cm||(cm=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=sm();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,f,p,d,v){var h=i(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var m=s(function(){var x=!1,k,$,R=function(L){if(!x){x=!0,k=L;var N=d(L);if(v!==void 0&&g.hasValue){var F=g.value;if(v(F,N))return $=F,F}return $=N,N}var D=k,M=$;if(r(D,L))return M;var G=d(L);return v!==void 0&&v(M,G)?M:(k=L,$=G,G)},W=p===void 0?null:p,T=function(){return R(f())},_=W===null?void 0:function(){return R(W())};return[T,_]},[f,p,d,v]),b=m[0],w=m[1],A=o(u,b,w);return a(function(){g.hasValue=!0,g.value=A},[A]),l(A),A}Fl.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fl}process.env.NODE_ENV==="production"?Ml.exports=gP():Ml.exports=yP();var bP=Ml.exports;const wP=be(bP),um={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:SP}=I,{useSyncExternalStoreWithSelector:xP}=wP;let fm=!1;const EP=e=>e;function kP(e,t=EP,n){(um?"production":void 0)!=="production"&&n&&!fm&&(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"),fm=!0);const r=xP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return SP(r),r}const CP=e=>{(um?"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"?hP(e):e,n=(r,o)=>kP(t,r,o);return Object.assign(n,t),n},xn=e=>CP,Di={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Bl=new Map,_i=e=>{const t=Bl.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},AP=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Bl.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return Bl.set(n.name,o),{type:"tracked",store:e,...o}},uo=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=t;let c;try{c=(i??(Di?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Di?"production":void 0)!=="production"&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...f}=AP(s,c,l);let p=!0;o.setState=(h,g,m)=>{const b=n(h,g);if(!p)return b;const w=m===void 0?{type:a||"anonymous"}:typeof m=="string"?{type:m}:m;return s===void 0?(u==null||u.send(w,r()),b):(u==null||u.send({...w,type:`${s}/${w.type}`},{..._i(l.name),[s]:o.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},v=e(o.setState,r,o);if(f.type==="untracked"?u==null||u.init(v):(f.stores[f.store]=o,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([h,g])=>[h,h===f.store?v:g.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let h=!1;const g=o.dispatch;o.dispatch=(...m)=>{(Di?"production":void 0)!=="production"&&m[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(...m)}}return u.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return jl(h.payload,m=>{if(m.type==="__setState"){if(s===void 0){d(m.state);return}Object.keys(m.state).length!==1&&console.error(`
249
+ */var cm;function yP(){return cm||(cm=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=sm();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,f,p,d,v){var h=i(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var m=s(function(){var x=!1,k,$,R=function(F){if(!x){x=!0,k=F;var N=d(F);if(v!==void 0&&g.hasValue){var B=g.value;if(v(B,N))return $=B,B}return $=N,N}var D=k,M=$;if(r(D,F))return M;var G=d(F);return v!==void 0&&v(M,G)?M:(k=F,$=G,G)},H=p===void 0?null:p,T=function(){return R(f())},_=H===null?void 0:function(){return R(H())};return[T,_]},[f,p,d,v]),b=m[0],w=m[1],A=o(u,b,w);return a(function(){g.hasValue=!0,g.value=A},[A]),l(A),A}Fl.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fl}process.env.NODE_ENV==="production"?Ml.exports=gP():Ml.exports=yP();var bP=Ml.exports;const wP=be(bP),um={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:SP}=I,{useSyncExternalStoreWithSelector:xP}=wP;let fm=!1;const EP=e=>e;function kP(e,t=EP,n){(um?"production":void 0)!=="production"&&n&&!fm&&(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"),fm=!0);const r=xP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return SP(r),r}const CP=e=>{(um?"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"?hP(e):e,n=(r,o)=>kP(t,r,o);return Object.assign(n,t),n},xn=e=>CP,Di={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Bl=new Map,_i=e=>{const t=Bl.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},AP=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Bl.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return Bl.set(n.name,o),{type:"tracked",store:e,...o}},uo=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=t;let c;try{c=(i??(Di?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Di?"production":void 0)!=="production"&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...f}=AP(s,c,l);let p=!0;o.setState=(h,g,m)=>{const b=n(h,g);if(!p)return b;const w=m===void 0?{type:a||"anonymous"}:typeof m=="string"?{type:m}:m;return s===void 0?(u==null||u.send(w,r()),b):(u==null||u.send({...w,type:`${s}/${w.type}`},{..._i(l.name),[s]:o.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},v=e(o.setState,r,o);if(f.type==="untracked"?u==null||u.init(v):(f.stores[f.store]=o,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([h,g])=>[h,h===f.store?v:g.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let h=!1;const g=o.dispatch;o.dispatch=(...m)=>{(Di?"production":void 0)!=="production"&&m[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(...m)}}return u.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return jl(h.payload,m=>{if(m.type==="__setState"){if(s===void 0){d(m.state);return}Object.keys(m.state).length!==1&&console.error(`
250
250
  [zustand devtools middleware] Unsupported __setState action format.
251
251
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
252
252
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
253
- `);const b=m.state[s];if(b==null)return;JSON.stringify(o.getState())!==JSON.stringify(b)&&d(b);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(m)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(v),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_i(l.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_i(l.name));case"ROLLBACK":return jl(h.state,m=>{if(s===void 0){d(m),u==null||u.init(o.getState());return}d(m[s]),u==null||u.init(_i(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return jl(h.state,m=>{if(s===void 0){d(m);return}JSON.stringify(o.getState())!==JSON.stringify(m[s])&&d(m[s])});case"IMPORT_STATE":{const{nextLiftedState:m}=h.payload,b=(g=m.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),u==null||u.send(null,m);return}case"PAUSE_RECORDING":return p=!p}return}}),v},jl=(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 zl(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=l=>l===null?null:JSON.parse(l,void 0),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return fo(r)(n)}}}},$P=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,m)=>({...m,...g}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...g)},r,o);const u=fo(i.serialize),f=()=>{const g=i.partialize({...r()});let m;const b=u({state:g,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{m=w});if(m)throw m;return b},p=o.setState;o.setState=(g,m)=>{p(g,m),f()};const d=e((...g)=>{n(...g),f()},r,o);let v;const h=()=>{var g;if(!c)return;a=!1,s.forEach(b=>b(r()));const m=((g=i.onRehydrateStorage)==null?void 0:g.call(i,r()))||void 0;return fo(c.getItem.bind(c))(i.name).then(b=>{if(b)return i.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return i.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 v=i.merge(b,(w=r())!=null?w:d),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),a=!0,l.forEach(b=>b(v))}).catch(b=>{m==null||m(void 0,b)})};return o.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),v||d},TP=(e,t)=>(n,r,o)=>{let i={storage:zl(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let c=i.storage;if(!c)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...h)},r,o);const u=()=>{const h=i.partialize({...r()});return c.setItem(i.name,{state:h,version:i.version})},f=o.setState;o.setState=(h,g)=>{f(h,g),u()};const p=e((...h)=>{n(...h),u()},r,o);o.getInitialState=()=>p;let d;const v=()=>{var h,g;if(!c)return;a=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const m=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(h=r())!=null?h:p))||void 0;return fo(c.getItem.bind(c))(i.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return[!0,i.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[A,x]=b;if(d=i.merge(x,(w=r())!=null?w:p),n(d,!0),A)return u()}).then(()=>{m==null||m(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{m==null||m(void 0,b)})};return o.persist={setOptions:h=>{i={...i,...h},h.storage&&(c=h.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},i.skipHydration||v(),d||p},Mi=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Di?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),$P(e,t)):TP(e,t),dm=xn()(uo(Mi(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let Ni;const IP=new Uint8Array(16);function OP(){if(!Ni&&(Ni=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ni))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ni(IP)}const rt=[];for(let e=0;e<256;++e)rt.push((e+256).toString(16).slice(1));function PP(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 pm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function DP(e,t,n){if(pm.randomUUID&&!t&&!e)return pm.randomUUID();e=e||{};const r=e.random||(e.rng||OP)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,PP(r)}function Ri(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:o,disableInput:i}=hm(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:o,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:i,metadata:t}}const hm=e=>{switch(e.type){case"audio":return vm(e);case"card":return _P(e);case"carousel":return MP(e);case"choice":return NP(e);case"dropdown":return RP(e);case"file":return mm(e);case"image":return gm(e);case"location":return ym(e);case"markdown":return bm(e);case"text":return wm(e);case"video":return Sm(e);case"bloc":return LP(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},po=e=>({block:e,type:"bubble"}),vm=e=>({payload:{type:"audio",url:e.audioUrl}}),_P=e=>({payload:po(xm(e))}),MP=e=>({payload:{type:"carousel",blocks:e.items.map(t=>xm({type:"card",...t}))}}),NP=e=>{const t=e.options.map(i=>({title:i.label,value:i.value})),n=e.text,r=DP(),o=po({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:o}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[o,{type:"row",blocks:t.map(({title:i,value:a})=>({type:"button",variant:"action",text:i,buttonValue:a,groupId:r}))}]}}},RP=e=>{const t=e.options.map(o=>({label:o.label,value:o.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:po({type:"column",blocks:r})}},mm=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),gm=e=>({payload:{type:"image",url:e.imageUrl}}),ym=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),bm=e=>({payload:po({type:"text",text:e.markdown})}),wm=e=>({payload:po({type:"text",text:e.text,value:e.value})}),Sm=e=>({payload:{type:"video",url:e.videoUrl}}),LP=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return vm({...n.payload,type:n.type}).payload;case"file":return mm({...n.payload,type:n.type}).payload;case"image":return gm({...n.payload,type:n.type}).payload;case"location":return ym({...n.payload,type:n.type}).payload;case"markdown":return bm({...n.payload,type:n.type}).payload;case"text":return wm({...n.payload,type:n.type}).payload;case"video":return Sm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),xm=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,o=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}`)}}),i=[];return r&&i.push({type:"image",url:r}),t&&i.push({type:"text",text:`#### ${t}`}),n&&i.push({type:"text",text:n}),o.length>0&&i.push({type:"row",blocks:o}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},Hn=xn()(uo(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var o;const r=(o=t.metadata)==null?void 0:o.clientMessageId;if(r){const i=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[i];if(i!==-1)return{messages:[...n.slice(0,i),{...a,...t},...n.slice(i+1)]}}return{messages:[...n.filter(i=>i.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(o=>o.id===t?{...o,...n}:o)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let o;do{const{messages:i,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:o});r.push(...i),o=a.nextToken}while(o);return e({isFetching:!1}),r.reverse().map(i=>Ri(i)).filter(Boolean)}}),{name:"messagesStore"})),FP=(e,t)=>xn()(uo(Mi(n=>({setUser:r=>n(o=>({...o,user:r})),setConversationId:r=>n(o=>({...o,conversationId:r})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:zl(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Qr=class Qr{constructor(){}static getInstance(t="bp-webchat",n){return Qr._instances[t]||(Qr._instances[t]=FP(t,n)),Qr._instances[t]}};Ms(Qr,"_instances",{});let Ul=Qr;const Em=Ul.getInstance,Li=xn()(uo(e=>({eventEmitter:gp(),messageContainerRef:I.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),BP=8,jP=e=>xn()(Mi((t,n)=>({files:[],setFiles:r=>t({files:r}),upsertFile:r=>t(({files:o})=>({files:o.some(s=>s.name===r.name)?o.map(s=>s.name===r.name?{...s,...r}:s):[...o,{...r}]})),uploadFile:async(r,o)=>{const i=n().files.some(s=>s.name===r.name),a=n().files.length===BP;if(!(!i&&a)){n().upsertFile({name:r.name,type:"file",instance:r,status:"loading"});try{const{fileUrl:s,type:l}=await o(r);n().upsertFile({name:r.name,type:l,url:s,instance:r,status:"uploaded"})}catch(s){console.error("Error sending file:",s),n().upsertFile({name:r.name,type:"file",instance:r,status:"error"})}}},deleteFile:r=>t(({files:o})=>({files:o.filter(i=>i.name!=r)}))}),{name:e,storage:zl(()=>sessionStorage)})),Jr=class Jr{constructor(){}static getInstance(t="bp-composer-file-store"){return Jr._instances[t]||(Jr._instances[t]=jP(t)),Jr._instances[t]}};Ms(Jr,"_instances",{});let Wl=Jr;const km=Wl.getInstance,ho=xn()(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)})),clearParticipants:()=>e({participants:[]})})),zP=e=>xn()(uo(Mi((t,n)=>({soundOn:!0,setSoundEnabled:r=>t({soundOn:r}),toggleSound:()=>t({soundOn:!n().soundOn})}),{name:e}))),Zr=class Zr{constructor(){}static getInstance(t="webchat:soundEnabled"){return Zr._instances[t]||(Zr._instances[t]=zP(t)),Zr._instances[t]}};Ms(Zr,"_instances",{});let Hl=Zr;const Cm=Hl.getInstance,UP=({text:e,buttonValue:t,variant:n,groupId:r,reusable:o,sendMessage:i,isReadOnly:a,...s})=>{const l=Li(w=>w.eventEmitter),[c,u]=I.useState(!1),[f,p]=I.useState(!1),[d,v]=I.useState(!1),{message:{blocks:{button:h}}}=me;I.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),o||v(!0)})},[l,r,o]);const m={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}u(!0),o||v(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&i&&(i==null||i({type:"text",text:e,value:t}))},"data-activated":c?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?E.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):E.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Vl=I.createContext(null);function Am(){const e=I.useContext(Vl);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Kl=I.createContext({showInputModal:void 0});function ql(){return I.useContext(Kl)}const $m=I.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:o,feedback:i,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:c,...u},f)=>{const{showInputModal:p}=ql(),{message:{blocks:{bubble:{container:d,feedbackContainer:v,feedbackIcon:h}}}}=me;return t=="incoming"?E.jsxs("div",{"data-direction":"incoming","data-feedback":!!i,...u,...d,ref:f,children:[E.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l}}),c&&p&&e.type==="text"&&E.jsxs("div",{...v,children:[E.jsx(aP,{...h,"data-selected":i==="positive",onClick:()=>c(o,{value:"positive"})}),E.jsx(iP,{...h,"data-selected":i==="negative",onClick:async()=>{const g=await p({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButtonText:"Send feedback",cancelButtonText:"Cancel",Content:WP});c(o,{value:"negative",comment:g})}})]})]}):E.jsx("div",{"data-direction":"outgoing",...u,...d,ref:f,children:E.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:c}})})});$m.displayName="Bubble";const WP=({setValue:e})=>{const{modal:{dialog:{content:t}}}=me;return E.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var _t=function(){return _t=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_t.apply(this,arguments)};function Tm(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function fr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function l(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function dr(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Im(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Gl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function HP(){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 VP(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=I.useRef(0),o=HP(),i=I.useState(n),a=i[0],s=i[1],l=I.useCallback(function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=++r.current;return a.loading||s(function(p){return _t(_t({},p),{loading:!0})}),e.apply(void 0,c).then(function(p){return o()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return o()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function Om(e,t){t===void 0&&(t=[]);var n=VP(e,t,{loading:!0}),r=n[0],o=n[1];return I.useEffect(function(){o()},[o]),r}const Pm=I.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=I.useId(),{setIsLoading:a}=Am(),[s,l]=I.useState(n),[c,u]=I.useState(!1),[f,p]=I.useState(!1),{message:{blocks:{image:d}}}=me;return I.useLayoutEffect(()=>{a(v=>[...v,i])},[]),Om(async()=>{if(e){try{const{width:v,height:h}=await nk(e);s==="auto"&&l(KP(v,h))}catch(v){l("square"),console.error(v)}a(v=>v.filter(h=>h!==i))}},[e]),E.jsxs(E.Fragment,{children:[c?null:E.jsx("div",{"data-orientation":s,...d.placeholder}),f?E.jsx("div",{"data-error":"true","data-orientation":s,...r,...d.image,ref:o,children:E.jsx(em,{size:"25%",strokeWidth:"5%"})}):E.jsx("img",{"data-orientation":s,"data-loaded":c,...r,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)},onError:()=>{p(!0),u(!0)}})]})});Pm.displayName="Image";function KP(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const Dm=I.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:o}}}=me;return E.jsx("div",{children:E.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...o,ref:r})})});Dm.displayName="Video";const _m=I.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:o}}}=me;return E.jsx("div",{children:E.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...o,ref:r})})});_m.displayName="Audio";const Mm=I.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=me;return E.jsxs("a",{...o,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:i,children:[E.jsx("p",{...s.title,children:n}),E.jsx(XO,{...s.icon})]})});Mm.displayName="Location";const Nm=I.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:o,timestamp:i,messageId:a,isReadOnly:s,sendMessage:l,...c},u)=>{const{message:{blocks:{column:f}}}=me;return E.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...f,ref:u,children:e.map((p,d)=>E.jsx(Kn,{block:{...p,direction:r,timestamp:i,sender:o,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Nm.displayName="Column";const Rm=I.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:o,timestamp:i,metadata:a,messageId:s,isReadOnly:l,sendMessage:c,...u},f)=>{const{message:{blocks:{row:p}}}=me;return E.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...p,ref:f,children:e.map((d,v)=>E.jsx(Kn,{block:{...d,direction:r,timestamp:i,sender:o,messageId:s,isReadOnly:l,sendMessage:c}},v))})});Rm.displayName="Row";function qP(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lm(e){return qP(e)||Array.isArray(e)}function GP(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Yl(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!Lm(s)||!Lm(l)?s===l:Yl(s,l)})}function Fm(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function YP(e,t){if(e.length!==t.length)return!1;const n=Fm(e),r=Fm(t);return n.every((o,i)=>{const a=r[i];return Yl(o,a)})}function Ql(e){return typeof e=="number"}function Bm(e){return typeof e=="string"}function Jl(e){return typeof e=="boolean"}function jm(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return Math.abs(e)}function Zl(e){return Math.sign(e)}function Fi(e,t){return ze(e-t)}function QP(e,t){if(e===0||t===0||ze(e)<=ze(t))return 0;const n=Fi(ze(e),ze(t));return ze(n/e)}function vo(e){return ji(e).map(Number)}function fn(e){return e[Bi(e)]}function Bi(e){return Math.max(0,e.length-1)}function ji(e){return Object.keys(e)}function zm(e,t){return[e,t].reduce((n,r)=>(ji(r).forEach(o=>{const i=n[o],a=r[o],s=jm(i)&&jm(a);n[o]=s?zm(i,a):a}),n),{})}function Um(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function JP(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(c){return i(c)/2}function i(c){return t-c}function a(){return t*Number(e)}function s(c){return Ql(e)?a():n[e](c)}return{measure:s}}function ZP(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=l();function a(u){const{width:f,height:p}=u;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:o,endEdge:i,measureSize:a}}function En(e,t){const n=ze(e-t);function r(c){return c<e}function o(c){return c>t}function i(c){return r(c)||o(c)}function a(c){return i(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function Wm(e,t,n){const{constrain:r}=En(0,e),o=e+1;let i=a(t);function a(p){return n?ze((o+p)%o):r(p)}function s(){return i}function l(p){return i=a(p),f}function c(p){return u().set(s()+p)}function u(){return Wm(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function XP(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function mo(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function eD(e,t,n,r,o,i,a,s,l,c,u,f,p,d,v,h,g,m,b){const{cross:w}=e,A=["INPUT","SELECT","TEXTAREA"],x={passive:!1},k=mo(),$=mo(),R=En(50,225).constrain(v.measure(20)),W={mouse:300,touch:400},T={mouse:500,touch:600},_=h?43:25;let L=!1,N=0,F=0,D=!1,M=!1,G=!1,z=!1;function O(X,K){if(!K)return;function oe(le){(Jl(K)||K(X,le))&&Y(le)}const V=n;k.add(V,"dragstart",le=>le.preventDefault(),x).add(V,"touchmove",()=>{},x).add(V,"touchend",()=>{}).add(V,"touchstart",oe).add(V,"mousedown",oe).add(V,"touchcancel",Q).add(V,"contextmenu",Q).add(V,"click",ee,!0)}function y(){k.clear(),$.clear()}function P(){const X=z?r:n;$.add(X,"touchmove",q,x).add(X,"touchend",Q).add(X,"mousemove",q,x).add(X,"mouseup",Q)}function B(X){const K=X.nodeName||"";return A.includes(K)}function S(){return(h?T:W)[z?"mouse":"touch"]}function H(X,K){const oe=p.add(Zl(X)*-1),V=f.byDistance(X,!h).distance;return h||ze(X)<R?V:m&&K?V*.5:f.byIndex(oe.get(),0).distance}function Y(X){const K=Um(X,o);z=K,!(K&&X.button!==0)&&(B(X.target)||(G=h&&K&&!X.buttons&&L,L=Fi(i.get(),s.get())>=2,D=!0,a.pointerDown(X),u.useFriction(0).useDuration(0),i.set(s),P(),N=a.readPoint(X),F=a.readPoint(X,w),d.emit("pointerDown")))}function q(X){const K=a.readPoint(X),oe=a.readPoint(X,w),V=Fi(K,N),le=Fi(oe,F);if(!M&&!z&&(!X.cancelable||(M=V>le,!M)))return Q(X);const Z=a.pointerMove(X);V>g&&(G=!0),u.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(Z)),X.preventDefault()}function Q(X){const oe=f.byDistance(0,!1).index!==p.get(),V=a.pointerUp(X)*S(),le=H(t.apply(V),oe),Z=QP(V,le),fe=_-10*Z,pe=b+Z/50;M=!1,D=!1,$.clear(),u.useDuration(fe).useFriction(pe),c.distance(le,!h),z=!1,d.emit("pointerUp")}function ee(X){G&&(X.stopPropagation(),X.preventDefault())}function te(){return D}return{init:O,pointerDown:te,destroy:y}}function tD(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const v=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Um(f,t)?f:f.touches[0])[v]}function s(f){return r=f,o=f,a(f)}function l(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function c(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),v=i(f)-i(o)>170,h=p/d;return d&&!v&&ze(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function nD(e){function t(r){return e*(r/100)}return{measure:t}}function rD(e,t,n,r,o){let i,a,s=[],l=!1;function c(d){return o.measureSize(d.getBoundingClientRect())}function u(d,v){if(!v)return;a=c(e),s=r.map(c);function h(m){for(const b of m){const w=b.target===e,A=r.indexOf(b.target),x=w?a:s[A],k=c(w?e:r[A]);if(x!==k){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(m=>{l||(Jl(v)||v(d,m))&&h(m)}),[e].concat(r).forEach(m=>i.observe(m))}function f(){i&&i.disconnect(),l=!0}return{init:u,destroy:f}}function oD(e,t,n,r){let o=!0,i=0,a=0,s=n,l=r,c=e.get(),u=0;function f(){const x=t.get()-e.get(),k=!s;let $=0;return k?(i=0,e.set(t),$=x):(i+=x/s,i*=l,c+=i,e.add(i),$=c-u),a=Zl($),u=c,o=ze(x)<.001,A}function p(){return o}function d(){return s}function v(){return a}function h(){return i}function g(){return b(n)}function m(){return w(r)}function b(x){return s=x,A}function w(x){return l=x,A}const A={direction:v,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:m,useBaseDuration:g,useFriction:w,useDuration:b};return A}function iD(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=En(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!c())return;const v=e.reachedMin(t.get())?"min":"max",h=ze(e[v]-t.get()),g=n.get()-t.get(),m=s.constrain(h/a);n.subtract(g*m),!d&&ze(g)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:u,toggleActive:f}}function aD(e,t,n,r){const o=En(-t+e,n[0]),i=l(),a=c();function s(){const f=i[0],p=fn(i),d=i.lastIndexOf(f),v=i.indexOf(p)+1;return En(d,v)}function l(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function c(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function sD(e,t,n){const r=t[0],o=n?r-e:fn(t);return{limit:En(o,r)}}function lD(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=En(i,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function u(p){if(!c(p))return;const d=e*(p*-1);r.forEach(v=>v.add(d))}return{loop:u}}function cD(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function uD(e,t,n,r,o,i,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=i,u=d().map(t.measure),f=v(),p=h();function d(){return c(r).map(m=>fn(m)[l]-m[0][s]).map(ze)}function v(){return r.map(m=>n[s]-m[s]).map(m=>-ze(m))}function h(){const b=fn(f)-fn(o);return c(f).map(w=>w[0]).map((w,A,x)=>{const k=!A,$=A===Bi(x);return a&&k?0:a&&$?b:w+u[A]})}return{snaps:f,snapsAligned:p}}function fD(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(v){return v.concat().sort((h,g)=>ze(h)-ze(g))[0]}function c(v){const h=e?a(v):s(v),g=t.map(b=>b-h).map(b=>u(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>ze(b.diff)-ze(w.diff)),{index:m}=g[0];return{index:m,distance:h}}function u(v,h){const g=[v,v+n,v-n];if(!e)return g[0];if(!h)return l(g);const m=g.filter(b=>Zl(b)===h);return l(m)}function f(v,h){const g=t[v]-o.get(),m=u(g,h);return{index:v,distance:m}}function p(v,h){const g=o.get()+v,{index:m,distance:b}=c(g),w=!e&&i(g);if(!h||w)return{index:m,distance:v};const A=t[m]-b,x=v+u(A,0);return{index:m,distance:x}}return{byDistance:p,byIndex:f,shortcut:u}}function dD(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.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 c(f,p){const d=t.clone().set(f),v=r.byIndex(d.get(),p);s(v)}return{distance:l,index:c}}function zi(e){let t=e;function n(){return t}function r(l){t=a(l)}function o(l){t+=a(l)}function i(l){t-=a(l)}function a(l){return Ql(l)?l:l.get()}return{get:n,set:r,add:o,subtract:i}}function Hm(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){i||(o.transform=r(t.apply(p)))}function c(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function pD(e,t,n,r,o,i,a,s,l){const c=vo(o),u=vo(o).reverse(),f=h().concat(g());function p(x,k){return x.reduce(($,R)=>$-o[R],k)}function d(x,k){return x.reduce(($,R)=>p($,k)>0?$.concat([R]):$,[])}function v(x,k){const $=k==="start",R=$?-r:r,W=a.findSlideBounds([R]);return x.map(T=>{const _=$?0:-r,L=$?r:0,F=W.filter(D=>D.index===T)[0][$?"end":"start"];return{index:T,slideLocation:zi(-1),translate:Hm(e,t,l[T]),target:()=>s.get()>F?_:L}})}function h(){const x=i[0]-1,k=d(u,x);return v(k,"end")}function g(){const x=n-i[0]-1,k=d(c,x);return v(k,"start")}function m(){return f.every(({index:x})=>{const k=c.filter($=>$!==x);return p(k,n)<=.1})}function b(){f.forEach(x=>{const{target:k,translate:$,slideLocation:R}=x,W=k();W!==R.get()&&($.to(W),R.set(W))})}function w(){f.forEach(x=>x.translate.clear())}return{canLoop:m,clear:w,loop:b,loopPoints:f}}function hD(e,t){let n,r=!1;function o(s,l){if(!l)return;function c(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Jl(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function vD(e,t,n,r,o,i,a){const{removeOffset:s,constrain:l}=o,c=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(g){const m=g||0;return n.map(b=>En(c,b-c).constrain(b*m))}function d(g,m){const b=g||u,w=p(m);return b.reduce((A,x)=>{const k=r.map(($,R)=>({start:$-n[R]+w[R]+x,end:$+e-w[R]+x,index:R}));return A.concat(k)},[])}function v(g,m){const b=i?s(g):l(g);return(m||f).reduce((A,x)=>{const{index:k,start:$,end:R}=x,W=A.includes(k),T=$<b&&R>b;return!W&&T?A.concat([k]):A},[])}return{check:v,findSlideBounds:d}}function mD(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&o,u=v(),f=h(),p=n.map(a),d=g();function v(){if(!c)return 0;const b=n[0];return ze(t[s]-b[s])}function h(){if(!c)return 0;const b=i.getComputedStyle(fn(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,w,A)=>{const x=!w,k=w===Bi(A);return x?p[w]+u:k?p[w]+f:A[w+1][s]-b[s]}).map(ze)}return{slideSizes:p,slideSizesWithGaps:d}}function gD(e,t,n){const r=Ql(n);function o(l,c){return vo(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function i(l){return vo(l).reduce((c,u)=>{const p=t.slice(fn(c),u+1).reduce((d,v)=>d+v,0);return!u||p>e?c.concat(u):c},[]).map((c,u,f)=>l.slice(c,f[u+1]))}function a(l){return r?o(l,n):i(l)}return{groupSlides:a}}function yD(e,t,n,r,o,i,a,s){const{align:l,axis:c,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:v,dragFree:h,dragThreshold:g,slidesToScroll:m,skipSnaps:b,containScroll:w}=i,A=t.getBoundingClientRect(),x=n.map(pe=>pe.getBoundingClientRect()),k=XP(u),$=ZP(c,u),R=$.measureSize(A),W=nD(R),T=JP(l,R),_=!d&&!!w,L=d||!!w,{slideSizes:N,slideSizesWithGaps:F}=mD($,A,x,n,L,o),D=gD(R,F,m),{snaps:M,snapsAligned:G}=uD($,T,A,x,F,D,_),z=-fn(M)+fn(F),{snapsContained:O}=aD(R,z,G,w),y=_?O:G,{limit:P}=sD(z,y,d),B=Wm(Bi(y),f,d),S=B.clone(),H=vo(n),Y=({dragHandler:pe,scrollBody:xe,scrollBounds:qe,eventHandler:st,animation:Et,options:{loop:lt}})=>{const ie=pe.pointerDown();lt||qe.constrain(ie);const ue=xe.seek().settled();ue&&!ie&&(Et.stop(),st.emit("settle")),ue||st.emit("scroll")},q=({scrollBody:pe,translate:xe,location:qe,offsetLocation:st,scrollLooper:Et,slideLooper:lt,options:{loop:ie}},ue)=>{const U=pe.velocity();st.set(qe.get()-U+U*ue),ie&&(Et.loop(pe.direction()),lt.loop()),xe.to(st.get())},Q={start:()=>s.start(fe),stop:()=>s.stop(fe),update:()=>Y(fe),render:pe=>q(fe,pe)},ee=.68,te=y[B.get()],J=zi(te),X=zi(te),K=zi(te),oe=oD(J,K,v,ee),V=fD(d,y,z,P,K),le=dD(Q,B,S,V,oe,K,a),Z=vD(R,z,N,M,P,d,p),fe={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:A,slideRects:x,animation:Q,axis:$,direction:k,dragHandler:eD($,k,e,r,o,K,tD($,o),J,Q,le,oe,V,B,a,W,h,g,b,ee),eventStore:mo(),percentOfView:W,index:B,indexPrevious:S,limit:P,location:J,offsetLocation:X,options:i,resizeHandler:rD(t,a,o,n,$),scrollBody:oe,scrollBounds:iD(P,J,K,oe,W),scrollLooper:lD(z,P,X,[J,X,K]),scrollProgress:cD(P),scrollSnaps:y,scrollTarget:V,scrollTo:le,slideLooper:pD($,k,R,z,F,y,Z,X,n),slidesHandler:hD(t,a),slidesInView:Z,slideIndexes:H,slidesToScroll:D,target:K,translate:Hm($,k,t)};return fe}function bD(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:v})=>v.update()),o-=t;const d=ze(o/t);n.forEach(({animation:v})=>v.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function c(){r=null,o=0}return{start:s,stop:l,reset:c,window:e}}function wD(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function o(l){return r(l).forEach(c=>c(t,l)),s}function i(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(u=>u!==c),s}const s={init:n,emit:o,off:a,on:i};return s}const SD={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 xD(e){function t(i,a){return zm(i,a||{})}function n(i){const a=i.breakpoints||{},s=ji(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(i,s)}function r(i){return i.map(a=>ji(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function ED(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function pr(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=xD(o),a=ED(i),s=mo(),l=mo(),c=wD(),{animationRealms:u}=pr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:v,off:h,emit:g}=c,m=N;let b=!1,w,A=f(SD,pr.globalOptions),x=f(A),k=[],$,R,W;function T(){const{container:oe,slides:V}=x;R=(Bm(oe)?e.querySelector(oe):oe)||e.children[0];const Z=Bm(V)?R.querySelectorAll(V):V;W=[].slice.call(Z||R.children)}function _(oe,V){const le=yD(e,R,W,r,o,oe,c,V);if(oe.loop&&!le.slideLooper.canLoop()){const Z=Object.assign({},oe,{loop:!1});return _(Z,V)}return le}function L(oe,V){if(b)return;const le=u.find(fe=>fe.window===o),Z=le||bD(o);le||u.push(Z),A=f(A,oe),x=p(A),k=V||k,T(),w=_(x,Z),d([A,...k.map(({options:fe})=>fe)]).forEach(fe=>s.add(fe,"change",N)),x.active&&(w.translate.to(w.location.get()),w.eventHandler.init(K),w.resizeHandler.init(K,x.watchResize),w.slidesHandler.init(K,x.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&Z.reset()}),w.options.loop&&w.slideLooper.loop(),R.offsetParent&&W.length&&w.dragHandler.init(K,x.watchDrag),$=a.init(k,K))}function N(oe,V){const le=Y();F(),L(f({startIndex:le},oe),V),c.emit("reInit")}function F(){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 D(){b||(b=!0,s.clear(),F(),c.emit("destroy"))}function M(oe){const V=w[oe?"target":"location"].get(),le=x.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[le](V))}function G(oe){const V=M(oe);return w.slideIndexes.filter(le=>!V.includes(le))}function z(oe,V,le){!x.active||b||(w.scrollBody.useBaseFriction().useDuration(V?0:x.duration),w.scrollTo.index(oe,le||0))}function O(oe){const V=w.index.add(1).get();z(V,oe===!0,-1)}function y(oe){const V=w.index.add(-1).get();z(V,oe===!0,1)}function P(){return w.index.add(1).get()!==Y()}function B(){return w.index.add(-1).get()!==Y()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function H(){return w.scrollProgress.get(w.location.get())}function Y(){return w.index.get()}function q(){return w.indexPrevious.get()}function Q(){return $}function ee(){return w}function te(){return e}function J(){return R}function X(){return W}const K={canScrollNext:P,canScrollPrev:B,containerNode:J,internalEngine:ee,destroy:D,off:h,on:v,emit:g,plugins:Q,previousScrollSnap:q,reInit:m,rootNode:te,scrollNext:O,scrollPrev:y,scrollProgress:H,scrollSnapList:S,scrollTo:z,selectedScrollSnap:Y,slideNodes:X,slidesInView:M,slidesNotInView:G};return L(t,n),setTimeout(()=>c.emit("init"),0),K}pr.animationRealms=[],pr.globalOptions=void 0;function Xl(e={},t=[]){const n=I.useRef(e),r=I.useRef(t),[o,i]=I.useState(),[a,s]=I.useState(),l=I.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return I.useEffect(()=>{if(GP()&&a){pr.globalOptions=Xl.globalOptions;const c=pr(a,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[a,i]),I.useEffect(()=>{Yl(n.current,e)||(n.current=e,l())},[e,l]),I.useEffect(()=>{YP(r.current,t)||(r.current=t,l())},[t,l]),[s,o]}Xl.globalOptions=void 0;const Vm=I.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:o,isReadOnly:i,sendMessage:a,addMessageFeedback:s},l)=>{const[c,u]=Xl({skipSnaps:!0,loop:!0}),[f,p]=I.useState(!0),[d,v]=I.useState(!0),h=I.useCallback(()=>u==null?void 0:u.scrollPrev(),[u]),g=I.useCallback(()=>u==null?void 0:u.scrollNext(),[u]),{message:{blocks:{carousel:m}}}=me,b=I.useCallback(w=>{p(!w.canScrollPrev()),v(!w.canScrollNext())},[]);return I.useEffect(()=>{u&&(b(u),u.on("reInit",b),u.on("select",b))},[u,b]),E.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:c,children:[E.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((w,A)=>E.jsx(Kn,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:i}},A))}),e.length>1&&E.jsxs(E.Fragment,{children:[E.jsx(UO,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),E.jsx(WO,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});Vm.displayName="Carousel";const Km=Math.floor;function qm(e){return Gm(e)?(e.nodeName||"").toLowerCase():"#document"}function go(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kD(e){var t;return(t=(Gm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gm(e){return e instanceof Node||e instanceof go(e).Node}function Mt(e){return e instanceof Element||e instanceof go(e).Element}function hr(e){return e instanceof HTMLElement||e instanceof go(e).HTMLElement}function ec(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof go(e).ShadowRoot}function CD(e){return["html","body","#document"].includes(qm(e))}function AD(e){return go(e).getComputedStyle(e)}function $D(e){if(qm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ec(e)&&e.host||kD(e);return ec(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 yt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ec(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ym(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function TD(){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 Qm(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Ym())||t.test(TD()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Jm(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 Zm(){return/apple/i.test(navigator.vendor)}function ID(){return Ym().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Xm(e,t){return["mouse","pen"].includes(e)}function OD(e){return"nativeEvent"in e}function PD(e){return e.matches("html,body")}function Ft(e){return(e==null?void 0:e.ownerDocument)||document}function tc(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 eg(e){return"composedPath"in e?e.composedPath()[0]:e.target}const DD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tg(e){return hr(e)&&e.matches(DD)}function ot(e){e.preventDefault(),e.stopPropagation()}const vr=Math.min,Ct=Math.max,Ui=Math.round,Wi=Math.floor,Qt=e=>({x:e,y:e});function ng(e,t,n){return Ct(e,vr(t,n))}function Hi(e,t){return typeof e=="function"?e(t):e}function yo(e){return e.split("-")[0]}function nc(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function _D(e){return e==="y"?"height":"width"}function bo(e){return["top","bottom"].includes(yo(e))?"y":"x"}function MD(e){return rg(bo(e))}function ND(e){return{top:0,right:0,bottom:0,left:0,...e}}function RD(e){return typeof e!="number"?ND(e):{top:e,right:e,bottom:e,left:e}}function Vi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function og(e,t,n){let{reference:r,floating:o}=e;const i=bo(t),a=MD(t),s=_D(a),l=yo(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(nc(t)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const LD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=og(c,r,l),p=r,d={},v=0;for(let h=0;h<s.length;h++){const{name:g,fn:m}=s[h],{x:b,y:w,data:A,reset:x}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,f=w??f,d={...d,[g]:{...d[g],...A}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=og(c,p,l)),h=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function ig(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Hi(t,e),v=RD(d),g=s[p?f==="floating"?"reference":"floating":f],m=Vi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),A=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=Vi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(m.top-x.top+v.top)/A.y,bottom:(x.bottom-m.bottom+v.bottom)/A.y,left:(m.left-x.left+v.left)/A.x,right:(x.right-m.right+v.right)/A.x}}async function FD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=yo(n),s=nc(n),l=bo(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Hi(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(d=s==="end"?v*-1:v),l?{x:d*u,y:p*c}:{x:p*c,y:d*u}}const BD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await FD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:m,y:b}=g;return{x:m,y:b}}},...l}=Hi(e,t),c={x:n,y:r},u=await ig(t,l),f=bo(yo(o)),p=rg(f);let d=c[p],v=c[f];if(i){const g=p==="y"?"top":"left",m=p==="y"?"bottom":"right",b=d+u[g],w=d-u[m];d=ng(b,d,w)}if(a){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",b=v+u[g],w=v-u[m];v=ng(b,v,w)}const h=s.fn({...t,[p]:d,[f]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:i,[f]:a}}}}}},zD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Hi(e,t),u=await ig(t,c),f=yo(o),p=nc(o),d=bo(o)==="y",{width:v,height:h}=i.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=p==="end"?"top":"bottom");const b=h-u.top-u.bottom,w=v-u.left-u.right,A=vr(h-u[g],b),x=vr(v-u[m],w),k=!t.middlewareData.shift;let $=A,R=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),k&&!p){const T=Ct(u.left,0),_=Ct(u.right,0),L=Ct(u.top,0),N=Ct(u.bottom,0);d?R=v-2*(T!==0||_!==0?T+_:Ct(u.left,u.right)):$=h-2*(L!==0||N!==0?L+N:Ct(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:$});const W=await a.getDimensions(s.floating);return v!==W.width||h!==W.height?{reset:{rects:!0}}:{}}}};function Ki(){return typeof window<"u"}function mr(e){return ag(e)?(e.nodeName||"").toLowerCase():"#document"}function At(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(ag(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ag(e){return Ki()?e instanceof Node||e instanceof At(e).Node:!1}function Bt(e){return Ki()?e instanceof Element||e instanceof At(e).Element:!1}function Zt(e){return Ki()?e instanceof HTMLElement||e instanceof At(e).HTMLElement:!1}function sg(e){return!Ki()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof At(e).ShadowRoot}function wo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function UD(e){return["table","td","th"].includes(mr(e))}function qi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function rc(e){const t=oc(),n=Bt(e)?jt(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 WD(e){let t=Cn(e);for(;Zt(t)&&!gr(t);){if(rc(t))return t;if(qi(t))return null;t=Cn(t)}return null}function oc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(mr(e))}function jt(e){return At(e).getComputedStyle(e)}function Gi(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sg(e)&&e.host||Jt(e);return sg(t)?t.host:t}function lg(e){const t=Cn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&wo(t)?t:lg(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=At(o);if(i){const s=ic(a);return t.concat(a,a.visualViewport||[],wo(o)?o:[],s&&n?An(s):[])}return t.concat(o,An(o,[],n))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cg(e){const t=jt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ui(n)!==i||Ui(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function ac(e){return Bt(e)?e:e.contextElement}function yr(e){const t=ac(e);if(!Zt(t))return Qt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cg(t);let a=(i?Ui(n.width):n.width)/r,s=(i?Ui(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const HD=Qt(0);function ug(e){const t=At(e);return!oc()||!t.visualViewport?HD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==At(e)?!1:t}function Vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ac(e);let a=Qt(1);t&&(r?Bt(r)&&(a=yr(r)):a=yr(e));const s=VD(i,n,r)?ug(i):Qt(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=At(i),d=r&&Bt(r)?At(r):r;let v=p,h=ic(v);for(;h&&r&&d!==v;){const g=yr(h),m=h.getBoundingClientRect(),b=jt(h),w=m.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,A=m.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=w,c+=A,v=At(h),h=ic(v)}}return Vi({width:u,height:f,x:l,y:c})}function sc(e,t){const n=Gi(e).scrollLeft;return t?t.left+n:Vn(Jt(e)).left+n}function fg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:sc(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function KD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Jt(r),s=t?qi(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Qt(1);const u=Qt(0),f=Zt(r);if((f||!f&&!i)&&((mr(r)!=="body"||wo(a))&&(l=Gi(r)),Zt(r))){const d=Vn(r);c=yr(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const p=a&&!f&&!i?fg(a,l,!0):Qt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function qD(e){return Array.from(e.getClientRects())}function GD(e){const t=Jt(e),n=Gi(e),r=e.ownerDocument.body,o=Ct(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ct(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+sc(e);const s=-n.scrollTop;return jt(r).direction==="rtl"&&(a+=Ct(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function YD(e,t){const n=At(e),r=Jt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=oc();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function QD(e,t){const n=Vn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zt(e)?yr(e):Qt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function dg(e,t,n){let r;if(t==="viewport")r=YD(e,n);else if(t==="document")r=GD(Jt(e));else if(Bt(t))r=QD(t,n);else{const o=ug(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vi(r)}function pg(e,t){const n=Cn(e);return n===t||!Bt(n)||gr(n)?!1:jt(n).position==="fixed"||pg(n,t)}function JD(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(s=>Bt(s)&&mr(s)!=="body"),o=null;const i=jt(e).position==="fixed";let a=i?Cn(e):e;for(;Bt(a)&&!gr(a);){const s=jt(a),l=rc(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wo(a)&&!l&&pg(e,a))?r=r.filter(u=>u!==a):o=s,a=Cn(a)}return t.set(e,r),r}function ZD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?qi(t)?[]:JD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const f=dg(t,u,o);return c.top=Ct(f.top,c.top),c.right=vr(f.right,c.right),c.bottom=vr(f.bottom,c.bottom),c.left=Ct(f.left,c.left),c},dg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XD(e){const{width:t,height:n}=cg(e);return{width:t,height:n}}function e_(e,t,n){const r=Zt(t),o=Jt(t),i=n==="fixed",a=Vn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Qt(0);function c(){l.x=sc(o)}if(r||!r&&!i)if((mr(t)!=="body"||wo(o))&&(s=Gi(t)),r){const d=Vn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?fg(o,s):Qt(0),f=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function lc(e){return jt(e).position==="static"}function hg(e,t){if(!Zt(e)||jt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jt(e)===n&&(n=n.ownerDocument.body),n}function vg(e,t){const n=At(e);if(qi(e))return n;if(!Zt(e)){let o=Cn(e);for(;o&&!gr(o);){if(Bt(o)&&!lc(o))return o;o=Cn(o)}return n}let r=hg(e,t);for(;r&&UD(r)&&lc(r);)r=hg(r,t);return r&&gr(r)&&lc(r)&&!rc(r)?n:r||WD(e)||n}const t_=async function(e){const t=this.getOffsetParent||vg,n=this.getDimensions,r=await n(e.floating);return{reference:e_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function n_(e){return jt(e).direction==="rtl"}const r_={convertOffsetParentRelativeRectToViewportRelativeRect:KD,getDocumentElement:Jt,getClippingRect:ZD,getOffsetParent:vg,getElementRects:t_,getClientRects:qD,getDimensions:XD,getScale:yr,isElement:Bt,isRTL:n_};function mg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o_(e,t){let n=null,r;const o=Jt(e);function i(){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),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(s||t(),!p||!d)return;const v=Wi(f),h=Wi(o.clientWidth-(u+p)),g=Wi(o.clientHeight-(f+d)),m=Wi(u),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Ct(0,vr(1,l))||1};let A=!0;function x(k){const $=k[0].intersectionRatio;if($!==l){if(!A)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},1e3)}$===1&&!mg(c,e.getBoundingClientRect())&&a(),A=!1}try{n=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return a(!0),i}function i_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ac(e),u=o||i?[...c?An(c):[],...An(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=c&&s?o_(c,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let v,h=l?Vn(e):null;l&&g();function g(){const m=Vn(e);h&&!mg(h,m)&&n(),h=m,v=requestAnimationFrame(g)}return n(),()=>{var m;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f==null||f(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const a_=BD,s_=jD,l_=zD,c_=(e,t,n)=>{const r=new Map,o={platform:r_,...n},i={...o.platform,_c:r};return LD(e,t,{...o,platform:i})};var Yi=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Qi(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,o;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(!Qi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Qi(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function gg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yg(e,t){const n=gg(e);return Math.round(t*n)/n}function cc(e){const t=C.useRef(e);return Yi(()=>{t.current=e}),t}function u_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Qi(p,r)||d(r);const[v,h]=C.useState(null),[g,m]=C.useState(null),b=C.useCallback(z=>{z!==k.current&&(k.current=z,h(z))},[]),w=C.useCallback(z=>{z!==$.current&&($.current=z,m(z))},[]),A=i||v,x=a||g,k=C.useRef(null),$=C.useRef(null),R=C.useRef(u),W=l!=null,T=cc(l),_=cc(o),L=cc(c),N=C.useCallback(()=>{if(!k.current||!$.current)return;const z={placement:t,strategy:n,middleware:p};_.current&&(z.platform=_.current),c_(k.current,$.current,z).then(O=>{const y={...O,isPositioned:L.current!==!1};F.current&&!Qi(R.current,y)&&(R.current=y,rp.flushSync(()=>{f(y)}))})},[p,t,n,_,L]);Yi(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[c]);const F=C.useRef(!1);Yi(()=>(F.current=!0,()=>{F.current=!1}),[]),Yi(()=>{if(A&&(k.current=A),x&&($.current=x),A&&x){if(T.current)return T.current(A,x,N);N()}},[A,x,N,T,W]);const D=C.useMemo(()=>({reference:k,floating:$,setReference:b,setFloating:w}),[b,w]),M=C.useMemo(()=>({reference:A,floating:x}),[A,x]),G=C.useMemo(()=>{const z={position:n,left:0,top:0};if(!M.floating)return z;const O=yg(M.floating,u.x),y=yg(M.floating,u.y);return s?{...z,transform:"translate("+O+"px, "+y+"px)",...gg(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:y}},[n,s,M.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:N,refs:D,elements:M,floatingStyles:G}),[u,N,D,M,G])}const f_=(e,t)=>({...a_(e),options:[e,t]}),d_=(e,t)=>({...s_(e),options:[e,t]}),p_=(e,t)=>({...l_(e),options:[e,t]});/*!
253
+ `);const b=m.state[s];if(b==null)return;JSON.stringify(o.getState())!==JSON.stringify(b)&&d(b);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(m)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(v),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_i(l.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_i(l.name));case"ROLLBACK":return jl(h.state,m=>{if(s===void 0){d(m),u==null||u.init(o.getState());return}d(m[s]),u==null||u.init(_i(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return jl(h.state,m=>{if(s===void 0){d(m);return}JSON.stringify(o.getState())!==JSON.stringify(m[s])&&d(m[s])});case"IMPORT_STATE":{const{nextLiftedState:m}=h.payload,b=(g=m.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),u==null||u.send(null,m);return}case"PAUSE_RECORDING":return p=!p}return}}),v},jl=(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 zl(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=l=>l===null?null:JSON.parse(l,void 0),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return fo(r)(n)}}}},$P=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,m)=>({...m,...g}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...g)},r,o);const u=fo(i.serialize),f=()=>{const g=i.partialize({...r()});let m;const b=u({state:g,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{m=w});if(m)throw m;return b},p=o.setState;o.setState=(g,m)=>{p(g,m),f()};const d=e((...g)=>{n(...g),f()},r,o);let v;const h=()=>{var g;if(!c)return;a=!1,s.forEach(b=>b(r()));const m=((g=i.onRehydrateStorage)==null?void 0:g.call(i,r()))||void 0;return fo(c.getItem.bind(c))(i.name).then(b=>{if(b)return i.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return i.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 v=i.merge(b,(w=r())!=null?w:d),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),a=!0,l.forEach(b=>b(v))}).catch(b=>{m==null||m(void 0,b)})};return o.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),v||d},TP=(e,t)=>(n,r,o)=>{let i={storage:zl(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let c=i.storage;if(!c)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...h)},r,o);const u=()=>{const h=i.partialize({...r()});return c.setItem(i.name,{state:h,version:i.version})},f=o.setState;o.setState=(h,g)=>{f(h,g),u()};const p=e((...h)=>{n(...h),u()},r,o);o.getInitialState=()=>p;let d;const v=()=>{var h,g;if(!c)return;a=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const m=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(h=r())!=null?h:p))||void 0;return fo(c.getItem.bind(c))(i.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return[!0,i.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[A,x]=b;if(d=i.merge(x,(w=r())!=null?w:p),n(d,!0),A)return u()}).then(()=>{m==null||m(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{m==null||m(void 0,b)})};return o.persist={setOptions:h=>{i={...i,...h},h.storage&&(c=h.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},i.skipHydration||v(),d||p},Mi=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Di?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),$P(e,t)):TP(e,t),dm=xn()(uo(Mi(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let Ni;const IP=new Uint8Array(16);function OP(){if(!Ni&&(Ni=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ni))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ni(IP)}const rt=[];for(let e=0;e<256;++e)rt.push((e+256).toString(16).slice(1));function PP(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 pm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function DP(e,t,n){if(pm.randomUUID&&!t&&!e)return pm.randomUUID();e=e||{};const r=e.random||(e.rng||OP)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,PP(r)}function Ri(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:o,disableInput:i}=hm(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:o,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:i,metadata:t}}const hm=e=>{switch(e.type){case"audio":return vm(e);case"card":return _P(e);case"carousel":return MP(e);case"choice":return NP(e);case"dropdown":return RP(e);case"file":return mm(e);case"image":return gm(e);case"location":return ym(e);case"markdown":return bm(e);case"text":return wm(e);case"video":return Sm(e);case"bloc":return LP(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},po=e=>({block:e,type:"bubble"}),vm=e=>({payload:{type:"audio",url:e.audioUrl}}),_P=e=>({payload:po(xm(e))}),MP=e=>({payload:{type:"carousel",blocks:e.items.map(t=>xm({type:"card",...t}))}}),NP=e=>{const t=e.options.map(i=>({title:i.label,value:i.value})),n=e.text,r=DP(),o=po({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:o}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[o,{type:"row",blocks:t.map(({title:i,value:a})=>({type:"button",variant:"action",text:i,buttonValue:a,groupId:r}))}]}}},RP=e=>{const t=e.options.map(o=>({label:o.label,value:o.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:po({type:"column",blocks:r})}},mm=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),gm=e=>({payload:{type:"image",url:e.imageUrl}}),ym=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),bm=e=>({payload:po({type:"text",text:e.markdown})}),wm=e=>({payload:po({type:"text",text:e.text,value:e.value})}),Sm=e=>({payload:{type:"video",url:e.videoUrl}}),LP=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return vm({...n.payload,type:n.type}).payload;case"file":return mm({...n.payload,type:n.type}).payload;case"image":return gm({...n.payload,type:n.type}).payload;case"location":return ym({...n.payload,type:n.type}).payload;case"markdown":return bm({...n.payload,type:n.type}).payload;case"text":return wm({...n.payload,type:n.type}).payload;case"video":return Sm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),xm=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,o=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}`)}}),i=[];return r&&i.push({type:"image",url:r}),t&&i.push({type:"text",text:`#### ${t}`}),n&&i.push({type:"text",text:n}),o.length>0&&i.push({type:"row",blocks:o}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},Hn=xn()(uo(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var o;const r=(o=t.metadata)==null?void 0:o.clientMessageId;if(r){const i=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[i];if(i!==-1)return{messages:[...n.slice(0,i),{...a,...t},...n.slice(i+1)]}}return{messages:[...n.filter(i=>i.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(o=>o.id===t?{...o,...n}:o)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let o;do{const{messages:i,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:o});r.push(...i),o=a.nextToken}while(o);return e({isFetching:!1}),r.reverse().map(i=>Ri(i)).filter(Boolean)}}),{name:"messagesStore"})),FP=(e,t)=>xn()(uo(Mi(n=>({setUser:r=>n(o=>({...o,user:r})),setConversationId:r=>n(o=>({...o,conversationId:r})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:zl(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Qr=class Qr{constructor(){}static getInstance(t="bp-webchat",n){return Qr._instances[t]||(Qr._instances[t]=FP(t,n)),Qr._instances[t]}};Ms(Qr,"_instances",{});let Ul=Qr;const Em=Ul.getInstance,Li=xn()(uo(e=>({eventEmitter:gp(),messageContainerRef:I.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),BP=8,jP=e=>xn()(Mi((t,n)=>({files:[],setFiles:r=>t({files:r}),upsertFile:r=>t(({files:o})=>({files:o.some(s=>s.name===r.name)?o.map(s=>s.name===r.name?{...s,...r}:s):[...o,{...r}]})),uploadFile:async(r,o)=>{const i=n().files.some(s=>s.name===r.name),a=n().files.length===BP;if(!(!i&&a)){n().upsertFile({name:r.name,type:"file",instance:r,status:"loading"});try{const{fileUrl:s,type:l}=await o(r);n().upsertFile({name:r.name,type:l,url:s,instance:r,status:"uploaded"})}catch(s){console.error("Error sending file:",s),n().upsertFile({name:r.name,type:"file",instance:r,status:"error"})}}},deleteFile:r=>t(({files:o})=>({files:o.filter(i=>i.name!=r)}))}),{name:e,storage:zl(()=>sessionStorage)})),Jr=class Jr{constructor(){}static getInstance(t="bp-composer-file-store"){return Jr._instances[t]||(Jr._instances[t]=jP(t)),Jr._instances[t]}};Ms(Jr,"_instances",{});let Wl=Jr;const km=Wl.getInstance,ho=xn()(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)})),clearParticipants:()=>e({participants:[]})})),zP=e=>xn()(uo(Mi((t,n)=>({soundOn:!0,setSoundEnabled:r=>t({soundOn:r}),toggleSound:()=>t({soundOn:!n().soundOn})}),{name:e}))),Zr=class Zr{constructor(){}static getInstance(t="webchat:soundEnabled"){return Zr._instances[t]||(Zr._instances[t]=zP(t)),Zr._instances[t]}};Ms(Zr,"_instances",{});let Hl=Zr;const Cm=Hl.getInstance,UP=({text:e,buttonValue:t,variant:n,groupId:r,reusable:o,sendMessage:i,isReadOnly:a,...s})=>{const l=Li(w=>w.eventEmitter),[c,u]=I.useState(!1),[f,p]=I.useState(!1),[d,v]=I.useState(!1),{message:{blocks:{button:h}}}=ve;I.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),o||v(!0)})},[l,r,o]);const m={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}u(!0),o||v(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&i&&(i==null||i({type:"text",text:e,value:t}))},"data-activated":c?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?E.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):E.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Vl=I.createContext(null);function Am(){const e=I.useContext(Vl);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Kl=I.createContext({showInputModal:void 0});function ql(){return I.useContext(Kl)}const $m=I.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:o,feedback:i,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:c,...u},f)=>{const{showInputModal:p}=ql(),{message:{blocks:{bubble:{container:d,feedbackContainer:v,feedbackIcon:h}}}}=ve;return t=="incoming"?E.jsxs("div",{"data-direction":"incoming","data-feedback":!!i,...u,...d,ref:f,children:[E.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l}}),c&&p&&e.type==="text"&&E.jsxs("div",{...v,children:[E.jsx(aP,{...h,"data-selected":i==="positive",onClick:()=>c(o,{value:"positive"})}),E.jsx(iP,{...h,"data-selected":i==="negative",onClick:async()=>{const g=await p({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButtonText:"Send feedback",cancelButtonText:"Cancel",Content:WP});c(o,{value:"negative",comment:g})}})]})]}):E.jsx("div",{"data-direction":"outgoing",...u,...d,ref:f,children:E.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:c}})})});$m.displayName="Bubble";const WP=({setValue:e})=>{const{modal:{dialog:{content:t}}}=ve;return E.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var _t=function(){return _t=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_t.apply(this,arguments)};function Tm(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function fr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function l(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function dr(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Im(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Gl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function HP(){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 VP(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=I.useRef(0),o=HP(),i=I.useState(n),a=i[0],s=i[1],l=I.useCallback(function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=++r.current;return a.loading||s(function(p){return _t(_t({},p),{loading:!0})}),e.apply(void 0,c).then(function(p){return o()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return o()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function Om(e,t){t===void 0&&(t=[]);var n=VP(e,t,{loading:!0}),r=n[0],o=n[1];return I.useEffect(function(){o()},[o]),r}const Pm=I.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=I.useId(),{setIsLoading:a}=Am(),[s,l]=I.useState(n),[c,u]=I.useState(!1),[f,p]=I.useState(!1),{message:{blocks:{image:d}}}=ve;return I.useLayoutEffect(()=>{a(v=>[...v,i])},[]),Om(async()=>{if(e){try{const{width:v,height:h}=await nk(e);s==="auto"&&l(KP(v,h))}catch(v){l("square"),console.error(v)}a(v=>v.filter(h=>h!==i))}},[e]),E.jsxs(E.Fragment,{children:[c?null:E.jsx("div",{"data-orientation":s,...d.placeholder}),f?E.jsx("div",{"data-error":"true","data-orientation":s,...r,...d.image,ref:o,children:E.jsx(em,{size:"25%",strokeWidth:"5%"})}):E.jsx("img",{"data-orientation":s,"data-loaded":c,...r,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)},onError:()=>{p(!0),u(!0)}})]})});Pm.displayName="Image";function KP(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const Dm=I.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:o}}}=ve;return E.jsx("div",{children:E.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...o,ref:r})})});Dm.displayName="Video";const _m=I.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ve;return E.jsx("div",{children:E.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...o,ref:r})})});_m.displayName="Audio";const Mm=I.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=ve;return E.jsxs("a",{...o,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:i,children:[E.jsx("p",{...s.title,children:n}),E.jsx(XO,{...s.icon})]})});Mm.displayName="Location";const Nm=I.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:o,timestamp:i,messageId:a,isReadOnly:s,sendMessage:l,...c},u)=>{const{message:{blocks:{column:f}}}=ve;return E.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...f,ref:u,children:e.map((p,d)=>E.jsx(Kn,{block:{...p,direction:r,timestamp:i,sender:o,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Nm.displayName="Column";const Rm=I.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:o,timestamp:i,metadata:a,messageId:s,isReadOnly:l,sendMessage:c,...u},f)=>{const{message:{blocks:{row:p}}}=ve;return E.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...p,ref:f,children:e.map((d,v)=>E.jsx(Kn,{block:{...d,direction:r,timestamp:i,sender:o,messageId:s,isReadOnly:l,sendMessage:c}},v))})});Rm.displayName="Row";function qP(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lm(e){return qP(e)||Array.isArray(e)}function GP(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Yl(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!Lm(s)||!Lm(l)?s===l:Yl(s,l)})}function Fm(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function YP(e,t){if(e.length!==t.length)return!1;const n=Fm(e),r=Fm(t);return n.every((o,i)=>{const a=r[i];return Yl(o,a)})}function Ql(e){return typeof e=="number"}function Bm(e){return typeof e=="string"}function Jl(e){return typeof e=="boolean"}function jm(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return Math.abs(e)}function Zl(e){return Math.sign(e)}function Fi(e,t){return ze(e-t)}function QP(e,t){if(e===0||t===0||ze(e)<=ze(t))return 0;const n=Fi(ze(e),ze(t));return ze(n/e)}function vo(e){return ji(e).map(Number)}function fn(e){return e[Bi(e)]}function Bi(e){return Math.max(0,e.length-1)}function ji(e){return Object.keys(e)}function zm(e,t){return[e,t].reduce((n,r)=>(ji(r).forEach(o=>{const i=n[o],a=r[o],s=jm(i)&&jm(a);n[o]=s?zm(i,a):a}),n),{})}function Um(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function JP(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(c){return i(c)/2}function i(c){return t-c}function a(){return t*Number(e)}function s(c){return Ql(e)?a():n[e](c)}return{measure:s}}function ZP(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=l();function a(u){const{width:f,height:p}=u;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:o,endEdge:i,measureSize:a}}function En(e,t){const n=ze(e-t);function r(c){return c<e}function o(c){return c>t}function i(c){return r(c)||o(c)}function a(c){return i(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function Wm(e,t,n){const{constrain:r}=En(0,e),o=e+1;let i=a(t);function a(p){return n?ze((o+p)%o):r(p)}function s(){return i}function l(p){return i=a(p),f}function c(p){return u().set(s()+p)}function u(){return Wm(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function XP(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function mo(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function eD(e,t,n,r,o,i,a,s,l,c,u,f,p,d,v,h,g,m,b){const{cross:w}=e,A=["INPUT","SELECT","TEXTAREA"],x={passive:!1},k=mo(),$=mo(),R=En(50,225).constrain(v.measure(20)),H={mouse:300,touch:400},T={mouse:500,touch:600},_=h?43:25;let F=!1,N=0,B=0,D=!1,M=!1,G=!1,U=!1;function O(Z,K){if(!K)return;function L(ae){(Jl(K)||K(Z,ae))&&Y(ae)}const oe=n;k.add(oe,"dragstart",ae=>ae.preventDefault(),x).add(oe,"touchmove",()=>{},x).add(oe,"touchend",()=>{}).add(oe,"touchstart",L).add(oe,"mousedown",L).add(oe,"touchcancel",Q).add(oe,"contextmenu",Q).add(oe,"click",X,!0)}function y(){k.clear(),$.clear()}function P(){const Z=U?r:n;$.add(Z,"touchmove",q,x).add(Z,"touchend",Q).add(Z,"mousemove",q,x).add(Z,"mouseup",Q)}function j(Z){const K=Z.nodeName||"";return A.includes(K)}function S(){return(h?T:H)[U?"mouse":"touch"]}function V(Z,K){const L=p.add(Zl(Z)*-1),oe=f.byDistance(Z,!h).distance;return h||ze(Z)<R?oe:m&&K?oe*.5:f.byIndex(L.get(),0).distance}function Y(Z){const K=Um(Z,o);U=K,!(K&&Z.button!==0)&&(j(Z.target)||(G=h&&K&&!Z.buttons&&F,F=Fi(i.get(),s.get())>=2,D=!0,a.pointerDown(Z),u.useFriction(0).useDuration(0),i.set(s),P(),N=a.readPoint(Z),B=a.readPoint(Z,w),d.emit("pointerDown")))}function q(Z){const K=a.readPoint(Z),L=a.readPoint(Z,w),oe=Fi(K,N),ae=Fi(L,B);if(!M&&!U&&(!Z.cancelable||(M=oe>ae,!M)))return Q(Z);const ne=a.pointerMove(Z);oe>g&&(G=!0),u.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(ne)),Z.preventDefault()}function Q(Z){const L=f.byDistance(0,!1).index!==p.get(),oe=a.pointerUp(Z)*S(),ae=V(t.apply(oe),L),ne=QP(oe,ae),de=_-10*ne,me=b+ne/50;M=!1,D=!1,$.clear(),u.useDuration(de).useFriction(me),c.distance(ae,!h),U=!1,d.emit("pointerUp")}function X(Z){G&&(Z.stopPropagation(),Z.preventDefault())}function ee(){return D}return{init:O,pointerDown:ee,destroy:y}}function tD(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const v=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Um(f,t)?f:f.touches[0])[v]}function s(f){return r=f,o=f,a(f)}function l(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function c(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),v=i(f)-i(o)>170,h=p/d;return d&&!v&&ze(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function nD(e){function t(r){return e*(r/100)}return{measure:t}}function rD(e,t,n,r,o){let i,a,s=[],l=!1;function c(d){return o.measureSize(d.getBoundingClientRect())}function u(d,v){if(!v)return;a=c(e),s=r.map(c);function h(m){for(const b of m){const w=b.target===e,A=r.indexOf(b.target),x=w?a:s[A],k=c(w?e:r[A]);if(x!==k){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(m=>{l||(Jl(v)||v(d,m))&&h(m)}),[e].concat(r).forEach(m=>i.observe(m))}function f(){i&&i.disconnect(),l=!0}return{init:u,destroy:f}}function oD(e,t,n,r){let o=!0,i=0,a=0,s=n,l=r,c=e.get(),u=0;function f(){const x=t.get()-e.get(),k=!s;let $=0;return k?(i=0,e.set(t),$=x):(i+=x/s,i*=l,c+=i,e.add(i),$=c-u),a=Zl($),u=c,o=ze(x)<.001,A}function p(){return o}function d(){return s}function v(){return a}function h(){return i}function g(){return b(n)}function m(){return w(r)}function b(x){return s=x,A}function w(x){return l=x,A}const A={direction:v,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:m,useBaseDuration:g,useFriction:w,useDuration:b};return A}function iD(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=En(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!c())return;const v=e.reachedMin(t.get())?"min":"max",h=ze(e[v]-t.get()),g=n.get()-t.get(),m=s.constrain(h/a);n.subtract(g*m),!d&&ze(g)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:u,toggleActive:f}}function aD(e,t,n,r){const o=En(-t+e,n[0]),i=l(),a=c();function s(){const f=i[0],p=fn(i),d=i.lastIndexOf(f),v=i.indexOf(p)+1;return En(d,v)}function l(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function c(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function sD(e,t,n){const r=t[0],o=n?r-e:fn(t);return{limit:En(o,r)}}function lD(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=En(i,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function u(p){if(!c(p))return;const d=e*(p*-1);r.forEach(v=>v.add(d))}return{loop:u}}function cD(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function uD(e,t,n,r,o,i,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=i,u=d().map(t.measure),f=v(),p=h();function d(){return c(r).map(m=>fn(m)[l]-m[0][s]).map(ze)}function v(){return r.map(m=>n[s]-m[s]).map(m=>-ze(m))}function h(){const b=fn(f)-fn(o);return c(f).map(w=>w[0]).map((w,A,x)=>{const k=!A,$=A===Bi(x);return a&&k?0:a&&$?b:w+u[A]})}return{snaps:f,snapsAligned:p}}function fD(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(v){return v.concat().sort((h,g)=>ze(h)-ze(g))[0]}function c(v){const h=e?a(v):s(v),g=t.map(b=>b-h).map(b=>u(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>ze(b.diff)-ze(w.diff)),{index:m}=g[0];return{index:m,distance:h}}function u(v,h){const g=[v,v+n,v-n];if(!e)return g[0];if(!h)return l(g);const m=g.filter(b=>Zl(b)===h);return l(m)}function f(v,h){const g=t[v]-o.get(),m=u(g,h);return{index:v,distance:m}}function p(v,h){const g=o.get()+v,{index:m,distance:b}=c(g),w=!e&&i(g);if(!h||w)return{index:m,distance:v};const A=t[m]-b,x=v+u(A,0);return{index:m,distance:x}}return{byDistance:p,byIndex:f,shortcut:u}}function dD(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.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 c(f,p){const d=t.clone().set(f),v=r.byIndex(d.get(),p);s(v)}return{distance:l,index:c}}function zi(e){let t=e;function n(){return t}function r(l){t=a(l)}function o(l){t+=a(l)}function i(l){t-=a(l)}function a(l){return Ql(l)?l:l.get()}return{get:n,set:r,add:o,subtract:i}}function Hm(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){i||(o.transform=r(t.apply(p)))}function c(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function pD(e,t,n,r,o,i,a,s,l){const c=vo(o),u=vo(o).reverse(),f=h().concat(g());function p(x,k){return x.reduce(($,R)=>$-o[R],k)}function d(x,k){return x.reduce(($,R)=>p($,k)>0?$.concat([R]):$,[])}function v(x,k){const $=k==="start",R=$?-r:r,H=a.findSlideBounds([R]);return x.map(T=>{const _=$?0:-r,F=$?r:0,B=H.filter(D=>D.index===T)[0][$?"end":"start"];return{index:T,slideLocation:zi(-1),translate:Hm(e,t,l[T]),target:()=>s.get()>B?_:F}})}function h(){const x=i[0]-1,k=d(u,x);return v(k,"end")}function g(){const x=n-i[0]-1,k=d(c,x);return v(k,"start")}function m(){return f.every(({index:x})=>{const k=c.filter($=>$!==x);return p(k,n)<=.1})}function b(){f.forEach(x=>{const{target:k,translate:$,slideLocation:R}=x,H=k();H!==R.get()&&($.to(H),R.set(H))})}function w(){f.forEach(x=>x.translate.clear())}return{canLoop:m,clear:w,loop:b,loopPoints:f}}function hD(e,t){let n,r=!1;function o(s,l){if(!l)return;function c(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Jl(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function vD(e,t,n,r,o,i,a){const{removeOffset:s,constrain:l}=o,c=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(g){const m=g||0;return n.map(b=>En(c,b-c).constrain(b*m))}function d(g,m){const b=g||u,w=p(m);return b.reduce((A,x)=>{const k=r.map(($,R)=>({start:$-n[R]+w[R]+x,end:$+e-w[R]+x,index:R}));return A.concat(k)},[])}function v(g,m){const b=i?s(g):l(g);return(m||f).reduce((A,x)=>{const{index:k,start:$,end:R}=x,H=A.includes(k),T=$<b&&R>b;return!H&&T?A.concat([k]):A},[])}return{check:v,findSlideBounds:d}}function mD(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&o,u=v(),f=h(),p=n.map(a),d=g();function v(){if(!c)return 0;const b=n[0];return ze(t[s]-b[s])}function h(){if(!c)return 0;const b=i.getComputedStyle(fn(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,w,A)=>{const x=!w,k=w===Bi(A);return x?p[w]+u:k?p[w]+f:A[w+1][s]-b[s]}).map(ze)}return{slideSizes:p,slideSizesWithGaps:d}}function gD(e,t,n){const r=Ql(n);function o(l,c){return vo(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function i(l){return vo(l).reduce((c,u)=>{const p=t.slice(fn(c),u+1).reduce((d,v)=>d+v,0);return!u||p>e?c.concat(u):c},[]).map((c,u,f)=>l.slice(c,f[u+1]))}function a(l){return r?o(l,n):i(l)}return{groupSlides:a}}function yD(e,t,n,r,o,i,a,s){const{align:l,axis:c,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:v,dragFree:h,dragThreshold:g,slidesToScroll:m,skipSnaps:b,containScroll:w}=i,A=t.getBoundingClientRect(),x=n.map(me=>me.getBoundingClientRect()),k=XP(u),$=ZP(c,u),R=$.measureSize(A),H=nD(R),T=JP(l,R),_=!d&&!!w,F=d||!!w,{slideSizes:N,slideSizesWithGaps:B}=mD($,A,x,n,F,o),D=gD(R,B,m),{snaps:M,snapsAligned:G}=uD($,T,A,x,B,D,_),U=-fn(M)+fn(B),{snapsContained:O}=aD(R,U,G,w),y=_?O:G,{limit:P}=sD(U,y,d),j=Wm(Bi(y),f,d),S=j.clone(),V=vo(n),Y=({dragHandler:me,scrollBody:De,scrollBounds:Ue,eventHandler:dt,animation:mt,options:{loop:pt}})=>{const ie=me.pointerDown();pt||Ue.constrain(ie);const ce=De.seek().settled();ce&&!ie&&(mt.stop(),dt.emit("settle")),ce||dt.emit("scroll")},q=({scrollBody:me,translate:De,location:Ue,offsetLocation:dt,scrollLooper:mt,slideLooper:pt,options:{loop:ie}},ce)=>{const W=me.velocity();dt.set(Ue.get()-W+W*ce),ie&&(mt.loop(me.direction()),pt.loop()),De.to(dt.get())},Q={start:()=>s.start(de),stop:()=>s.stop(de),update:()=>Y(de),render:me=>q(de,me)},X=.68,ee=y[j.get()],J=zi(ee),Z=zi(ee),K=zi(ee),L=oD(J,K,v,X),oe=fD(d,y,U,P,K),ae=dD(Q,j,S,oe,L,K,a),ne=vD(R,U,N,M,P,d,p),de={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:A,slideRects:x,animation:Q,axis:$,direction:k,dragHandler:eD($,k,e,r,o,K,tD($,o),J,Q,ae,L,oe,j,a,H,h,g,b,X),eventStore:mo(),percentOfView:H,index:j,indexPrevious:S,limit:P,location:J,offsetLocation:Z,options:i,resizeHandler:rD(t,a,o,n,$),scrollBody:L,scrollBounds:iD(P,J,K,L,H),scrollLooper:lD(U,P,Z,[J,Z,K]),scrollProgress:cD(P),scrollSnaps:y,scrollTarget:oe,scrollTo:ae,slideLooper:pD($,k,R,U,B,y,ne,Z,n),slidesHandler:hD(t,a),slidesInView:ne,slideIndexes:V,slidesToScroll:D,target:K,translate:Hm($,k,t)};return de}function bD(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:v})=>v.update()),o-=t;const d=ze(o/t);n.forEach(({animation:v})=>v.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function c(){r=null,o=0}return{start:s,stop:l,reset:c,window:e}}function wD(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function o(l){return r(l).forEach(c=>c(t,l)),s}function i(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(u=>u!==c),s}const s={init:n,emit:o,off:a,on:i};return s}const SD={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 xD(e){function t(i,a){return zm(i,a||{})}function n(i){const a=i.breakpoints||{},s=ji(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(i,s)}function r(i){return i.map(a=>ji(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function ED(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function pr(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=xD(o),a=ED(i),s=mo(),l=mo(),c=wD(),{animationRealms:u}=pr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:v,off:h,emit:g}=c,m=N;let b=!1,w,A=f(SD,pr.globalOptions),x=f(A),k=[],$,R,H;function T(){const{container:L,slides:oe}=x;R=(Bm(L)?e.querySelector(L):L)||e.children[0];const ne=Bm(oe)?R.querySelectorAll(oe):oe;H=[].slice.call(ne||R.children)}function _(L,oe){const ae=yD(e,R,H,r,o,L,c,oe);if(L.loop&&!ae.slideLooper.canLoop()){const ne=Object.assign({},L,{loop:!1});return _(ne,oe)}return ae}function F(L,oe){if(b)return;const ae=u.find(de=>de.window===o),ne=ae||bD(o);ae||u.push(ne),A=f(A,L),x=p(A),k=oe||k,T(),w=_(x,ne),d([A,...k.map(({options:de})=>de)]).forEach(de=>s.add(de,"change",N)),x.active&&(w.translate.to(w.location.get()),w.eventHandler.init(K),w.resizeHandler.init(K,x.watchResize),w.slidesHandler.init(K,x.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&ne.reset()}),w.options.loop&&w.slideLooper.loop(),R.offsetParent&&H.length&&w.dragHandler.init(K,x.watchDrag),$=a.init(k,K))}function N(L,oe){const ae=Y();B(),F(f({startIndex:ae},L),oe),c.emit("reInit")}function B(){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 D(){b||(b=!0,s.clear(),B(),c.emit("destroy"))}function M(L){const oe=w[L?"target":"location"].get(),ae=x.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[ae](oe))}function G(L){const oe=M(L);return w.slideIndexes.filter(ae=>!oe.includes(ae))}function U(L,oe,ae){!x.active||b||(w.scrollBody.useBaseFriction().useDuration(oe?0:x.duration),w.scrollTo.index(L,ae||0))}function O(L){const oe=w.index.add(1).get();U(oe,L===!0,-1)}function y(L){const oe=w.index.add(-1).get();U(oe,L===!0,1)}function P(){return w.index.add(1).get()!==Y()}function j(){return w.index.add(-1).get()!==Y()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function V(){return w.scrollProgress.get(w.location.get())}function Y(){return w.index.get()}function q(){return w.indexPrevious.get()}function Q(){return $}function X(){return w}function ee(){return e}function J(){return R}function Z(){return H}const K={canScrollNext:P,canScrollPrev:j,containerNode:J,internalEngine:X,destroy:D,off:h,on:v,emit:g,plugins:Q,previousScrollSnap:q,reInit:m,rootNode:ee,scrollNext:O,scrollPrev:y,scrollProgress:V,scrollSnapList:S,scrollTo:U,selectedScrollSnap:Y,slideNodes:Z,slidesInView:M,slidesNotInView:G};return F(t,n),setTimeout(()=>c.emit("init"),0),K}pr.animationRealms=[],pr.globalOptions=void 0;function Xl(e={},t=[]){const n=I.useRef(e),r=I.useRef(t),[o,i]=I.useState(),[a,s]=I.useState(),l=I.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return I.useEffect(()=>{if(GP()&&a){pr.globalOptions=Xl.globalOptions;const c=pr(a,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[a,i]),I.useEffect(()=>{Yl(n.current,e)||(n.current=e,l())},[e,l]),I.useEffect(()=>{YP(r.current,t)||(r.current=t,l())},[t,l]),[s,o]}Xl.globalOptions=void 0;const Vm=I.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:o,isReadOnly:i,sendMessage:a,addMessageFeedback:s},l)=>{const[c,u]=Xl({skipSnaps:!0,loop:!0}),[f,p]=I.useState(!0),[d,v]=I.useState(!0),h=I.useCallback(()=>u==null?void 0:u.scrollPrev(),[u]),g=I.useCallback(()=>u==null?void 0:u.scrollNext(),[u]),{message:{blocks:{carousel:m}}}=ve,b=I.useCallback(w=>{p(!w.canScrollPrev()),v(!w.canScrollNext())},[]);return I.useEffect(()=>{u&&(b(u),u.on("reInit",b),u.on("select",b))},[u,b]),E.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:c,children:[E.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((w,A)=>E.jsx(Kn,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:i}},A))}),e.length>1&&E.jsxs(E.Fragment,{children:[E.jsx(UO,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),E.jsx(WO,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});Vm.displayName="Carousel";const Km=Math.floor;function qm(e){return Gm(e)?(e.nodeName||"").toLowerCase():"#document"}function go(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kD(e){var t;return(t=(Gm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gm(e){return e instanceof Node||e instanceof go(e).Node}function Mt(e){return e instanceof Element||e instanceof go(e).Element}function hr(e){return e instanceof HTMLElement||e instanceof go(e).HTMLElement}function ec(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof go(e).ShadowRoot}function CD(e){return["html","body","#document"].includes(qm(e))}function AD(e){return go(e).getComputedStyle(e)}function $D(e){if(qm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ec(e)&&e.host||kD(e);return ec(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 bt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ec(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ym(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function TD(){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 Qm(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Ym())||t.test(TD()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Jm(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 Zm(){return/apple/i.test(navigator.vendor)}function ID(){return Ym().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Xm(e,t){return["mouse","pen"].includes(e)}function OD(e){return"nativeEvent"in e}function PD(e){return e.matches("html,body")}function Ft(e){return(e==null?void 0:e.ownerDocument)||document}function tc(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 eg(e){return"composedPath"in e?e.composedPath()[0]:e.target}const DD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tg(e){return hr(e)&&e.matches(DD)}function ot(e){e.preventDefault(),e.stopPropagation()}const vr=Math.min,Ct=Math.max,Ui=Math.round,Wi=Math.floor,Qt=e=>({x:e,y:e});function ng(e,t,n){return Ct(e,vr(t,n))}function Hi(e,t){return typeof e=="function"?e(t):e}function yo(e){return e.split("-")[0]}function nc(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function _D(e){return e==="y"?"height":"width"}function bo(e){return["top","bottom"].includes(yo(e))?"y":"x"}function MD(e){return rg(bo(e))}function ND(e){return{top:0,right:0,bottom:0,left:0,...e}}function RD(e){return typeof e!="number"?ND(e):{top:e,right:e,bottom:e,left:e}}function Vi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function og(e,t,n){let{reference:r,floating:o}=e;const i=bo(t),a=MD(t),s=_D(a),l=yo(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(nc(t)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const LD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=og(c,r,l),p=r,d={},v=0;for(let h=0;h<s.length;h++){const{name:g,fn:m}=s[h],{x:b,y:w,data:A,reset:x}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,f=w??f,d={...d,[g]:{...d[g],...A}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=og(c,p,l)),h=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function ig(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Hi(t,e),v=RD(d),g=s[p?f==="floating"?"reference":"floating":f],m=Vi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),A=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=Vi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(m.top-x.top+v.top)/A.y,bottom:(x.bottom-m.bottom+v.bottom)/A.y,left:(m.left-x.left+v.left)/A.x,right:(x.right-m.right+v.right)/A.x}}async function FD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=yo(n),s=nc(n),l=bo(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Hi(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(d=s==="end"?v*-1:v),l?{x:d*u,y:p*c}:{x:p*c,y:d*u}}const BD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await FD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:m,y:b}=g;return{x:m,y:b}}},...l}=Hi(e,t),c={x:n,y:r},u=await ig(t,l),f=bo(yo(o)),p=rg(f);let d=c[p],v=c[f];if(i){const g=p==="y"?"top":"left",m=p==="y"?"bottom":"right",b=d+u[g],w=d-u[m];d=ng(b,d,w)}if(a){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",b=v+u[g],w=v-u[m];v=ng(b,v,w)}const h=s.fn({...t,[p]:d,[f]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:i,[f]:a}}}}}},zD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Hi(e,t),u=await ig(t,c),f=yo(o),p=nc(o),d=bo(o)==="y",{width:v,height:h}=i.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=p==="end"?"top":"bottom");const b=h-u.top-u.bottom,w=v-u.left-u.right,A=vr(h-u[g],b),x=vr(v-u[m],w),k=!t.middlewareData.shift;let $=A,R=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),k&&!p){const T=Ct(u.left,0),_=Ct(u.right,0),F=Ct(u.top,0),N=Ct(u.bottom,0);d?R=v-2*(T!==0||_!==0?T+_:Ct(u.left,u.right)):$=h-2*(F!==0||N!==0?F+N:Ct(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:$});const H=await a.getDimensions(s.floating);return v!==H.width||h!==H.height?{reset:{rects:!0}}:{}}}};function Ki(){return typeof window<"u"}function mr(e){return ag(e)?(e.nodeName||"").toLowerCase():"#document"}function At(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(ag(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ag(e){return Ki()?e instanceof Node||e instanceof At(e).Node:!1}function Bt(e){return Ki()?e instanceof Element||e instanceof At(e).Element:!1}function Zt(e){return Ki()?e instanceof HTMLElement||e instanceof At(e).HTMLElement:!1}function sg(e){return!Ki()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof At(e).ShadowRoot}function wo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function UD(e){return["table","td","th"].includes(mr(e))}function qi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function rc(e){const t=oc(),n=Bt(e)?jt(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 WD(e){let t=Cn(e);for(;Zt(t)&&!gr(t);){if(rc(t))return t;if(qi(t))return null;t=Cn(t)}return null}function oc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(mr(e))}function jt(e){return At(e).getComputedStyle(e)}function Gi(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sg(e)&&e.host||Jt(e);return sg(t)?t.host:t}function lg(e){const t=Cn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&wo(t)?t:lg(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=At(o);if(i){const s=ic(a);return t.concat(a,a.visualViewport||[],wo(o)?o:[],s&&n?An(s):[])}return t.concat(o,An(o,[],n))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cg(e){const t=jt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ui(n)!==i||Ui(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function ac(e){return Bt(e)?e:e.contextElement}function yr(e){const t=ac(e);if(!Zt(t))return Qt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cg(t);let a=(i?Ui(n.width):n.width)/r,s=(i?Ui(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const HD=Qt(0);function ug(e){const t=At(e);return!oc()||!t.visualViewport?HD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==At(e)?!1:t}function Vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ac(e);let a=Qt(1);t&&(r?Bt(r)&&(a=yr(r)):a=yr(e));const s=VD(i,n,r)?ug(i):Qt(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=At(i),d=r&&Bt(r)?At(r):r;let v=p,h=ic(v);for(;h&&r&&d!==v;){const g=yr(h),m=h.getBoundingClientRect(),b=jt(h),w=m.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,A=m.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=w,c+=A,v=At(h),h=ic(v)}}return Vi({width:u,height:f,x:l,y:c})}function sc(e,t){const n=Gi(e).scrollLeft;return t?t.left+n:Vn(Jt(e)).left+n}function fg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:sc(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function KD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Jt(r),s=t?qi(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Qt(1);const u=Qt(0),f=Zt(r);if((f||!f&&!i)&&((mr(r)!=="body"||wo(a))&&(l=Gi(r)),Zt(r))){const d=Vn(r);c=yr(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const p=a&&!f&&!i?fg(a,l,!0):Qt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function qD(e){return Array.from(e.getClientRects())}function GD(e){const t=Jt(e),n=Gi(e),r=e.ownerDocument.body,o=Ct(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ct(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+sc(e);const s=-n.scrollTop;return jt(r).direction==="rtl"&&(a+=Ct(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function YD(e,t){const n=At(e),r=Jt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=oc();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function QD(e,t){const n=Vn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zt(e)?yr(e):Qt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function dg(e,t,n){let r;if(t==="viewport")r=YD(e,n);else if(t==="document")r=GD(Jt(e));else if(Bt(t))r=QD(t,n);else{const o=ug(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vi(r)}function pg(e,t){const n=Cn(e);return n===t||!Bt(n)||gr(n)?!1:jt(n).position==="fixed"||pg(n,t)}function JD(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(s=>Bt(s)&&mr(s)!=="body"),o=null;const i=jt(e).position==="fixed";let a=i?Cn(e):e;for(;Bt(a)&&!gr(a);){const s=jt(a),l=rc(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wo(a)&&!l&&pg(e,a))?r=r.filter(u=>u!==a):o=s,a=Cn(a)}return t.set(e,r),r}function ZD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?qi(t)?[]:JD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const f=dg(t,u,o);return c.top=Ct(f.top,c.top),c.right=vr(f.right,c.right),c.bottom=vr(f.bottom,c.bottom),c.left=Ct(f.left,c.left),c},dg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XD(e){const{width:t,height:n}=cg(e);return{width:t,height:n}}function e_(e,t,n){const r=Zt(t),o=Jt(t),i=n==="fixed",a=Vn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Qt(0);function c(){l.x=sc(o)}if(r||!r&&!i)if((mr(t)!=="body"||wo(o))&&(s=Gi(t)),r){const d=Vn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?fg(o,s):Qt(0),f=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function lc(e){return jt(e).position==="static"}function hg(e,t){if(!Zt(e)||jt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jt(e)===n&&(n=n.ownerDocument.body),n}function vg(e,t){const n=At(e);if(qi(e))return n;if(!Zt(e)){let o=Cn(e);for(;o&&!gr(o);){if(Bt(o)&&!lc(o))return o;o=Cn(o)}return n}let r=hg(e,t);for(;r&&UD(r)&&lc(r);)r=hg(r,t);return r&&gr(r)&&lc(r)&&!rc(r)?n:r||WD(e)||n}const t_=async function(e){const t=this.getOffsetParent||vg,n=this.getDimensions,r=await n(e.floating);return{reference:e_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function n_(e){return jt(e).direction==="rtl"}const r_={convertOffsetParentRelativeRectToViewportRelativeRect:KD,getDocumentElement:Jt,getClippingRect:ZD,getOffsetParent:vg,getElementRects:t_,getClientRects:qD,getDimensions:XD,getScale:yr,isElement:Bt,isRTL:n_};function mg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o_(e,t){let n=null,r;const o=Jt(e);function i(){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),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(s||t(),!p||!d)return;const v=Wi(f),h=Wi(o.clientWidth-(u+p)),g=Wi(o.clientHeight-(f+d)),m=Wi(u),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Ct(0,vr(1,l))||1};let A=!0;function x(k){const $=k[0].intersectionRatio;if($!==l){if(!A)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},1e3)}$===1&&!mg(c,e.getBoundingClientRect())&&a(),A=!1}try{n=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return a(!0),i}function i_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ac(e),u=o||i?[...c?An(c):[],...An(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=c&&s?o_(c,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let v,h=l?Vn(e):null;l&&g();function g(){const m=Vn(e);h&&!mg(h,m)&&n(),h=m,v=requestAnimationFrame(g)}return n(),()=>{var m;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f==null||f(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const a_=BD,s_=jD,l_=zD,c_=(e,t,n)=>{const r=new Map,o={platform:r_,...n},i={...o.platform,_c:r};return LD(e,t,{...o,platform:i})};var Yi=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Qi(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,o;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(!Qi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Qi(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function gg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yg(e,t){const n=gg(e);return Math.round(t*n)/n}function cc(e){const t=C.useRef(e);return Yi(()=>{t.current=e}),t}function u_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Qi(p,r)||d(r);const[v,h]=C.useState(null),[g,m]=C.useState(null),b=C.useCallback(U=>{U!==k.current&&(k.current=U,h(U))},[]),w=C.useCallback(U=>{U!==$.current&&($.current=U,m(U))},[]),A=i||v,x=a||g,k=C.useRef(null),$=C.useRef(null),R=C.useRef(u),H=l!=null,T=cc(l),_=cc(o),F=cc(c),N=C.useCallback(()=>{if(!k.current||!$.current)return;const U={placement:t,strategy:n,middleware:p};_.current&&(U.platform=_.current),c_(k.current,$.current,U).then(O=>{const y={...O,isPositioned:F.current!==!1};B.current&&!Qi(R.current,y)&&(R.current=y,rp.flushSync(()=>{f(y)}))})},[p,t,n,_,F]);Yi(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[c]);const B=C.useRef(!1);Yi(()=>(B.current=!0,()=>{B.current=!1}),[]),Yi(()=>{if(A&&(k.current=A),x&&($.current=x),A&&x){if(T.current)return T.current(A,x,N);N()}},[A,x,N,T,H]);const D=C.useMemo(()=>({reference:k,floating:$,setReference:b,setFloating:w}),[b,w]),M=C.useMemo(()=>({reference:A,floating:x}),[A,x]),G=C.useMemo(()=>{const U={position:n,left:0,top:0};if(!M.floating)return U;const O=yg(M.floating,u.x),y=yg(M.floating,u.y);return s?{...U,transform:"translate("+O+"px, "+y+"px)",...gg(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:y}},[n,s,M.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:N,refs:D,elements:M,floatingStyles:G}),[u,N,D,M,G])}const f_=(e,t)=>({...a_(e),options:[e,t]}),d_=(e,t)=>({...s_(e),options:[e,t]}),p_=(e,t)=>({...l_(e),options:[e,t]});/*!
254
254
  * tabbable 6.2.0
255
255
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
256
- */var h_=["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])"],uc=h_.join(","),bg=typeof Element>"u",So=bg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ji=!bg&&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},Zi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},v_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},m_=function(t,n,r){if(Zi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(uc));return n&&So.call(t,uc)&&o.unshift(t),o=o.filter(r),o},g_=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Zi(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=So.call(a,uc);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Zi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},wg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||v_(t))&&!wg(t)?0:t.tabIndex},y_=function(t,n){var r=Sg(t);return r<0&&n&&!wg(t)?0:r},b_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xg=function(t){return t.tagName==="INPUT"},w_=function(t){return xg(t)&&t.type==="hidden"},S_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},x_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},E_=function(t){if(!t.name)return!0;var n=t.form||Ji(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=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 i=x_(o,t.form);return!i||i===t},k_=function(t){return xg(t)&&t.type==="radio"},C_=function(t){return k_(t)&&!E_(t)},A_=function(t){var n,r=t&&Ji(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=Ji(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Eg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=So.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(So.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ji(t);if(l&&!l.shadowRoot&&o(l)===!0)return Eg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(A_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Eg(t);return!1},T_=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 o=n.children.item(r);if(o.tagName==="LEGEND")return So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},I_=function(t,n){return!(n.disabled||Zi(n)||w_(n)||$_(n,t)||S_(n)||T_(n))},kg=function(t,n){return!(C_(n)||Sg(n)<0||!I_(t,n))},O_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},P_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=y_(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(b_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},fc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=g_([t],n.includeContainer,{filter:kg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:O_}):r=m_(t,n.includeContainer,kg.bind(null,n)),P_(r)};const dc="ArrowUp",Xi="ArrowDown",br="ArrowLeft",xo="ArrowRight";function ea(e,t,n){return Math.floor(e/t)!==n}function Eo(e,t){return t<0||t>=e.current.length}function pc(e,t){return ft(e,{disabledIndices:t})}function Cg(e,t){return ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function D_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===dc){if(u&&ot(n),c===-1)f=l;else if(f=ft(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||f<0)){const p=c%i,d=l%i,v=l-(d-p);d===p?f=l:f=d>p?v:v-i}Eo(e,f)&&(f=c)}if(n.key===Xi&&(u&&ot(n),c===-1?f=s:(f=ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(f=ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Eo(e,f)&&(f=c)),r==="both"){const p=Km(c/i);n.key===xo&&(u&&ot(n),c%i!==i-1?(f=ft(e,{startingIndex:c,disabledIndices:a}),o&&ea(f,i,p)&&(f=ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(f=ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),ea(f,i,p)&&(f=c)),n.key===br&&(u&&ot(n),c%i!==0?(f=ft(e,{startingIndex:c,disabledIndices:a,decrement:!0}),o&&ea(f,i,p)&&(f=ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(f=ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),ea(f,i,p)&&(f=c));const d=Km(l/i)===p;Eo(e,f)&&(o&&d?f=n.key===br?l:ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):f=c)}return f}let Ag=0;function dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ag);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Ag=requestAnimationFrame(i)}var Ye=typeof document<"u"?I.useLayoutEffect:I.useEffect;function ta(){return ta=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},ta.apply(this,arguments)}let hc=!1,__=0;const $g=()=>"floating-ui-"+__++;function M_(){const[e,t]=C.useState(()=>hc?$g():void 0);return Ye(()=>{e==null&&t($g())},[]),C.useEffect(()=>{hc||(hc=!0)},[]),e}const vc=C.useId||M_;function N_(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(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(o=>o!==n))||[])}}}const R_=C.createContext(null),L_=C.createContext(null),Tg=()=>{var e;return((e=C.useContext(R_))==null?void 0:e.id)||null},na=()=>C.useContext(L_);function ko(e){return"data-floating-ui-"+e}function $n(e){const t=I.useRef(e);return Ye(()=>{t.current=e}),t}function F_(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function wr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function B_(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Sr=new WeakMap,ra=new WeakSet,oa={},mc=0;const j_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ig=e=>e&&(e.host||Ig(e.parentNode)),z_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ig(n);return e.contains(r)?r:null}).filter(n=>n!=null);function U_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=z_(t,e),s=new Set,l=new Set(a),c=[];oa[o]||(oa[o]=new WeakMap);const u=oa[o];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,v=>{if(s.has(v))p(v);else{const h=i?v.getAttribute(i):null,g=h!==null&&h!=="false",m=(Sr.get(v)||0)+1,b=(u.get(v)||0)+1;Sr.set(v,m),u.set(v,b),c.push(v),m===1&&g&&ra.add(v),b===1&&v.setAttribute(o,""),!g&&i&&v.setAttribute(i,"true")}})}return mc++,()=>{c.forEach(d=>{const v=(Sr.get(d)||0)-1,h=(u.get(d)||0)-1;Sr.set(d,v),u.set(d,h),v||(!ra.has(d)&&i&&d.removeAttribute(i),ra.delete(d)),h||d.removeAttribute(o)}),mc--,mc||(Sr=new WeakMap,Sr=new WeakMap,ra=new WeakSet,oa={})}}function Og(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Ft(e[0]).body;return U_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const gc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pg(e,t){const n=fc(e,gc());t==="prev"&&n.reverse();const r=n.indexOf(kn(Ft(e)));return n.slice(r+1)[0]}function Dg(){return Pg(document.body,"next")}function _g(){return Pg(document.body,"prev")}function Co(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function W_(e){fc(e,gc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function H_(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 yc={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 V_;function Mg(e){e.key==="Tab"&&(e.target,clearTimeout(V_))}const ia=C.forwardRef(function(t,n){const[r,o]=C.useState();Ye(()=>(Zm()&&o("button"),document.addEventListener("keydown",Mg),()=>{document.removeEventListener("keydown",Mg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ko("focus-guard")]:"",style:yc};return C.createElement("span",ta({},t,i))}),Ng=C.createContext(null);function K_(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=C.useState(null),i=vc(),a=Rg(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),l=C.useRef();return Ye(()=>()=>{r==null||r.remove()},[r,s]),Ye(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:f,uniqueId:p}=s,d=c?document.getElementById(c):null,v=ko("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(v,""),d.appendChild(h),o(h)}else{let h=u||(f==null?void 0:f.portalNode);h&&!Mt(h)&&(h=h.current),h=h||document.body;let g=null;c&&(g=document.createElement("div"),g.id=c,h.appendChild(g));const m=document.createElement("div");m.id=p,m.setAttribute(v,""),h=g||h,h.appendChild(m),o(m)}},[s]),r}function q_(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=K_({id:n,root:r}),[a,s]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(v){i&&Co(v)&&(v.type==="focusin"?H_:W_)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),C.createElement(Ng.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&C.createElement(ia,{"data-type":"outside",ref:l,onFocus:d=>{if(Co(d,i)){var v;(v=u.current)==null||v.focus()}else{const h=_g()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&i&&C.createElement("span",{"aria-owns":i.id,style:yc}),i&&tp.createPortal(t,i),p&&i&&C.createElement(ia,{"data-type":"outside",ref:c,onFocus:d=>{if(Co(d,i)){var v;(v=f.current)==null||v.focus()}else{const h=Dg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Rg=()=>C.useContext(Ng),G_=C.forwardRef(function(t,n){return C.createElement("button",ta({},t,{type:"button",ref:n,tabIndex:-1,style:yc}))});function Y_(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:v,events:h,dataRef:g,elements:{domReference:m,floating:b}}=t,w=j_()?i:!0,A=$n(o),x=$n(a),k=$n(s),$=na(),R=Rg(),W=typeof a=="number"&&a<0,T=C.useRef(null),_=C.useRef(null),L=C.useRef(!1),N=C.useRef(null),F=C.useRef(!1),D=R!=null,M=m&&m.getAttribute("role")==="combobox"&&tg(m)&&W,G=C.useCallback(function(P){return P===void 0&&(P=b),P?fc(P,gc()):[]},[b]),z=C.useCallback(P=>{const B=G(P);return A.current.map(S=>m&&S==="reference"?m:b&&S==="floating"?b:B).filter(Boolean).flat()},[m,b,A,G]);C.useEffect(()=>{if(r||!l)return;function P(S){if(S.key==="Tab"){yt(b,kn(Ft(b)))&&G().length===0&&!M&&ot(S);const H=z(),Y=eg(S);A.current[0]==="reference"&&Y===m&&(ot(S),S.shiftKey?dn(H[H.length-1]):dn(H[1])),A.current[1]==="floating"&&Y===b&&S.shiftKey&&(ot(S),dn(H[0]))}}const B=Ft(b);return B.addEventListener("keydown",P),()=>{B.removeEventListener("keydown",P)}},[r,m,b,l,A,p,M,G,z]),C.useEffect(()=>{if(r||!u)return;function P(){F.current=!0,setTimeout(()=>{F.current=!1})}function B(S){const H=S.relatedTarget;queueMicrotask(()=>{const Y=!(yt(m,H)||yt(b,H)||yt(H,b)||yt(R==null?void 0:R.portalNode,H)||H!=null&&H.hasAttribute(ko("focus-guard"))||$&&(wr($.nodesRef.current,d).find(q=>{var Q,ee;return yt((Q=q.context)==null?void 0:Q.elements.floating,H)||yt((ee=q.context)==null?void 0:ee.elements.domReference,H)})||F_($.nodesRef.current,d).find(q=>{var Q,ee;return((Q=q.context)==null?void 0:Q.elements.floating)===H||((ee=q.context)==null?void 0:ee.elements.domReference)===H})));H&&Y&&!F.current&&H!==N.current&&(L.current=!0,v(!1,S))})}if(b&&hr(m))return m.addEventListener("focusout",B),m.addEventListener("pointerdown",P),!l&&b.addEventListener("focusout",B),()=>{m.removeEventListener("focusout",B),m.removeEventListener("pointerdown",P),!l&&b.removeEventListener("focusout",B)}},[r,m,b,l,d,$,R,v,u]),C.useEffect(()=>{var P;if(r)return;const B=Array.from((R==null||(P=R.portalNode)==null?void 0:P.querySelectorAll("["+ko("portal")+"]"))||[]);if(b){const S=[b,...B,T.current,_.current,A.current.includes("reference")||M?m:null].filter(Y=>Y!=null),H=l?Og(S,w,!w):Og(S);return()=>{H()}}},[r,m,b,l,A,R,M,w]),Ye(()=>{if(r||!b)return;const P=Ft(b),B=kn(P);queueMicrotask(()=>{const S=z(b),H=x.current,Y=(typeof H=="number"?S[H]:H.current)||b,q=yt(b,B);!W&&!q&&f&&dn(Y,{preventScroll:Y===b})})},[r,f,b,W,z,x]),Ye(()=>{if(r||!b)return;let P=!1;const B=Ft(b),S=kn(B),H=g.current;N.current=S;function Y(q){if(q.type==="escapeKey"&&p.domReference.current&&(N.current=p.domReference.current),["referencePress","escapeKey"].includes(q.type))return;const Q=q.data.returnFocus;typeof Q=="object"?(L.current=!1,P=Q.preventScroll):L.current=!Q}return h.on("dismiss",Y),()=>{h.off("dismiss",Y);const q=kn(B);(yt(b,q)||$&&wr($.nodesRef.current,d).some(ee=>{var te;return yt((te=ee.context)==null?void 0:te.elements.floating,q)})||H.openEvent&&["click","mousedown"].includes(H.openEvent.type))&&p.domReference.current&&(N.current=p.domReference.current),k.current&&hr(N.current)&&!L.current&&dn(N.current,{cancelPrevious:!1,preventScroll:P})}},[r,b,k,g,p,h,$,d]),Ye(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:u,open:f,onOpenChange:v,refs:p}),()=>{R.setFocusManagerState(null)}},[r,R,l,f,v,p,u]),Ye(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!W){const P=()=>{const S=b.getAttribute("tabindex");A.current.includes("floating")||kn(Ft(b))!==p.domReference.current&&G().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};P();const B=new MutationObserver(P);return B.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{B.disconnect()}}},[r,b,p,A,G,W]);function O(P){return r||!c||!l?null:C.createElement(G_,{ref:P==="start"?T:_,onClick:B=>v(!1,B.nativeEvent)},typeof c=="string"?c:"Dismiss")}const y=!r&&w&&!M&&(D||l);return C.createElement(C.Fragment,null,y&&C.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:P=>{if(l){const S=z();dn(o[0]==="reference"?S[0]:S[S.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(L.current=!1,Co(P,R.portalNode)){const S=Dg()||m;S==null||S.focus()}else{var B;(B=R.beforeOutsideRef.current)==null||B.focus()}}}),!M&&O("start"),n,O("end"),y&&C.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:P=>{if(l)dn(z()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(L.current=!0),Co(P,R.portalNode)){const S=_g()||m;S==null||S.focus()}else{var B;(B=R.afterOutsideRef.current)==null||B.focus()}}}))}function Lg(e){return hr(e.target)&&e.target.tagName==="BUTTON"}function Fg(e){return tg(e)}function Q_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Xm(f.current)&&c||s!=="click"&&(n&&l&&(!o.current.openEvent||o.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}Xm(f.current)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||Lg(d))&&(d.key===" "&&!Fg(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||Lg(d)||Fg(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,o,s,c,u,i,l,n,r])}const J_=C.useInsertionEffect||(e=>e());function Tn(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return J_(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Z_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},X_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},eM=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 tM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:m}=t,b=na(),w=Tg()!=null,A=Tn(typeof p=="function"?p:()=>!1),x=typeof p=="function"?A:p,k=C.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:R}=eM(m),W=Tn(_=>{if(!n||!u||!f||_.key!=="Escape")return;const L=b?wr(b.nodesRef.current,i):[];if(!$&&(_.stopPropagation(),L.length>0)){let N=!0;if(L.forEach(F=>{var D;if((D=F.context)!=null&&D.open&&!F.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,OD(_)?_.nativeEvent:_)}),T=Tn(_=>{const L=k.current;if(k.current=!1,L||typeof x=="function"&&!x(_))return;const N=eg(_),F="["+ko("inert")+"]",D=Ft(l).querySelectorAll(F);let M=Mt(N)?N:null;for(;M&&!CD(M);){const O=$D(M);if(O===Ft(l).body||!Mt(O))break;M=O}if(D.length&&Mt(N)&&!PD(N)&&!yt(N,l)&&Array.from(D).every(O=>!yt(M,O)))return;if(hr(N)&&l){const O=N.clientWidth>0&&N.scrollWidth>N.clientWidth,y=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let P=y&&_.offsetX>N.clientWidth;if(y&&AD(N).direction==="rtl"&&(P=_.offsetX<=N.offsetWidth-N.clientWidth),P||O&&_.offsetY>N.clientHeight)return}const G=b&&wr(b.nodesRef.current,i).some(O=>{var y;return tc(_,(y=O.context)==null?void 0:y.elements.floating)});if(tc(_,l)||tc(_,s)||G)return;const z=b?wr(b.nodesRef.current,i):[];if(z.length>0){let O=!0;if(z.forEach(y=>{var P;if((P=y.context)!=null&&P.open&&!y.context.dataRef.current.__outsidePressBubbles){O=!1;return}}),!O)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Qm(_)||Jm(_)}}),r(!1,_)});return C.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=$,c.current.__outsidePressBubbles=R;function _(F){r(!1,F)}const L=Ft(l);f&&L.addEventListener("keydown",W),x&&L.addEventListener(d,T);let N=[];return g&&(Mt(s)&&(N=An(s)),Mt(l)&&(N=N.concat(An(l))),!Mt(a)&&a&&a.contextElement&&(N=N.concat(An(a.contextElement)))),N=N.filter(F=>{var D;return F!==((D=L.defaultView)==null?void 0:D.visualViewport)}),N.forEach(F=>{F.addEventListener("scroll",_,{passive:!0})}),()=>{f&&L.removeEventListener("keydown",W),x&&L.removeEventListener(d,T),N.forEach(F=>{F.removeEventListener("scroll",_)})}},[c,l,s,a,f,x,d,n,r,g,u,$,R,W,T]),C.useEffect(()=>{k.current=!1},[x,d]),C.useMemo(()=>u?{reference:{onKeyDown:W,[Z_[h]]:_=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,_.nativeEvent))}},floating:{onKeyDown:W,[X_[d]]:()=>{k.current=!0}}}:{},[u,o,v,d,h,r,W])}let bc;process.env.NODE_ENV!=="production"&&(bc=new Set);function nM(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const $="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((i=e.elements)!=null&&i.reference&&!Mt(e.elements.reference)){var a;if(!((a=bc)!=null&&a.has($))){var s;(s=bc)==null||s.add($),console.error($)}}}const[l,c]=C.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=u_(e),p=na(),d=Tn(($,R)=>{$&&(h.current.openEvent=R),r==null||r($,R)}),v=C.useRef(null),h=C.useRef({}),g=C.useState(()=>N_())[0],m=vc(),b=C.useCallback($=>{const R=Mt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(R)},[f.refs]),w=C.useCallback($=>{(Mt($)||$===null)&&(v.current=$,c($)),(Mt(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Mt($))&&f.refs.setReference($)},[f.refs]),A=C.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:v}),[f.refs,w,b]),x=C.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),k=C.useMemo(()=>({...f,refs:A,elements:x,dataRef:h,nodeId:o,floatingId:m,events:g,open:n,onOpenChange:d}),[f,o,m,g,n,d,A,x]);return Ye(()=>{const $=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);$&&($.context=k)}),C.useMemo(()=>({...f,context:k,refs:A,elements:x}),[f,A,x,k])}function wc(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(v=>v(...p)).find(v=>v!==void 0)}}}else o[s]=l}),o),{})}}function rM(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(i=>wc(i,e,"reference"),t),r=C.useCallback(i=>wc(i,e,"floating"),t),o=C.useCallback(i=>wc(i,e,"item"),e.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let Bg=!1;function aa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function jg(e,t){return aa(t,e===dc||e===Xi,e===br||e===xo)}function Sc(e,t,n){return aa(t,e===Xi,n?e===br:e===xo)||e==="Enter"||e==" "||e===""}function oM(e,t,n){return aa(t,n?e===br:e===xo,e===Xi)}function zg(e,t,n){return aa(t,n?e===xo:e===br,e===dc)}function iM(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:v=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:A=void 0,orientation:x="vertical",cols:k=1,scrollItemIntoView:$=!0,virtualItemRef:R}=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(" "))),x==="vertical"&&k>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const W=Tg(),T=na(),_=Tn(c),L=C.useRef(m),N=C.useRef(f??-1),F=C.useRef(null),D=C.useRef(!0),M=C.useRef(_),G=C.useRef(!!a),z=C.useRef(!1),O=C.useRef(!1),y=$n(A),P=$n(n),B=$n($),[S,H]=C.useState(),[Y,q]=C.useState(),Q=Tn(function(J,X,K){K===void 0&&(K=!1);const oe=J.current[X.current];oe&&(g?(H(oe.id),T==null||T.events.emit("virtualfocus",oe),R&&(R.current=oe)):dn(oe,{preventScroll:!0,sync:ID()&&Zm()?Bg||z.current:!1}),requestAnimationFrame(()=>{const V=B.current;V&&oe&&(K||!D.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof V=="boolean"?{block:"nearest",inline:"nearest"}:V))}))});Ye(()=>{document.createElement("div").focus({get preventScroll(){return Bg=!0,!1}})},[]),Ye(()=>{u&&(n&&a?L.current&&f!=null&&(O.current=!0,_(f)):G.current&&(N.current=-1,M.current(null)))},[u,n,a,f,_]),Ye(()=>{if(u&&n&&a)if(l==null){if(z.current=!1,f!=null)return;if(G.current&&(N.current=-1,Q(s,N)),!G.current&&L.current&&(F.current!=null||L.current===!0&&F.current==null)){let J=0;const X=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(X),J++):(N.current=F.current==null||Sc(F.current,x,h)||v?pc(s,y.current):Cg(s,y.current),F.current=null,_(N.current))};X()}}else Eo(s,l)||(N.current=l,Q(s,N,O.current),O.current=!1)},[u,n,a,l,f,v,s,x,h,_,Q,y]),Ye(()=>{var J,X;if(!u||a||!T||g||!G.current)return;const K=T.nodesRef.current,oe=(J=K.find(Z=>Z.id===W))==null||(X=J.context)==null?void 0:X.elements.floating,V=kn(Ft(a)),le=K.some(Z=>Z.context&&yt(Z.context.elements.floating,V));oe&&!le&&D.current&&oe.focus({preventScroll:!0})},[u,a,T,W,g]),Ye(()=>{if(!u||!T||!g||W)return;function J(X){q(X.id),R&&(R.current=X)}return T.events.on("virtualfocus",J),()=>{T.events.off("virtualfocus",J)}},[u,T,g,W,R]),Ye(()=>{M.current=_,G.current=!!a}),Ye(()=>{n||(F.current=null)},[n]);const ee=l!=null,te=C.useMemo(()=>{function J(K){if(!n)return;const oe=s.current.indexOf(K);oe!==-1&&_(oe)}return{onFocus(K){let{currentTarget:oe}=K;J(oe)},onClick:K=>{let{currentTarget:oe}=K;return oe.focus({preventScroll:!0})},...b&&{onMouseMove(K){let{currentTarget:oe}=K;J(oe)},onPointerLeave(K){let{pointerType:oe}=K;!D.current||oe==="touch"||(N.current=-1,Q(s,N),_(null),g||dn(o.floating.current,{preventScroll:!0}))}}}},[n,o,Q,b,s,_,g]);return C.useMemo(()=>{if(!u)return{};const J=y.current;function X(Z){if(D.current=!1,z.current=!0,!P.current&&Z.currentTarget===o.floating.current)return;if(v&&zg(Z.key,x,h)){ot(Z),r(!1,Z.nativeEvent),hr(i)&&!g&&i.focus();return}const fe=N.current,pe=pc(s,J),xe=Cg(s,J);if(Z.key==="Home"&&(ot(Z),N.current=pe,_(N.current)),Z.key==="End"&&(ot(Z),N.current=xe,_(N.current)),!(k>1&&(N.current=D_(s,{event:Z,orientation:x,loop:d,cols:k,disabledIndices:J,minIndex:pe,maxIndex:xe,prevIndex:N.current,stopEvent:!0}),_(N.current),x==="both"))&&jg(Z.key,x)){if(ot(Z),n&&!g&&kn(Z.currentTarget.ownerDocument)===Z.currentTarget){N.current=Sc(Z.key,x,h)?pe:xe,_(N.current);return}Sc(Z.key,x,h)?d?N.current=fe>=xe?p&&fe!==s.current.length?-1:pe:ft(s,{startingIndex:fe,disabledIndices:J}):N.current=Math.min(xe,ft(s,{startingIndex:fe,disabledIndices:J})):d?N.current=fe<=pe?p&&fe!==-1?s.current.length:xe:ft(s,{startingIndex:fe,decrement:!0,disabledIndices:J}):N.current=Math.max(pe,ft(s,{startingIndex:fe,decrement:!0,disabledIndices:J})),Eo(s,N.current)?_(null):_(N.current)}}function K(Z){m==="auto"&&Qm(Z.nativeEvent)&&(L.current=!0)}function oe(Z){L.current=m,m==="auto"&&Jm(Z.nativeEvent)&&(L.current=!0)}const V=g&&n&&ee&&{"aria-activedescendant":Y||S},le=s.current.find(Z=>(Z==null?void 0:Z.id)===S);return{reference:{...V,onKeyDown(Z){D.current=!1;const fe=Z.key.indexOf("Arrow")===0,pe=oM(Z.key,x,h),xe=zg(Z.key,x,h),qe=jg(Z.key,x),st=(v?pe:qe)||Z.key==="Enter"||Z.key.trim()==="";if(g&&n){const ue=T==null?void 0:T.nodesRef.current.find(j=>j.parentId==null),U=T&&ue?B_(T.nodesRef.current,ue.id):null;if(fe&&U&&R){const j=new KeyboardEvent("keydown",{key:Z.key,bubbles:!0});if(pe||xe){var Et,lt;const ne=((Et=U.context)==null?void 0:Et.elements.domReference)===Z.currentTarget,ae=xe&&!ne?(lt=U.context)==null?void 0:lt.elements.domReference:pe?le:null;ae&&(ot(Z),ae.dispatchEvent(j),q(void 0))}if(qe&&U.context&&U.context.open&&U.parentId&&Z.currentTarget!==U.context.elements.domReference){var ie;ot(Z),(ie=U.context.elements.domReference)==null||ie.dispatchEvent(j);return}}return X(Z)}if(!(!n&&!w&&fe)){if(st&&(F.current=v&&qe?null:Z.key),v){pe&&(ot(Z),n?(N.current=pc(s,J),_(N.current)):r(!0,Z.nativeEvent));return}qe&&(f!=null&&(N.current=f),ot(Z),!n&&w?r(!0,Z.nativeEvent):X(Z),n&&_(N.current))}},onFocus(){n&&_(null)},onPointerDown:oe,onMouseDown:K,onClick:K},floating:{"aria-orientation":x==="both"?void 0:x,...V,onKeyDown:X,onPointerMove(){D.current=!0}},item:te}},[i,o,S,Y,y,P,s,u,x,h,g,n,ee,v,f,w,p,k,d,m,_,r,te,T,R])}function aM(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=vc();return C.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function sM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,v=C.useRef(),h=C.useRef(""),g=C.useRef((n=d??a)!=null?n:-1),m=C.useRef(null),b=Tn(s),w=Tn(l),A=$n(u),x=$n(p);return Ye(()=>{r&&(clearTimeout(v.current),m.current=null,h.current="")},[r]),Ye(()=>{if(r&&h.current===""){var k;g.current=(k=d??a)!=null?k:-1}},[r,d,a]),C.useMemo(()=>{if(!c)return{};function k(W){W?o.current.typing||(o.current.typing=W,w(W)):o.current.typing&&(o.current.typing=W,w(W))}function $(W,T,_){const L=A.current?A.current(T,_):T.find(N=>(N==null?void 0:N.toLocaleLowerCase().indexOf(_.toLocaleLowerCase()))===0);return L?W.indexOf(L):-1}function R(W){const T=i.current;if(h.current.length>0&&h.current[0]!==" "&&($(T,T,h.current)===-1?k(!1):W.key===" "&&ot(W)),T==null||x.current.includes(W.key)||W.key.length!==1||W.ctrlKey||W.metaKey||W.altKey)return;r&&W.key!==" "&&(ot(W),k(!0)),T.every(F=>{var D,M;return F?((D=F[0])==null?void 0:D.toLocaleLowerCase())!==((M=F[1])==null?void 0:M.toLocaleLowerCase()):!0})&&h.current===W.key&&(h.current="",g.current=m.current),h.current+=W.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,k(!1)},f);const L=g.current,N=$(T,[...T.slice((L||0)+1),...T.slice(0,(L||0)+1)],h.current);N!==-1?(b(N),m.current=N):W.key!==" "&&(h.current="",k(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(W){W.key===" "&&k(!1)}}}},[c,r,o,i,f,x,A,b,w])}const lM=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var F,D,M,G,z;const o=Li(O=>O.messageContainerRef),[i,a]=C.useState(!1),[s,l]=C.useState(null),[c,u]=C.useState(null),{message:{blocks:{dropdown:f}}}=me,p=e.reduce((O,y)=>(O[y.label]=y.value,O),{}),d=p?Object.keys(p):[],v=O=>{a(c!==null&&!t?!1:O)},{refs:h,floatingStyles:g,context:m}=nM({placement:"bottom-start",open:i,onOpenChange:v,whileElementsMounted:i_,middleware:[f_(5),d_({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),p_({apply({rects:O,elements:y,availableHeight:P}){Object.assign(y.floating.style,{maxHeight:`${P}px`,minWidth:`${O.reference.width}px`})},padding:10})]}),b=C.useRef([]),w=C.useRef(d),A=C.useRef(!1),x=Q_(m,{event:"mousedown"}),k=tM(m),$=aM(m,{role:"listbox"}),R=iM(m,{listRef:b,activeIndex:s,selectedIndex:c,onNavigate:l,loop:!0}),W=sM(m,{listRef:w,activeIndex:s,selectedIndex:c,onMatch:i?l:u,onTypingChange(O){A.current=O}}),{getReferenceProps:T,getFloatingProps:_,getItemProps:L}=rM([k,$,R,W,x]),N=O=>{u(O),d[O]!==void 0&&(n==null||n({type:"text",text:d[O]??"",value:p[d[O]]??""})),a(!1)};return E.jsxs(E.Fragment,{children:[E.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(F=f.button)==null?void 0:F.container,...T(),children:[E.jsx("span",{...(D=f.button)==null?void 0:D.text,children:c?d[c]:"Select..."}),E.jsx(zO,{...(M=f.button)==null?void 0:M.icon})]}),i&&E.jsx(q_,{children:E.jsx(Y_,{context:m,modal:!1,children:E.jsx("div",{ref:h.setFloating,className:(z=(G=f.content)==null?void 0:G.container)==null?void 0:z.className,style:{...g},..._(),children:d.map((O,y)=>{var P;return E.jsx("div",{ref:B=>{b.current[y]=B},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===c&&y===s,"data-active":y===s?"":void 0,...(P=f.content)==null?void 0:P.item,...L({onClick(){N(y)},onKeyDown(B){B.key==="Enter"&&(B.preventDefault(),N(y)),B.key===" "&&!A.current&&(B.preventDefault(),N(y))}}),children:O},O)})})})})]})},Ug=I.forwardRef(({title:e,url:t,isReadOnly:n,...r},o)=>{const{message:{blocks:{file:i}}}=me;return E.jsxs("a",{...r,...i.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[E.jsx("p",{...i.title,children:e||t}),E.jsx(qO,{...i.icon})]})});Ug.displayName="File";const cM=xn()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const o=await fetch(n).then(c=>c.text()),i=new Blob([o],{type:"application/javascript"}),s=await import(URL.createObjectURL(i)),l=()=>s.default;return e(c=>({components:{...c.components,[n]:l}})),l}}));globalThis.React=I;const Wg={audio:_m,bubble:$m,button:UP,carousel:Vm,column:Nm,dropdown:lM,file:Ug,image:Pm,location:Mm,row:Rm,text:fP,video:Dm,custom:({url:e,name:t,data:n,...r})=>{const o=cM(c=>c.getCustomComponent),[i,a]=I.useState(null),[s,l]=I.useState(null);return I.useEffect(()=>{o(e).then(a).catch(c=>{l(c.message)})},[e]),s?E.jsx("div",{style:{color:"red"},children:s}):i?E.jsx(i,{...n,...r}):null}},Kn=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Wg[e.type],o={...n,...e};return E.jsx(r,{...o})};function Hg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ao(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hg(e))&&(r&&(r+=" "),r+=t);return r}const uM=({disabled:e,onFileSelected:t})=>{const n=I.useRef(null),{uploadButton:r}=me.composer,o=()=>{n.current&&n.current.click()},i=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return E.jsxs(E.Fragment,{children:[E.jsx(rP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:o}),E.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:i})]})},fM=({name:e,type:t,instance:n,status:r,removeFile:o})=>{const{loader:i,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:c}=me.composer.fileWidget,u=["PNG","JPEG","JPG"].includes(la(e)),f=I.useMemo(()=>u?URL.createObjectURL(n):"",[n]);return r==="loading"?E.jsx(sa,{name:e,status:r,removeButton:E.jsx("div",{...i}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx(xc,{type:t,...a.icon})})}):r==="error"?E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Vg,{removeFile:()=>o(e)}),extension:"Upload Error",children:E.jsxs("div",{...a.container,children:[E.jsx(HO,{...l}),E.jsx(xc,{type:t,...a.icon})]})}):r=="uploaded"&&u?E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Vg,{removeFile:()=>o(e)}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx("img",{src:f,alt:e,...c})})}):E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Zv,{onClick:()=>o(e),...s}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx(xc,{type:t,...a.icon})})})},sa=({name:e,status:t,removeButton:n,children:r,extension:o})=>{const{container:i,metadata:a}=me.composer.fileWidget;return E.jsxs("div",{"data-status":t,title:e,...i,children:[n,r,E.jsxs("div",{...a.container,children:[E.jsx("div",{...a.name,children:e}),E.jsx("div",{...a.type,children:o})]})]})},xc=({type:e,...t})=>e==="image"?E.jsx(QO,{...t}):e==="video"?E.jsx(lP,{...t}):e==="audio"?E.jsx(tm,{...t}):E.jsx(Xv,{...t}),la=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Vg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=me;return E.jsx(Zv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function Ec(){return Ec=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},Ec.apply(null,arguments)}function dM(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 pM=I.useLayoutEffect,hM=function(t){var n=C.useRef(t);return pM(function(){n.current=t}),n},Kg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},vM=function(t,n){var r=I.useRef();return I.useCallback(function(o){t.current=o,r.current&&Kg(r.current,null),r.current=n,n&&Kg(n,o)},[n])},qg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},mM=function(t){Object.keys(qg).forEach(function(n){t.style.setProperty(n,qg[n],"important")})},Gg=mM,vt=null,Yg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function gM(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),vt||(vt=document.createElement("textarea"),vt.setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Gg(vt)),vt.parentNode===null&&document.body.appendChild(vt);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;vt.style[d]=a[d]}),Gg(vt),vt.value=t;var l=Yg(vt,e);vt.value=t,l=Yg(vt,e),vt.value="x";var c=vt.scrollHeight-o,u=c*n;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*r;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var Qg=function(){},yM=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},bM=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],wM=!!document.documentElement.currentStyle,SM=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=yM(bM,n),o=r.boxSizing;if(o==="")return null;wM&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},xM=SM;function Jg(e,t,n){var r=hM(n);C.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var EM=function(t){Jg(window,"resize",t)},kM=function(t){Jg(document.fonts,"loadingdone",t)},CM=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],AM=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?Qg:a,l=t.onHeightChange,c=l===void 0?Qg:l,u=dM(t,CM),f=u.value!==void 0,p=C.useRef(null),d=vM(p,n),v=C.useRef(0),h=C.useRef(),g=function(){var w=p.current,A=r&&h.current?h.current:xM(w);if(A){h.current=A;var x=gM(A,w.value||w.placeholder||"x",i,o),k=x[0],$=x[1];v.current!==k&&(v.current=k,w.style.setProperty("height",k+"px","important"),c(k,{rowHeight:$}))}},m=function(w){f||g(),s(w)};return C.useLayoutEffect(g),EM(g),kM(g),C.createElement("textarea",Ec({},u,{onChange:m,ref:d}))},$M=C.forwardRef(AM);const TM=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:o,setTextInput:i,setHistoryIndex:a,sendComposerMessage:s})=>{const l=dm(u=>u.messageHistory),{input:c}=me.composer;return E.jsx($M,{...c,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:u=>i(u.target.value),maxRows:5,onKeyDown:u=>{if(n)return;const f=u.nativeEvent;f.isComposing||f.keyCode===229||(u.key==="Enter"&&u.shiftKey?(u.preventDefault(),i(`${r}
257
- `)):u.key==="Enter"&&(u.preventDefault(),s()),u.key==="ArrowUp"&&(u.preventDefault(),o<l.length-1&&i(l[o+1]??""),a(Math.min(o+1,l.length-1))),u.key==="ArrowDown"&&(u.preventDefault(),i(o===0?"":l[o-1]??""),a(Math.max(o-1,-1))))}})},IM=({disabled:e,setTextInput:t})=>{const[n,r]=I.useState(!1),o=I.useRef(null),{voiceButton:i}=me.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{o.current||(o.current=new a);const l=o.current;l&&(l.continuous=!0,l.onresult=c=>{var f,p,d;const u=((d=(p=(f=c.results)==null?void 0:f[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(u??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return E.jsx(eP,{...i,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},Zg=I.memo(I.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:o,connected:i,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:c,storageKey:u,children:f,...p},d)=>{const{composer:v}=me,h=n||r||!i,[g,m]=I.useState(""),[b,w]=I.useState(-1),A=km(u),x=A(L=>L.files),k=A(L=>L.setFiles),$=A(L=>L.deleteFile),R=A(L=>L.uploadFile),W=dm(L=>L.addMessageToHistory),T=!!g||x.filter(L=>L.status==="uploaded").length>0;t=t??I.useRef(null);const _=()=>{const L=x.filter(D=>D.status==="uploaded");if(!L.length&&!g)return;const N=(L==null?void 0:L.map(D=>{const M=D.url,G=D.type;return{video:{type:"video",videoUrl:M},audio:{type:"audio",audioUrl:M},image:{type:"image",imageUrl:M}}[G]??{title:D.name,type:"file",fileUrl:M}}))??[];g&&N.push({type:"text",text:g});let F;N.length==1?F=N[0]:F={type:"bloc",items:N.map(M=>{const{type:G,...z}=M;return{type:G,payload:z}})},l==null||l(F),k([]),m(""),W(g),w(-1)};return r?null:E.jsxs(E.Fragment,{children:[E.jsxs("div",{"data-disabled":h,className:Ao(v.container.className,e),ref:d,...p,children:[f,x.length>0&&E.jsx("div",{...v==null?void 0:v.fileContainer,children:x.map(L=>E.jsx(fM,{...L,removeFile:$},L.name))}),E.jsxs("div",{...v.inputContainer,onClick:()=>{t&&"current"in t&&t.current&&t.current.focus()},children:[o&&E.jsx(uM,{disabled:h,onFileSelected:L=>{c&&R(L,c)}}),E.jsx(TM,{inputRef:t,composerPlaceholder:a,composerDisabled:h,textInput:g,historyIndex:b,setTextInput:m,setHistoryIndex:w,sendComposerMessage:_}),!h&&E.jsxs(E.Fragment,{children:[E.jsx(BO,{...v.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":T,onClick:()=>_()}),E.jsx(IM,{disabled:T,setTextInput:m})]})]})]}),E.jsx(gv,{components:{a:({node:L,...N})=>E.jsx("a",{...N,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...v.footer,children:s})]})}));var kc={exports:{}},ca={exports:{}},$e={};/** @license React v16.13.1
256
+ */var h_=["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])"],uc=h_.join(","),bg=typeof Element>"u",So=bg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ji=!bg&&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},Zi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},v_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},m_=function(t,n,r){if(Zi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(uc));return n&&So.call(t,uc)&&o.unshift(t),o=o.filter(r),o},g_=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Zi(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=So.call(a,uc);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Zi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},wg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||v_(t))&&!wg(t)?0:t.tabIndex},y_=function(t,n){var r=Sg(t);return r<0&&n&&!wg(t)?0:r},b_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xg=function(t){return t.tagName==="INPUT"},w_=function(t){return xg(t)&&t.type==="hidden"},S_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},x_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},E_=function(t){if(!t.name)return!0;var n=t.form||Ji(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=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 i=x_(o,t.form);return!i||i===t},k_=function(t){return xg(t)&&t.type==="radio"},C_=function(t){return k_(t)&&!E_(t)},A_=function(t){var n,r=t&&Ji(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=Ji(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Eg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=So.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(So.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ji(t);if(l&&!l.shadowRoot&&o(l)===!0)return Eg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(A_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Eg(t);return!1},T_=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 o=n.children.item(r);if(o.tagName==="LEGEND")return So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},I_=function(t,n){return!(n.disabled||Zi(n)||w_(n)||$_(n,t)||S_(n)||T_(n))},kg=function(t,n){return!(C_(n)||Sg(n)<0||!I_(t,n))},O_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},P_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=y_(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(b_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},fc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=g_([t],n.includeContainer,{filter:kg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:O_}):r=m_(t,n.includeContainer,kg.bind(null,n)),P_(r)};const dc="ArrowUp",Xi="ArrowDown",br="ArrowLeft",xo="ArrowRight";function ea(e,t,n){return Math.floor(e/t)!==n}function Eo(e,t){return t<0||t>=e.current.length}function pc(e,t){return ct(e,{disabledIndices:t})}function Cg(e,t){return ct(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ct(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function D_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===dc){if(u&&ot(n),c===-1)f=l;else if(f=ct(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||f<0)){const p=c%i,d=l%i,v=l-(d-p);d===p?f=l:f=d>p?v:v-i}Eo(e,f)&&(f=c)}if(n.key===Xi&&(u&&ot(n),c===-1?f=s:(f=ct(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(f=ct(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Eo(e,f)&&(f=c)),r==="both"){const p=Km(c/i);n.key===xo&&(u&&ot(n),c%i!==i-1?(f=ct(e,{startingIndex:c,disabledIndices:a}),o&&ea(f,i,p)&&(f=ct(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(f=ct(e,{startingIndex:c-c%i-1,disabledIndices:a})),ea(f,i,p)&&(f=c)),n.key===br&&(u&&ot(n),c%i!==0?(f=ct(e,{startingIndex:c,disabledIndices:a,decrement:!0}),o&&ea(f,i,p)&&(f=ct(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(f=ct(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),ea(f,i,p)&&(f=c));const d=Km(l/i)===p;Eo(e,f)&&(o&&d?f=n.key===br?l:ct(e,{startingIndex:c-c%i-1,disabledIndices:a}):f=c)}return f}let Ag=0;function dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ag);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Ag=requestAnimationFrame(i)}var Ye=typeof document<"u"?I.useLayoutEffect:I.useEffect;function ta(){return ta=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},ta.apply(this,arguments)}let hc=!1,__=0;const $g=()=>"floating-ui-"+__++;function M_(){const[e,t]=C.useState(()=>hc?$g():void 0);return Ye(()=>{e==null&&t($g())},[]),C.useEffect(()=>{hc||(hc=!0)},[]),e}const vc=C.useId||M_;function N_(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(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(o=>o!==n))||[])}}}const R_=C.createContext(null),L_=C.createContext(null),Tg=()=>{var e;return((e=C.useContext(R_))==null?void 0:e.id)||null},na=()=>C.useContext(L_);function ko(e){return"data-floating-ui-"+e}function $n(e){const t=I.useRef(e);return Ye(()=>{t.current=e}),t}function F_(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function wr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function B_(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Sr=new WeakMap,ra=new WeakSet,oa={},mc=0;const j_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ig=e=>e&&(e.host||Ig(e.parentNode)),z_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ig(n);return e.contains(r)?r:null}).filter(n=>n!=null);function U_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=z_(t,e),s=new Set,l=new Set(a),c=[];oa[o]||(oa[o]=new WeakMap);const u=oa[o];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,v=>{if(s.has(v))p(v);else{const h=i?v.getAttribute(i):null,g=h!==null&&h!=="false",m=(Sr.get(v)||0)+1,b=(u.get(v)||0)+1;Sr.set(v,m),u.set(v,b),c.push(v),m===1&&g&&ra.add(v),b===1&&v.setAttribute(o,""),!g&&i&&v.setAttribute(i,"true")}})}return mc++,()=>{c.forEach(d=>{const v=(Sr.get(d)||0)-1,h=(u.get(d)||0)-1;Sr.set(d,v),u.set(d,h),v||(!ra.has(d)&&i&&d.removeAttribute(i),ra.delete(d)),h||d.removeAttribute(o)}),mc--,mc||(Sr=new WeakMap,Sr=new WeakMap,ra=new WeakSet,oa={})}}function Og(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Ft(e[0]).body;return U_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const gc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pg(e,t){const n=fc(e,gc());t==="prev"&&n.reverse();const r=n.indexOf(kn(Ft(e)));return n.slice(r+1)[0]}function Dg(){return Pg(document.body,"next")}function _g(){return Pg(document.body,"prev")}function Co(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function W_(e){fc(e,gc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function H_(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 yc={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 V_;function Mg(e){e.key==="Tab"&&(e.target,clearTimeout(V_))}const ia=C.forwardRef(function(t,n){const[r,o]=C.useState();Ye(()=>(Zm()&&o("button"),document.addEventListener("keydown",Mg),()=>{document.removeEventListener("keydown",Mg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ko("focus-guard")]:"",style:yc};return C.createElement("span",ta({},t,i))}),Ng=C.createContext(null);function K_(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=C.useState(null),i=vc(),a=Rg(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),l=C.useRef();return Ye(()=>()=>{r==null||r.remove()},[r,s]),Ye(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:f,uniqueId:p}=s,d=c?document.getElementById(c):null,v=ko("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(v,""),d.appendChild(h),o(h)}else{let h=u||(f==null?void 0:f.portalNode);h&&!Mt(h)&&(h=h.current),h=h||document.body;let g=null;c&&(g=document.createElement("div"),g.id=c,h.appendChild(g));const m=document.createElement("div");m.id=p,m.setAttribute(v,""),h=g||h,h.appendChild(m),o(m)}},[s]),r}function q_(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=K_({id:n,root:r}),[a,s]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(v){i&&Co(v)&&(v.type==="focusin"?H_:W_)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),C.createElement(Ng.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&C.createElement(ia,{"data-type":"outside",ref:l,onFocus:d=>{if(Co(d,i)){var v;(v=u.current)==null||v.focus()}else{const h=_g()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&i&&C.createElement("span",{"aria-owns":i.id,style:yc}),i&&tp.createPortal(t,i),p&&i&&C.createElement(ia,{"data-type":"outside",ref:c,onFocus:d=>{if(Co(d,i)){var v;(v=f.current)==null||v.focus()}else{const h=Dg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Rg=()=>C.useContext(Ng),G_=C.forwardRef(function(t,n){return C.createElement("button",ta({},t,{type:"button",ref:n,tabIndex:-1,style:yc}))});function Y_(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:v,events:h,dataRef:g,elements:{domReference:m,floating:b}}=t,w=j_()?i:!0,A=$n(o),x=$n(a),k=$n(s),$=na(),R=Rg(),H=typeof a=="number"&&a<0,T=C.useRef(null),_=C.useRef(null),F=C.useRef(!1),N=C.useRef(null),B=C.useRef(!1),D=R!=null,M=m&&m.getAttribute("role")==="combobox"&&tg(m)&&H,G=C.useCallback(function(P){return P===void 0&&(P=b),P?fc(P,gc()):[]},[b]),U=C.useCallback(P=>{const j=G(P);return A.current.map(S=>m&&S==="reference"?m:b&&S==="floating"?b:j).filter(Boolean).flat()},[m,b,A,G]);C.useEffect(()=>{if(r||!l)return;function P(S){if(S.key==="Tab"){bt(b,kn(Ft(b)))&&G().length===0&&!M&&ot(S);const V=U(),Y=eg(S);A.current[0]==="reference"&&Y===m&&(ot(S),S.shiftKey?dn(V[V.length-1]):dn(V[1])),A.current[1]==="floating"&&Y===b&&S.shiftKey&&(ot(S),dn(V[0]))}}const j=Ft(b);return j.addEventListener("keydown",P),()=>{j.removeEventListener("keydown",P)}},[r,m,b,l,A,p,M,G,U]),C.useEffect(()=>{if(r||!u)return;function P(){B.current=!0,setTimeout(()=>{B.current=!1})}function j(S){const V=S.relatedTarget;queueMicrotask(()=>{const Y=!(bt(m,V)||bt(b,V)||bt(V,b)||bt(R==null?void 0:R.portalNode,V)||V!=null&&V.hasAttribute(ko("focus-guard"))||$&&(wr($.nodesRef.current,d).find(q=>{var Q,X;return bt((Q=q.context)==null?void 0:Q.elements.floating,V)||bt((X=q.context)==null?void 0:X.elements.domReference,V)})||F_($.nodesRef.current,d).find(q=>{var Q,X;return((Q=q.context)==null?void 0:Q.elements.floating)===V||((X=q.context)==null?void 0:X.elements.domReference)===V})));V&&Y&&!B.current&&V!==N.current&&(F.current=!0,v(!1,S))})}if(b&&hr(m))return m.addEventListener("focusout",j),m.addEventListener("pointerdown",P),!l&&b.addEventListener("focusout",j),()=>{m.removeEventListener("focusout",j),m.removeEventListener("pointerdown",P),!l&&b.removeEventListener("focusout",j)}},[r,m,b,l,d,$,R,v,u]),C.useEffect(()=>{var P;if(r)return;const j=Array.from((R==null||(P=R.portalNode)==null?void 0:P.querySelectorAll("["+ko("portal")+"]"))||[]);if(b){const S=[b,...j,T.current,_.current,A.current.includes("reference")||M?m:null].filter(Y=>Y!=null),V=l?Og(S,w,!w):Og(S);return()=>{V()}}},[r,m,b,l,A,R,M,w]),Ye(()=>{if(r||!b)return;const P=Ft(b),j=kn(P);queueMicrotask(()=>{const S=U(b),V=x.current,Y=(typeof V=="number"?S[V]:V.current)||b,q=bt(b,j);!H&&!q&&f&&dn(Y,{preventScroll:Y===b})})},[r,f,b,H,U,x]),Ye(()=>{if(r||!b)return;let P=!1;const j=Ft(b),S=kn(j),V=g.current;N.current=S;function Y(q){if(q.type==="escapeKey"&&p.domReference.current&&(N.current=p.domReference.current),["referencePress","escapeKey"].includes(q.type))return;const Q=q.data.returnFocus;typeof Q=="object"?(F.current=!1,P=Q.preventScroll):F.current=!Q}return h.on("dismiss",Y),()=>{h.off("dismiss",Y);const q=kn(j);(bt(b,q)||$&&wr($.nodesRef.current,d).some(X=>{var ee;return bt((ee=X.context)==null?void 0:ee.elements.floating,q)})||V.openEvent&&["click","mousedown"].includes(V.openEvent.type))&&p.domReference.current&&(N.current=p.domReference.current),k.current&&hr(N.current)&&!F.current&&dn(N.current,{cancelPrevious:!1,preventScroll:P})}},[r,b,k,g,p,h,$,d]),Ye(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:u,open:f,onOpenChange:v,refs:p}),()=>{R.setFocusManagerState(null)}},[r,R,l,f,v,p,u]),Ye(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!H){const P=()=>{const S=b.getAttribute("tabindex");A.current.includes("floating")||kn(Ft(b))!==p.domReference.current&&G().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};P();const j=new MutationObserver(P);return j.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{j.disconnect()}}},[r,b,p,A,G,H]);function O(P){return r||!c||!l?null:C.createElement(G_,{ref:P==="start"?T:_,onClick:j=>v(!1,j.nativeEvent)},typeof c=="string"?c:"Dismiss")}const y=!r&&w&&!M&&(D||l);return C.createElement(C.Fragment,null,y&&C.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:P=>{if(l){const S=U();dn(o[0]==="reference"?S[0]:S[S.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(F.current=!1,Co(P,R.portalNode)){const S=Dg()||m;S==null||S.focus()}else{var j;(j=R.beforeOutsideRef.current)==null||j.focus()}}}),!M&&O("start"),n,O("end"),y&&C.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:P=>{if(l)dn(U()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(F.current=!0),Co(P,R.portalNode)){const S=_g()||m;S==null||S.focus()}else{var j;(j=R.afterOutsideRef.current)==null||j.focus()}}}))}function Lg(e){return hr(e.target)&&e.target.tagName==="BUTTON"}function Fg(e){return tg(e)}function Q_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Xm(f.current)&&c||s!=="click"&&(n&&l&&(!o.current.openEvent||o.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}Xm(f.current)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||Lg(d))&&(d.key===" "&&!Fg(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||Lg(d)||Fg(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,o,s,c,u,i,l,n,r])}const J_=C.useInsertionEffect||(e=>e());function Tn(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return J_(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Z_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},X_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},eM=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 tM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:m}=t,b=na(),w=Tg()!=null,A=Tn(typeof p=="function"?p:()=>!1),x=typeof p=="function"?A:p,k=C.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:R}=eM(m),H=Tn(_=>{if(!n||!u||!f||_.key!=="Escape")return;const F=b?wr(b.nodesRef.current,i):[];if(!$&&(_.stopPropagation(),F.length>0)){let N=!0;if(F.forEach(B=>{var D;if((D=B.context)!=null&&D.open&&!B.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,OD(_)?_.nativeEvent:_)}),T=Tn(_=>{const F=k.current;if(k.current=!1,F||typeof x=="function"&&!x(_))return;const N=eg(_),B="["+ko("inert")+"]",D=Ft(l).querySelectorAll(B);let M=Mt(N)?N:null;for(;M&&!CD(M);){const O=$D(M);if(O===Ft(l).body||!Mt(O))break;M=O}if(D.length&&Mt(N)&&!PD(N)&&!bt(N,l)&&Array.from(D).every(O=>!bt(M,O)))return;if(hr(N)&&l){const O=N.clientWidth>0&&N.scrollWidth>N.clientWidth,y=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let P=y&&_.offsetX>N.clientWidth;if(y&&AD(N).direction==="rtl"&&(P=_.offsetX<=N.offsetWidth-N.clientWidth),P||O&&_.offsetY>N.clientHeight)return}const G=b&&wr(b.nodesRef.current,i).some(O=>{var y;return tc(_,(y=O.context)==null?void 0:y.elements.floating)});if(tc(_,l)||tc(_,s)||G)return;const U=b?wr(b.nodesRef.current,i):[];if(U.length>0){let O=!0;if(U.forEach(y=>{var P;if((P=y.context)!=null&&P.open&&!y.context.dataRef.current.__outsidePressBubbles){O=!1;return}}),!O)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Qm(_)||Jm(_)}}),r(!1,_)});return C.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=$,c.current.__outsidePressBubbles=R;function _(B){r(!1,B)}const F=Ft(l);f&&F.addEventListener("keydown",H),x&&F.addEventListener(d,T);let N=[];return g&&(Mt(s)&&(N=An(s)),Mt(l)&&(N=N.concat(An(l))),!Mt(a)&&a&&a.contextElement&&(N=N.concat(An(a.contextElement)))),N=N.filter(B=>{var D;return B!==((D=F.defaultView)==null?void 0:D.visualViewport)}),N.forEach(B=>{B.addEventListener("scroll",_,{passive:!0})}),()=>{f&&F.removeEventListener("keydown",H),x&&F.removeEventListener(d,T),N.forEach(B=>{B.removeEventListener("scroll",_)})}},[c,l,s,a,f,x,d,n,r,g,u,$,R,H,T]),C.useEffect(()=>{k.current=!1},[x,d]),C.useMemo(()=>u?{reference:{onKeyDown:H,[Z_[h]]:_=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,_.nativeEvent))}},floating:{onKeyDown:H,[X_[d]]:()=>{k.current=!0}}}:{},[u,o,v,d,h,r,H])}let bc;process.env.NODE_ENV!=="production"&&(bc=new Set);function nM(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const $="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((i=e.elements)!=null&&i.reference&&!Mt(e.elements.reference)){var a;if(!((a=bc)!=null&&a.has($))){var s;(s=bc)==null||s.add($),console.error($)}}}const[l,c]=C.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=u_(e),p=na(),d=Tn(($,R)=>{$&&(h.current.openEvent=R),r==null||r($,R)}),v=C.useRef(null),h=C.useRef({}),g=C.useState(()=>N_())[0],m=vc(),b=C.useCallback($=>{const R=Mt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(R)},[f.refs]),w=C.useCallback($=>{(Mt($)||$===null)&&(v.current=$,c($)),(Mt(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Mt($))&&f.refs.setReference($)},[f.refs]),A=C.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:v}),[f.refs,w,b]),x=C.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),k=C.useMemo(()=>({...f,refs:A,elements:x,dataRef:h,nodeId:o,floatingId:m,events:g,open:n,onOpenChange:d}),[f,o,m,g,n,d,A,x]);return Ye(()=>{const $=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);$&&($.context=k)}),C.useMemo(()=>({...f,context:k,refs:A,elements:x}),[f,A,x,k])}function wc(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(v=>v(...p)).find(v=>v!==void 0)}}}else o[s]=l}),o),{})}}function rM(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(i=>wc(i,e,"reference"),t),r=C.useCallback(i=>wc(i,e,"floating"),t),o=C.useCallback(i=>wc(i,e,"item"),e.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let Bg=!1;function aa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function jg(e,t){return aa(t,e===dc||e===Xi,e===br||e===xo)}function Sc(e,t,n){return aa(t,e===Xi,n?e===br:e===xo)||e==="Enter"||e==" "||e===""}function oM(e,t,n){return aa(t,n?e===br:e===xo,e===Xi)}function zg(e,t,n){return aa(t,n?e===xo:e===br,e===dc)}function iM(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:v=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:A=void 0,orientation:x="vertical",cols:k=1,scrollItemIntoView:$=!0,virtualItemRef:R}=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(" "))),x==="vertical"&&k>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const H=Tg(),T=na(),_=Tn(c),F=C.useRef(m),N=C.useRef(f??-1),B=C.useRef(null),D=C.useRef(!0),M=C.useRef(_),G=C.useRef(!!a),U=C.useRef(!1),O=C.useRef(!1),y=$n(A),P=$n(n),j=$n($),[S,V]=C.useState(),[Y,q]=C.useState(),Q=Tn(function(J,Z,K){K===void 0&&(K=!1);const L=J.current[Z.current];L&&(g?(V(L.id),T==null||T.events.emit("virtualfocus",L),R&&(R.current=L)):dn(L,{preventScroll:!0,sync:ID()&&Zm()?Bg||U.current:!1}),requestAnimationFrame(()=>{const oe=j.current;oe&&L&&(K||!D.current)&&(L.scrollIntoView==null||L.scrollIntoView(typeof oe=="boolean"?{block:"nearest",inline:"nearest"}:oe))}))});Ye(()=>{document.createElement("div").focus({get preventScroll(){return Bg=!0,!1}})},[]),Ye(()=>{u&&(n&&a?F.current&&f!=null&&(O.current=!0,_(f)):G.current&&(N.current=-1,M.current(null)))},[u,n,a,f,_]),Ye(()=>{if(u&&n&&a)if(l==null){if(U.current=!1,f!=null)return;if(G.current&&(N.current=-1,Q(s,N)),!G.current&&F.current&&(B.current!=null||F.current===!0&&B.current==null)){let J=0;const Z=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Z),J++):(N.current=B.current==null||Sc(B.current,x,h)||v?pc(s,y.current):Cg(s,y.current),B.current=null,_(N.current))};Z()}}else Eo(s,l)||(N.current=l,Q(s,N,O.current),O.current=!1)},[u,n,a,l,f,v,s,x,h,_,Q,y]),Ye(()=>{var J,Z;if(!u||a||!T||g||!G.current)return;const K=T.nodesRef.current,L=(J=K.find(ne=>ne.id===H))==null||(Z=J.context)==null?void 0:Z.elements.floating,oe=kn(Ft(a)),ae=K.some(ne=>ne.context&&bt(ne.context.elements.floating,oe));L&&!ae&&D.current&&L.focus({preventScroll:!0})},[u,a,T,H,g]),Ye(()=>{if(!u||!T||!g||H)return;function J(Z){q(Z.id),R&&(R.current=Z)}return T.events.on("virtualfocus",J),()=>{T.events.off("virtualfocus",J)}},[u,T,g,H,R]),Ye(()=>{M.current=_,G.current=!!a}),Ye(()=>{n||(B.current=null)},[n]);const X=l!=null,ee=C.useMemo(()=>{function J(K){if(!n)return;const L=s.current.indexOf(K);L!==-1&&_(L)}return{onFocus(K){let{currentTarget:L}=K;J(L)},onClick:K=>{let{currentTarget:L}=K;return L.focus({preventScroll:!0})},...b&&{onMouseMove(K){let{currentTarget:L}=K;J(L)},onPointerLeave(K){let{pointerType:L}=K;!D.current||L==="touch"||(N.current=-1,Q(s,N),_(null),g||dn(o.floating.current,{preventScroll:!0}))}}}},[n,o,Q,b,s,_,g]);return C.useMemo(()=>{if(!u)return{};const J=y.current;function Z(ne){if(D.current=!1,U.current=!0,!P.current&&ne.currentTarget===o.floating.current)return;if(v&&zg(ne.key,x,h)){ot(ne),r(!1,ne.nativeEvent),hr(i)&&!g&&i.focus();return}const de=N.current,me=pc(s,J),De=Cg(s,J);if(ne.key==="Home"&&(ot(ne),N.current=me,_(N.current)),ne.key==="End"&&(ot(ne),N.current=De,_(N.current)),!(k>1&&(N.current=D_(s,{event:ne,orientation:x,loop:d,cols:k,disabledIndices:J,minIndex:me,maxIndex:De,prevIndex:N.current,stopEvent:!0}),_(N.current),x==="both"))&&jg(ne.key,x)){if(ot(ne),n&&!g&&kn(ne.currentTarget.ownerDocument)===ne.currentTarget){N.current=Sc(ne.key,x,h)?me:De,_(N.current);return}Sc(ne.key,x,h)?d?N.current=de>=De?p&&de!==s.current.length?-1:me:ct(s,{startingIndex:de,disabledIndices:J}):N.current=Math.min(De,ct(s,{startingIndex:de,disabledIndices:J})):d?N.current=de<=me?p&&de!==-1?s.current.length:De:ct(s,{startingIndex:de,decrement:!0,disabledIndices:J}):N.current=Math.max(me,ct(s,{startingIndex:de,decrement:!0,disabledIndices:J})),Eo(s,N.current)?_(null):_(N.current)}}function K(ne){m==="auto"&&Qm(ne.nativeEvent)&&(F.current=!0)}function L(ne){F.current=m,m==="auto"&&Jm(ne.nativeEvent)&&(F.current=!0)}const oe=g&&n&&X&&{"aria-activedescendant":Y||S},ae=s.current.find(ne=>(ne==null?void 0:ne.id)===S);return{reference:{...oe,onKeyDown(ne){D.current=!1;const de=ne.key.indexOf("Arrow")===0,me=oM(ne.key,x,h),De=zg(ne.key,x,h),Ue=jg(ne.key,x),dt=(v?me:Ue)||ne.key==="Enter"||ne.key.trim()==="";if(g&&n){const ce=T==null?void 0:T.nodesRef.current.find(z=>z.parentId==null),W=T&&ce?B_(T.nodesRef.current,ce.id):null;if(de&&W&&R){const z=new KeyboardEvent("keydown",{key:ne.key,bubbles:!0});if(me||De){var mt,pt;const te=((mt=W.context)==null?void 0:mt.elements.domReference)===ne.currentTarget,se=De&&!te?(pt=W.context)==null?void 0:pt.elements.domReference:me?ae:null;se&&(ot(ne),se.dispatchEvent(z),q(void 0))}if(Ue&&W.context&&W.context.open&&W.parentId&&ne.currentTarget!==W.context.elements.domReference){var ie;ot(ne),(ie=W.context.elements.domReference)==null||ie.dispatchEvent(z);return}}return Z(ne)}if(!(!n&&!w&&de)){if(dt&&(B.current=v&&Ue?null:ne.key),v){me&&(ot(ne),n?(N.current=pc(s,J),_(N.current)):r(!0,ne.nativeEvent));return}Ue&&(f!=null&&(N.current=f),ot(ne),!n&&w?r(!0,ne.nativeEvent):Z(ne),n&&_(N.current))}},onFocus(){n&&_(null)},onPointerDown:L,onMouseDown:K,onClick:K},floating:{"aria-orientation":x==="both"?void 0:x,...oe,onKeyDown:Z,onPointerMove(){D.current=!0}},item:ee}},[i,o,S,Y,y,P,s,u,x,h,g,n,X,v,f,w,p,k,d,m,_,r,ee,T,R])}function aM(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=vc();return C.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function sM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,v=C.useRef(),h=C.useRef(""),g=C.useRef((n=d??a)!=null?n:-1),m=C.useRef(null),b=Tn(s),w=Tn(l),A=$n(u),x=$n(p);return Ye(()=>{r&&(clearTimeout(v.current),m.current=null,h.current="")},[r]),Ye(()=>{if(r&&h.current===""){var k;g.current=(k=d??a)!=null?k:-1}},[r,d,a]),C.useMemo(()=>{if(!c)return{};function k(H){H?o.current.typing||(o.current.typing=H,w(H)):o.current.typing&&(o.current.typing=H,w(H))}function $(H,T,_){const F=A.current?A.current(T,_):T.find(N=>(N==null?void 0:N.toLocaleLowerCase().indexOf(_.toLocaleLowerCase()))===0);return F?H.indexOf(F):-1}function R(H){const T=i.current;if(h.current.length>0&&h.current[0]!==" "&&($(T,T,h.current)===-1?k(!1):H.key===" "&&ot(H)),T==null||x.current.includes(H.key)||H.key.length!==1||H.ctrlKey||H.metaKey||H.altKey)return;r&&H.key!==" "&&(ot(H),k(!0)),T.every(B=>{var D,M;return B?((D=B[0])==null?void 0:D.toLocaleLowerCase())!==((M=B[1])==null?void 0:M.toLocaleLowerCase()):!0})&&h.current===H.key&&(h.current="",g.current=m.current),h.current+=H.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,k(!1)},f);const F=g.current,N=$(T,[...T.slice((F||0)+1),...T.slice(0,(F||0)+1)],h.current);N!==-1?(b(N),m.current=N):H.key!==" "&&(h.current="",k(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(H){H.key===" "&&k(!1)}}}},[c,r,o,i,f,x,A,b,w])}const lM=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var B,D,M,G,U;const o=Li(O=>O.messageContainerRef),[i,a]=C.useState(!1),[s,l]=C.useState(null),[c,u]=C.useState(null),{message:{blocks:{dropdown:f}}}=ve,p=e.reduce((O,y)=>(O[y.label]=y.value,O),{}),d=p?Object.keys(p):[],v=O=>{a(c!==null&&!t?!1:O)},{refs:h,floatingStyles:g,context:m}=nM({placement:"bottom-start",open:i,onOpenChange:v,whileElementsMounted:i_,middleware:[f_(5),d_({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),p_({apply({rects:O,elements:y,availableHeight:P}){Object.assign(y.floating.style,{maxHeight:`${P}px`,minWidth:`${O.reference.width}px`})},padding:10})]}),b=C.useRef([]),w=C.useRef(d),A=C.useRef(!1),x=Q_(m,{event:"mousedown"}),k=tM(m),$=aM(m,{role:"listbox"}),R=iM(m,{listRef:b,activeIndex:s,selectedIndex:c,onNavigate:l,loop:!0}),H=sM(m,{listRef:w,activeIndex:s,selectedIndex:c,onMatch:i?l:u,onTypingChange(O){A.current=O}}),{getReferenceProps:T,getFloatingProps:_,getItemProps:F}=rM([k,$,R,H,x]),N=O=>{u(O),d[O]!==void 0&&(n==null||n({type:"text",text:d[O]??"",value:p[d[O]]??""})),a(!1)};return E.jsxs(E.Fragment,{children:[E.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(B=f.button)==null?void 0:B.container,...T(),children:[E.jsx("span",{...(D=f.button)==null?void 0:D.text,children:c?d[c]:"Select..."}),E.jsx(zO,{...(M=f.button)==null?void 0:M.icon})]}),i&&E.jsx(q_,{children:E.jsx(Y_,{context:m,modal:!1,children:E.jsx("div",{ref:h.setFloating,className:(U=(G=f.content)==null?void 0:G.container)==null?void 0:U.className,style:{...g},..._(),children:d.map((O,y)=>{var P;return E.jsx("div",{ref:j=>{b.current[y]=j},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===c&&y===s,"data-active":y===s?"":void 0,...(P=f.content)==null?void 0:P.item,...F({onClick(){N(y)},onKeyDown(j){j.key==="Enter"&&(j.preventDefault(),N(y)),j.key===" "&&!A.current&&(j.preventDefault(),N(y))}}),children:O},O)})})})})]})},Ug=I.forwardRef(({title:e,url:t,isReadOnly:n,...r},o)=>{const{message:{blocks:{file:i}}}=ve;return E.jsxs("a",{...r,...i.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[E.jsx("p",{...i.title,children:e||t}),E.jsx(qO,{...i.icon})]})});Ug.displayName="File";const cM=xn()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const o=await fetch(n).then(c=>c.text()),i=new Blob([o],{type:"application/javascript"}),s=await import(URL.createObjectURL(i)),l=()=>s.default;return e(c=>({components:{...c.components,[n]:l}})),l}}));globalThis.React=I;const Wg={audio:_m,bubble:$m,button:UP,carousel:Vm,column:Nm,dropdown:lM,file:Ug,image:Pm,location:Mm,row:Rm,text:fP,video:Dm,custom:({url:e,name:t,data:n,...r})=>{const o=cM(c=>c.getCustomComponent),[i,a]=I.useState(null),[s,l]=I.useState(null);return I.useEffect(()=>{o(e).then(a).catch(c=>{l(c.message)})},[e]),s?E.jsx("div",{style:{color:"red"},children:s}):i?E.jsx(i,{...n,...r}):null}},Kn=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Wg[e.type],o={...n,...e};return E.jsx(r,{...o})};function Hg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ao(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hg(e))&&(r&&(r+=" "),r+=t);return r}const uM=({disabled:e,onFileSelected:t})=>{const n=I.useRef(null),{uploadButton:r}=ve.composer,o=()=>{n.current&&n.current.click()},i=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return E.jsxs(E.Fragment,{children:[E.jsx(rP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:o}),E.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:i})]})},fM=({name:e,type:t,instance:n,status:r,removeFile:o})=>{const{loader:i,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:c}=ve.composer.fileWidget,u=["PNG","JPEG","JPG"].includes(la(e)),f=I.useMemo(()=>u?URL.createObjectURL(n):"",[n]);return r==="loading"?E.jsx(sa,{name:e,status:r,removeButton:E.jsx("div",{...i}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx(xc,{type:t,...a.icon})})}):r==="error"?E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Vg,{removeFile:()=>o(e)}),extension:"Upload Error",children:E.jsxs("div",{...a.container,children:[E.jsx(HO,{...l}),E.jsx(xc,{type:t,...a.icon})]})}):r=="uploaded"&&u?E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Vg,{removeFile:()=>o(e)}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx("img",{src:f,alt:e,...c})})}):E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Zv,{onClick:()=>o(e),...s}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx(xc,{type:t,...a.icon})})})},sa=({name:e,status:t,removeButton:n,children:r,extension:o})=>{const{container:i,metadata:a}=ve.composer.fileWidget;return E.jsxs("div",{"data-status":t,title:e,...i,children:[n,r,E.jsxs("div",{...a.container,children:[E.jsx("div",{...a.name,children:e}),E.jsx("div",{...a.type,children:o})]})]})},xc=({type:e,...t})=>e==="image"?E.jsx(QO,{...t}):e==="video"?E.jsx(lP,{...t}):e==="audio"?E.jsx(tm,{...t}):E.jsx(Xv,{...t}),la=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Vg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ve;return E.jsx(Zv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function Ec(){return Ec=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},Ec.apply(null,arguments)}function dM(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 pM=I.useLayoutEffect,hM=function(t){var n=C.useRef(t);return pM(function(){n.current=t}),n},Kg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},vM=function(t,n){var r=I.useRef();return I.useCallback(function(o){t.current=o,r.current&&Kg(r.current,null),r.current=n,n&&Kg(n,o)},[n])},qg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},mM=function(t){Object.keys(qg).forEach(function(n){t.style.setProperty(n,qg[n],"important")})},Gg=mM,vt=null,Yg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function gM(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),vt||(vt=document.createElement("textarea"),vt.setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Gg(vt)),vt.parentNode===null&&document.body.appendChild(vt);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;vt.style[d]=a[d]}),Gg(vt),vt.value=t;var l=Yg(vt,e);vt.value=t,l=Yg(vt,e),vt.value="x";var c=vt.scrollHeight-o,u=c*n;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*r;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var Qg=function(){},yM=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},bM=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],wM=!!document.documentElement.currentStyle,SM=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=yM(bM,n),o=r.boxSizing;if(o==="")return null;wM&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},xM=SM;function Jg(e,t,n){var r=hM(n);C.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var EM=function(t){Jg(window,"resize",t)},kM=function(t){Jg(document.fonts,"loadingdone",t)},CM=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],AM=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?Qg:a,l=t.onHeightChange,c=l===void 0?Qg:l,u=dM(t,CM),f=u.value!==void 0,p=C.useRef(null),d=vM(p,n),v=C.useRef(0),h=C.useRef(),g=function(){var w=p.current,A=r&&h.current?h.current:xM(w);if(A){h.current=A;var x=gM(A,w.value||w.placeholder||"x",i,o),k=x[0],$=x[1];v.current!==k&&(v.current=k,w.style.setProperty("height",k+"px","important"),c(k,{rowHeight:$}))}},m=function(w){f||g(),s(w)};return C.useLayoutEffect(g),EM(g),kM(g),C.createElement("textarea",Ec({},u,{onChange:m,ref:d}))},$M=C.forwardRef(AM);const TM=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:o,setTextInput:i,setHistoryIndex:a,sendComposerMessage:s})=>{const l=dm(u=>u.messageHistory),{input:c}=ve.composer;return E.jsx($M,{...c,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:u=>i(u.target.value),maxRows:5,onKeyDown:u=>{if(n)return;const f=u.nativeEvent;f.isComposing||f.keyCode===229||(u.key==="Enter"&&u.shiftKey?(u.preventDefault(),i(`${r}
257
+ `)):u.key==="Enter"&&(u.preventDefault(),s()),u.key==="ArrowUp"&&(u.preventDefault(),o<l.length-1&&i(l[o+1]??""),a(Math.min(o+1,l.length-1))),u.key==="ArrowDown"&&(u.preventDefault(),i(o===0?"":l[o-1]??""),a(Math.max(o-1,-1))))}})},IM=({disabled:e,setTextInput:t})=>{const[n,r]=I.useState(!1),o=I.useRef(null),{voiceButton:i}=ve.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{o.current||(o.current=new a);const l=o.current;l&&(l.continuous=!0,l.onresult=c=>{var f,p,d;const u=((d=(p=(f=c.results)==null?void 0:f[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(u??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return E.jsx(eP,{...i,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},Zg=I.memo(I.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:o,connected:i,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:c,storageKey:u,children:f,...p},d)=>{const{composer:v}=ve,h=n||r||!i,[g,m]=I.useState(""),[b,w]=I.useState(-1),A=km(u),x=A(F=>F.files),k=A(F=>F.setFiles),$=A(F=>F.deleteFile),R=A(F=>F.uploadFile),H=dm(F=>F.addMessageToHistory),T=!!g||x.filter(F=>F.status==="uploaded").length>0;t=t??I.useRef(null);const _=()=>{const F=x.filter(D=>D.status==="uploaded");if(!F.length&&!g)return;const N=(F==null?void 0:F.map(D=>{const M=D.url,G=D.type;return{video:{type:"video",videoUrl:M},audio:{type:"audio",audioUrl:M},image:{type:"image",imageUrl:M}}[G]??{title:D.name,type:"file",fileUrl:M}}))??[];g&&N.push({type:"text",text:g});let B;N.length==1?B=N[0]:B={type:"bloc",items:N.map(M=>{const{type:G,...U}=M;return{type:G,payload:U}})},l==null||l(B),k([]),m(""),H(g),w(-1)};return r?null:E.jsxs(E.Fragment,{children:[E.jsxs("div",{"data-disabled":h,className:Ao(v.container.className,e),ref:d,...p,children:[f,x.length>0&&E.jsx("div",{...v==null?void 0:v.fileContainer,children:x.map(F=>E.jsx(fM,{...F,removeFile:$},F.name))}),E.jsxs("div",{...v.inputContainer,onClick:()=>{t&&"current"in t&&t.current&&t.current.focus()},children:[o&&E.jsx(uM,{disabled:h,onFileSelected:F=>{c&&R(F,c)}}),E.jsx(TM,{inputRef:t,composerPlaceholder:a,composerDisabled:h,textInput:g,historyIndex:b,setTextInput:m,setHistoryIndex:w,sendComposerMessage:_}),!h&&E.jsxs(E.Fragment,{children:[E.jsx(BO,{...v.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":T,onClick:()=>_()}),E.jsx(IM,{disabled:T,setTextInput:m})]})]})]}),E.jsx(gv,{components:{a:({node:F,...N})=>E.jsx("a",{...N,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...v.footer,children:s})]})}));var kc={exports:{}},ca={exports:{}},Ae={};/** @license React v16.13.1
258
258
  * react-is.production.min.js
259
259
  *
260
260
  * Copyright (c) Facebook, Inc. and its affiliates.
261
261
  *
262
262
  * This source code is licensed under the MIT license found in the
263
263
  * LICENSE file in the root directory of this source tree.
264
- */var Xg;function OM(){if(Xg)return $e;Xg=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,o=e?Symbol.for("react.strict_mode"):60108,i=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,c=e?Symbol.for("react.concurrent_mode"):60111,u=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,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var k=x.$$typeof;switch(k){case t:switch(x=x.type,x){case l:case c:case r:case i:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case u:case v:case d:case a:return x;default:return k}}case n:return k}}}function A(x){return w(x)===c}return $e.AsyncMode=l,$e.ConcurrentMode=c,$e.ContextConsumer=s,$e.ContextProvider=a,$e.Element=t,$e.ForwardRef=u,$e.Fragment=r,$e.Lazy=v,$e.Memo=d,$e.Portal=n,$e.Profiler=i,$e.StrictMode=o,$e.Suspense=f,$e.isAsyncMode=function(x){return A(x)||w(x)===l},$e.isConcurrentMode=A,$e.isContextConsumer=function(x){return w(x)===s},$e.isContextProvider=function(x){return w(x)===a},$e.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},$e.isForwardRef=function(x){return w(x)===u},$e.isFragment=function(x){return w(x)===r},$e.isLazy=function(x){return w(x)===v},$e.isMemo=function(x){return w(x)===d},$e.isPortal=function(x){return w(x)===n},$e.isProfiler=function(x){return w(x)===i},$e.isStrictMode=function(x){return w(x)===o},$e.isSuspense=function(x){return w(x)===f},$e.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===d||x.$$typeof===a||x.$$typeof===s||x.$$typeof===u||x.$$typeof===g||x.$$typeof===m||x.$$typeof===b||x.$$typeof===h)},$e.typeOf=w,$e}var Te={};/** @license React v16.13.1
264
+ */var Xg;function OM(){if(Xg)return Ae;Xg=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,o=e?Symbol.for("react.strict_mode"):60108,i=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,c=e?Symbol.for("react.concurrent_mode"):60111,u=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,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var k=x.$$typeof;switch(k){case t:switch(x=x.type,x){case l:case c:case r:case i:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case u:case v:case d:case a:return x;default:return k}}case n:return k}}}function A(x){return w(x)===c}return Ae.AsyncMode=l,Ae.ConcurrentMode=c,Ae.ContextConsumer=s,Ae.ContextProvider=a,Ae.Element=t,Ae.ForwardRef=u,Ae.Fragment=r,Ae.Lazy=v,Ae.Memo=d,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=o,Ae.Suspense=f,Ae.isAsyncMode=function(x){return A(x)||w(x)===l},Ae.isConcurrentMode=A,Ae.isContextConsumer=function(x){return w(x)===s},Ae.isContextProvider=function(x){return w(x)===a},Ae.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Ae.isForwardRef=function(x){return w(x)===u},Ae.isFragment=function(x){return w(x)===r},Ae.isLazy=function(x){return w(x)===v},Ae.isMemo=function(x){return w(x)===d},Ae.isPortal=function(x){return w(x)===n},Ae.isProfiler=function(x){return w(x)===i},Ae.isStrictMode=function(x){return w(x)===o},Ae.isSuspense=function(x){return w(x)===f},Ae.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===d||x.$$typeof===a||x.$$typeof===s||x.$$typeof===u||x.$$typeof===g||x.$$typeof===m||x.$$typeof===b||x.$$typeof===h)},Ae.typeOf=w,Ae}var $e={};/** @license React v16.13.1
265
265
  * react-is.development.js
266
266
  *
267
267
  * Copyright (c) Facebook, Inc. and its affiliates.
268
268
  *
269
269
  * This source code is licensed under the MIT license found in the
270
270
  * LICENSE file in the root directory of this source tree.
271
- */var ey;function PM(){return ey||(ey=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,o=e?Symbol.for("react.strict_mode"):60108,i=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,c=e?Symbol.for("react.concurrent_mode"):60111,u=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,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(K){return typeof K=="string"||typeof K=="function"||K===r||K===c||K===i||K===o||K===f||K===p||typeof K=="object"&&K!==null&&(K.$$typeof===v||K.$$typeof===d||K.$$typeof===a||K.$$typeof===s||K.$$typeof===u||K.$$typeof===g||K.$$typeof===m||K.$$typeof===b||K.$$typeof===h)}function A(K){if(typeof K=="object"&&K!==null){var oe=K.$$typeof;switch(oe){case t:var V=K.type;switch(V){case l:case c:case r:case i:case o:case f:return V;default:var le=V&&V.$$typeof;switch(le){case s:case u:case v:case d:case a:return le;default:return oe}}case n:return oe}}}var x=l,k=c,$=s,R=a,W=t,T=u,_=r,L=v,N=d,F=n,D=i,M=o,G=f,z=!1;function O(K){return z||(z=!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(K)||A(K)===l}function y(K){return A(K)===c}function P(K){return A(K)===s}function B(K){return A(K)===a}function S(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function H(K){return A(K)===u}function Y(K){return A(K)===r}function q(K){return A(K)===v}function Q(K){return A(K)===d}function ee(K){return A(K)===n}function te(K){return A(K)===i}function J(K){return A(K)===o}function X(K){return A(K)===f}Te.AsyncMode=x,Te.ConcurrentMode=k,Te.ContextConsumer=$,Te.ContextProvider=R,Te.Element=W,Te.ForwardRef=T,Te.Fragment=_,Te.Lazy=L,Te.Memo=N,Te.Portal=F,Te.Profiler=D,Te.StrictMode=M,Te.Suspense=G,Te.isAsyncMode=O,Te.isConcurrentMode=y,Te.isContextConsumer=P,Te.isContextProvider=B,Te.isElement=S,Te.isForwardRef=H,Te.isFragment=Y,Te.isLazy=q,Te.isMemo=Q,Te.isPortal=ee,Te.isProfiler=te,Te.isStrictMode=J,Te.isSuspense=X,Te.isValidElementType=w,Te.typeOf=A}()),Te}var ty;function ua(){return ty||(ty=1,process.env.NODE_ENV==="production"?ca.exports=OM():ca.exports=PM()),ca.exports}/*
271
+ */var ey;function PM(){return ey||(ey=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,o=e?Symbol.for("react.strict_mode"):60108,i=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,c=e?Symbol.for("react.concurrent_mode"):60111,u=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,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(K){return typeof K=="string"||typeof K=="function"||K===r||K===c||K===i||K===o||K===f||K===p||typeof K=="object"&&K!==null&&(K.$$typeof===v||K.$$typeof===d||K.$$typeof===a||K.$$typeof===s||K.$$typeof===u||K.$$typeof===g||K.$$typeof===m||K.$$typeof===b||K.$$typeof===h)}function A(K){if(typeof K=="object"&&K!==null){var L=K.$$typeof;switch(L){case t:var oe=K.type;switch(oe){case l:case c:case r:case i:case o:case f:return oe;default:var ae=oe&&oe.$$typeof;switch(ae){case s:case u:case v:case d:case a:return ae;default:return L}}case n:return L}}}var x=l,k=c,$=s,R=a,H=t,T=u,_=r,F=v,N=d,B=n,D=i,M=o,G=f,U=!1;function O(K){return U||(U=!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(K)||A(K)===l}function y(K){return A(K)===c}function P(K){return A(K)===s}function j(K){return A(K)===a}function S(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function V(K){return A(K)===u}function Y(K){return A(K)===r}function q(K){return A(K)===v}function Q(K){return A(K)===d}function X(K){return A(K)===n}function ee(K){return A(K)===i}function J(K){return A(K)===o}function Z(K){return A(K)===f}$e.AsyncMode=x,$e.ConcurrentMode=k,$e.ContextConsumer=$,$e.ContextProvider=R,$e.Element=H,$e.ForwardRef=T,$e.Fragment=_,$e.Lazy=F,$e.Memo=N,$e.Portal=B,$e.Profiler=D,$e.StrictMode=M,$e.Suspense=G,$e.isAsyncMode=O,$e.isConcurrentMode=y,$e.isContextConsumer=P,$e.isContextProvider=j,$e.isElement=S,$e.isForwardRef=V,$e.isFragment=Y,$e.isLazy=q,$e.isMemo=Q,$e.isPortal=X,$e.isProfiler=ee,$e.isStrictMode=J,$e.isSuspense=Z,$e.isValidElementType=w,$e.typeOf=A}()),$e}var ty;function ua(){return ty||(ty=1,process.env.NODE_ENV==="production"?ca.exports=OM():ca.exports=PM()),ca.exports}/*
272
272
  object-assign
273
273
  (c) Sindre Sorhus
274
274
  @license MIT
275
- */var Cc,ny;function ry(){if(ny)return Cc;ny=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Cc=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},Cc}var Ac,oy;function $c(){if(oy)return Ac;oy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ac=e,Ac}var Tc,iy;function ay(){return iy||(iy=1,Tc=Function.call.bind(Object.prototype.hasOwnProperty)),Tc}var Ic,sy;function DM(){if(sy)return Ic;sy=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$c(),n={},r=ay();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` 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=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ic=o,Ic}var Oc,ly;function _M(){if(ly)return Oc;ly=1;var e=ua(),t=ry(),n=$c(),r=ay(),o=DM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Oc=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(y){var P=y&&(c&&y[c]||y[u]);if(typeof P=="function")return P}var p="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:A(),elementType:x(),instanceOf:k,node:T(),objectOf:R,oneOf:$,oneOfType:W,shape:L,exact:N};function v(y,P){return y===P?y!==0||1/y===1/P:y!==y&&P!==P}function h(y,P){this.message=y,this.data=P&&typeof P=="object"?P:{},this.stack=""}h.prototype=Error.prototype;function g(y){if(process.env.NODE_ENV!=="production")var P={},B=0;function S(Y,q,Q,ee,te,J,X){if(ee=ee||p,J=J||Q,X!==n){if(l){var K=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 K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=ee+":"+Q;!P[oe]&&B<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+ee+"`. 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."),P[oe]=!0,B++)}}return q[Q]==null?Y?q[Q]===null?new h("The "+te+" `"+J+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new h("The "+te+" `"+J+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:y(q,Q,ee,te,J)}var H=S.bind(null,!1);return H.isRequired=S.bind(null,!0),H}function m(y){function P(B,S,H,Y,q,Q){var ee=B[S],te=M(ee);if(te!==y){var J=G(ee);return new h("Invalid "+Y+" `"+q+"` of type "+("`"+J+"` supplied to `"+H+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return g(P)}function b(){return g(a)}function w(y){function P(B,S,H,Y,q){if(typeof y!="function")return new h("Property `"+q+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var Q=B[S];if(!Array.isArray(Q)){var ee=M(Q);return new h("Invalid "+Y+" `"+q+"` of type "+("`"+ee+"` supplied to `"+H+"`, expected an array."))}for(var te=0;te<Q.length;te++){var J=y(Q,te,H,Y,q+"["+te+"]",n);if(J instanceof Error)return J}return null}return g(P)}function A(){function y(P,B,S,H,Y){var q=P[B];if(!s(q)){var Q=M(q);return new h("Invalid "+H+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return g(y)}function x(){function y(P,B,S,H,Y){var q=P[B];if(!e.isValidElementType(q)){var Q=M(q);return new h("Invalid "+H+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return g(y)}function k(y){function P(B,S,H,Y,q){if(!(B[S]instanceof y)){var Q=y.name||p,ee=O(B[S]);return new h("Invalid "+Y+" `"+q+"` of type "+("`"+ee+"` supplied to `"+H+"`, expected ")+("instance of `"+Q+"`."))}return null}return g(P)}function $(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function P(B,S,H,Y,q){for(var Q=B[S],ee=0;ee<y.length;ee++)if(v(Q,y[ee]))return null;var te=JSON.stringify(y,function(X,K){var oe=G(K);return oe==="symbol"?String(K):K});return new h("Invalid "+Y+" `"+q+"` of value `"+String(Q)+"` "+("supplied to `"+H+"`, expected one of "+te+"."))}return g(P)}function R(y){function P(B,S,H,Y,q){if(typeof y!="function")return new h("Property `"+q+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var Q=B[S],ee=M(Q);if(ee!=="object")return new h("Invalid "+Y+" `"+q+"` of type "+("`"+ee+"` supplied to `"+H+"`, expected an object."));for(var te in Q)if(r(Q,te)){var J=y(Q,te,H,Y,q+"."+te,n);if(J instanceof Error)return J}return null}return g(P)}function W(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var P=0;P<y.length;P++){var B=y[P];if(typeof B!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(B)+" at index "+P+"."),a}function S(H,Y,q,Q,ee){for(var te=[],J=0;J<y.length;J++){var X=y[J],K=X(H,Y,q,Q,ee,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&te.push(K.data.expectedType)}var oe=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new h("Invalid "+Q+" `"+ee+"` supplied to "+("`"+q+"`"+oe+"."))}return g(S)}function T(){function y(P,B,S,H,Y){return F(P[B])?null:new h("Invalid "+H+" `"+Y+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return g(y)}function _(y,P,B,S,H){return new h((y||"React class")+": "+P+" type `"+B+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function L(y){function P(B,S,H,Y,q){var Q=B[S],ee=M(Q);if(ee!=="object")return new h("Invalid "+Y+" `"+q+"` of type `"+ee+"` "+("supplied to `"+H+"`, expected `object`."));for(var te in y){var J=y[te];if(typeof J!="function")return _(H,Y,q,te,G(J));var X=J(Q,te,H,Y,q+"."+te,n);if(X)return X}return null}return g(P)}function N(y){function P(B,S,H,Y,q){var Q=B[S],ee=M(Q);if(ee!=="object")return new h("Invalid "+Y+" `"+q+"` of type `"+ee+"` "+("supplied to `"+H+"`, expected `object`."));var te=t({},B[S],y);for(var J in te){var X=y[J];if(r(y,J)&&typeof X!="function")return _(H,Y,q,J,G(X));if(!X)return new h("Invalid "+Y+" `"+q+"` key `"+J+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(B[S],null," ")+`
276
- Valid keys: `+JSON.stringify(Object.keys(y),null," "));var K=X(Q,J,H,Y,q+"."+J,n);if(K)return K}return null}return g(P)}function F(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(F);if(y===null||s(y))return!0;var P=f(y);if(P){var B=P.call(y),S;if(P!==y.entries){for(;!(S=B.next()).done;)if(!F(S.value))return!1}else for(;!(S=B.next()).done;){var H=S.value;if(H&&!F(H[1]))return!1}}else return!1;return!0;default:return!1}}function D(y,P){return y==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function M(y){var P=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":D(P,y)?"symbol":P}function G(y){if(typeof y>"u"||y===null)return""+y;var P=M(y);if(P==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return P}function z(y){var P=G(y);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function O(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Oc}var Pc,cy;function MM(){if(cy)return Pc;cy=1;var e=$c();function t(){}function n(){}return n.resetWarningCache=t,Pc=function(){function r(a,s,l,c,u,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 o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Pc}if(process.env.NODE_ENV!=="production"){var NM=ua(),RM=!0;kc.exports=_M()(NM.isElement,RM)}else kc.exports=MM()();var LM=kc.exports;const Me=be(LM);var FM=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 $o(e,t){var n=BM(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 BM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=FM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var jM=[".DS_Store","Thumbs.db"];function zM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return fa(e)&&UM(e.dataTransfer)?[2,KM(e.dataTransfer,e.type)]:WM(e)?[2,HM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,VM(e)]:[2,[]]})})}function UM(e){return fa(e)}function WM(e){return fa(e)&&fa(e.target)}function fa(e){return typeof e=="object"&&e!==null}function HM(e){return Dc(e.target.files).map(function(t){return $o(t)})}function VM(e){return fr(this,void 0,void 0,function(){var t;return dr(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 $o(r)})]}})})}function KM(e,t){return fr(this,void 0,void 0,function(){var n,r;return dr(this,function(o){switch(o.label){case 0:return e.items?(n=Dc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(qM))]):[3,2];case 1:return r=o.sent(),[2,uy(fy(r))];case 2:return[2,uy(Dc(e.files).map(function(i){return $o(i)}))]}})})}function uy(e){return e.filter(function(t){return jM.indexOf(t.name)===-1})}function Dc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function qM(e){if(typeof e.webkitGetAsEntry!="function")return dy(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?py(t):dy(e)}function fy(e){return e.reduce(function(t,n){return Gl(Gl([],Im(t),!1),Im(Array.isArray(n)?fy(n):[n]),!1)},[])}function dy(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=$o(t);return Promise.resolve(n)}function GM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return[2,e.isDirectory?py(e):YM(e)]})})}function py(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var a=this;t.readEntries(function(s){return fr(a,void 0,void 0,function(){var l,c,u;return dr(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(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(GM)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}i()})}function YM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=$o(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var QM=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function hy(e){return XM(e)||ZM(e)||yy(e)||JM()}function JM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
275
+ */var Cc,ny;function ry(){if(ny)return Cc;ny=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Cc=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},Cc}var Ac,oy;function $c(){if(oy)return Ac;oy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ac=e,Ac}var Tc,iy;function ay(){return iy||(iy=1,Tc=Function.call.bind(Object.prototype.hasOwnProperty)),Tc}var Ic,sy;function DM(){if(sy)return Ic;sy=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$c(),n={},r=ay();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` 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=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ic=o,Ic}var Oc,ly;function _M(){if(ly)return Oc;ly=1;var e=ua(),t=ry(),n=$c(),r=ay(),o=DM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Oc=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(y){var P=y&&(c&&y[c]||y[u]);if(typeof P=="function")return P}var p="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:A(),elementType:x(),instanceOf:k,node:T(),objectOf:R,oneOf:$,oneOfType:H,shape:F,exact:N};function v(y,P){return y===P?y!==0||1/y===1/P:y!==y&&P!==P}function h(y,P){this.message=y,this.data=P&&typeof P=="object"?P:{},this.stack=""}h.prototype=Error.prototype;function g(y){if(process.env.NODE_ENV!=="production")var P={},j=0;function S(Y,q,Q,X,ee,J,Z){if(X=X||p,J=J||Q,Z!==n){if(l){var K=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 K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var L=X+":"+Q;!P[L]&&j<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+X+"`. 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."),P[L]=!0,j++)}}return q[Q]==null?Y?q[Q]===null?new h("The "+ee+" `"+J+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new h("The "+ee+" `"+J+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:y(q,Q,X,ee,J)}var V=S.bind(null,!1);return V.isRequired=S.bind(null,!0),V}function m(y){function P(j,S,V,Y,q,Q){var X=j[S],ee=M(X);if(ee!==y){var J=G(X);return new h("Invalid "+Y+" `"+q+"` of type "+("`"+J+"` supplied to `"+V+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return g(P)}function b(){return g(a)}function w(y){function P(j,S,V,Y,q){if(typeof y!="function")return new h("Property `"+q+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var Q=j[S];if(!Array.isArray(Q)){var X=M(Q);return new h("Invalid "+Y+" `"+q+"` of type "+("`"+X+"` supplied to `"+V+"`, expected an array."))}for(var ee=0;ee<Q.length;ee++){var J=y(Q,ee,V,Y,q+"["+ee+"]",n);if(J instanceof Error)return J}return null}return g(P)}function A(){function y(P,j,S,V,Y){var q=P[j];if(!s(q)){var Q=M(q);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return g(y)}function x(){function y(P,j,S,V,Y){var q=P[j];if(!e.isValidElementType(q)){var Q=M(q);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return g(y)}function k(y){function P(j,S,V,Y,q){if(!(j[S]instanceof y)){var Q=y.name||p,X=O(j[S]);return new h("Invalid "+Y+" `"+q+"` of type "+("`"+X+"` supplied to `"+V+"`, expected ")+("instance of `"+Q+"`."))}return null}return g(P)}function $(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function P(j,S,V,Y,q){for(var Q=j[S],X=0;X<y.length;X++)if(v(Q,y[X]))return null;var ee=JSON.stringify(y,function(Z,K){var L=G(K);return L==="symbol"?String(K):K});return new h("Invalid "+Y+" `"+q+"` of value `"+String(Q)+"` "+("supplied to `"+V+"`, expected one of "+ee+"."))}return g(P)}function R(y){function P(j,S,V,Y,q){if(typeof y!="function")return new h("Property `"+q+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var Q=j[S],X=M(Q);if(X!=="object")return new h("Invalid "+Y+" `"+q+"` of type "+("`"+X+"` supplied to `"+V+"`, expected an object."));for(var ee in Q)if(r(Q,ee)){var J=y(Q,ee,V,Y,q+"."+ee,n);if(J instanceof Error)return J}return null}return g(P)}function H(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var P=0;P<y.length;P++){var j=y[P];if(typeof j!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(j)+" at index "+P+"."),a}function S(V,Y,q,Q,X){for(var ee=[],J=0;J<y.length;J++){var Z=y[J],K=Z(V,Y,q,Q,X,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&ee.push(K.data.expectedType)}var L=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new h("Invalid "+Q+" `"+X+"` supplied to "+("`"+q+"`"+L+"."))}return g(S)}function T(){function y(P,j,S,V,Y){return B(P[j])?null:new h("Invalid "+V+" `"+Y+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return g(y)}function _(y,P,j,S,V){return new h((y||"React class")+": "+P+" type `"+j+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function F(y){function P(j,S,V,Y,q){var Q=j[S],X=M(Q);if(X!=="object")return new h("Invalid "+Y+" `"+q+"` of type `"+X+"` "+("supplied to `"+V+"`, expected `object`."));for(var ee in y){var J=y[ee];if(typeof J!="function")return _(V,Y,q,ee,G(J));var Z=J(Q,ee,V,Y,q+"."+ee,n);if(Z)return Z}return null}return g(P)}function N(y){function P(j,S,V,Y,q){var Q=j[S],X=M(Q);if(X!=="object")return new h("Invalid "+Y+" `"+q+"` of type `"+X+"` "+("supplied to `"+V+"`, expected `object`."));var ee=t({},j[S],y);for(var J in ee){var Z=y[J];if(r(y,J)&&typeof Z!="function")return _(V,Y,q,J,G(Z));if(!Z)return new h("Invalid "+Y+" `"+q+"` key `"+J+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(j[S],null," ")+`
276
+ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var K=Z(Q,J,V,Y,q+"."+J,n);if(K)return K}return null}return g(P)}function B(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(B);if(y===null||s(y))return!0;var P=f(y);if(P){var j=P.call(y),S;if(P!==y.entries){for(;!(S=j.next()).done;)if(!B(S.value))return!1}else for(;!(S=j.next()).done;){var V=S.value;if(V&&!B(V[1]))return!1}}else return!1;return!0;default:return!1}}function D(y,P){return y==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function M(y){var P=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":D(P,y)?"symbol":P}function G(y){if(typeof y>"u"||y===null)return""+y;var P=M(y);if(P==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return P}function U(y){var P=G(y);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function O(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Oc}var Pc,cy;function MM(){if(cy)return Pc;cy=1;var e=$c();function t(){}function n(){}return n.resetWarningCache=t,Pc=function(){function r(a,s,l,c,u,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 o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Pc}if(process.env.NODE_ENV!=="production"){var NM=ua(),RM=!0;kc.exports=_M()(NM.isElement,RM)}else kc.exports=MM()();var LM=kc.exports;const Me=be(LM);var FM=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 $o(e,t){var n=BM(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 BM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=FM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var jM=[".DS_Store","Thumbs.db"];function zM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return fa(e)&&UM(e.dataTransfer)?[2,KM(e.dataTransfer,e.type)]:WM(e)?[2,HM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,VM(e)]:[2,[]]})})}function UM(e){return fa(e)}function WM(e){return fa(e)&&fa(e.target)}function fa(e){return typeof e=="object"&&e!==null}function HM(e){return Dc(e.target.files).map(function(t){return $o(t)})}function VM(e){return fr(this,void 0,void 0,function(){var t;return dr(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 $o(r)})]}})})}function KM(e,t){return fr(this,void 0,void 0,function(){var n,r;return dr(this,function(o){switch(o.label){case 0:return e.items?(n=Dc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(qM))]):[3,2];case 1:return r=o.sent(),[2,uy(fy(r))];case 2:return[2,uy(Dc(e.files).map(function(i){return $o(i)}))]}})})}function uy(e){return e.filter(function(t){return jM.indexOf(t.name)===-1})}function Dc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function qM(e){if(typeof e.webkitGetAsEntry!="function")return dy(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?py(t):dy(e)}function fy(e){return e.reduce(function(t,n){return Gl(Gl([],Im(t),!1),Im(Array.isArray(n)?fy(n):[n]),!1)},[])}function dy(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=$o(t);return Promise.resolve(n)}function GM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return[2,e.isDirectory?py(e):YM(e)]})})}function py(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var a=this;t.readEntries(function(s){return fr(a,void 0,void 0,function(){var l,c,u;return dr(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(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(GM)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}i()})}function YM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=$o(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var QM=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function hy(e){return XM(e)||ZM(e)||yy(e)||JM()}function JM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
277
277
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XM(e){if(Array.isArray(e))return _c(e)}function vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vy(Object(n),!0).forEach(function(r){gy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function To(e,t){return nN(e)||tN(e,t)||yy(e,t)||eN()}function eN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
278
278
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yy(e,t){if(e){if(typeof e=="string")return _c(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 _c(e,t)}}function _c(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 tN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function nN(e){if(Array.isArray(e))return e}var rN="file-invalid-type",oN="file-too-large",iN="file-too-small",aN="too-many-files",sN=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:rN,message:"File type must be ".concat(n)}},by=function(t){return{code:oN,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},wy=function(t){return{code:iN,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},lN={code:aN,message:"Too many files"};function Sy(e,t){var n=e.type==="application/x-moz-file"||QM(e,t);return[n,n?null:sN(t)]}function xy(e,t,n){if(qn(e.size))if(qn(t)&&qn(n)){if(e.size>n)return[!1,by(n)];if(e.size<t)return[!1,wy(t)]}else{if(qn(t)&&e.size<t)return[!1,wy(t)];if(qn(n)&&e.size>n)return[!1,by(n)]}return[!0,null]}function qn(e){return e!=null}function cN(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=Sy(l,n),u=To(c,1),f=u[0],p=xy(l,r,o),d=To(p,1),v=d[0],h=s?s(l):null;return f&&v&&!h})}function da(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function pa(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 Ey(e){e.preventDefault()}function uN(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fN(e){return e.indexOf("Edge/")!==-1}function dN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return uN(e)||fN(e)}function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!da(r)&&s&&s.apply(void 0,[r].concat(i)),da(r)})}}function pN(){return"showOpenFilePicker"in window}function hN(e){if(qn(e)){var t=Object.entries(e).filter(function(n){var r=To(n,2),o=r[0],i=r[1],a=!0;return ky(o)||(console.warn('Skipped "'.concat(o,'" 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(i)||!i.every(Cy))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=To(r,2),i=o[0],a=o[1];return my(my({},n),{},gy({},i,a))},{});return[{description:"Files",accept:t}]}return e}function vN(e){if(qn(e))return Object.entries(e).reduce(function(t,n){var r=To(n,2),o=r[0],i=r[1];return[].concat(hy(t),[o],hy(i))},[]).filter(function(t){return ky(t)||Cy(t)}).join(",")}function mN(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function gN(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function ky(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Cy(e){return/^.*\.[\w]+$/.test(e)}var yN=["children"],bN=["open"],wN=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],SN=["refKey","onChange","onClick"];function xN(e){return CN(e)||kN(e)||Ay(e)||EN()}function EN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
279
279
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CN(e){if(Array.isArray(e))return Nc(e)}function Mc(e,t){return TN(e)||$N(e,t)||Ay(e,t)||AN()}function AN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ay(e,t){if(e){if(typeof e=="string")return Nc(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 Nc(e,t)}}function Nc(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 $N(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function TN(e){if(Array.isArray(e))return e}function $y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fe(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){Rc(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 Rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(e,t){if(e==null)return{};var n=IN(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Lc=I.forwardRef(function(e,t){var n=e.children,r=ha(e,yN),o=Iy(r),i=o.open,a=ha(o,bN);return I.useImperativeHandle(t,function(){return{open:i}},[i]),I.createElement(I.Fragment,null,n(Fe(Fe({},a),{},{open:i})))});Lc.displayName="Dropzone";var Ty={disabled:!1,getFilesFromEvent:zM,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};Lc.defaultProps=Ty,Lc.propTypes={children:Me.func,accept:Me.objectOf(Me.arrayOf(Me.string)),multiple:Me.bool,preventDropOnDocument:Me.bool,noClick:Me.bool,noKeyboard:Me.bool,noDrag:Me.bool,noDragEventsBubbling:Me.bool,minSize:Me.number,maxSize:Me.number,maxFiles:Me.number,disabled:Me.bool,getFilesFromEvent:Me.func,onFileDialogCancel:Me.func,onFileDialogOpen:Me.func,useFsAccessApi:Me.bool,autoFocus:Me.bool,onDragEnter:Me.func,onDragLeave:Me.func,onDragOver:Me.func,onDrop:Me.func,onDropAccepted:Me.func,onDropRejected:Me.func,onError:Me.func,validator:Me.func};var Fc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Iy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Fe(Fe({},Ty),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,m=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,A=t.noClick,x=t.noKeyboard,k=t.noDrag,$=t.noDragEventsBubbling,R=t.onError,W=t.validator,T=I.useMemo(function(){return vN(n)},[n]),_=I.useMemo(function(){return hN(n)},[n]),L=I.useMemo(function(){return typeof g=="function"?g:Oy},[g]),N=I.useMemo(function(){return typeof h=="function"?h:Oy},[h]),F=I.useRef(null),D=I.useRef(null),M=I.useReducer(ON,Fc),G=Mc(M,2),z=G[0],O=G[1],y=z.isFocused,P=z.isFileDialogActive,B=I.useRef(typeof window<"u"&&window.isSecureContext&&m&&pN()),S=function(){!B.current&&P&&setTimeout(function(){if(D.current){var ue=D.current.files;ue.length||(O({type:"closeDialog"}),N())}},300)};I.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[D,P,N,B]);var H=I.useRef([]),Y=function(ue){F.current&&F.current.contains(ue.target)||(ue.preventDefault(),H.current=[])};I.useEffect(function(){return w&&(document.addEventListener("dragover",Ey,!1),document.addEventListener("drop",Y,!1)),function(){w&&(document.removeEventListener("dragover",Ey),document.removeEventListener("drop",Y))}},[F,w]),I.useEffect(function(){return!r&&b&&F.current&&F.current.focus(),function(){}},[F,b,r]);var q=I.useCallback(function(ie){R?R(ie):console.error(ie)},[R]),Q=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),qe(ie),H.current=[].concat(xN(H.current),[ie.target]),pa(ie)&&Promise.resolve(o(ie)).then(function(ue){if(!(da(ie)&&!$)){var U=ue.length,j=U>0&&cN({files:ue,accept:T,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:W}),ne=U>0&&!j;O({isDragAccept:j,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ie)}}).catch(function(ue){return q(ue)})},[o,c,q,$,T,a,i,s,l,W]),ee=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),qe(ie);var ue=pa(ie);if(ue&&ie.dataTransfer)try{ie.dataTransfer.dropEffect="copy"}catch{}return ue&&f&&f(ie),!1},[f,$]),te=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),qe(ie);var ue=H.current.filter(function(j){return F.current&&F.current.contains(j)}),U=ue.indexOf(ie.target);U!==-1&&ue.splice(U,1),H.current=ue,!(ue.length>0)&&(O({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),pa(ie)&&u&&u(ie))},[F,u,$]),J=I.useCallback(function(ie,ue){var U=[],j=[];ie.forEach(function(ne){var ae=Sy(ne,T),ce=Mc(ae,2),ve=ce[0],Ue=ce[1],We=xy(ne,a,i),mt=Mc(We,2),tt=mt[0],Pe=mt[1],nt=W?W(ne):null;if(ve&&tt&&!nt)U.push(ne);else{var Ge=[Ue,Pe];nt&&(Ge=Ge.concat(nt)),j.push({file:ne,errors:Ge.filter(function(Bn){return Bn})})}}),(!s&&U.length>1||s&&l>=1&&U.length>l)&&(U.forEach(function(ne){j.push({file:ne,errors:[lN]})}),U.splice(0)),O({acceptedFiles:U,fileRejections:j,type:"setFiles"}),p&&p(U,j,ue),j.length>0&&v&&v(j,ue),U.length>0&&d&&d(U,ue)},[O,s,T,a,i,l,p,d,v,W]),X=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),qe(ie),H.current=[],pa(ie)&&Promise.resolve(o(ie)).then(function(ue){da(ie)&&!$||J(ue,ie)}).catch(function(ue){return q(ue)}),O({type:"reset"})},[o,J,q,$]),K=I.useCallback(function(){if(B.current){O({type:"openDialog"}),L();var ie={multiple:s,types:_};window.showOpenFilePicker(ie).then(function(ue){return o(ue)}).then(function(ue){J(ue,null),O({type:"closeDialog"})}).catch(function(ue){mN(ue)?(N(ue),O({type:"closeDialog"})):gN(ue)?(B.current=!1,D.current?(D.current.value=null,D.current.click()):q(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."))):q(ue)});return}D.current&&(O({type:"openDialog"}),L(),D.current.value=null,D.current.click())},[O,L,N,m,J,q,_,s]),oe=I.useCallback(function(ie){!F.current||!F.current.isEqualNode(ie.target)||(ie.key===" "||ie.key==="Enter"||ie.keyCode===32||ie.keyCode===13)&&(ie.preventDefault(),K())},[F,K]),V=I.useCallback(function(){O({type:"focus"})},[]),le=I.useCallback(function(){O({type:"blur"})},[]),Z=I.useCallback(function(){A||(dN()?setTimeout(K,0):K())},[A,K]),fe=function(ue){return r?null:ue},pe=function(ue){return x?null:fe(ue)},xe=function(ue){return k?null:fe(ue)},qe=function(ue){$&&ue.stopPropagation()},st=I.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=ie.refKey,U=ue===void 0?"ref":ue,j=ie.role,ne=ie.onKeyDown,ae=ie.onFocus,ce=ie.onBlur,ve=ie.onClick,Ue=ie.onDragEnter,We=ie.onDragOver,mt=ie.onDragLeave,tt=ie.onDrop,Pe=ha(ie,wN);return Fe(Fe(Rc({onKeyDown:pe(Xt(ne,oe)),onFocus:pe(Xt(ae,V)),onBlur:pe(Xt(ce,le)),onClick:fe(Xt(ve,Z)),onDragEnter:xe(Xt(Ue,Q)),onDragOver:xe(Xt(We,ee)),onDragLeave:xe(Xt(mt,te)),onDrop:xe(Xt(tt,X)),role:typeof j=="string"&&j!==""?j:"presentation"},U,F),!r&&!x?{tabIndex:0}:{}),Pe)}},[F,oe,V,le,Z,Q,ee,te,X,x,k,r]),Et=I.useCallback(function(ie){ie.stopPropagation()},[]),lt=I.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=ie.refKey,U=ue===void 0?"ref":ue,j=ie.onChange,ne=ie.onClick,ae=ha(ie,SN),ce=Rc({accept:T,multiple:s,type:"file",style:{display:"none"},onChange:fe(Xt(j,X)),onClick:fe(Xt(ne,Et)),tabIndex:-1},U,D);return Fe(Fe({},ce),ae)}},[D,n,s,X,r]);return Fe(Fe({},z),{},{isFocused:y&&!r,getRootProps:st,getInputProps:lt,rootRef:F,inputRef:D,open:fe(K)})}function ON(e,t){switch(t.type){case"focus":return Fe(Fe({},e),{},{isFocused:!0});case"blur":return Fe(Fe({},e),{},{isFocused:!1});case"openDialog":return Fe(Fe({},Fc),{},{isFileDialogActive:!0});case"closeDialog":return Fe(Fe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Fe(Fe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Fe(Fe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Fe({},Fc);default:return e}}function Oy(){}const Py=({children:e})=>{const t=I.useRef(),[n,r]=I.useState({open:!1}),o=({title:a,description:s,confirmButtonText:l,cancelButtonText:c,onConfirm:u,onCancel:f,initialValue:p,Content:d})=>new Promise((v,h)=>{t.current=p,r({open:!0,title:a,description:s,confirmButtonText:l,cancelButtonText:c,content:d?E.jsx(d,{value:p,setValue:g=>{t.current=g}}):null,onConfirm:()=>{u==null||u(),v(t.current),i()},onCancel:()=>{f==null||f(),h(),i()}})}),i=()=>{r(a=>({...a,open:!1}))};return E.jsxs(Kl.Provider,{value:{showInputModal:o},children:[E.jsx(Yr,{open:n.open,onOpenChange:a=>r(s=>({...s,open:a})),children:E.jsx(Yr.Content,{title:n.title,description:n.description,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText,onConfirm:n.onConfirm,onCancel:n.onCancel,children:n.content})}),e]})},PN=(e,t)=>{const n=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim())return;const o=t.filter(l=>/^\d+$/.test(l)).join(";"),i=`https://fonts.googleapis.com/css2?family=${n}:wght@${o}&display=swap`;if(document.querySelector(`link[href="${i}"]`))return;const s=document.createElement("link");s.rel="stylesheet",s.href=i,document.head.appendChild(s)},Dy=({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i,additionalStylesheetUrl:a})=>{I.useMemo(()=>{t&&PN(t,["100","200","300","400","500","600","700","800"])},[t]);const s=I.useMemo(()=>Cp({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i}),[e,t,n,r,o,i]);return E.jsxs(E.Fragment,{children:[a&&E.jsx("link",{rel:"stylesheet",href:a}),E.jsx("style",{children:s})]})},Bc=({children:e,className:t,uploadFile:n,allowFileUpload:r,storageKey:o,...i})=>{const{container:a}=me,s=Li(h=>h.setMessageContainerRef),c=km(o)(h=>h.uploadFile),[u,f]=I.useState(0),p=I.useRef(null);I.useEffect(()=>{s(p)},[p,s]);const d=I.useCallback(h=>{n&&(h.forEach(g=>c(g,n)),f(0))},[c,n]),{getRootProps:v}=Iy({noClick:!0,noKeyboard:!0,onDrop:d,disabled:!(r&&n),onDragEnter:()=>f(h=>h+1),onDragLeave:()=>f(h=>h-1)});return E.jsxs("div",{...i,className:Ao(a.className,t),...v(),ref:p,children:[E.jsxs("div",{"data-hover":u>0,...a.dropzone.overlay,children:["Drop files to upload",E.jsx(VO,{style:{width:"50px"}})]}),E.jsx(Py,{children:e})]})};Bc.displayName="Container";const _y=I.forwardRef(({children:e,onClick:t,imgUrl:n,...r},o)=>{const{fab:i}=me,{container:a,icon:s,image:l}=i??{};return n?E.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):E.jsx("div",{...r,...a,ref:o,onClick:t,children:E.jsx("div",{...s})})});_y.displayName="Fab";function pn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function DN(e,t){const n=C.createContext(t),r=i=>{const{children:a,...s}=i,l=C.useMemo(()=>s,Object.values(s));return E.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=C.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function My(e,t=[]){let n=[];function r(i,a){const s=C.createContext(a),l=n.length;n=[...n,a];const c=f=>{var m;const{scope:p,children:d,...v}=f,h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,g=C.useMemo(()=>v,Object.values(v));return E.jsx(h.Provider,{value:g,children:d})};c.displayName=i+"Provider";function u(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,_N(o,...t)]}function _N(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ny({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=MN({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=bn(n),l=C.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else o(c)},[i,e,o,s]);return[a,l]}function MN({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),i=bn(t);return C.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Ry(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jc(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ry(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ry(e[o],null)}}}}function In(...e){return C.useCallback(jc(...e),e)}var Ly=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(RN);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(zc,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(zc,{...r,ref:t,children:n})});Ly.displayName="Slot";var zc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=FN(n);return C.cloneElement(n,{...LN(r,n.props),ref:t?jc(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});zc.displayName="SlotClone";var NN=({children:e})=>E.jsx(E.Fragment,{children:e});function RN(e){return C.isValidElement(e)&&e.type===NN}function LN(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function FN(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Uc=BN.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ly:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jN(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var va=e=>{const{present:t,children:n}=e,r=zN(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),i=In(r.ref,UN(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:i}):null};va.displayName="Presence";function zN(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),i=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=jN(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=ma(r.current);i.current=s==="mounted"?c:"none"},[s]),ir(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,d=ma(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ir(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=d=>{const h=ma(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(i.current=ma(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ma(e){return(e==null?void 0:e.animationName)||"none"}function UN(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var WN=C.useId||(()=>{}),HN=0;function ga(e){const[t,n]=C.useState(WN());return ir(()=>{e||n(r=>r??String(HN++))},[e]),e||(t?`radix-${t}`:"")}var Wc="Collapsible",[VN,gJ]=My(Wc),[KN,Hc]=VN(Wc),Fy=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,c]=Ny({prop:r,defaultProp:o,onChange:a});return E.jsx(KN,{scope:n,disabled:i,contentId:ga(),open:l,onOpenToggle:C.useCallback(()=>c(u=>!u),[c]),children:E.jsx(Uc.div,{"data-state":Kc(l),"data-disabled":i?"":void 0,...s,ref:t})})});Fy.displayName=Wc;var By="CollapsibleTrigger",jy=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Hc(By,n);return E.jsx(Uc.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Kc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:pn(e.onClick,o.onOpenToggle)})});jy.displayName=By;var Vc="CollapsibleContent",zy=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Hc(Vc,e.__scopeCollapsible);return E.jsx(va,{present:n||o.open,children:({present:i})=>E.jsx(qN,{...r,ref:t,present:i})})});zy.displayName=Vc;var qN=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Hc(Vc,n),[s,l]=C.useState(r),c=C.useRef(null),u=In(t,c),f=C.useRef(0),p=f.current,d=C.useRef(0),v=d.current,h=a.open||s,g=C.useRef(h),m=C.useRef(void 0);return C.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),ir(()=>{const b=c.current;if(b){m.current=m.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,g.current||(b.style.transitionDuration=m.current.transitionDuration,b.style.animationName=m.current.animationName),l(r)}},[a.open,r]),E.jsx(Uc.div,{"data-state":Kc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...i,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function Kc(e){return e?"open":"closed"}var GN=Fy,YN=zy;const qc=({restartConversation:e,...t})=>{var i,a;const{header:n}=me,{showInputModal:r}=ql(),o=async s=>{s.stopPropagation(),r?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButtonText:"New conversation",cancelButtonText:"Cancel"}).then(()=>e()):e()};return E.jsx(oP,{...t,...(a=(i=n==null?void 0:n.content)==null?void 0:i.actions)==null?void 0:a.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},Uy=({onClick:e,...t})=>{const{header:n}=me,r=o=>{o.stopPropagation(),e==null||e()};return E.jsx(nm,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},Io=({icon:e,title:t,link:n,...r})=>{var a,s,l,c,u,f,p,d,v,h,g,m;const{header:o}=me,i=e??KO;return t?n?E.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[E.jsx(i,{...(c=(l=o.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),E.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):E.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[E.jsx(i,{...(h=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),E.jsx("p",{...(m=(g=o.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},QN=({soundOn:e,toggleSound:t})=>{const n=i=>{i.stopPropagation(),t==null||t()},{header:r}=me,o=e?tm:cP;return E.jsx("button",{type:"button",onClick:n,title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:E.jsx(o,{size:16})})},Wy=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:o,soundOn:i,toggleSound:a,...s})=>{var d,v,h,g,m,b,w,A,x,k,$,R,W,T,_,L,N,F,D,M,G,z;const{header:l}=me,[c,u]=I.useState(e),f=!!((d=n.email)!=null&&d.title)||!!((v=n.phone)!=null&&v.title)||!!((h=n.website)!=null&&h.title)||!!((g=n.termsOfService)!=null&&g.link)||!!((m=n.privacyPolicy)!=null&&m.link),p=f&&!o;return E.jsxs(GN,{open:p?c:!1,onOpenChange:u,"data-disabled":p?void 0:"",...l.container,...s,children:[E.jsxs(jy,{"aria-label":"Expand Header Button",...l.content.container,children:[E.jsx(to,{...s,src:n.botAvatar,...l.content.avatar,children:n.botName||"Bot"}),E.jsx("h2",{...l.content.title,children:n.botName||"Bot"}),n.botDescription&&E.jsx("p",{...l.content.description,children:n.botDescription}),E.jsxs("div",{...l.content.actions.container,children:[n.soundEnabled&&i!==void 0&&a&&E.jsx(QN,{soundOn:i,toggleSound:a})," ",r&&E.jsx(qc,{restartConversation:r}),t&&E.jsx(Uy,{onClick:t})]})]}),f&&E.jsxs(YN,{...l.expandedContent.container,children:[E.jsxs("div",{"data-links":"",...l.expandedContent.group,children:[E.jsx(Io,{"data-email":"",icon:ZO,title:(b=n.email)==null?void 0:b.title,link:(A=(w=n.email)==null?void 0:w.link)!=null&&A.startsWith("mailto:")?(x=n.email)==null?void 0:x.link:`mailto:${(k=n.email)==null?void 0:k.link}`}),E.jsx(Io,{"data-phone":"",icon:nP,title:($=n.phone)==null?void 0:$.title,link:(W=(R=n.phone)==null?void 0:R.link)!=null&&W.startsWith("tel:")?(T=n.phone)==null?void 0:T.link:`tel:${(_=n.phone)==null?void 0:_.link}`}),E.jsx(Io,{"data-website":"",link:(L=n.website)==null?void 0:L.link,icon:YO,title:(N=n.website)==null?void 0:N.title})]}),E.jsxs("div",{"data-legal":"",...(F=l.expandedContent)==null?void 0:F.group,children:[E.jsx(Io,{"data-terms":"",link:(D=n.termsOfService)==null?void 0:D.link,icon:Xv,title:(M=n.termsOfService)==null?void 0:M.title}),E.jsx(Io,{"data-privacy":"",link:(G=n.privacyPolicy)==null?void 0:G.link,icon:JO,title:(z=n.privacyPolicy)==null?void 0:z.title})]})]})]})},Gc=I.memo(({...e})=>{const{typingIndicator:t}=me;return E.jsx("div",{...e,...t==null?void 0:t.container,children:E.jsx("div",{...t==null?void 0:t.loader})})});Gc.displayName="TypingIndicator";const Yc=I.memo(I.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:o,id:i,authorId:a,status:s,renderers:l,isReadOnly:c,isLastDeliveredMessage:u,feedback:f,timestamp:p,metadata:d,sendMessage:v,addMessageFeedback:h,showAvatar:g},m)=>{const[b,w]=I.useState([]),{message:{container:A,deliveryStatus:x}}=me;return g=g??e==="incoming",E.jsx(Vl.Provider,{value:{isLoading:b,setIsLoading:w},children:E.jsxs("div",{...A,className:Ao(A==null?void 0:A.className,u&&(x==null?void 0:x.className)),"data-loaded":b.length===0,"data-disable-input":!!n,"data-direction":e,dir:"auto",ref:m,children:[e==="incoming"&&g&&E.jsx(Hy,{authorId:a,sender:o}),t&&E.jsx(Kn,{block:{...t,isReadOnly:c,direction:e,timestamp:p,sender:o,feedback:f,messageId:i,status:s,metadata:d,sendMessage:v,addMessageFeedback:h},renderers:l}),e==="outgoing"&&g&&E.jsx(Hy,{authorId:a,sender:o}),r]})})})),Hy=({authorId:e,sender:t})=>{const{message:{avatar:n}}=me,[r,o]=I.useState("idle"),i=cp(e??"",15);return E.jsxs(Bs,{"data-color":i,"data-loading-status":r,...n==null?void 0:n.container,children:[E.jsx(js,{...n==null?void 0:n.image,onLoadingStatusChange:o,src:t==null?void 0:t.avatar}),E.jsxs(zs,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};function JN({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=me;return E.jsxs("li",{...r.container,children:[E.jsx(to,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),E.jsxs("div",{...r.content,children:[E.jsx("h1",{...r.title,children:n||"Bot"}),E.jsx("p",{...r.description,children:t})]})]})}function ZN(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function XN(){ZN("react-scroll-to-bottom:version","4.2.0")}var Oo=function(e){return e&&e.Math===Math&&e},Qe=Oo(typeof globalThis=="object"&&globalThis)||Oo(typeof window=="object"&&window)||Oo(typeof self=="object"&&self)||Oo(typeof Rt=="object"&&Rt)||Oo(typeof Rt=="object"&&Rt)||function(){return this}()||Function("return this")(),Je=function(e){try{return!!e()}catch{return!0}},e2=Je,ya=!e2(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),t2=ya,Vy=Function.prototype,Ky=Vy.apply,qy=Vy.call,Qc=typeof Reflect=="object"&&Reflect.apply||(t2?qy.bind(Ky):function(){return qy.apply(Ky,arguments)}),Gy=ya,Yy=Function.prototype,Jc=Yy.call,n2=Gy&&Yy.bind.bind(Jc,Jc),Ve=Gy?n2:function(e){return function(){return Jc.apply(e,arguments)}},Qy=Ve,r2=Qy({}.toString),o2=Qy("".slice),Gn=function(e){return o2(r2(e),8,-1)},i2=Gn,a2=Ve,Zc=function(e){if(i2(e)==="Function")return a2(e)},Xc=typeof document=="object"&&document.all,dt=typeof Xc>"u"&&Xc!==void 0?function(e){return typeof e=="function"||e===Xc}:function(e){return typeof e=="function"},Po={},s2=Je,bt=!s2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),l2=ya,ba=Function.prototype.call,en=l2?ba.bind(ba):function(){return ba.apply(ba,arguments)},eu={},Jy={}.propertyIsEnumerable,Zy=Object.getOwnPropertyDescriptor,c2=Zy&&!Jy.call({1:2},1);eu.f=c2?function(t){var n=Zy(this,t);return!!n&&n.enumerable}:Jy;var Do=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},u2=Ve,f2=Je,d2=Gn,tu=Object,p2=u2("".split),Xy=f2(function(){return!tu("z").propertyIsEnumerable(0)})?function(e){return d2(e)==="String"?p2(e,""):tu(e)}:tu,nu=function(e){return e==null},h2=nu,v2=TypeError,wa=function(e){if(h2(e))throw new v2("Can't call method on "+e);return e},m2=Xy,g2=wa,tn=function(e){return m2(g2(e))},y2=dt,zt=function(e){return typeof e=="object"?e!==null:y2(e)},it={},ru=it,ou=Qe,b2=dt,eb=function(e){return b2(e)?e:void 0},nn=function(e,t){return arguments.length<2?eb(ru[e])||eb(ou[e]):ru[e]&&ru[e][t]||ou[e]&&ou[e][t]},w2=Ve,hn=w2({}.isPrototypeOf),S2=Qe,tb=S2.navigator,nb=tb&&tb.userAgent,iu=nb?String(nb):"",rb=Qe,au=iu,ob=rb.process,ib=rb.Deno,ab=ob&&ob.versions||ib&&ib.version,sb=ab&&ab.v8,Ut,Sa;sb&&(Ut=sb.split("."),Sa=Ut[0]>0&&Ut[0]<4?1:+(Ut[0]+Ut[1])),!Sa&&au&&(Ut=au.match(/Edge\/(\d+)/),(!Ut||Ut[1]>=74)&&(Ut=au.match(/Chrome\/(\d+)/),Ut&&(Sa=+Ut[1])));var su=Sa,lb=su,x2=Je,E2=Qe,k2=E2.String,xr=!!Object.getOwnPropertySymbols&&!x2(function(){var e=Symbol("symbol detection");return!k2(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&lb&&lb<41}),C2=xr,cb=C2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",A2=nn,$2=dt,T2=hn,I2=cb,O2=Object,_o=I2?function(e){return typeof e=="symbol"}:function(e){var t=A2("Symbol");return $2(t)&&T2(t.prototype,O2(e))},P2=String,xa=function(e){try{return P2(e)}catch{return"Object"}},D2=dt,_2=xa,M2=TypeError,Ea=function(e){if(D2(e))return e;throw new M2(_2(e)+" is not a function")},N2=Ea,R2=nu,lu=function(e,t){var n=e[t];return R2(n)?void 0:N2(n)},cu=en,uu=dt,fu=zt,L2=TypeError,F2=function(e,t){var n,r;if(t==="string"&&uu(n=e.toString)&&!fu(r=cu(n,e))||uu(n=e.valueOf)&&!fu(r=cu(n,e))||t!=="string"&&uu(n=e.toString)&&!fu(r=cu(n,e)))return r;throw new L2("Can't convert object to primitive value")},ub={exports:{}},fb=Qe,B2=Object.defineProperty,j2=function(e,t){try{B2(fb,e,{value:t,configurable:!0,writable:!0})}catch{fb[e]=t}return t},z2=Qe,U2=j2,db="__core-js_shared__",pb=ub.exports=z2[db]||U2(db,{});(pb.versions||(pb.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 du=ub.exports,hb=du,Er=function(e,t){return hb[e]||(hb[e]=t||{})},W2=wa,H2=Object,vn=function(e){return H2(W2(e))},V2=Ve,K2=vn,q2=V2({}.hasOwnProperty),$t=Object.hasOwn||function(t,n){return q2(K2(t),n)},G2=Ve,Y2=0,Q2=Math.random(),J2=G2(1 .toString),pu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+J2(++Y2+Q2,36)},Z2=Qe,X2=Er,vb=$t,eR=pu,tR=xr,nR=cb,kr=Z2.Symbol,hu=X2("wks"),rR=nR?kr.for||kr:kr&&kr.withoutSetter||eR,Xe=function(e){return vb(hu,e)||(hu[e]=tR&&vb(kr,e)?kr[e]:rR("Symbol."+e)),hu[e]},oR=en,mb=zt,gb=_o,iR=lu,aR=F2,sR=Xe,lR=TypeError,cR=sR("toPrimitive"),uR=function(e,t){if(!mb(e)||gb(e))return e;var n=iR(e,cR),r;if(n){if(t===void 0&&(t="default"),r=oR(n,e,t),!mb(r)||gb(r))return r;throw new lR("Can't convert object to primitive value")}return t===void 0&&(t="number"),aR(e,t)},fR=uR,dR=_o,vu=function(e){var t=fR(e,"string");return dR(t)?t:t+""},pR=Qe,yb=zt,mu=pR.document,hR=yb(mu)&&yb(mu.createElement),bb=function(e){return hR?mu.createElement(e):{}},vR=bt,mR=Je,gR=bb,wb=!vR&&!mR(function(){return Object.defineProperty(gR("div"),"a",{get:function(){return 7}}).a!==7}),yR=bt,bR=en,wR=eu,SR=Do,xR=tn,ER=vu,kR=$t,CR=wb,Sb=Object.getOwnPropertyDescriptor;Po.f=yR?Sb:function(t,n){if(t=xR(t),n=ER(n),CR)try{return Sb(t,n)}catch{}if(kR(t,n))return SR(!bR(wR.f,t,n),t[n])};var AR=Je,$R=dt,TR=/#|\.prototype\./,Mo=function(e,t){var n=OR[IR(e)];return n===DR?!0:n===PR?!1:$R(t)?AR(t):!!t},IR=Mo.normalize=function(e){return String(e).replace(TR,".").toLowerCase()},OR=Mo.data={},PR=Mo.NATIVE="N",DR=Mo.POLYFILL="P",_R=Mo,xb=Zc,MR=Ea,NR=ya,RR=xb(xb.bind),gu=function(e,t){return MR(e),t===void 0?e:NR?RR(e,t):function(){return e.apply(t,arguments)}},Wt={},LR=bt,FR=Je,Eb=LR&&FR(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),BR=zt,jR=String,zR=TypeError,On=function(e){if(BR(e))return e;throw new zR(jR(e)+" is not an object")},UR=bt,WR=wb,HR=Eb,ka=On,kb=vu,VR=TypeError,yu=Object.defineProperty,KR=Object.getOwnPropertyDescriptor,bu="enumerable",wu="configurable",Su="writable";Wt.f=UR?HR?function(t,n,r){if(ka(t),n=kb(n),ka(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Su in r&&!r[Su]){var o=KR(t,n);o&&o[Su]&&(t[n]=r.value,r={configurable:wu in r?r[wu]:o[wu],enumerable:bu in r?r[bu]:o[bu],writable:!1})}return yu(t,n,r)}:yu:function(t,n,r){if(ka(t),n=kb(n),ka(r),WR)try{return yu(t,n,r)}catch{}if("get"in r||"set"in r)throw new VR("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var qR=bt,GR=Wt,YR=Do,Ca=qR?function(e,t,n){return GR.f(e,t,YR(1,n))}:function(e,t,n){return e[t]=n,e},No=Qe,QR=Qc,JR=Zc,ZR=dt,XR=Po.f,eL=_R,Cr=it,tL=gu,Ar=Ca,Cb=$t,nL=function(e){var t=function(n,r,o){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,o)}return QR(e,this,arguments)};return t.prototype=e.prototype,t},De=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?No:o?No[n]:No[n]&&No[n].prototype,s=r?Cr:Cr[n]||Ar(Cr,n,{})[n],l=s.prototype,c,u,f,p,d,v,h,g,m;for(p in t)c=eL(r?p:n+(o?".":"#")+p,e.forced),u=!c&&a&&Cb(a,p),v=s[p],u&&(e.dontCallGetSet?(m=XR(a,p),h=m&&m.value):h=a[p]),d=u&&h?h:t[p],!(!c&&!i&&typeof v==typeof d)&&(e.bind&&u?g=tL(d,No):e.wrap&&u?g=nL(d):i&&ZR(d)?g=JR(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&Ar(g,"sham",!0),Ar(s,p,g),i&&(f=n+"Prototype",Cb(Cr,f)||Ar(Cr,f,{}),Ar(Cr[f],p,d),e.real&&l&&(c||!l[p])&&Ar(l,p,d)))},rL=Gn,$r=Array.isArray||function(t){return rL(t)==="Array"},oL=De,iL=$r;oL({target:"Array",stat:!0},{isArray:iL});var aL=it,sL=aL.Array.isArray,lL=sL,Ab=lL,cL=Ab,uL=cL,fL=uL,dL=fL,pL=dL;const $b=be(pL);function hL(e){if($b(e))return e}var vL=Math.ceil,mL=Math.floor,gL=Math.trunc||function(t){var n=+t;return(n>0?mL:vL)(n)},yL=gL,Aa=function(e){var t=+e;return t!==t||t===0?0:yL(t)},bL=Aa,wL=Math.min,SL=function(e){var t=bL(e);return t>0?wL(t,9007199254740991):0},xL=SL,Yn=function(e){return xL(e.length)},EL=TypeError,kL=9007199254740991,xu=function(e){if(e>kL)throw EL("Maximum allowed index exceeded");return e},CL=bt,AL=Wt,$L=Do,Ro=function(e,t,n){CL?AL.f(e,t,$L(0,n)):e[t]=n},TL=Xe,IL=TL("toStringTag"),Tb={};Tb[IL]="z";var Eu=String(Tb)==="[object z]",OL=Eu,PL=dt,$a=Gn,DL=Xe,_L=DL("toStringTag"),ML=Object,NL=$a(function(){return arguments}())==="Arguments",RL=function(e,t){try{return e[t]}catch{}},Lo=OL?$a:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=RL(t=ML(e),_L))=="string"?n:NL?$a(t):(r=$a(t))==="Object"&&PL(t.callee)?"Arguments":r},LL=Ve,FL=dt,ku=du,BL=LL(Function.toString);FL(ku.inspectSource)||(ku.inspectSource=function(e){return BL(e)});var jL=ku.inspectSource,zL=Ve,UL=Je,Ib=dt,WL=Lo,HL=nn,VL=jL,Ob=function(){},Pb=HL("Reflect","construct"),Cu=/^\s*(?:class|function)\b/,KL=zL(Cu.exec),qL=!Cu.test(Ob),Fo=function(t){if(!Ib(t))return!1;try{return Pb(Ob,[],t),!0}catch{return!1}},Db=function(t){if(!Ib(t))return!1;switch(WL(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return qL||!!KL(Cu,VL(t))}catch{return!0}};Db.sham=!0;var Au=!Pb||UL(function(){var e;return Fo(Fo.call)||!Fo(Object)||!Fo(function(){e=!0})||e})?Db:Fo,_b=$r,GL=Au,YL=zt,QL=Xe,JL=QL("species"),Mb=Array,ZL=function(e){var t;return _b(e)&&(t=e.constructor,GL(t)&&(t===Mb||_b(t.prototype))?t=void 0:YL(t)&&(t=t[JL],t===null&&(t=void 0))),t===void 0?Mb:t},XL=ZL,$u=function(e,t){return new(XL(e))(t===0?0:t)},eF=Je,tF=Xe,nF=su,rF=tF("species"),Ta=function(e){return nF>=51||!eF(function(){var t=[],n=t.constructor={};return n[rF]=function(){return{foo:1}},t[e](Boolean).foo!==1})},oF=De,iF=Je,aF=$r,sF=zt,lF=vn,cF=Yn,Nb=xu,Rb=Ro,uF=$u,fF=Ta,dF=Xe,pF=su,Lb=dF("isConcatSpreadable"),hF=pF>=51||!iF(function(){var e=[];return e[Lb]=!1,e.concat()[0]!==e}),vF=function(e){if(!sF(e))return!1;var t=e[Lb];return t!==void 0?!!t:aF(e)},mF=!hF||!fF("concat");oF({target:"Array",proto:!0,arity:1,forced:mF},{concat:function(t){var n=lF(this),r=uF(n,0),o=0,i,a,s,l,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?n:arguments[i],vF(c))for(l=cF(c),Nb(o+l),a=0;a<l;a++,o++)a in c&&Rb(r,o,c[a]);else Nb(o+1),Rb(r,o++,c);return r.length=o,r}});var gF=Lo,yF=String,Bo=function(e){if(gF(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return yF(e)},Ia={},bF=Aa,wF=Math.max,SF=Math.min,Tu=function(e,t){var n=bF(e);return n<0?wF(n+t,0):SF(n,t)},xF=tn,EF=Tu,kF=Yn,Fb=function(e){return function(t,n,r){var o=xF(t),i=kF(o);if(i===0)return!e&&-1;var a=EF(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},Bb={includes:Fb(!0),indexOf:Fb(!1)},Oa={},CF=Ve,Iu=$t,AF=tn,$F=Bb.indexOf,TF=Oa,jb=CF([].push),zb=function(e,t){var n=AF(e),r=0,o=[],i;for(i in n)!Iu(TF,i)&&Iu(n,i)&&jb(o,i);for(;t.length>r;)Iu(n,i=t[r++])&&(~$F(o,i)||jb(o,i));return o},Ou=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],IF=zb,OF=Ou,Pu=Object.keys||function(t){return IF(t,OF)},PF=bt,DF=Eb,_F=Wt,MF=On,NF=tn,RF=Pu;Ia.f=PF&&!DF?Object.defineProperties:function(t,n){MF(t);for(var r=NF(n),o=RF(n),i=o.length,a=0,s;i>a;)_F.f(t,s=o[a++],r[s]);return t};var LF=nn,FF=LF("document","documentElement"),BF=Er,jF=pu,Ub=BF("keys"),Pa=function(e){return Ub[e]||(Ub[e]=jF(e))},zF=On,UF=Ia,Wb=Ou,WF=Oa,HF=FF,VF=bb,KF=Pa,Hb=">",Vb="<",Du="prototype",_u="script",Kb=KF("IE_PROTO"),Mu=function(){},qb=function(e){return Vb+_u+Hb+e+Vb+"/"+_u+Hb},Gb=function(e){e.write(qb("")),e.close();var t=e.parentWindow.Object;return e=null,t},qF=function(){var e=VF("iframe"),t="java"+_u+":",n;return e.style.display="none",HF.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(qb("document.F=Object")),n.close(),n.F},Da,_a=function(){try{Da=new ActiveXObject("htmlfile")}catch{}_a=typeof document<"u"?document.domain&&Da?Gb(Da):qF():Gb(Da);for(var e=Wb.length;e--;)delete _a[Du][Wb[e]];return _a()};WF[Kb]=!0;var Nu=Object.create||function(t,n){var r;return t!==null?(Mu[Du]=zF(t),r=new Mu,Mu[Du]=null,r[Kb]=t):r=_a(),n===void 0?r:UF.f(r,n)},Ma={},GF=zb,YF=Ou,QF=YF.concat("length","prototype");Ma.f=Object.getOwnPropertyNames||function(t){return GF(t,QF)};var Yb={},JF=Ve,Na=JF([].slice),ZF=Gn,XF=tn,Qb=Ma.f,eB=Na,Jb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tB=function(e){try{return Qb(e)}catch{return eB(Jb)}};Yb.f=function(t){return Jb&&ZF(t)==="Window"?tB(t):Qb(XF(t))};var Ra={};Ra.f=Object.getOwnPropertySymbols;var nB=Ca,La=function(e,t,n,r){return r&&r.enumerable?e[t]=n:nB(e,t,n),e},rB=Wt,oB=function(e,t,n){return rB.f(e,t,n)},jo={},iB=Xe;jo.f=iB;var Zb=it,aB=$t,sB=jo,lB=Wt.f,Be=function(e){var t=Zb.Symbol||(Zb.Symbol={});aB(t,e)||lB(t,e,{value:sB.f(e)})},cB=en,uB=nn,fB=Xe,dB=La,Xb=function(){var e=uB("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=fB("toPrimitive");t&&!t[r]&&dB(t,r,function(o){return cB(n,this)},{arity:1})},pB=Eu,hB=Lo,vB=pB?{}.toString:function(){return"[object "+hB(this)+"]"},mB=Eu,gB=Wt.f,yB=Ca,bB=$t,wB=vB,SB=Xe,ew=SB("toStringTag"),Tr=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(bB(o,ew)||gB(o,ew,{configurable:!0,value:t}),r&&!mB&&yB(o,"toString",wB))},xB=Qe,EB=dt,tw=xB.WeakMap,kB=EB(tw)&&/native code/.test(String(tw)),CB=kB,nw=Qe,AB=zt,$B=Ca,Ru=$t,Lu=du,TB=Pa,IB=Oa,rw="Object already initialized",Fu=nw.TypeError,OB=nw.WeakMap,Fa,zo,Ba,PB=function(e){return Ba(e)?zo(e):Fa(e,{})},DB=function(e){return function(t){var n;if(!AB(t)||(n=zo(t)).type!==e)throw new Fu("Incompatible receiver, "+e+" required");return n}};if(CB||Lu.state){var rn=Lu.state||(Lu.state=new OB);rn.get=rn.get,rn.has=rn.has,rn.set=rn.set,Fa=function(e,t){if(rn.has(e))throw new Fu(rw);return t.facade=e,rn.set(e,t),t},zo=function(e){return rn.get(e)||{}},Ba=function(e){return rn.has(e)}}else{var Ir=TB("state");IB[Ir]=!0,Fa=function(e,t){if(Ru(e,Ir))throw new Fu(rw);return t.facade=e,$B(e,Ir,t),t},zo=function(e){return Ru(e,Ir)?e[Ir]:{}},Ba=function(e){return Ru(e,Ir)}}var Bu={set:Fa,get:zo,has:Ba,enforce:PB,getterFor:DB},_B=gu,MB=Ve,NB=Xy,RB=vn,LB=Yn,FB=$u,ow=MB([].push),Pn=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(l,c,u,f){for(var p=RB(l),d=NB(p),v=LB(d),h=_B(c,u),g=0,m=f||FB,b=t?m(l,v):n||a?m(l,0):void 0,w,A;v>g;g++)if((s||g in d)&&(w=d[g],A=h(w,g,p),e))if(t)b[g]=A;else if(A)switch(e){case 3:return!0;case 5:return w;case 6:return g;case 2:ow(b,w)}else switch(e){case 4:return!1;case 7:ow(b,w)}return i?-1:r||o?o:b}},ju={forEach:Pn(0),map:Pn(1),filter:Pn(2),some:Pn(3),every:Pn(4),find:Pn(5),findIndex:Pn(6),filterReject:Pn(7)},ja=De,Uo=Qe,zu=en,BB=Ve,Or=bt,Pr=xr,jB=Je,et=$t,zB=hn,Uu=On,za=tn,Wu=vu,UB=Bo,Hu=Do,Dr=Nu,iw=Pu,WB=Ma,aw=Yb,HB=Ra,sw=Po,lw=Wt,VB=Ia,cw=eu,uw=La,KB=oB,Vu=Er,qB=Pa,fw=Oa,dw=pu,GB=Xe,YB=jo,QB=Be,JB=Xb,ZB=Tr,pw=Bu,Ua=ju.forEach,wt=qB("hidden"),Wa="Symbol",Wo="prototype",XB=pw.set,hw=pw.getterFor(Wa),Ht=Object[Wo],Qn=Uo.Symbol,Ho=Qn&&Qn[Wo],ej=Uo.RangeError,tj=Uo.TypeError,Ku=Uo.QObject,vw=sw.f,Jn=lw.f,mw=aw.f,nj=cw.f,gw=BB([].push),mn=Vu("symbols"),Vo=Vu("op-symbols"),rj=Vu("wks"),qu=!Ku||!Ku[Wo]||!Ku[Wo].findChild,yw=function(e,t,n){var r=vw(Ht,t);r&&delete Ht[t],Jn(e,t,n),r&&e!==Ht&&Jn(Ht,t,r)},Gu=Or&&jB(function(){return Dr(Jn({},"a",{get:function(){return Jn(this,"a",{value:7}).a}})).a!==7})?yw:Jn,Yu=function(e,t){var n=mn[e]=Dr(Ho);return XB(n,{type:Wa,tag:e,description:t}),Or||(n.description=t),n},Ha=function(t,n,r){t===Ht&&Ha(Vo,n,r),Uu(t);var o=Wu(n);return Uu(r),et(mn,o)?(r.enumerable?(et(t,wt)&&t[wt][o]&&(t[wt][o]=!1),r=Dr(r,{enumerable:Hu(0,!1)})):(et(t,wt)||Jn(t,wt,Hu(1,Dr(null))),t[wt][o]=!0),Gu(t,o,r)):Jn(t,o,r)},Qu=function(t,n){Uu(t);var r=za(n),o=iw(r).concat(xw(r));return Ua(o,function(i){(!Or||zu(bw,r,i))&&Ha(t,i,r[i])}),t},oj=function(t,n){return n===void 0?Dr(t):Qu(Dr(t),n)},bw=function(t){var n=Wu(t),r=zu(nj,this,n);return this===Ht&&et(mn,n)&&!et(Vo,n)?!1:r||!et(this,n)||!et(mn,n)||et(this,wt)&&this[wt][n]?r:!0},ww=function(t,n){var r=za(t),o=Wu(n);if(!(r===Ht&&et(mn,o)&&!et(Vo,o))){var i=vw(r,o);return i&&et(mn,o)&&!(et(r,wt)&&r[wt][o])&&(i.enumerable=!0),i}},Sw=function(t){var n=mw(za(t)),r=[];return Ua(n,function(o){!et(mn,o)&&!et(fw,o)&&gw(r,o)}),r},xw=function(e){var t=e===Ht,n=mw(t?Vo:za(e)),r=[];return Ua(n,function(o){et(mn,o)&&(!t||et(Ht,o))&&gw(r,mn[o])}),r};Pr||(Qn=function(){if(zB(Ho,this))throw new tj("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:UB(arguments[0]),n=dw(t),r=function(o){var i=this===void 0?Uo:this;i===Ht&&zu(r,Vo,o),et(i,wt)&&et(i[wt],n)&&(i[wt][n]=!1);var a=Hu(1,o);try{Gu(i,n,a)}catch(s){if(!(s instanceof ej))throw s;yw(i,n,a)}};return Or&&qu&&Gu(Ht,n,{configurable:!0,set:r}),Yu(n,t)},Ho=Qn[Wo],uw(Ho,"toString",function(){return hw(this).tag}),uw(Qn,"withoutSetter",function(e){return Yu(dw(e),e)}),cw.f=bw,lw.f=Ha,VB.f=Qu,sw.f=ww,WB.f=aw.f=Sw,HB.f=xw,YB.f=function(e){return Yu(GB(e),e)},Or&&KB(Ho,"description",{configurable:!0,get:function(){return hw(this).description}})),ja({global:!0,constructor:!0,wrap:!0,forced:!Pr,sham:!Pr},{Symbol:Qn}),Ua(iw(rj),function(e){QB(e)}),ja({target:Wa,stat:!0,forced:!Pr},{useSetter:function(){qu=!0},useSimple:function(){qu=!1}}),ja({target:"Object",stat:!0,forced:!Pr,sham:!Or},{create:oj,defineProperty:Ha,defineProperties:Qu,getOwnPropertyDescriptor:ww}),ja({target:"Object",stat:!0,forced:!Pr},{getOwnPropertyNames:Sw}),JB(),ZB(Qn,Wa),fw[wt]=!0;var ij=xr,Ew=ij&&!!Symbol.for&&!!Symbol.keyFor,aj=De,sj=nn,lj=$t,cj=Bo,kw=Er,uj=Ew,Ju=kw("string-to-symbol-registry"),fj=kw("symbol-to-string-registry");aj({target:"Symbol",stat:!0,forced:!uj},{for:function(e){var t=cj(e);if(lj(Ju,t))return Ju[t];var n=sj("Symbol")(t);return Ju[t]=n,fj[n]=t,n}});var dj=De,pj=$t,hj=_o,vj=xa,mj=Er,gj=Ew,Cw=mj("symbol-to-string-registry");dj({target:"Symbol",stat:!0,forced:!gj},{keyFor:function(t){if(!hj(t))throw new TypeError(vj(t)+" is not a symbol");if(pj(Cw,t))return Cw[t]}});var yj=Ve,Aw=$r,bj=dt,$w=Gn,wj=Bo,Tw=yj([].push),Sj=function(e){if(bj(e))return e;if(Aw(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?Tw(n,o):(typeof o=="number"||$w(o)==="Number"||$w(o)==="String")&&Tw(n,wj(o))}var i=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(Aw(this))return l;for(var c=0;c<i;c++)if(n[c]===s)return l}}},xj=De,Iw=nn,Ow=Qc,Ej=en,Ko=Ve,Pw=Je,Dw=dt,_w=_o,Mw=Na,kj=Sj,Cj=xr,Aj=String,Dn=Iw("JSON","stringify"),Va=Ko(/./.exec),Nw=Ko("".charAt),$j=Ko("".charCodeAt),Tj=Ko("".replace),Ij=Ko(1 .toString),Oj=/[\uD800-\uDFFF]/g,Rw=/^[\uD800-\uDBFF]$/,Lw=/^[\uDC00-\uDFFF]$/,Fw=!Cj||Pw(function(){var e=Iw("Symbol")("stringify detection");return Dn([e])!=="[null]"||Dn({a:e})!=="{}"||Dn(Object(e))!=="{}"}),Bw=Pw(function(){return Dn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Dn("\uDEAD")!=='"\\udead"'}),Pj=function(e,t){var n=Mw(arguments),r=kj(t);if(!(!Dw(r)&&(e===void 0||_w(e))))return n[1]=function(o,i){if(Dw(r)&&(i=Ej(r,this,Aj(o),i)),!_w(i))return i},Ow(Dn,null,n)},Dj=function(e,t,n){var r=Nw(n,t-1),o=Nw(n,t+1);return Va(Rw,e)&&!Va(Lw,o)||Va(Lw,e)&&!Va(Rw,r)?"\\u"+Ij($j(e,0),16):e};Dn&&xj({target:"JSON",stat:!0,arity:3,forced:Fw||Bw},{stringify:function(t,n,r){var o=Mw(arguments),i=Ow(Fw?Pj:Dn,null,o);return Bw&&typeof i=="string"?Tj(i,Oj,Dj):i}});var _j=De,Mj=xr,Nj=Je,jw=Ra,Rj=vn,Lj=!Mj||Nj(function(){jw.f(1)});_j({target:"Object",stat:!0,forced:Lj},{getOwnPropertySymbols:function(t){var n=jw.f;return n?n(Rj(t)):[]}});var Fj=Be;Fj("asyncIterator");var Bj=Be;Bj("hasInstance");var jj=Be;jj("isConcatSpreadable");var zj=Be;zj("iterator");var Uj=Be;Uj("match");var Wj=Be;Wj("matchAll");var Hj=Be;Hj("replace");var Vj=Be;Vj("search");var Kj=Be;Kj("species");var qj=Be;qj("split");var Gj=Be,Yj=Xb;Gj("toPrimitive"),Yj();var Qj=nn,Jj=Be,Zj=Tr;Jj("toStringTag"),Zj(Qj("Symbol"),"Symbol");var Xj=Be;Xj("unscopables");var e4=Qe,t4=Tr;t4(e4.JSON,"JSON",!0);var n4=it,r4=n4.Symbol,_r={},Zu=bt,o4=$t,zw=Function.prototype,i4=Zu&&Object.getOwnPropertyDescriptor,Xu=o4(zw,"name"),a4=Xu&&(function(){}).name==="something",s4=Xu&&(!Zu||Zu&&i4(zw,"name").configurable),l4={EXISTS:Xu,PROPER:a4,CONFIGURABLE:s4},c4=Je,u4=!c4(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),f4=$t,d4=dt,p4=vn,h4=Pa,v4=u4,Uw=h4("IE_PROTO"),ef=Object,m4=ef.prototype,Ww=v4?ef.getPrototypeOf:function(e){var t=p4(e);if(f4(t,Uw))return t[Uw];var n=t.constructor;return d4(n)&&t instanceof n?n.prototype:t instanceof ef?m4:null},g4=Je,y4=dt,b4=zt,w4=Nu,Hw=Ww,S4=La,x4=Xe,tf=x4("iterator"),Vw=!1,gn,nf,rf;[].keys&&(rf=[].keys(),"next"in rf?(nf=Hw(Hw(rf)),nf!==Object.prototype&&(gn=nf)):Vw=!0);var E4=!b4(gn)||g4(function(){var e={};return gn[tf].call(e)!==e});E4?gn={}:gn=w4(gn),y4(gn[tf])||S4(gn,tf,function(){return this});var Kw={IteratorPrototype:gn,BUGGY_SAFARI_ITERATORS:Vw},k4=Kw.IteratorPrototype,C4=Nu,A4=Do,$4=Tr,T4=_r,I4=function(){return this},O4=function(e,t,n,r){var o=t+" Iterator";return e.prototype=C4(k4,{next:A4(+!r,n)}),$4(e,o,!1,!0),T4[o]=I4,e},P4=Ve,D4=Ea,_4=function(e,t,n){try{return P4(D4(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},M4=zt,N4=function(e){return M4(e)||e===null},R4=N4,L4=String,F4=TypeError,B4=function(e){if(R4(e))return e;throw new F4("Can't set "+L4(e)+" as a prototype")},j4=_4,z4=zt,U4=wa,W4=B4;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=j4(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(o,i){return U4(o),W4(i),z4(o)&&(e?n(o,i):o.__proto__=i),o}}();var H4=De,V4=en,qw=l4,K4=O4,q4=Ww,G4=Tr,Gw=La,Y4=Xe,Yw=_r,Qw=Kw,Q4=qw.PROPER;qw.CONFIGURABLE,Qw.IteratorPrototype;var Ka=Qw.BUGGY_SAFARI_ITERATORS,of=Y4("iterator"),Jw="keys",qa="values",Zw="entries",J4=function(){return this},Xw=function(e,t,n,r,o,i,a){K4(n,t,r);var s=function(m){if(m===o&&p)return p;if(!Ka&&m&&m in u)return u[m];switch(m){case Jw:return function(){return new n(this,m)};case qa:return function(){return new n(this,m)};case Zw:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[of]||u["@@iterator"]||o&&u[o],p=!Ka&&f||s(o),d=t==="Array"&&u.entries||f,v,h,g;if(d&&(v=q4(d.call(new e)),v!==Object.prototype&&v.next&&(G4(v,l,!0,!0),Yw[l]=J4)),Q4&&o===qa&&f&&f.name!==qa&&(c=!0,p=function(){return V4(f,this)}),o)if(h={values:s(qa),keys:i?p:s(Jw),entries:s(Zw)},a)for(g in h)(Ka||c||!(g in u))&&Gw(u,g,h[g]);else H4({target:t,proto:!0,forced:Ka||c},h);return a&&u[of]!==p&&Gw(u,of,p,{name:o}),Yw[t]=p,h},e1=function(e,t){return{value:e,done:t}},Z4=tn,t1=_r,n1=Bu;Wt.f;var X4=Xw,Ga=e1,r1="Array Iterator",e3=n1.set,t3=n1.getterFor(r1);X4(Array,"Array",function(e,t){e3(this,{type:r1,target:Z4(e),index:0,kind:t})},function(){var e=t3(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ga(void 0,!0);switch(e.kind){case"keys":return Ga(n,!1);case"values":return Ga(t[n],!1)}return Ga([n,t[n]],!1)},"values"),t1.Arguments=t1.Array;var n3={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},r3=n3,o3=Qe,i3=Tr,o1=_r;for(var af in r3)i3(o3[af],af),o1[af]=o1.Array;var a3=r4,s3=a3,l3=Xe,c3=Wt.f,i1=l3("metadata"),a1=Function.prototype;a1[i1]===void 0&&c3(a1,i1,{value:null});var u3=Be;u3("asyncDispose");var f3=Be;f3("dispose");var d3=Be;d3("metadata");var p3=s3,h3=p3,v3=nn,m3=Ve,sf=v3("Symbol"),g3=sf.keyFor,y3=m3(sf.prototype.valueOf),s1=sf.isRegisteredSymbol||function(t){try{return g3(y3(t))!==void 0}catch{return!1}},b3=De,w3=s1;b3({target:"Symbol",stat:!0},{isRegisteredSymbol:w3});for(var S3=Er,l1=nn,x3=Ve,E3=_o,k3=Xe,Ya=l1("Symbol"),c1=Ya.isWellKnownSymbol,u1=l1("Object","getOwnPropertyNames"),C3=x3(Ya.prototype.valueOf),f1=S3("wks"),lf=0,d1=u1(Ya),A3=d1.length;lf<A3;lf++)try{var p1=d1[lf];E3(Ya[p1])&&k3(p1)}catch{}var h1=function(t){if(c1&&c1(t))return!0;try{for(var n=C3(t),r=0,o=u1(f1),i=o.length;r<i;r++)if(f1[o[r]]==n)return!0}catch{}return!1},$3=De,T3=h1;$3({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:T3});var I3=Be;I3("customMatcher");var O3=Be;O3("observable");var P3=De,D3=s1;P3({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:D3});var _3=De,M3=h1;_3({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:M3});var N3=Be;N3("matcher");var R3=Be;R3("metadataKey");var L3=Be;L3("patternMatch");var F3=Be;F3("replaceAll");var B3=h3,j3=B3,z3=j3;const Mr=be(z3);var cf=Ve,U3=Aa,W3=Bo,H3=wa,V3=cf("".charAt),v1=cf("".charCodeAt),K3=cf("".slice),m1=function(e){return function(t,n){var r=W3(H3(t)),o=U3(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=v1(r,o),a<55296||a>56319||o+1===i||(s=v1(r,o+1))<56320||s>57343?e?V3(r,o):a:e?K3(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},q3={codeAt:m1(!1),charAt:m1(!0)},G3=q3.charAt,Y3=Bo,g1=Bu,Q3=Xw,y1=e1,b1="String Iterator",J3=g1.set,Z3=g1.getterFor(b1);Q3(String,"String",function(e){J3(this,{type:b1,string:Y3(e),index:0})},function(){var t=Z3(this),n=t.string,r=t.index,o;return r>=n.length?y1(void 0,!0):(o=G3(n,r),t.index+=o.length,y1(o,!1))});var X3=Lo,w1=lu,ez=nu,tz=_r,nz=Xe,rz=nz("iterator"),uf=function(e){if(!ez(e))return w1(e,rz)||w1(e,"@@iterator")||tz[X3(e)]},oz=uf,iz=oz,az=iz,sz=az,lz=sz,cz=lz,uz=cz,fz=uz,dz=fz;const S1=be(dz);var pz=bt,hz=$r,vz=TypeError,mz=Object.getOwnPropertyDescriptor,gz=pz&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),x1=gz?function(e,t){if(hz(e)&&!mz(e,"length").writable)throw new vz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},yz=De,bz=vn,wz=Yn,Sz=x1,xz=xu,Ez=Je,kz=Ez(function(){return[].push.call({length:4294967296},1)!==4294967297}),Cz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Az=kz||!Cz();yz({target:"Array",proto:!0,arity:1,forced:Az},{push:function(t){var n=bz(this),r=wz(n),o=arguments.length;xz(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return Sz(n,r),r}});var $z=Qe,Tz=it,Zn=function(e,t){var n=Tz[e+"Prototype"],r=n&&n[t];if(r)return r;var o=$z[e],i=o&&o.prototype;return i&&i[t]},Iz=Zn,Oz=Iz("Array","push"),Pz=hn,Dz=Oz,ff=Array.prototype,_z=function(e){var t=e.push;return e===ff||Pz(ff,e)&&t===ff.push?Dz:t},Mz=_z,Nz=Mz,Rz=Nz,Lz=Rz,Fz=Lz,Bz=Fz,jz=Bz;const zz=be(jz);function Uz(e,t){var n=e==null?null:typeof Mr<"u"&&S1(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(zz(s).call(s,r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}var Wz=De,E1=$r,Hz=Au,Vz=zt,k1=Tu,Kz=Yn,qz=tn,Gz=Ro,Yz=Xe,Qz=Ta,Jz=Na,Zz=Qz("slice"),Xz=Yz("species"),df=Array,e5=Math.max;Wz({target:"Array",proto:!0,forced:!Zz},{slice:function(t,n){var r=qz(this),o=Kz(r),i=k1(t,o),a=k1(n===void 0?o:n,o),s,l,c;if(E1(r)&&(s=r.constructor,Hz(s)&&(s===df||E1(s.prototype))?s=void 0:Vz(s)&&(s=s[Xz],s===null&&(s=void 0)),s===df||s===void 0))return Jz(r,i,a);for(l=new(s===void 0?df:s)(e5(a-i,0)),c=0;i<a;i++,c++)i in r&&Gz(l,c,r[i]);return l.length=c,l}});var t5=Zn,n5=t5("Array","slice"),r5=hn,o5=n5,pf=Array.prototype,i5=function(e){var t=e.slice;return e===pf||r5(pf,e)&&t===pf.slice?o5:t},a5=i5,s5=a5,l5=s5,c5=l5,u5=c5,f5=u5,d5=f5;const p5=be(d5);var h5=en,C1=On,v5=lu,m5=function(e,t,n){var r,o;C1(e);try{if(r=v5(e,"return"),!r){if(t==="throw")throw n;return n}r=h5(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return C1(r),n},g5=On,y5=m5,b5=function(e,t,n,r){try{return r?t(g5(n)[0],n[1]):t(n)}catch(o){y5(e,"throw",o)}},w5=Xe,S5=_r,x5=w5("iterator"),E5=Array.prototype,k5=function(e){return e!==void 0&&(S5.Array===e||E5[x5]===e)},C5=en,A5=Ea,$5=On,T5=xa,I5=uf,O5=TypeError,P5=function(e,t){var n=arguments.length<2?I5(e):t;if(A5(n))return $5(C5(n,e));throw new O5(T5(e)+" is not iterable")},D5=gu,_5=en,M5=vn,N5=b5,R5=k5,L5=Au,F5=Yn,A1=Ro,B5=P5,j5=uf,$1=Array,z5=function(t){var n=M5(t),r=L5(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=D5(i,o>2?arguments[2]:void 0));var s=j5(n),l=0,c,u,f,p,d,v;if(s&&!(this===$1&&R5(s)))for(u=r?new this:[],p=B5(n,s),d=p.next;!(f=_5(d,p)).done;l++)v=a?N5(p,i,[f.value,l],!0):f.value,A1(u,l,v);else for(c=F5(n),u=r?new this(c):$1(c);c>l;l++)v=a?i(n[l],l):n[l],A1(u,l,v);return u.length=l,u},U5=Xe,T1=U5("iterator"),I1=!1;try{var W5=0,O1={next:function(){return{done:!!W5++}},return:function(){I1=!0}};O1[T1]=function(){return this},Array.from(O1,function(){throw 2})}catch{}var H5=function(e,t){try{if(!t&&!I1)return!1}catch{return!1}var n=!1;try{var r={};r[T1]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},V5=De,K5=z5,q5=H5,G5=!q5(function(e){Array.from(e)});V5({target:"Array",stat:!0,forced:G5},{from:K5});var Y5=it,Q5=Y5.Array.from,J5=Q5,Z5=J5,X5=Z5,eU=X5,tU=eU,nU=tU,rU=nU;const P1=be(rU);function hf(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 D1(e,t){if(e){var n;if(typeof e=="string")return hf(e,t);var r=p5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?P1(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hf(e,t):void 0}}function oU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ay(e,t){if(e){if(typeof e=="string")return Nc(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 Nc(e,t)}}function Nc(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 $N(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function TN(e){if(Array.isArray(e))return e}function $y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fe(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){Rc(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 Rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(e,t){if(e==null)return{};var n=IN(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Lc=I.forwardRef(function(e,t){var n=e.children,r=ha(e,yN),o=Iy(r),i=o.open,a=ha(o,bN);return I.useImperativeHandle(t,function(){return{open:i}},[i]),I.createElement(I.Fragment,null,n(Fe(Fe({},a),{},{open:i})))});Lc.displayName="Dropzone";var Ty={disabled:!1,getFilesFromEvent:zM,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};Lc.defaultProps=Ty,Lc.propTypes={children:Me.func,accept:Me.objectOf(Me.arrayOf(Me.string)),multiple:Me.bool,preventDropOnDocument:Me.bool,noClick:Me.bool,noKeyboard:Me.bool,noDrag:Me.bool,noDragEventsBubbling:Me.bool,minSize:Me.number,maxSize:Me.number,maxFiles:Me.number,disabled:Me.bool,getFilesFromEvent:Me.func,onFileDialogCancel:Me.func,onFileDialogOpen:Me.func,useFsAccessApi:Me.bool,autoFocus:Me.bool,onDragEnter:Me.func,onDragLeave:Me.func,onDragOver:Me.func,onDrop:Me.func,onDropAccepted:Me.func,onDropRejected:Me.func,onError:Me.func,validator:Me.func};var Fc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Iy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Fe(Fe({},Ty),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,m=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,A=t.noClick,x=t.noKeyboard,k=t.noDrag,$=t.noDragEventsBubbling,R=t.onError,H=t.validator,T=I.useMemo(function(){return vN(n)},[n]),_=I.useMemo(function(){return hN(n)},[n]),F=I.useMemo(function(){return typeof g=="function"?g:Oy},[g]),N=I.useMemo(function(){return typeof h=="function"?h:Oy},[h]),B=I.useRef(null),D=I.useRef(null),M=I.useReducer(ON,Fc),G=Mc(M,2),U=G[0],O=G[1],y=U.isFocused,P=U.isFileDialogActive,j=I.useRef(typeof window<"u"&&window.isSecureContext&&m&&pN()),S=function(){!j.current&&P&&setTimeout(function(){if(D.current){var ce=D.current.files;ce.length||(O({type:"closeDialog"}),N())}},300)};I.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[D,P,N,j]);var V=I.useRef([]),Y=function(ce){B.current&&B.current.contains(ce.target)||(ce.preventDefault(),V.current=[])};I.useEffect(function(){return w&&(document.addEventListener("dragover",Ey,!1),document.addEventListener("drop",Y,!1)),function(){w&&(document.removeEventListener("dragover",Ey),document.removeEventListener("drop",Y))}},[B,w]),I.useEffect(function(){return!r&&b&&B.current&&B.current.focus(),function(){}},[B,b,r]);var q=I.useCallback(function(ie){R?R(ie):console.error(ie)},[R]),Q=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie),V.current=[].concat(xN(V.current),[ie.target]),pa(ie)&&Promise.resolve(o(ie)).then(function(ce){if(!(da(ie)&&!$)){var W=ce.length,z=W>0&&cN({files:ce,accept:T,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:H}),te=W>0&&!z;O({isDragAccept:z,isDragReject:te,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ie)}}).catch(function(ce){return q(ce)})},[o,c,q,$,T,a,i,s,l,H]),X=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie);var ce=pa(ie);if(ce&&ie.dataTransfer)try{ie.dataTransfer.dropEffect="copy"}catch{}return ce&&f&&f(ie),!1},[f,$]),ee=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie);var ce=V.current.filter(function(z){return B.current&&B.current.contains(z)}),W=ce.indexOf(ie.target);W!==-1&&ce.splice(W,1),V.current=ce,!(ce.length>0)&&(O({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),pa(ie)&&u&&u(ie))},[B,u,$]),J=I.useCallback(function(ie,ce){var W=[],z=[];ie.forEach(function(te){var se=Sy(te,T),ue=Mc(se,2),he=ue[0],We=ue[1],He=xy(te,a,i),gt=Mc(He,2),tt=gt[0],Oe=gt[1],nt=H?H(te):null;if(he&&tt&&!nt)W.push(te);else{var Ge=[We,Oe];nt&&(Ge=Ge.concat(nt)),z.push({file:te,errors:Ge.filter(function(Bn){return Bn})})}}),(!s&&W.length>1||s&&l>=1&&W.length>l)&&(W.forEach(function(te){z.push({file:te,errors:[lN]})}),W.splice(0)),O({acceptedFiles:W,fileRejections:z,type:"setFiles"}),p&&p(W,z,ce),z.length>0&&v&&v(z,ce),W.length>0&&d&&d(W,ce)},[O,s,T,a,i,l,p,d,v,H]),Z=I.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie),V.current=[],pa(ie)&&Promise.resolve(o(ie)).then(function(ce){da(ie)&&!$||J(ce,ie)}).catch(function(ce){return q(ce)}),O({type:"reset"})},[o,J,q,$]),K=I.useCallback(function(){if(j.current){O({type:"openDialog"}),F();var ie={multiple:s,types:_};window.showOpenFilePicker(ie).then(function(ce){return o(ce)}).then(function(ce){J(ce,null),O({type:"closeDialog"})}).catch(function(ce){mN(ce)?(N(ce),O({type:"closeDialog"})):gN(ce)?(j.current=!1,D.current?(D.current.value=null,D.current.click()):q(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."))):q(ce)});return}D.current&&(O({type:"openDialog"}),F(),D.current.value=null,D.current.click())},[O,F,N,m,J,q,_,s]),L=I.useCallback(function(ie){!B.current||!B.current.isEqualNode(ie.target)||(ie.key===" "||ie.key==="Enter"||ie.keyCode===32||ie.keyCode===13)&&(ie.preventDefault(),K())},[B,K]),oe=I.useCallback(function(){O({type:"focus"})},[]),ae=I.useCallback(function(){O({type:"blur"})},[]),ne=I.useCallback(function(){A||(dN()?setTimeout(K,0):K())},[A,K]),de=function(ce){return r?null:ce},me=function(ce){return x?null:de(ce)},De=function(ce){return k?null:de(ce)},Ue=function(ce){$&&ce.stopPropagation()},dt=I.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=ie.refKey,W=ce===void 0?"ref":ce,z=ie.role,te=ie.onKeyDown,se=ie.onFocus,ue=ie.onBlur,he=ie.onClick,We=ie.onDragEnter,He=ie.onDragOver,gt=ie.onDragLeave,tt=ie.onDrop,Oe=ha(ie,wN);return Fe(Fe(Rc({onKeyDown:me(Xt(te,L)),onFocus:me(Xt(se,oe)),onBlur:me(Xt(ue,ae)),onClick:de(Xt(he,ne)),onDragEnter:De(Xt(We,Q)),onDragOver:De(Xt(He,X)),onDragLeave:De(Xt(gt,ee)),onDrop:De(Xt(tt,Z)),role:typeof z=="string"&&z!==""?z:"presentation"},W,B),!r&&!x?{tabIndex:0}:{}),Oe)}},[B,L,oe,ae,ne,Q,X,ee,Z,x,k,r]),mt=I.useCallback(function(ie){ie.stopPropagation()},[]),pt=I.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=ie.refKey,W=ce===void 0?"ref":ce,z=ie.onChange,te=ie.onClick,se=ha(ie,SN),ue=Rc({accept:T,multiple:s,type:"file",style:{display:"none"},onChange:de(Xt(z,Z)),onClick:de(Xt(te,mt)),tabIndex:-1},W,D);return Fe(Fe({},ue),se)}},[D,n,s,Z,r]);return Fe(Fe({},U),{},{isFocused:y&&!r,getRootProps:dt,getInputProps:pt,rootRef:B,inputRef:D,open:de(K)})}function ON(e,t){switch(t.type){case"focus":return Fe(Fe({},e),{},{isFocused:!0});case"blur":return Fe(Fe({},e),{},{isFocused:!1});case"openDialog":return Fe(Fe({},Fc),{},{isFileDialogActive:!0});case"closeDialog":return Fe(Fe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Fe(Fe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Fe(Fe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Fe({},Fc);default:return e}}function Oy(){}const Py=({children:e})=>{const t=I.useRef(),[n,r]=I.useState({open:!1}),o=({title:a,description:s,confirmButtonText:l,cancelButtonText:c,onConfirm:u,onCancel:f,initialValue:p,Content:d})=>new Promise((v,h)=>{t.current=p,r({open:!0,title:a,description:s,confirmButtonText:l,cancelButtonText:c,content:d?E.jsx(d,{value:p,setValue:g=>{t.current=g}}):null,onConfirm:()=>{u==null||u(),v(t.current),i()},onCancel:()=>{f==null||f(),h(),i()}})}),i=()=>{r(a=>({...a,open:!1}))};return E.jsxs(Kl.Provider,{value:{showInputModal:o},children:[E.jsx(Yr,{open:n.open,onOpenChange:a=>r(s=>({...s,open:a})),children:E.jsx(Yr.Content,{title:n.title,description:n.description,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText,onConfirm:n.onConfirm,onCancel:n.onCancel,children:n.content})}),e]})},PN=(e,t)=>{const n=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim())return;const o=t.filter(l=>/^\d+$/.test(l)).join(";"),i=`https://fonts.googleapis.com/css2?family=${n}:wght@${o}&display=swap`;if(document.querySelector(`link[href="${i}"]`))return;const s=document.createElement("link");s.rel="stylesheet",s.href=i,document.head.appendChild(s)},Dy=({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i,additionalStylesheetUrl:a})=>{I.useMemo(()=>{t&&PN(t,["100","200","300","400","500","600","700","800"])},[t]);const s=I.useMemo(()=>Cp({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i}),[e,t,n,r,o,i]);return E.jsxs(E.Fragment,{children:[a&&E.jsx("link",{rel:"stylesheet",href:a}),E.jsx("style",{children:s})]})},Bc=({children:e,className:t,uploadFile:n,allowFileUpload:r,storageKey:o,...i})=>{const{container:a}=ve,s=Li(h=>h.setMessageContainerRef),c=km(o)(h=>h.uploadFile),[u,f]=I.useState(0),p=I.useRef(null);I.useEffect(()=>{s(p)},[p,s]);const d=I.useCallback(h=>{n&&(h.forEach(g=>c(g,n)),f(0))},[c,n]),{getRootProps:v}=Iy({noClick:!0,noKeyboard:!0,onDrop:d,disabled:!(r&&n),onDragEnter:()=>f(h=>h+1),onDragLeave:()=>f(h=>h-1)});return E.jsxs("div",{...i,className:Ao(a.className,t),...v(),ref:p,children:[E.jsxs("div",{"data-hover":u>0,...a.dropzone.overlay,children:["Drop files to upload",E.jsx(VO,{style:{width:"50px"}})]}),E.jsx(Py,{children:e})]})};Bc.displayName="Container";const _y=I.forwardRef(({children:e,onClick:t,imgUrl:n,...r},o)=>{const{fab:i}=ve,{container:a,icon:s,image:l}=i??{};return n?E.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):E.jsx("div",{...r,...a,ref:o,onClick:t,children:E.jsx("div",{...s})})});_y.displayName="Fab";function pn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function DN(e,t){const n=C.createContext(t),r=i=>{const{children:a,...s}=i,l=C.useMemo(()=>s,Object.values(s));return E.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=C.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function My(e,t=[]){let n=[];function r(i,a){const s=C.createContext(a),l=n.length;n=[...n,a];const c=f=>{var m;const{scope:p,children:d,...v}=f,h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,g=C.useMemo(()=>v,Object.values(v));return E.jsx(h.Provider,{value:g,children:d})};c.displayName=i+"Provider";function u(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,_N(o,...t)]}function _N(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ny({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=MN({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=bn(n),l=C.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else o(c)},[i,e,o,s]);return[a,l]}function MN({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),i=bn(t);return C.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Ry(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jc(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ry(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ry(e[o],null)}}}}function In(...e){return C.useCallback(jc(...e),e)}var Ly=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(RN);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(zc,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(zc,{...r,ref:t,children:n})});Ly.displayName="Slot";var zc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=FN(n);return C.cloneElement(n,{...LN(r,n.props),ref:t?jc(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});zc.displayName="SlotClone";var NN=({children:e})=>E.jsx(E.Fragment,{children:e});function RN(e){return C.isValidElement(e)&&e.type===NN}function LN(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function FN(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Uc=BN.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ly:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jN(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var va=e=>{const{present:t,children:n}=e,r=zN(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),i=In(r.ref,UN(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:i}):null};va.displayName="Presence";function zN(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),i=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=jN(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=ma(r.current);i.current=s==="mounted"?c:"none"},[s]),ir(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,d=ma(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ir(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=d=>{const h=ma(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(i.current=ma(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ma(e){return(e==null?void 0:e.animationName)||"none"}function UN(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var WN=C.useId||(()=>{}),HN=0;function ga(e){const[t,n]=C.useState(WN());return ir(()=>{e||n(r=>r??String(HN++))},[e]),e||(t?`radix-${t}`:"")}var Wc="Collapsible",[VN,mJ]=My(Wc),[KN,Hc]=VN(Wc),Fy=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,c]=Ny({prop:r,defaultProp:o,onChange:a});return E.jsx(KN,{scope:n,disabled:i,contentId:ga(),open:l,onOpenToggle:C.useCallback(()=>c(u=>!u),[c]),children:E.jsx(Uc.div,{"data-state":Kc(l),"data-disabled":i?"":void 0,...s,ref:t})})});Fy.displayName=Wc;var By="CollapsibleTrigger",jy=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Hc(By,n);return E.jsx(Uc.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Kc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:pn(e.onClick,o.onOpenToggle)})});jy.displayName=By;var Vc="CollapsibleContent",zy=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Hc(Vc,e.__scopeCollapsible);return E.jsx(va,{present:n||o.open,children:({present:i})=>E.jsx(qN,{...r,ref:t,present:i})})});zy.displayName=Vc;var qN=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Hc(Vc,n),[s,l]=C.useState(r),c=C.useRef(null),u=In(t,c),f=C.useRef(0),p=f.current,d=C.useRef(0),v=d.current,h=a.open||s,g=C.useRef(h),m=C.useRef(void 0);return C.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),ir(()=>{const b=c.current;if(b){m.current=m.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,g.current||(b.style.transitionDuration=m.current.transitionDuration,b.style.animationName=m.current.animationName),l(r)}},[a.open,r]),E.jsx(Uc.div,{"data-state":Kc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...i,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function Kc(e){return e?"open":"closed"}var GN=Fy,YN=zy;const qc=({restartConversation:e,...t})=>{var i,a;const{header:n}=ve,{showInputModal:r}=ql(),o=async s=>{s.stopPropagation(),r?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButtonText:"New conversation",cancelButtonText:"Cancel"}).then(()=>e()):e()};return E.jsx(oP,{...t,...(a=(i=n==null?void 0:n.content)==null?void 0:i.actions)==null?void 0:a.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},Uy=({onClick:e,...t})=>{const{header:n}=ve,r=o=>{o.stopPropagation(),e==null||e()};return E.jsx(nm,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},Io=({icon:e,title:t,link:n,...r})=>{var a,s,l,c,u,f,p,d,v,h,g,m;const{header:o}=ve,i=e??KO;return t?n?E.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[E.jsx(i,{...(c=(l=o.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),E.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):E.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[E.jsx(i,{...(h=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),E.jsx("p",{...(m=(g=o.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},QN=({soundOn:e,toggleSound:t})=>{const n=i=>{i.stopPropagation(),t==null||t()},{header:r}=ve,o=e?tm:cP;return E.jsx("button",{type:"button",onClick:n,title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:E.jsx(o,{size:16})})},Wy=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:o,soundOn:i,toggleSound:a,...s})=>{var d,v,h,g,m,b,w,A,x,k,$,R,H,T,_,F,N,B,D,M,G,U;const{header:l}=ve,[c,u]=I.useState(e),f=!!((d=n.email)!=null&&d.title)||!!((v=n.phone)!=null&&v.title)||!!((h=n.website)!=null&&h.title)||!!((g=n.termsOfService)!=null&&g.link)||!!((m=n.privacyPolicy)!=null&&m.link),p=f&&!o;return E.jsxs(GN,{open:p?c:!1,onOpenChange:u,"data-disabled":p?void 0:"",...l.container,...s,children:[E.jsxs(jy,{"aria-label":"Expand Header Button",...l.content.container,children:[E.jsx(to,{...s,src:n.botAvatar,...l.content.avatar,children:n.botName||"Bot"}),E.jsx("h2",{...l.content.title,children:n.botName||"Bot"}),n.botDescription&&E.jsx("p",{...l.content.description,children:n.botDescription}),E.jsxs("div",{...l.content.actions.container,children:[n.soundEnabled&&i!==void 0&&a&&E.jsx(QN,{soundOn:i,toggleSound:a})," ",r&&E.jsx(qc,{restartConversation:r}),t&&E.jsx(Uy,{onClick:t})]})]}),f&&E.jsxs(YN,{...l.expandedContent.container,children:[E.jsxs("div",{"data-links":"",...l.expandedContent.group,children:[E.jsx(Io,{"data-email":"",icon:ZO,title:(b=n.email)==null?void 0:b.title,link:(A=(w=n.email)==null?void 0:w.link)!=null&&A.startsWith("mailto:")?(x=n.email)==null?void 0:x.link:`mailto:${(k=n.email)==null?void 0:k.link}`}),E.jsx(Io,{"data-phone":"",icon:nP,title:($=n.phone)==null?void 0:$.title,link:(H=(R=n.phone)==null?void 0:R.link)!=null&&H.startsWith("tel:")?(T=n.phone)==null?void 0:T.link:`tel:${(_=n.phone)==null?void 0:_.link}`}),E.jsx(Io,{"data-website":"",link:(F=n.website)==null?void 0:F.link,icon:YO,title:(N=n.website)==null?void 0:N.title})]}),E.jsxs("div",{"data-legal":"",...(B=l.expandedContent)==null?void 0:B.group,children:[E.jsx(Io,{"data-terms":"",link:(D=n.termsOfService)==null?void 0:D.link,icon:Xv,title:(M=n.termsOfService)==null?void 0:M.title}),E.jsx(Io,{"data-privacy":"",link:(G=n.privacyPolicy)==null?void 0:G.link,icon:JO,title:(U=n.privacyPolicy)==null?void 0:U.title})]})]})]})},Gc=I.memo(({...e})=>{const{typingIndicator:t}=ve;return E.jsx("div",{...e,...t==null?void 0:t.container,children:E.jsx("div",{...t==null?void 0:t.loader})})});Gc.displayName="TypingIndicator";const Yc=I.memo(I.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:o,id:i,authorId:a,status:s,renderers:l,isReadOnly:c,isLastDeliveredMessage:u,feedback:f,timestamp:p,metadata:d,sendMessage:v,addMessageFeedback:h,showAvatar:g},m)=>{const[b,w]=I.useState([]),{message:{container:A,deliveryStatus:x}}=ve;return g=g??e==="incoming",E.jsx(Vl.Provider,{value:{isLoading:b,setIsLoading:w},children:E.jsxs("div",{...A,className:Ao(A==null?void 0:A.className,u&&(x==null?void 0:x.className)),"data-loaded":b.length===0,"data-disable-input":!!n,"data-direction":e,dir:"auto",ref:m,children:[e==="incoming"&&g&&E.jsx(Hy,{authorId:a,sender:o}),t&&E.jsx(Kn,{block:{...t,isReadOnly:c,direction:e,timestamp:p,sender:o,feedback:f,messageId:i,status:s,metadata:d,sendMessage:v,addMessageFeedback:h},renderers:l}),e==="outgoing"&&g&&E.jsx(Hy,{authorId:a,sender:o}),r]})})})),Hy=({authorId:e,sender:t})=>{const{message:{avatar:n}}=ve,[r,o]=I.useState("idle"),i=cp(e??"",15);return E.jsxs(Bs,{"data-color":i,"data-loading-status":r,...n==null?void 0:n.container,children:[E.jsx(js,{...n==null?void 0:n.image,onLoadingStatusChange:o,src:t==null?void 0:t.avatar}),E.jsxs(zs,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};function JN({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ve;return E.jsxs("li",{...r.container,children:[E.jsx(to,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),E.jsxs("div",{...r.content,children:[E.jsx("h1",{...r.title,children:n||"Bot"}),E.jsx("p",{...r.description,children:t})]})]})}function ZN(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function XN(){ZN("react-scroll-to-bottom:version","4.2.0")}var Oo=function(e){return e&&e.Math===Math&&e},Qe=Oo(typeof globalThis=="object"&&globalThis)||Oo(typeof window=="object"&&window)||Oo(typeof self=="object"&&self)||Oo(typeof Rt=="object"&&Rt)||Oo(typeof Rt=="object"&&Rt)||function(){return this}()||Function("return this")(),Je=function(e){try{return!!e()}catch{return!0}},e2=Je,ya=!e2(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),t2=ya,Vy=Function.prototype,Ky=Vy.apply,qy=Vy.call,Qc=typeof Reflect=="object"&&Reflect.apply||(t2?qy.bind(Ky):function(){return qy.apply(Ky,arguments)}),Gy=ya,Yy=Function.prototype,Jc=Yy.call,n2=Gy&&Yy.bind.bind(Jc,Jc),Ke=Gy?n2:function(e){return function(){return Jc.apply(e,arguments)}},Qy=Ke,r2=Qy({}.toString),o2=Qy("".slice),Gn=function(e){return o2(r2(e),8,-1)},i2=Gn,a2=Ke,Zc=function(e){if(i2(e)==="Function")return a2(e)},Xc=typeof document=="object"&&document.all,ut=typeof Xc>"u"&&Xc!==void 0?function(e){return typeof e=="function"||e===Xc}:function(e){return typeof e=="function"},Po={},s2=Je,wt=!s2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),l2=ya,ba=Function.prototype.call,en=l2?ba.bind(ba):function(){return ba.apply(ba,arguments)},eu={},Jy={}.propertyIsEnumerable,Zy=Object.getOwnPropertyDescriptor,c2=Zy&&!Jy.call({1:2},1);eu.f=c2?function(t){var n=Zy(this,t);return!!n&&n.enumerable}:Jy;var Do=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},u2=Ke,f2=Je,d2=Gn,tu=Object,p2=u2("".split),Xy=f2(function(){return!tu("z").propertyIsEnumerable(0)})?function(e){return d2(e)==="String"?p2(e,""):tu(e)}:tu,nu=function(e){return e==null},h2=nu,v2=TypeError,wa=function(e){if(h2(e))throw new v2("Can't call method on "+e);return e},m2=Xy,g2=wa,tn=function(e){return m2(g2(e))},y2=ut,zt=function(e){return typeof e=="object"?e!==null:y2(e)},it={},ru=it,ou=Qe,b2=ut,eb=function(e){return b2(e)?e:void 0},nn=function(e,t){return arguments.length<2?eb(ru[e])||eb(ou[e]):ru[e]&&ru[e][t]||ou[e]&&ou[e][t]},w2=Ke,hn=w2({}.isPrototypeOf),S2=Qe,tb=S2.navigator,nb=tb&&tb.userAgent,iu=nb?String(nb):"",rb=Qe,au=iu,ob=rb.process,ib=rb.Deno,ab=ob&&ob.versions||ib&&ib.version,sb=ab&&ab.v8,Ut,Sa;sb&&(Ut=sb.split("."),Sa=Ut[0]>0&&Ut[0]<4?1:+(Ut[0]+Ut[1])),!Sa&&au&&(Ut=au.match(/Edge\/(\d+)/),(!Ut||Ut[1]>=74)&&(Ut=au.match(/Chrome\/(\d+)/),Ut&&(Sa=+Ut[1])));var su=Sa,lb=su,x2=Je,E2=Qe,k2=E2.String,xr=!!Object.getOwnPropertySymbols&&!x2(function(){var e=Symbol("symbol detection");return!k2(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&lb&&lb<41}),C2=xr,cb=C2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",A2=nn,$2=ut,T2=hn,I2=cb,O2=Object,_o=I2?function(e){return typeof e=="symbol"}:function(e){var t=A2("Symbol");return $2(t)&&T2(t.prototype,O2(e))},P2=String,xa=function(e){try{return P2(e)}catch{return"Object"}},D2=ut,_2=xa,M2=TypeError,Ea=function(e){if(D2(e))return e;throw new M2(_2(e)+" is not a function")},N2=Ea,R2=nu,lu=function(e,t){var n=e[t];return R2(n)?void 0:N2(n)},cu=en,uu=ut,fu=zt,L2=TypeError,F2=function(e,t){var n,r;if(t==="string"&&uu(n=e.toString)&&!fu(r=cu(n,e))||uu(n=e.valueOf)&&!fu(r=cu(n,e))||t!=="string"&&uu(n=e.toString)&&!fu(r=cu(n,e)))return r;throw new L2("Can't convert object to primitive value")},ub={exports:{}},fb=Qe,B2=Object.defineProperty,j2=function(e,t){try{B2(fb,e,{value:t,configurable:!0,writable:!0})}catch{fb[e]=t}return t},z2=Qe,U2=j2,db="__core-js_shared__",pb=ub.exports=z2[db]||U2(db,{});(pb.versions||(pb.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 du=ub.exports,hb=du,Er=function(e,t){return hb[e]||(hb[e]=t||{})},W2=wa,H2=Object,vn=function(e){return H2(W2(e))},V2=Ke,K2=vn,q2=V2({}.hasOwnProperty),$t=Object.hasOwn||function(t,n){return q2(K2(t),n)},G2=Ke,Y2=0,Q2=Math.random(),J2=G2(1 .toString),pu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+J2(++Y2+Q2,36)},Z2=Qe,X2=Er,vb=$t,eR=pu,tR=xr,nR=cb,kr=Z2.Symbol,hu=X2("wks"),rR=nR?kr.for||kr:kr&&kr.withoutSetter||eR,Xe=function(e){return vb(hu,e)||(hu[e]=tR&&vb(kr,e)?kr[e]:rR("Symbol."+e)),hu[e]},oR=en,mb=zt,gb=_o,iR=lu,aR=F2,sR=Xe,lR=TypeError,cR=sR("toPrimitive"),uR=function(e,t){if(!mb(e)||gb(e))return e;var n=iR(e,cR),r;if(n){if(t===void 0&&(t="default"),r=oR(n,e,t),!mb(r)||gb(r))return r;throw new lR("Can't convert object to primitive value")}return t===void 0&&(t="number"),aR(e,t)},fR=uR,dR=_o,vu=function(e){var t=fR(e,"string");return dR(t)?t:t+""},pR=Qe,yb=zt,mu=pR.document,hR=yb(mu)&&yb(mu.createElement),bb=function(e){return hR?mu.createElement(e):{}},vR=wt,mR=Je,gR=bb,wb=!vR&&!mR(function(){return Object.defineProperty(gR("div"),"a",{get:function(){return 7}}).a!==7}),yR=wt,bR=en,wR=eu,SR=Do,xR=tn,ER=vu,kR=$t,CR=wb,Sb=Object.getOwnPropertyDescriptor;Po.f=yR?Sb:function(t,n){if(t=xR(t),n=ER(n),CR)try{return Sb(t,n)}catch{}if(kR(t,n))return SR(!bR(wR.f,t,n),t[n])};var AR=Je,$R=ut,TR=/#|\.prototype\./,Mo=function(e,t){var n=OR[IR(e)];return n===DR?!0:n===PR?!1:$R(t)?AR(t):!!t},IR=Mo.normalize=function(e){return String(e).replace(TR,".").toLowerCase()},OR=Mo.data={},PR=Mo.NATIVE="N",DR=Mo.POLYFILL="P",_R=Mo,xb=Zc,MR=Ea,NR=ya,RR=xb(xb.bind),gu=function(e,t){return MR(e),t===void 0?e:NR?RR(e,t):function(){return e.apply(t,arguments)}},Wt={},LR=wt,FR=Je,Eb=LR&&FR(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),BR=zt,jR=String,zR=TypeError,On=function(e){if(BR(e))return e;throw new zR(jR(e)+" is not an object")},UR=wt,WR=wb,HR=Eb,ka=On,kb=vu,VR=TypeError,yu=Object.defineProperty,KR=Object.getOwnPropertyDescriptor,bu="enumerable",wu="configurable",Su="writable";Wt.f=UR?HR?function(t,n,r){if(ka(t),n=kb(n),ka(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Su in r&&!r[Su]){var o=KR(t,n);o&&o[Su]&&(t[n]=r.value,r={configurable:wu in r?r[wu]:o[wu],enumerable:bu in r?r[bu]:o[bu],writable:!1})}return yu(t,n,r)}:yu:function(t,n,r){if(ka(t),n=kb(n),ka(r),WR)try{return yu(t,n,r)}catch{}if("get"in r||"set"in r)throw new VR("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var qR=wt,GR=Wt,YR=Do,Ca=qR?function(e,t,n){return GR.f(e,t,YR(1,n))}:function(e,t,n){return e[t]=n,e},No=Qe,QR=Qc,JR=Zc,ZR=ut,XR=Po.f,eL=_R,Cr=it,tL=gu,Ar=Ca,Cb=$t,nL=function(e){var t=function(n,r,o){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,o)}return QR(e,this,arguments)};return t.prototype=e.prototype,t},Pe=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?No:o?No[n]:No[n]&&No[n].prototype,s=r?Cr:Cr[n]||Ar(Cr,n,{})[n],l=s.prototype,c,u,f,p,d,v,h,g,m;for(p in t)c=eL(r?p:n+(o?".":"#")+p,e.forced),u=!c&&a&&Cb(a,p),v=s[p],u&&(e.dontCallGetSet?(m=XR(a,p),h=m&&m.value):h=a[p]),d=u&&h?h:t[p],!(!c&&!i&&typeof v==typeof d)&&(e.bind&&u?g=tL(d,No):e.wrap&&u?g=nL(d):i&&ZR(d)?g=JR(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&Ar(g,"sham",!0),Ar(s,p,g),i&&(f=n+"Prototype",Cb(Cr,f)||Ar(Cr,f,{}),Ar(Cr[f],p,d),e.real&&l&&(c||!l[p])&&Ar(l,p,d)))},rL=Gn,$r=Array.isArray||function(t){return rL(t)==="Array"},oL=Pe,iL=$r;oL({target:"Array",stat:!0},{isArray:iL});var aL=it,sL=aL.Array.isArray,lL=sL,Ab=lL,cL=Ab,uL=cL,fL=uL,dL=fL,pL=dL;const $b=be(pL);function hL(e){if($b(e))return e}var vL=Math.ceil,mL=Math.floor,gL=Math.trunc||function(t){var n=+t;return(n>0?mL:vL)(n)},yL=gL,Aa=function(e){var t=+e;return t!==t||t===0?0:yL(t)},bL=Aa,wL=Math.min,SL=function(e){var t=bL(e);return t>0?wL(t,9007199254740991):0},xL=SL,Yn=function(e){return xL(e.length)},EL=TypeError,kL=9007199254740991,xu=function(e){if(e>kL)throw EL("Maximum allowed index exceeded");return e},CL=wt,AL=Wt,$L=Do,Ro=function(e,t,n){CL?AL.f(e,t,$L(0,n)):e[t]=n},TL=Xe,IL=TL("toStringTag"),Tb={};Tb[IL]="z";var Eu=String(Tb)==="[object z]",OL=Eu,PL=ut,$a=Gn,DL=Xe,_L=DL("toStringTag"),ML=Object,NL=$a(function(){return arguments}())==="Arguments",RL=function(e,t){try{return e[t]}catch{}},Lo=OL?$a:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=RL(t=ML(e),_L))=="string"?n:NL?$a(t):(r=$a(t))==="Object"&&PL(t.callee)?"Arguments":r},LL=Ke,FL=ut,ku=du,BL=LL(Function.toString);FL(ku.inspectSource)||(ku.inspectSource=function(e){return BL(e)});var jL=ku.inspectSource,zL=Ke,UL=Je,Ib=ut,WL=Lo,HL=nn,VL=jL,Ob=function(){},Pb=HL("Reflect","construct"),Cu=/^\s*(?:class|function)\b/,KL=zL(Cu.exec),qL=!Cu.test(Ob),Fo=function(t){if(!Ib(t))return!1;try{return Pb(Ob,[],t),!0}catch{return!1}},Db=function(t){if(!Ib(t))return!1;switch(WL(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return qL||!!KL(Cu,VL(t))}catch{return!0}};Db.sham=!0;var Au=!Pb||UL(function(){var e;return Fo(Fo.call)||!Fo(Object)||!Fo(function(){e=!0})||e})?Db:Fo,_b=$r,GL=Au,YL=zt,QL=Xe,JL=QL("species"),Mb=Array,ZL=function(e){var t;return _b(e)&&(t=e.constructor,GL(t)&&(t===Mb||_b(t.prototype))?t=void 0:YL(t)&&(t=t[JL],t===null&&(t=void 0))),t===void 0?Mb:t},XL=ZL,$u=function(e,t){return new(XL(e))(t===0?0:t)},eF=Je,tF=Xe,nF=su,rF=tF("species"),Ta=function(e){return nF>=51||!eF(function(){var t=[],n=t.constructor={};return n[rF]=function(){return{foo:1}},t[e](Boolean).foo!==1})},oF=Pe,iF=Je,aF=$r,sF=zt,lF=vn,cF=Yn,Nb=xu,Rb=Ro,uF=$u,fF=Ta,dF=Xe,pF=su,Lb=dF("isConcatSpreadable"),hF=pF>=51||!iF(function(){var e=[];return e[Lb]=!1,e.concat()[0]!==e}),vF=function(e){if(!sF(e))return!1;var t=e[Lb];return t!==void 0?!!t:aF(e)},mF=!hF||!fF("concat");oF({target:"Array",proto:!0,arity:1,forced:mF},{concat:function(t){var n=lF(this),r=uF(n,0),o=0,i,a,s,l,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?n:arguments[i],vF(c))for(l=cF(c),Nb(o+l),a=0;a<l;a++,o++)a in c&&Rb(r,o,c[a]);else Nb(o+1),Rb(r,o++,c);return r.length=o,r}});var gF=Lo,yF=String,Bo=function(e){if(gF(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return yF(e)},Ia={},bF=Aa,wF=Math.max,SF=Math.min,Tu=function(e,t){var n=bF(e);return n<0?wF(n+t,0):SF(n,t)},xF=tn,EF=Tu,kF=Yn,Fb=function(e){return function(t,n,r){var o=xF(t),i=kF(o);if(i===0)return!e&&-1;var a=EF(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},Bb={includes:Fb(!0),indexOf:Fb(!1)},Oa={},CF=Ke,Iu=$t,AF=tn,$F=Bb.indexOf,TF=Oa,jb=CF([].push),zb=function(e,t){var n=AF(e),r=0,o=[],i;for(i in n)!Iu(TF,i)&&Iu(n,i)&&jb(o,i);for(;t.length>r;)Iu(n,i=t[r++])&&(~$F(o,i)||jb(o,i));return o},Ou=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],IF=zb,OF=Ou,Pu=Object.keys||function(t){return IF(t,OF)},PF=wt,DF=Eb,_F=Wt,MF=On,NF=tn,RF=Pu;Ia.f=PF&&!DF?Object.defineProperties:function(t,n){MF(t);for(var r=NF(n),o=RF(n),i=o.length,a=0,s;i>a;)_F.f(t,s=o[a++],r[s]);return t};var LF=nn,FF=LF("document","documentElement"),BF=Er,jF=pu,Ub=BF("keys"),Pa=function(e){return Ub[e]||(Ub[e]=jF(e))},zF=On,UF=Ia,Wb=Ou,WF=Oa,HF=FF,VF=bb,KF=Pa,Hb=">",Vb="<",Du="prototype",_u="script",Kb=KF("IE_PROTO"),Mu=function(){},qb=function(e){return Vb+_u+Hb+e+Vb+"/"+_u+Hb},Gb=function(e){e.write(qb("")),e.close();var t=e.parentWindow.Object;return e=null,t},qF=function(){var e=VF("iframe"),t="java"+_u+":",n;return e.style.display="none",HF.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(qb("document.F=Object")),n.close(),n.F},Da,_a=function(){try{Da=new ActiveXObject("htmlfile")}catch{}_a=typeof document<"u"?document.domain&&Da?Gb(Da):qF():Gb(Da);for(var e=Wb.length;e--;)delete _a[Du][Wb[e]];return _a()};WF[Kb]=!0;var Nu=Object.create||function(t,n){var r;return t!==null?(Mu[Du]=zF(t),r=new Mu,Mu[Du]=null,r[Kb]=t):r=_a(),n===void 0?r:UF.f(r,n)},Ma={},GF=zb,YF=Ou,QF=YF.concat("length","prototype");Ma.f=Object.getOwnPropertyNames||function(t){return GF(t,QF)};var Yb={},JF=Ke,Na=JF([].slice),ZF=Gn,XF=tn,Qb=Ma.f,eB=Na,Jb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tB=function(e){try{return Qb(e)}catch{return eB(Jb)}};Yb.f=function(t){return Jb&&ZF(t)==="Window"?tB(t):Qb(XF(t))};var Ra={};Ra.f=Object.getOwnPropertySymbols;var nB=Ca,La=function(e,t,n,r){return r&&r.enumerable?e[t]=n:nB(e,t,n),e},rB=Wt,oB=function(e,t,n){return rB.f(e,t,n)},jo={},iB=Xe;jo.f=iB;var Zb=it,aB=$t,sB=jo,lB=Wt.f,Be=function(e){var t=Zb.Symbol||(Zb.Symbol={});aB(t,e)||lB(t,e,{value:sB.f(e)})},cB=en,uB=nn,fB=Xe,dB=La,Xb=function(){var e=uB("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=fB("toPrimitive");t&&!t[r]&&dB(t,r,function(o){return cB(n,this)},{arity:1})},pB=Eu,hB=Lo,vB=pB?{}.toString:function(){return"[object "+hB(this)+"]"},mB=Eu,gB=Wt.f,yB=Ca,bB=$t,wB=vB,SB=Xe,ew=SB("toStringTag"),Tr=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(bB(o,ew)||gB(o,ew,{configurable:!0,value:t}),r&&!mB&&yB(o,"toString",wB))},xB=Qe,EB=ut,tw=xB.WeakMap,kB=EB(tw)&&/native code/.test(String(tw)),CB=kB,nw=Qe,AB=zt,$B=Ca,Ru=$t,Lu=du,TB=Pa,IB=Oa,rw="Object already initialized",Fu=nw.TypeError,OB=nw.WeakMap,Fa,zo,Ba,PB=function(e){return Ba(e)?zo(e):Fa(e,{})},DB=function(e){return function(t){var n;if(!AB(t)||(n=zo(t)).type!==e)throw new Fu("Incompatible receiver, "+e+" required");return n}};if(CB||Lu.state){var rn=Lu.state||(Lu.state=new OB);rn.get=rn.get,rn.has=rn.has,rn.set=rn.set,Fa=function(e,t){if(rn.has(e))throw new Fu(rw);return t.facade=e,rn.set(e,t),t},zo=function(e){return rn.get(e)||{}},Ba=function(e){return rn.has(e)}}else{var Ir=TB("state");IB[Ir]=!0,Fa=function(e,t){if(Ru(e,Ir))throw new Fu(rw);return t.facade=e,$B(e,Ir,t),t},zo=function(e){return Ru(e,Ir)?e[Ir]:{}},Ba=function(e){return Ru(e,Ir)}}var Bu={set:Fa,get:zo,has:Ba,enforce:PB,getterFor:DB},_B=gu,MB=Ke,NB=Xy,RB=vn,LB=Yn,FB=$u,ow=MB([].push),Pn=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(l,c,u,f){for(var p=RB(l),d=NB(p),v=LB(d),h=_B(c,u),g=0,m=f||FB,b=t?m(l,v):n||a?m(l,0):void 0,w,A;v>g;g++)if((s||g in d)&&(w=d[g],A=h(w,g,p),e))if(t)b[g]=A;else if(A)switch(e){case 3:return!0;case 5:return w;case 6:return g;case 2:ow(b,w)}else switch(e){case 4:return!1;case 7:ow(b,w)}return i?-1:r||o?o:b}},ju={forEach:Pn(0),map:Pn(1),filter:Pn(2),some:Pn(3),every:Pn(4),find:Pn(5),findIndex:Pn(6),filterReject:Pn(7)},ja=Pe,Uo=Qe,zu=en,BB=Ke,Or=wt,Pr=xr,jB=Je,et=$t,zB=hn,Uu=On,za=tn,Wu=vu,UB=Bo,Hu=Do,Dr=Nu,iw=Pu,WB=Ma,aw=Yb,HB=Ra,sw=Po,lw=Wt,VB=Ia,cw=eu,uw=La,KB=oB,Vu=Er,qB=Pa,fw=Oa,dw=pu,GB=Xe,YB=jo,QB=Be,JB=Xb,ZB=Tr,pw=Bu,Ua=ju.forEach,St=qB("hidden"),Wa="Symbol",Wo="prototype",XB=pw.set,hw=pw.getterFor(Wa),Ht=Object[Wo],Qn=Uo.Symbol,Ho=Qn&&Qn[Wo],ej=Uo.RangeError,tj=Uo.TypeError,Ku=Uo.QObject,vw=sw.f,Jn=lw.f,mw=aw.f,nj=cw.f,gw=BB([].push),mn=Vu("symbols"),Vo=Vu("op-symbols"),rj=Vu("wks"),qu=!Ku||!Ku[Wo]||!Ku[Wo].findChild,yw=function(e,t,n){var r=vw(Ht,t);r&&delete Ht[t],Jn(e,t,n),r&&e!==Ht&&Jn(Ht,t,r)},Gu=Or&&jB(function(){return Dr(Jn({},"a",{get:function(){return Jn(this,"a",{value:7}).a}})).a!==7})?yw:Jn,Yu=function(e,t){var n=mn[e]=Dr(Ho);return XB(n,{type:Wa,tag:e,description:t}),Or||(n.description=t),n},Ha=function(t,n,r){t===Ht&&Ha(Vo,n,r),Uu(t);var o=Wu(n);return Uu(r),et(mn,o)?(r.enumerable?(et(t,St)&&t[St][o]&&(t[St][o]=!1),r=Dr(r,{enumerable:Hu(0,!1)})):(et(t,St)||Jn(t,St,Hu(1,Dr(null))),t[St][o]=!0),Gu(t,o,r)):Jn(t,o,r)},Qu=function(t,n){Uu(t);var r=za(n),o=iw(r).concat(xw(r));return Ua(o,function(i){(!Or||zu(bw,r,i))&&Ha(t,i,r[i])}),t},oj=function(t,n){return n===void 0?Dr(t):Qu(Dr(t),n)},bw=function(t){var n=Wu(t),r=zu(nj,this,n);return this===Ht&&et(mn,n)&&!et(Vo,n)?!1:r||!et(this,n)||!et(mn,n)||et(this,St)&&this[St][n]?r:!0},ww=function(t,n){var r=za(t),o=Wu(n);if(!(r===Ht&&et(mn,o)&&!et(Vo,o))){var i=vw(r,o);return i&&et(mn,o)&&!(et(r,St)&&r[St][o])&&(i.enumerable=!0),i}},Sw=function(t){var n=mw(za(t)),r=[];return Ua(n,function(o){!et(mn,o)&&!et(fw,o)&&gw(r,o)}),r},xw=function(e){var t=e===Ht,n=mw(t?Vo:za(e)),r=[];return Ua(n,function(o){et(mn,o)&&(!t||et(Ht,o))&&gw(r,mn[o])}),r};Pr||(Qn=function(){if(zB(Ho,this))throw new tj("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:UB(arguments[0]),n=dw(t),r=function(o){var i=this===void 0?Uo:this;i===Ht&&zu(r,Vo,o),et(i,St)&&et(i[St],n)&&(i[St][n]=!1);var a=Hu(1,o);try{Gu(i,n,a)}catch(s){if(!(s instanceof ej))throw s;yw(i,n,a)}};return Or&&qu&&Gu(Ht,n,{configurable:!0,set:r}),Yu(n,t)},Ho=Qn[Wo],uw(Ho,"toString",function(){return hw(this).tag}),uw(Qn,"withoutSetter",function(e){return Yu(dw(e),e)}),cw.f=bw,lw.f=Ha,VB.f=Qu,sw.f=ww,WB.f=aw.f=Sw,HB.f=xw,YB.f=function(e){return Yu(GB(e),e)},Or&&KB(Ho,"description",{configurable:!0,get:function(){return hw(this).description}})),ja({global:!0,constructor:!0,wrap:!0,forced:!Pr,sham:!Pr},{Symbol:Qn}),Ua(iw(rj),function(e){QB(e)}),ja({target:Wa,stat:!0,forced:!Pr},{useSetter:function(){qu=!0},useSimple:function(){qu=!1}}),ja({target:"Object",stat:!0,forced:!Pr,sham:!Or},{create:oj,defineProperty:Ha,defineProperties:Qu,getOwnPropertyDescriptor:ww}),ja({target:"Object",stat:!0,forced:!Pr},{getOwnPropertyNames:Sw}),JB(),ZB(Qn,Wa),fw[St]=!0;var ij=xr,Ew=ij&&!!Symbol.for&&!!Symbol.keyFor,aj=Pe,sj=nn,lj=$t,cj=Bo,kw=Er,uj=Ew,Ju=kw("string-to-symbol-registry"),fj=kw("symbol-to-string-registry");aj({target:"Symbol",stat:!0,forced:!uj},{for:function(e){var t=cj(e);if(lj(Ju,t))return Ju[t];var n=sj("Symbol")(t);return Ju[t]=n,fj[n]=t,n}});var dj=Pe,pj=$t,hj=_o,vj=xa,mj=Er,gj=Ew,Cw=mj("symbol-to-string-registry");dj({target:"Symbol",stat:!0,forced:!gj},{keyFor:function(t){if(!hj(t))throw new TypeError(vj(t)+" is not a symbol");if(pj(Cw,t))return Cw[t]}});var yj=Ke,Aw=$r,bj=ut,$w=Gn,wj=Bo,Tw=yj([].push),Sj=function(e){if(bj(e))return e;if(Aw(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?Tw(n,o):(typeof o=="number"||$w(o)==="Number"||$w(o)==="String")&&Tw(n,wj(o))}var i=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(Aw(this))return l;for(var c=0;c<i;c++)if(n[c]===s)return l}}},xj=Pe,Iw=nn,Ow=Qc,Ej=en,Ko=Ke,Pw=Je,Dw=ut,_w=_o,Mw=Na,kj=Sj,Cj=xr,Aj=String,Dn=Iw("JSON","stringify"),Va=Ko(/./.exec),Nw=Ko("".charAt),$j=Ko("".charCodeAt),Tj=Ko("".replace),Ij=Ko(1 .toString),Oj=/[\uD800-\uDFFF]/g,Rw=/^[\uD800-\uDBFF]$/,Lw=/^[\uDC00-\uDFFF]$/,Fw=!Cj||Pw(function(){var e=Iw("Symbol")("stringify detection");return Dn([e])!=="[null]"||Dn({a:e})!=="{}"||Dn(Object(e))!=="{}"}),Bw=Pw(function(){return Dn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Dn("\uDEAD")!=='"\\udead"'}),Pj=function(e,t){var n=Mw(arguments),r=kj(t);if(!(!Dw(r)&&(e===void 0||_w(e))))return n[1]=function(o,i){if(Dw(r)&&(i=Ej(r,this,Aj(o),i)),!_w(i))return i},Ow(Dn,null,n)},Dj=function(e,t,n){var r=Nw(n,t-1),o=Nw(n,t+1);return Va(Rw,e)&&!Va(Lw,o)||Va(Lw,e)&&!Va(Rw,r)?"\\u"+Ij($j(e,0),16):e};Dn&&xj({target:"JSON",stat:!0,arity:3,forced:Fw||Bw},{stringify:function(t,n,r){var o=Mw(arguments),i=Ow(Fw?Pj:Dn,null,o);return Bw&&typeof i=="string"?Tj(i,Oj,Dj):i}});var _j=Pe,Mj=xr,Nj=Je,jw=Ra,Rj=vn,Lj=!Mj||Nj(function(){jw.f(1)});_j({target:"Object",stat:!0,forced:Lj},{getOwnPropertySymbols:function(t){var n=jw.f;return n?n(Rj(t)):[]}});var Fj=Be;Fj("asyncIterator");var Bj=Be;Bj("hasInstance");var jj=Be;jj("isConcatSpreadable");var zj=Be;zj("iterator");var Uj=Be;Uj("match");var Wj=Be;Wj("matchAll");var Hj=Be;Hj("replace");var Vj=Be;Vj("search");var Kj=Be;Kj("species");var qj=Be;qj("split");var Gj=Be,Yj=Xb;Gj("toPrimitive"),Yj();var Qj=nn,Jj=Be,Zj=Tr;Jj("toStringTag"),Zj(Qj("Symbol"),"Symbol");var Xj=Be;Xj("unscopables");var e4=Qe,t4=Tr;t4(e4.JSON,"JSON",!0);var n4=it,r4=n4.Symbol,_r={},Zu=wt,o4=$t,zw=Function.prototype,i4=Zu&&Object.getOwnPropertyDescriptor,Xu=o4(zw,"name"),a4=Xu&&(function(){}).name==="something",s4=Xu&&(!Zu||Zu&&i4(zw,"name").configurable),l4={EXISTS:Xu,PROPER:a4,CONFIGURABLE:s4},c4=Je,u4=!c4(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),f4=$t,d4=ut,p4=vn,h4=Pa,v4=u4,Uw=h4("IE_PROTO"),ef=Object,m4=ef.prototype,Ww=v4?ef.getPrototypeOf:function(e){var t=p4(e);if(f4(t,Uw))return t[Uw];var n=t.constructor;return d4(n)&&t instanceof n?n.prototype:t instanceof ef?m4:null},g4=Je,y4=ut,b4=zt,w4=Nu,Hw=Ww,S4=La,x4=Xe,tf=x4("iterator"),Vw=!1,gn,nf,rf;[].keys&&(rf=[].keys(),"next"in rf?(nf=Hw(Hw(rf)),nf!==Object.prototype&&(gn=nf)):Vw=!0);var E4=!b4(gn)||g4(function(){var e={};return gn[tf].call(e)!==e});E4?gn={}:gn=w4(gn),y4(gn[tf])||S4(gn,tf,function(){return this});var Kw={IteratorPrototype:gn,BUGGY_SAFARI_ITERATORS:Vw},k4=Kw.IteratorPrototype,C4=Nu,A4=Do,$4=Tr,T4=_r,I4=function(){return this},O4=function(e,t,n,r){var o=t+" Iterator";return e.prototype=C4(k4,{next:A4(+!r,n)}),$4(e,o,!1,!0),T4[o]=I4,e},P4=Ke,D4=Ea,_4=function(e,t,n){try{return P4(D4(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},M4=zt,N4=function(e){return M4(e)||e===null},R4=N4,L4=String,F4=TypeError,B4=function(e){if(R4(e))return e;throw new F4("Can't set "+L4(e)+" as a prototype")},j4=_4,z4=zt,U4=wa,W4=B4;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=j4(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(o,i){return U4(o),W4(i),z4(o)&&(e?n(o,i):o.__proto__=i),o}}();var H4=Pe,V4=en,qw=l4,K4=O4,q4=Ww,G4=Tr,Gw=La,Y4=Xe,Yw=_r,Qw=Kw,Q4=qw.PROPER;qw.CONFIGURABLE,Qw.IteratorPrototype;var Ka=Qw.BUGGY_SAFARI_ITERATORS,of=Y4("iterator"),Jw="keys",qa="values",Zw="entries",J4=function(){return this},Xw=function(e,t,n,r,o,i,a){K4(n,t,r);var s=function(m){if(m===o&&p)return p;if(!Ka&&m&&m in u)return u[m];switch(m){case Jw:return function(){return new n(this,m)};case qa:return function(){return new n(this,m)};case Zw:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[of]||u["@@iterator"]||o&&u[o],p=!Ka&&f||s(o),d=t==="Array"&&u.entries||f,v,h,g;if(d&&(v=q4(d.call(new e)),v!==Object.prototype&&v.next&&(G4(v,l,!0,!0),Yw[l]=J4)),Q4&&o===qa&&f&&f.name!==qa&&(c=!0,p=function(){return V4(f,this)}),o)if(h={values:s(qa),keys:i?p:s(Jw),entries:s(Zw)},a)for(g in h)(Ka||c||!(g in u))&&Gw(u,g,h[g]);else H4({target:t,proto:!0,forced:Ka||c},h);return a&&u[of]!==p&&Gw(u,of,p,{name:o}),Yw[t]=p,h},e1=function(e,t){return{value:e,done:t}},Z4=tn,t1=_r,n1=Bu;Wt.f;var X4=Xw,Ga=e1,r1="Array Iterator",e3=n1.set,t3=n1.getterFor(r1);X4(Array,"Array",function(e,t){e3(this,{type:r1,target:Z4(e),index:0,kind:t})},function(){var e=t3(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ga(void 0,!0);switch(e.kind){case"keys":return Ga(n,!1);case"values":return Ga(t[n],!1)}return Ga([n,t[n]],!1)},"values"),t1.Arguments=t1.Array;var n3={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},r3=n3,o3=Qe,i3=Tr,o1=_r;for(var af in r3)i3(o3[af],af),o1[af]=o1.Array;var a3=r4,s3=a3,l3=Xe,c3=Wt.f,i1=l3("metadata"),a1=Function.prototype;a1[i1]===void 0&&c3(a1,i1,{value:null});var u3=Be;u3("asyncDispose");var f3=Be;f3("dispose");var d3=Be;d3("metadata");var p3=s3,h3=p3,v3=nn,m3=Ke,sf=v3("Symbol"),g3=sf.keyFor,y3=m3(sf.prototype.valueOf),s1=sf.isRegisteredSymbol||function(t){try{return g3(y3(t))!==void 0}catch{return!1}},b3=Pe,w3=s1;b3({target:"Symbol",stat:!0},{isRegisteredSymbol:w3});for(var S3=Er,l1=nn,x3=Ke,E3=_o,k3=Xe,Ya=l1("Symbol"),c1=Ya.isWellKnownSymbol,u1=l1("Object","getOwnPropertyNames"),C3=x3(Ya.prototype.valueOf),f1=S3("wks"),lf=0,d1=u1(Ya),A3=d1.length;lf<A3;lf++)try{var p1=d1[lf];E3(Ya[p1])&&k3(p1)}catch{}var h1=function(t){if(c1&&c1(t))return!0;try{for(var n=C3(t),r=0,o=u1(f1),i=o.length;r<i;r++)if(f1[o[r]]==n)return!0}catch{}return!1},$3=Pe,T3=h1;$3({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:T3});var I3=Be;I3("customMatcher");var O3=Be;O3("observable");var P3=Pe,D3=s1;P3({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:D3});var _3=Pe,M3=h1;_3({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:M3});var N3=Be;N3("matcher");var R3=Be;R3("metadataKey");var L3=Be;L3("patternMatch");var F3=Be;F3("replaceAll");var B3=h3,j3=B3,z3=j3;const Mr=be(z3);var cf=Ke,U3=Aa,W3=Bo,H3=wa,V3=cf("".charAt),v1=cf("".charCodeAt),K3=cf("".slice),m1=function(e){return function(t,n){var r=W3(H3(t)),o=U3(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=v1(r,o),a<55296||a>56319||o+1===i||(s=v1(r,o+1))<56320||s>57343?e?V3(r,o):a:e?K3(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},q3={codeAt:m1(!1),charAt:m1(!0)},G3=q3.charAt,Y3=Bo,g1=Bu,Q3=Xw,y1=e1,b1="String Iterator",J3=g1.set,Z3=g1.getterFor(b1);Q3(String,"String",function(e){J3(this,{type:b1,string:Y3(e),index:0})},function(){var t=Z3(this),n=t.string,r=t.index,o;return r>=n.length?y1(void 0,!0):(o=G3(n,r),t.index+=o.length,y1(o,!1))});var X3=Lo,w1=lu,ez=nu,tz=_r,nz=Xe,rz=nz("iterator"),uf=function(e){if(!ez(e))return w1(e,rz)||w1(e,"@@iterator")||tz[X3(e)]},oz=uf,iz=oz,az=iz,sz=az,lz=sz,cz=lz,uz=cz,fz=uz,dz=fz;const S1=be(dz);var pz=wt,hz=$r,vz=TypeError,mz=Object.getOwnPropertyDescriptor,gz=pz&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),x1=gz?function(e,t){if(hz(e)&&!mz(e,"length").writable)throw new vz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},yz=Pe,bz=vn,wz=Yn,Sz=x1,xz=xu,Ez=Je,kz=Ez(function(){return[].push.call({length:4294967296},1)!==4294967297}),Cz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Az=kz||!Cz();yz({target:"Array",proto:!0,arity:1,forced:Az},{push:function(t){var n=bz(this),r=wz(n),o=arguments.length;xz(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return Sz(n,r),r}});var $z=Qe,Tz=it,Zn=function(e,t){var n=Tz[e+"Prototype"],r=n&&n[t];if(r)return r;var o=$z[e],i=o&&o.prototype;return i&&i[t]},Iz=Zn,Oz=Iz("Array","push"),Pz=hn,Dz=Oz,ff=Array.prototype,_z=function(e){var t=e.push;return e===ff||Pz(ff,e)&&t===ff.push?Dz:t},Mz=_z,Nz=Mz,Rz=Nz,Lz=Rz,Fz=Lz,Bz=Fz,jz=Bz;const zz=be(jz);function Uz(e,t){var n=e==null?null:typeof Mr<"u"&&S1(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(zz(s).call(s,r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}var Wz=Pe,E1=$r,Hz=Au,Vz=zt,k1=Tu,Kz=Yn,qz=tn,Gz=Ro,Yz=Xe,Qz=Ta,Jz=Na,Zz=Qz("slice"),Xz=Yz("species"),df=Array,e5=Math.max;Wz({target:"Array",proto:!0,forced:!Zz},{slice:function(t,n){var r=qz(this),o=Kz(r),i=k1(t,o),a=k1(n===void 0?o:n,o),s,l,c;if(E1(r)&&(s=r.constructor,Hz(s)&&(s===df||E1(s.prototype))?s=void 0:Vz(s)&&(s=s[Xz],s===null&&(s=void 0)),s===df||s===void 0))return Jz(r,i,a);for(l=new(s===void 0?df:s)(e5(a-i,0)),c=0;i<a;i++,c++)i in r&&Gz(l,c,r[i]);return l.length=c,l}});var t5=Zn,n5=t5("Array","slice"),r5=hn,o5=n5,pf=Array.prototype,i5=function(e){var t=e.slice;return e===pf||r5(pf,e)&&t===pf.slice?o5:t},a5=i5,s5=a5,l5=s5,c5=l5,u5=c5,f5=u5,d5=f5;const p5=be(d5);var h5=en,C1=On,v5=lu,m5=function(e,t,n){var r,o;C1(e);try{if(r=v5(e,"return"),!r){if(t==="throw")throw n;return n}r=h5(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return C1(r),n},g5=On,y5=m5,b5=function(e,t,n,r){try{return r?t(g5(n)[0],n[1]):t(n)}catch(o){y5(e,"throw",o)}},w5=Xe,S5=_r,x5=w5("iterator"),E5=Array.prototype,k5=function(e){return e!==void 0&&(S5.Array===e||E5[x5]===e)},C5=en,A5=Ea,$5=On,T5=xa,I5=uf,O5=TypeError,P5=function(e,t){var n=arguments.length<2?I5(e):t;if(A5(n))return $5(C5(n,e));throw new O5(T5(e)+" is not iterable")},D5=gu,_5=en,M5=vn,N5=b5,R5=k5,L5=Au,F5=Yn,A1=Ro,B5=P5,j5=uf,$1=Array,z5=function(t){var n=M5(t),r=L5(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=D5(i,o>2?arguments[2]:void 0));var s=j5(n),l=0,c,u,f,p,d,v;if(s&&!(this===$1&&R5(s)))for(u=r?new this:[],p=B5(n,s),d=p.next;!(f=_5(d,p)).done;l++)v=a?N5(p,i,[f.value,l],!0):f.value,A1(u,l,v);else for(c=F5(n),u=r?new this(c):$1(c);c>l;l++)v=a?i(n[l],l):n[l],A1(u,l,v);return u.length=l,u},U5=Xe,T1=U5("iterator"),I1=!1;try{var W5=0,O1={next:function(){return{done:!!W5++}},return:function(){I1=!0}};O1[T1]=function(){return this},Array.from(O1,function(){throw 2})}catch{}var H5=function(e,t){try{if(!t&&!I1)return!1}catch{return!1}var n=!1;try{var r={};r[T1]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},V5=Pe,K5=z5,q5=H5,G5=!q5(function(e){Array.from(e)});V5({target:"Array",stat:!0,forced:G5},{from:K5});var Y5=it,Q5=Y5.Array.from,J5=Q5,Z5=J5,X5=Z5,eU=X5,tU=eU,nU=tU,rU=nU;const P1=be(rU);function hf(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 D1(e,t){if(e){var n;if(typeof e=="string")return hf(e,t);var r=p5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?P1(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hf(e,t):void 0}}function oU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
281
281
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function on(e,t){return hL(e)||Uz(e,t)||D1(e,t)||oU()}var _1={exports:{}};/*!
282
282
  Copyright (c) 2018 Jed Watson.
283
283
  Licensed under the MIT License (MIT), see
284
284
  http://jedwatson.github.io/classnames
285
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&r.push(l);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_1);var iU=_1.exports;const vf=be(iU);var mf={exports:{}},gf,M1;function yf(){if(M1)return gf;M1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gf=e,gf}var bf,N1;function aU(){if(N1)return bf;N1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=yf(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` 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=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bf=o,bf}var wf,R1;function sU(){if(R1)return wf;R1=1;var e=ua(),t=ry(),n=yf(),r=aU(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return wf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(O){var y=O&&(c&&O[c]||O[u]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:m("array"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:A(),elementType:x(),instanceOf:k,node:T(),objectOf:R,oneOf:$,oneOfType:W,shape:_,exact:L};function v(O,y){return O===y?O!==0||1/O===1/y:O!==O&&y!==y}function h(O){this.message=O,this.stack=""}h.prototype=Error.prototype;function g(O){if(process.env.NODE_ENV!=="production")var y={},P=0;function B(H,Y,q,Q,ee,te,J){if(Q=Q||p,te=te||q,J!==n){if(l){var X=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 X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var K=Q+":"+q;!y[K]&&P<3&&(i("You are manually calling a React.PropTypes validation function for the `"+te+"` 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."),y[K]=!0,P++)}}return Y[q]==null?H?Y[q]===null?new h("The "+ee+" `"+te+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+ee+" `"+te+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:O(Y,q,Q,ee,te)}var S=B.bind(null,!1);return S.isRequired=B.bind(null,!0),S}function m(O){function y(P,B,S,H,Y,q){var Q=P[B],ee=D(Q);if(ee!==O){var te=M(Q);return new h("Invalid "+H+" `"+Y+"` of type "+("`"+te+"` supplied to `"+S+"`, expected ")+("`"+O+"`."))}return null}return g(y)}function b(){return g(a)}function w(O){function y(P,B,S,H,Y){if(typeof O!="function")return new h("Property `"+Y+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var q=P[B];if(!Array.isArray(q)){var Q=D(q);return new h("Invalid "+H+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an array."))}for(var ee=0;ee<q.length;ee++){var te=O(q,ee,S,H,Y+"["+ee+"]",n);if(te instanceof Error)return te}return null}return g(y)}function A(){function O(y,P,B,S,H){var Y=y[P];if(!s(Y)){var q=D(Y);return new h("Invalid "+S+" `"+H+"` of type "+("`"+q+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return g(O)}function x(){function O(y,P,B,S,H){var Y=y[P];if(!e.isValidElementType(Y)){var q=D(Y);return new h("Invalid "+S+" `"+H+"` of type "+("`"+q+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return g(O)}function k(O){function y(P,B,S,H,Y){if(!(P[B]instanceof O)){var q=O.name||p,Q=z(P[B]);return new h("Invalid "+H+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected ")+("instance of `"+q+"`."))}return null}return g(y)}function $(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function y(P,B,S,H,Y){for(var q=P[B],Q=0;Q<O.length;Q++)if(v(q,O[Q]))return null;var ee=JSON.stringify(O,function(J,X){var K=M(X);return K==="symbol"?String(X):X});return new h("Invalid "+H+" `"+Y+"` of value `"+String(q)+"` "+("supplied to `"+S+"`, expected one of "+ee+"."))}return g(y)}function R(O){function y(P,B,S,H,Y){if(typeof O!="function")return new h("Property `"+Y+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var q=P[B],Q=D(q);if(Q!=="object")return new h("Invalid "+H+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an object."));for(var ee in q)if(o(q,ee)){var te=O(q,ee,S,H,Y+"."+ee,n);if(te instanceof Error)return te}return null}return g(y)}function W(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var y=0;y<O.length;y++){var P=O[y];if(typeof P!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(P)+" at index "+y+"."),a}function B(S,H,Y,q,Q){for(var ee=0;ee<O.length;ee++){var te=O[ee];if(te(S,H,Y,q,Q,n)==null)return null}return new h("Invalid "+q+" `"+Q+"` supplied to "+("`"+Y+"`."))}return g(B)}function T(){function O(y,P,B,S,H){return N(y[P])?null:new h("Invalid "+S+" `"+H+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return g(O)}function _(O){function y(P,B,S,H,Y){var q=P[B],Q=D(q);if(Q!=="object")return new h("Invalid "+H+" `"+Y+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));for(var ee in O){var te=O[ee];if(te){var J=te(q,ee,S,H,Y+"."+ee,n);if(J)return J}}return null}return g(y)}function L(O){function y(P,B,S,H,Y){var q=P[B],Q=D(q);if(Q!=="object")return new h("Invalid "+H+" `"+Y+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));var ee=t({},P[B],O);for(var te in ee){var J=O[te];if(!J)return new h("Invalid "+H+" `"+Y+"` key `"+te+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(P[B],null," ")+`
286
- Valid keys: `+JSON.stringify(Object.keys(O),null," "));var X=J(q,te,S,H,Y+"."+te,n);if(X)return X}return null}return g(y)}function N(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(N);if(O===null||s(O))return!0;var y=f(O);if(y){var P=y.call(O),B;if(y!==O.entries){for(;!(B=P.next()).done;)if(!N(B.value))return!1}else for(;!(B=P.next()).done;){var S=B.value;if(S&&!N(S[1]))return!1}}else return!1;return!0;default:return!1}}function F(O,y){return O==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function D(O){var y=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":F(y,O)?"symbol":y}function M(O){if(typeof O>"u"||O===null)return""+O;var y=D(O);if(y==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return y}function G(O){var y=M(O);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function z(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},wf}var Sf,L1;function lU(){if(L1)return Sf;L1=1;var e=yf();function t(){}function n(){}return n.resetWarningCache=t,Sf=function(){function r(a,s,l,c,u,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 o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Sf}if(process.env.NODE_ENV!=="production"){var cU=ua(),uU=!0;mf.exports=sU()(cU.isElement,uU)}else mf.exports=lU()();var fU=mf.exports;const Ee=be(fU);var xf=I.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});xf.displayName="ScrollToBottomFunctionContext";function dU(){return I.useContext(xf)}function pU(){var e=dU(),t=e.scrollToEnd;return t}var Ef=I.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Ef.displayName="ScrollToBottomState1Context";var kf=I.createContext({animating:!1,animatingToEnd:!1,sticky:!0});kf.displayName="ScrollToBottomState2Context";var Cf=I.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Cf.displayName="ScrollToBottomStateContext";var F1=[Cf,Ef,kf];function hU(e){return I.useContext(F1[e]||F1[0])}function vU(){var e=hU(2),t=e.sticky;return[t]}var Qa=I.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Qa.displayName="ScrollToBottomInternalContext";function mU(){return I.useContext(Qa)}function Af(){var e=mU(),t=e.styleToClassName;return t}var gU={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)"}},$f=function(t){var n=t.children,r=t.className,o=vU(),i=on(o,1),a=i[0],s=Af()(gU),l=pU();return!a&&I.createElement("button",{className:vf(s,(r||"")+""),onClick:l,type:"button"},n)};$f.defaultProps={children:void 0,className:""},$f.propTypes={children:Ee.any,className:Ee.string};var B1={exports:{}},yU=De,bU=bt,j1=Wt.f;yU({target:"Object",stat:!0,forced:Object.defineProperty!==j1,sham:!bU},{defineProperty:j1});var wU=it,z1=wU.Object,SU=B1.exports=function(t,n,r){return z1.defineProperty(t,n,r)};z1.defineProperty.sham&&(SU.sham=!0);var xU=B1.exports,EU=xU,U1=EU,kU=U1,CU=kU,AU=CU,$U=AU,TU=$U;const IU=be(TU);var OU=jo,PU=OU.f("iterator"),DU=PU,_U=DU,MU=_U,NU=MU,RU=NU,LU=RU,FU=LU;const BU=be(FU);function qo(e){"@babel/helpers - typeof";return qo=typeof Mr=="function"&&typeof BU=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Mr=="function"&&t.constructor===Mr&&t!==Mr.prototype?"symbol":typeof t},qo(e)}var jU=jo,zU=jU.f("toPrimitive"),UU=zU,WU=UU,HU=WU,VU=HU,KU=VU,qU=KU,GU=qU;const YU=be(GU);function QU(e,t){if(qo(e)!="object"||!e)return e;var n=e[YU];if(n!==void 0){var r=n.call(e,t||"default");if(qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JU(e){var t=QU(e,"string");return qo(t)=="symbol"?t:t+""}function ZU(e,t,n){return(t=JU(t))in e?IU(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XU(e){if($b(e))return hf(e)}function eW(e){if(typeof Mr<"u"&&S1(e)!=null||e["@@iterator"]!=null)return P1(e)}function tW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
285
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&r.push(l);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_1);var iU=_1.exports;const vf=be(iU);var mf={exports:{}},gf,M1;function yf(){if(M1)return gf;M1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gf=e,gf}var bf,N1;function aU(){if(N1)return bf;N1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=yf(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` 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=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bf=o,bf}var wf,R1;function sU(){if(R1)return wf;R1=1;var e=ua(),t=ry(),n=yf(),r=aU(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return wf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(O){var y=O&&(c&&O[c]||O[u]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:m("array"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:A(),elementType:x(),instanceOf:k,node:T(),objectOf:R,oneOf:$,oneOfType:H,shape:_,exact:F};function v(O,y){return O===y?O!==0||1/O===1/y:O!==O&&y!==y}function h(O){this.message=O,this.stack=""}h.prototype=Error.prototype;function g(O){if(process.env.NODE_ENV!=="production")var y={},P=0;function j(V,Y,q,Q,X,ee,J){if(Q=Q||p,ee=ee||q,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 K=Q+":"+q;!y[K]&&P<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ee+"` 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."),y[K]=!0,P++)}}return Y[q]==null?V?Y[q]===null?new h("The "+X+" `"+ee+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+X+" `"+ee+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:O(Y,q,Q,X,ee)}var S=j.bind(null,!1);return S.isRequired=j.bind(null,!0),S}function m(O){function y(P,j,S,V,Y,q){var Q=P[j],X=D(Q);if(X!==O){var ee=M(Q);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+ee+"` supplied to `"+S+"`, expected ")+("`"+O+"`."))}return null}return g(y)}function b(){return g(a)}function w(O){function y(P,j,S,V,Y){if(typeof O!="function")return new h("Property `"+Y+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var q=P[j];if(!Array.isArray(q)){var Q=D(q);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an array."))}for(var X=0;X<q.length;X++){var ee=O(q,X,S,V,Y+"["+X+"]",n);if(ee instanceof Error)return ee}return null}return g(y)}function A(){function O(y,P,j,S,V){var Y=y[P];if(!s(Y)){var q=D(Y);return new h("Invalid "+S+" `"+V+"` of type "+("`"+q+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return g(O)}function x(){function O(y,P,j,S,V){var Y=y[P];if(!e.isValidElementType(Y)){var q=D(Y);return new h("Invalid "+S+" `"+V+"` of type "+("`"+q+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return g(O)}function k(O){function y(P,j,S,V,Y){if(!(P[j]instanceof O)){var q=O.name||p,Q=U(P[j]);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected ")+("instance of `"+q+"`."))}return null}return g(y)}function $(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function y(P,j,S,V,Y){for(var q=P[j],Q=0;Q<O.length;Q++)if(v(q,O[Q]))return null;var X=JSON.stringify(O,function(J,Z){var K=M(Z);return K==="symbol"?String(Z):Z});return new h("Invalid "+V+" `"+Y+"` of value `"+String(q)+"` "+("supplied to `"+S+"`, expected one of "+X+"."))}return g(y)}function R(O){function y(P,j,S,V,Y){if(typeof O!="function")return new h("Property `"+Y+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var q=P[j],Q=D(q);if(Q!=="object")return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an object."));for(var X in q)if(o(q,X)){var ee=O(q,X,S,V,Y+"."+X,n);if(ee instanceof Error)return ee}return null}return g(y)}function H(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var y=0;y<O.length;y++){var P=O[y];if(typeof P!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(P)+" at index "+y+"."),a}function j(S,V,Y,q,Q){for(var X=0;X<O.length;X++){var ee=O[X];if(ee(S,V,Y,q,Q,n)==null)return null}return new h("Invalid "+q+" `"+Q+"` supplied to "+("`"+Y+"`."))}return g(j)}function T(){function O(y,P,j,S,V){return N(y[P])?null:new h("Invalid "+S+" `"+V+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return g(O)}function _(O){function y(P,j,S,V,Y){var q=P[j],Q=D(q);if(Q!=="object")return new h("Invalid "+V+" `"+Y+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));for(var X in O){var ee=O[X];if(ee){var J=ee(q,X,S,V,Y+"."+X,n);if(J)return J}}return null}return g(y)}function F(O){function y(P,j,S,V,Y){var q=P[j],Q=D(q);if(Q!=="object")return new h("Invalid "+V+" `"+Y+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));var X=t({},P[j],O);for(var ee in X){var J=O[ee];if(!J)return new h("Invalid "+V+" `"+Y+"` key `"+ee+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(P[j],null," ")+`
286
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var Z=J(q,ee,S,V,Y+"."+ee,n);if(Z)return Z}return null}return g(y)}function N(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(N);if(O===null||s(O))return!0;var y=f(O);if(y){var P=y.call(O),j;if(y!==O.entries){for(;!(j=P.next()).done;)if(!N(j.value))return!1}else for(;!(j=P.next()).done;){var S=j.value;if(S&&!N(S[1]))return!1}}else return!1;return!0;default:return!1}}function B(O,y){return O==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function D(O){var y=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":B(y,O)?"symbol":y}function M(O){if(typeof O>"u"||O===null)return""+O;var y=D(O);if(y==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return y}function G(O){var y=M(O);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function U(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},wf}var Sf,L1;function lU(){if(L1)return Sf;L1=1;var e=yf();function t(){}function n(){}return n.resetWarningCache=t,Sf=function(){function r(a,s,l,c,u,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 o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Sf}if(process.env.NODE_ENV!=="production"){var cU=ua(),uU=!0;mf.exports=sU()(cU.isElement,uU)}else mf.exports=lU()();var fU=mf.exports;const xe=be(fU);var xf=I.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});xf.displayName="ScrollToBottomFunctionContext";function dU(){return I.useContext(xf)}function pU(){var e=dU(),t=e.scrollToEnd;return t}var Ef=I.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Ef.displayName="ScrollToBottomState1Context";var kf=I.createContext({animating:!1,animatingToEnd:!1,sticky:!0});kf.displayName="ScrollToBottomState2Context";var Cf=I.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Cf.displayName="ScrollToBottomStateContext";var F1=[Cf,Ef,kf];function hU(e){return I.useContext(F1[e]||F1[0])}function vU(){var e=hU(2),t=e.sticky;return[t]}var Qa=I.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Qa.displayName="ScrollToBottomInternalContext";function mU(){return I.useContext(Qa)}function Af(){var e=mU(),t=e.styleToClassName;return t}var gU={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)"}},$f=function(t){var n=t.children,r=t.className,o=vU(),i=on(o,1),a=i[0],s=Af()(gU),l=pU();return!a&&I.createElement("button",{className:vf(s,(r||"")+""),onClick:l,type:"button"},n)};$f.defaultProps={children:void 0,className:""},$f.propTypes={children:xe.any,className:xe.string};var B1={exports:{}},yU=Pe,bU=wt,j1=Wt.f;yU({target:"Object",stat:!0,forced:Object.defineProperty!==j1,sham:!bU},{defineProperty:j1});var wU=it,z1=wU.Object,SU=B1.exports=function(t,n,r){return z1.defineProperty(t,n,r)};z1.defineProperty.sham&&(SU.sham=!0);var xU=B1.exports,EU=xU,U1=EU,kU=U1,CU=kU,AU=CU,$U=AU,TU=$U;const IU=be(TU);var OU=jo,PU=OU.f("iterator"),DU=PU,_U=DU,MU=_U,NU=MU,RU=NU,LU=RU,FU=LU;const BU=be(FU);function qo(e){"@babel/helpers - typeof";return qo=typeof Mr=="function"&&typeof BU=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Mr=="function"&&t.constructor===Mr&&t!==Mr.prototype?"symbol":typeof t},qo(e)}var jU=jo,zU=jU.f("toPrimitive"),UU=zU,WU=UU,HU=WU,VU=HU,KU=VU,qU=KU,GU=qU;const YU=be(GU);function QU(e,t){if(qo(e)!="object"||!e)return e;var n=e[YU];if(n!==void 0){var r=n.call(e,t||"default");if(qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JU(e){var t=QU(e,"string");return qo(t)=="symbol"?t:t+""}function ZU(e,t,n){return(t=JU(t))in e?IU(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XU(e){if($b(e))return hf(e)}function eW(e){if(typeof Mr<"u"&&S1(e)!=null||e["@@iterator"]!=null)return P1(e)}function tW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
287
287
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(e){return XU(e)||eW(e)||D1(e)||tW()}var Ja=function(e){return e&&e.Math==Math&&e},Tt=Ja(typeof globalThis=="object"&&globalThis)||Ja(typeof window=="object"&&window)||Ja(typeof self=="object"&&self)||Ja(typeof Rt=="object"&&Rt)||function(){return this}()||Function("return this")(),Tf={},Vt=function(e){try{return!!e()}catch{return!0}},nW=Vt,Xn=!nW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),W1={},H1={}.propertyIsEnumerable,V1=Object.getOwnPropertyDescriptor,rW=V1&&!H1.call({1:2},1);W1.f=rW?function(t){var n=V1(this,t);return!!n&&n.enumerable}:H1;var K1=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},oW={}.toString,If=function(e){return oW.call(e).slice(8,-1)},iW=Vt,aW=If,sW="".split,lW=iW(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return aW(e)=="String"?sW.call(e,""):Object(e)}:Object,Za=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},cW=lW,uW=Za,Of=function(e){return cW(uW(e))},Nt=function(e){return typeof e=="function"},fW=Nt,Go=function(e){return typeof e=="object"?e!==null:fW(e)},Pf=Tt,dW=Nt,pW=function(e){return dW(e)?e:void 0},Xa=function(e,t){return arguments.length<2?pW(Pf[e]):Pf[e]&&Pf[e][t]},hW=Xa,vW=hW("navigator","userAgent")||"",q1=Tt,Df=vW,G1=q1.process,Y1=q1.Deno,Q1=G1&&G1.versions||Y1&&Y1.version,J1=Q1&&Q1.v8,an,es;J1?(an=J1.split("."),es=an[0]<4?1:an[0]+an[1]):Df&&(an=Df.match(/Edge\/(\d+)/),(!an||an[1]>=74)&&(an=Df.match(/Chrome\/(\d+)/),an&&(es=an[1])));var mW=es&&+es,Z1=mW,gW=Vt,X1=!!Object.getOwnPropertySymbols&&!gW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Z1&&Z1<41}),yW=X1,eS=yW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",bW=Nt,wW=Xa,SW=eS,tS=SW?function(e){return typeof e=="symbol"}:function(e){var t=wW("Symbol");return bW(t)&&Object(e)instanceof t},xW=function(e){try{return String(e)}catch{return"Object"}},EW=Nt,kW=xW,CW=function(e){if(EW(e))return e;throw TypeError(kW(e)+" is not a function")},AW=CW,nS=function(e,t){var n=e[t];return n==null?void 0:AW(n)},_f=Nt,Mf=Go,$W=function(e,t){var n,r;if(t==="string"&&_f(n=e.toString)&&!Mf(r=n.call(e))||_f(n=e.valueOf)&&!Mf(r=n.call(e))||t!=="string"&&_f(n=e.toString)&&!Mf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},rS={exports:{}},oS=Tt,Nf=function(e,t){try{Object.defineProperty(oS,e,{value:t,configurable:!0,writable:!0})}catch{oS[e]=t}return t},TW=Tt,IW=Nf,iS="__core-js_shared__",OW=TW[iS]||IW(iS,{}),Rf=OW,aS=Rf;(rS.exports=function(e,t){return aS[e]||(aS[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Lf=rS.exports,PW=Za,sS=function(e){return Object(PW(e))},DW=sS,_W={}.hasOwnProperty,er=Object.hasOwn||function(t,n){return _W.call(DW(t),n)},MW=0,NW=Math.random(),lS=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++MW+NW).toString(36)},RW=Tt,LW=Lf,cS=er,FW=lS,uS=X1,BW=eS,Yo=LW("wks"),Qo=RW.Symbol,jW=BW?Qo:Qo&&Qo.withoutSetter||FW,Jo=function(e){return(!cS(Yo,e)||!(uS||typeof Yo[e]=="string"))&&(uS&&cS(Qo,e)?Yo[e]=Qo[e]:Yo[e]=jW("Symbol."+e)),Yo[e]},fS=Go,dS=tS,zW=nS,UW=$W,WW=Jo,HW=WW("toPrimitive"),VW=function(e,t){if(!fS(e)||dS(e))return e;var n=zW(e,HW),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!fS(r)||dS(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),UW(e,t)},KW=VW,qW=tS,pS=function(e){var t=KW(e,"string");return qW(t)?t:String(t)},GW=Tt,hS=Go,Ff=GW.document,YW=hS(Ff)&&hS(Ff.createElement),vS=function(e){return YW?Ff.createElement(e):{}},QW=Xn,JW=Vt,ZW=vS,mS=!QW&&!JW(function(){return Object.defineProperty(ZW("div"),"a",{get:function(){return 7}}).a!=7}),XW=Xn,e6=W1,t6=K1,n6=Of,r6=pS,o6=er,i6=mS,gS=Object.getOwnPropertyDescriptor;Tf.f=XW?gS:function(t,n){if(t=n6(t),n=r6(n),i6)try{return gS(t,n)}catch{}if(o6(t,n))return t6(!e6.f.call(t,n),t[n])};var Zo={},a6=Go,_n=function(e){if(a6(e))return e;throw TypeError(String(e)+" is not an object")},s6=Xn,l6=mS,yS=_n,c6=pS,bS=Object.defineProperty;Zo.f=s6?bS:function(t,n,r){if(yS(t),n=c6(n),yS(r),l6)try{return bS(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 u6=Xn,f6=Zo,d6=K1,ts=u6?function(e,t,n){return f6.f(e,t,d6(1,n))}:function(e,t,n){return e[t]=n,e},wS={exports:{}},p6=Nt,Bf=Rf,h6=Function.toString;p6(Bf.inspectSource)||(Bf.inspectSource=function(e){return h6.call(e)});var SS=Bf.inspectSource,v6=Tt,m6=Nt,g6=SS,xS=v6.WeakMap,y6=m6(xS)&&/native code/.test(g6(xS)),b6=Lf,w6=lS,ES=b6("keys"),kS=function(e){return ES[e]||(ES[e]=w6(e))},jf={},S6=y6,x6=Tt,E6=Go,k6=ts,zf=er,Uf=Rf,C6=kS,A6=jf,CS="Object already initialized",$6=x6.WeakMap,ns,Xo,rs,T6=function(e){return rs(e)?Xo(e):ns(e,{})},I6=function(e){return function(t){var n;if(!E6(t)||(n=Xo(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(S6||Uf.state){var tr=Uf.state||(Uf.state=new $6),O6=tr.get,AS=tr.has,P6=tr.set;ns=function(e,t){if(AS.call(tr,e))throw new TypeError(CS);return t.facade=e,P6.call(tr,e,t),t},Xo=function(e){return O6.call(tr,e)||{}},rs=function(e){return AS.call(tr,e)}}else{var Nr=C6("state");A6[Nr]=!0,ns=function(e,t){if(zf(e,Nr))throw new TypeError(CS);return t.facade=e,k6(e,Nr,t),t},Xo=function(e){return zf(e,Nr)?e[Nr]:{}},rs=function(e){return zf(e,Nr)}}var $S={set:ns,get:Xo,has:rs,enforce:T6,getterFor:I6},Wf=Xn,D6=er,TS=Function.prototype,_6=Wf&&Object.getOwnPropertyDescriptor,Hf=D6(TS,"name"),M6=Hf&&(function(){}).name==="something",N6=Hf&&(!Wf||Wf&&_6(TS,"name").configurable),Vf={EXISTS:Hf,PROPER:M6,CONFIGURABLE:N6},R6=Tt,IS=Nt,L6=er,OS=ts,F6=Nf,B6=SS,PS=$S,j6=Vf.CONFIGURABLE,z6=PS.get,U6=PS.enforce,W6=String(String).split("String");(wS.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,i=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(IS(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!L6(n,"name")||j6&&n.name!==s)&&OS(n,"name",s),l=U6(n),l.source||(l.source=W6.join(typeof s=="string"?s:""))),e===R6){i?e[t]=n:F6(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:OS(e,t,n)})(Function.prototype,"toString",function(){return IS(this)&&z6(this).source||B6(this)});var ei=wS.exports,DS={},H6=Math.ceil,V6=Math.floor,os=function(e){var t=+e;return t!==t||t===0?0:(t>0?V6:H6)(t)},K6=os,q6=Math.max,G6=Math.min,Y6=function(e,t){var n=K6(e);return n<0?q6(n+t,0):G6(n,t)},Q6=os,J6=Math.min,_S=function(e){return e>0?J6(Q6(e),9007199254740991):0},Z6=_S,X6=function(e){return Z6(e.length)},eH=Of,tH=Y6,nH=X6,MS=function(e){return function(t,n,r){var o=eH(t),i=nH(o),a=tH(r,i),s;if(e&&n!=n){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},rH={includes:MS(!0),indexOf:MS(!1)},Kf=er,oH=Of,iH=rH.indexOf,aH=jf,NS=function(e,t){var n=oH(e),r=0,o=[],i;for(i in n)!Kf(aH,i)&&Kf(n,i)&&o.push(i);for(;t.length>r;)Kf(n,i=t[r++])&&(~iH(o,i)||o.push(i));return o},qf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sH=NS,lH=qf,cH=lH.concat("length","prototype");DS.f=Object.getOwnPropertyNames||function(t){return sH(t,cH)};var RS={};RS.f=Object.getOwnPropertySymbols;var uH=Xa,fH=DS,dH=RS,pH=_n,hH=uH("Reflect","ownKeys")||function(t){var n=fH.f(pH(t)),r=dH.f;return r?n.concat(r(t)):n},vH=er,mH=hH,gH=Tf,yH=Zo,bH=function(e,t){for(var n=mH(t),r=yH.f,o=gH.f,i=0;i<n.length;i++){var a=n[i];vH(e,a)||r(e,a,o(t,a))}},wH=Vt,SH=Nt,xH=/#|\.prototype\./,ti=function(e,t){var n=kH[EH(e)];return n==AH?!0:n==CH?!1:SH(t)?wH(t):!!t},EH=ti.normalize=function(e){return String(e).replace(xH,".").toLowerCase()},kH=ti.data={},CH=ti.NATIVE="N",AH=ti.POLYFILL="P",$H=ti,Gf=Tt,TH=Tf.f,IH=ts,OH=ei,PH=Nf,DH=bH,_H=$H,MH=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,l,c,u;if(r?a=Gf:o?a=Gf[n]||PH(n,{}):a=(Gf[n]||{}).prototype,a)for(s in t){if(c=t[s],e.noTargetGet?(u=TH(a,s),l=u&&u.value):l=a[s],i=_H(r?s:n+(o?".":"#")+s,e.forced),!i&&l!==void 0){if(typeof c==typeof l)continue;DH(c,l)}(e.sham||l&&l.sham)&&IH(c,"sham",!0),OH(a,s,c,e)}},NH=Jo,RH=NH("toStringTag"),LS={};LS[RH]="z";var Yf=String(LS)==="[object z]",LH=Yf,FH=Nt,is=If,BH=Jo,jH=BH("toStringTag"),zH=is(function(){return arguments}())=="Arguments",UH=function(e,t){try{return e[t]}catch{}},FS=LH?is:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=UH(t=Object(e),jH))=="string"?n:zH?is(t):(r=is(t))=="Object"&&FH(t.callee)?"Arguments":r},WH=FS,as=function(e){if(WH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},HH=_n,BS=function(){var e=HH(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},Qf={},jS=Vt,VH=Tt,zS=VH.RegExp;Qf.UNSUPPORTED_Y=jS(function(){var e=zS("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Qf.BROKEN_CARET=jS(function(){var e=zS("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var KH=NS,qH=qf,GH=Object.keys||function(t){return KH(t,qH)},YH=Xn,QH=Zo,JH=_n,ZH=GH,XH=YH?Object.defineProperties:function(t,n){JH(t);for(var r=ZH(n),o=r.length,i=0,a;o>i;)QH.f(t,a=r[i++],n[a]);return t},e9=Xa,t9=e9("document","documentElement"),n9=_n,r9=XH,US=qf,o9=jf,i9=t9,a9=vS,s9=kS,WS=">",HS="<",Jf="prototype",Zf="script",VS=s9("IE_PROTO"),Xf=function(){},KS=function(e){return HS+Zf+WS+e+HS+"/"+Zf+WS},qS=function(e){e.write(KS("")),e.close();var t=e.parentWindow.Object;return e=null,t},l9=function(){var e=a9("iframe"),t="java"+Zf+":",n;return e.style.display="none",i9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(KS("document.F=Object")),n.close(),n.F},ss,ls=function(){try{ss=new ActiveXObject("htmlfile")}catch{}ls=typeof document<"u"?document.domain&&ss?qS(ss):l9():qS(ss);for(var e=US.length;e--;)delete ls[Jf][US[e]];return ls()};o9[VS]=!0;var c9=Object.create||function(t,n){var r;return t!==null?(Xf[Jf]=n9(t),r=new Xf,Xf[Jf]=null,r[VS]=t):r=ls(),n===void 0?r:r9(r,n)},u9=Vt,f9=Tt,d9=f9.RegExp,p9=u9(function(){var e=d9(".","s");return!(e.dotAll&&e.exec(`
288
288
  `)&&e.flags==="s")}),h9=Vt,v9=Tt,m9=v9.RegExp,g9=h9(function(){var e=m9("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),y9=as,b9=BS,GS=Qf,w9=Lf,S9=c9,x9=$S.get,E9=p9,k9=g9,cs=RegExp.prototype.exec,C9=w9("native-string-replace",String.prototype.replace),ed=cs,td=function(){var e=/a/,t=/b*/g;return cs.call(e,"a"),cs.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),YS=GS.UNSUPPORTED_Y||GS.BROKEN_CARET,nd=/()??/.exec("")[1]!==void 0,A9=td||nd||YS||E9||k9;A9&&(ed=function(t){var n=this,r=x9(n),o=y9(t),i=r.raw,a,s,l,c,u,f,p;if(i)return i.lastIndex=n.lastIndex,a=ed.call(i,o),n.lastIndex=i.lastIndex,a;var d=r.groups,v=YS&&n.sticky,h=b9.call(n),g=n.source,m=0,b=o;if(v&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
289
- `)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),nd&&(s=new RegExp("^"+g+"$(?!\\s)",h)),td&&(l=n.lastIndex),c=cs.call(v?s:n,b),v?c?(c.input=c.input.slice(m),c[0]=c[0].slice(m),c.index=n.lastIndex,n.lastIndex+=c[0].length):n.lastIndex=0:td&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),nd&&c&&c.length>1&&C9.call(c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&d)for(c.groups=f=S9(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=c[p[1]];return c});var rd=ed,$9=MH,QS=rd;$9({target:"RegExp",proto:!0,forced:/./.exec!==QS},{exec:QS});var JS=ei,T9=rd,ZS=Vt,XS=Jo,I9=ts,O9=XS("species"),od=RegExp.prototype,P9=function(e,t,n,r){var o=XS(e),i=!ZS(function(){var c={};return c[o]=function(){return 7},""[e](c)!=7}),a=i&&!ZS(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[O9]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return c=!0,null},u[o](""),!c});if(!i||!a||n){var s=/./[o],l=t(o,""[e],function(c,u,f,p,d){var v=u.exec;return v===T9||v===od.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:c.call(f,u,p)}:{done:!1}});JS(String.prototype,e,l[0]),JS(od,o,l[1])}r&&I9(od[o],"sham",!0)},D9=os,_9=as,M9=Za,e0=function(e){return function(t,n){var r=_9(M9(t)),o=D9(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},N9={codeAt:e0(!1),charAt:e0(!0)},R9=N9.charAt,L9=function(e,t,n){return t+(n?R9(e,t).length:1)},F9=sS,B9=Math.floor,j9="".replace,z9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,U9=/\$([$&'`]|\d{1,2})/g,W9=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=U9;return o!==void 0&&(o=F9(o),l=z9),j9.call(i,l,function(c,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return c;if(p>s){var d=B9(p/10);return d===0?c:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):c}f=r[p-1]}return f===void 0?"":f})},H9=_n,V9=Nt,K9=If,q9=rd,G9=function(e,t){var n=e.exec;if(V9(n)){var r=n.call(e,t);return r!==null&&H9(r),r}if(K9(e)==="RegExp")return q9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Y9=P9,Q9=Vt,J9=_n,Z9=Nt,X9=os,eV=_S,Rr=as,tV=Za,nV=L9,rV=nS,oV=W9,iV=G9,aV=Jo,id=aV("replace"),sV=Math.max,lV=Math.min,cV=function(e){return e===void 0?e:String(e)},uV=function(){return"a".replace(/./,"$0")==="$0"}(),t0=function(){return/./[id]?/./[id]("a","$0")==="":!1}(),fV=!Q9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Y9("replace",function(e,t,n){var r=t0?"$":"$0";return[function(i,a){var s=tV(this),l=i==null?void 0:rV(i,id);return l?l.call(i,s,a):t.call(Rr(s),i,a)},function(o,i){var a=J9(this),s=Rr(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var l=n(t,a,s,i);if(l.done)return l.value}var c=Z9(i);c||(i=Rr(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=iV(a,s);if(d===null||(p.push(d),!u))break;var v=Rr(d[0]);v===""&&(a.lastIndex=nV(s,eV(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=Rr(d[0]),w=sV(lV(X9(d.index),s.length),0),A=[],x=1;x<d.length;x++)A.push(cV(d[x]));var k=d.groups;if(c){var $=[b].concat(A,w,s);k!==void 0&&$.push(k);var R=Rr(i.apply(void 0,$))}else R=oV(b,s,w,A,k,i);w>=g&&(h+=s.slice(g,w)+R,g=w+b.length)}return h+s.slice(g)}]},!fV||!uV||t0);var ni=Qe,dV=iu,pV=Gn,us=function(e){return dV.slice(0,e.length)===e},hV=function(){return us("Bun/")?"BUN":us("Cloudflare-Workers")?"CLOUDFLARE":us("Deno/")?"DENO":us("Node.js/")?"NODE":ni.Bun&&typeof Bun.version=="string"?"BUN":ni.Deno&&typeof Deno.version=="object"?"DENO":pV(ni.process)==="process"?"NODE":ni.window&&ni.document?"BROWSER":"REST"}(),vV=TypeError,mV=function(e,t){if(e<t)throw new vV("Not enough arguments");return e},n0=Qe,gV=Qc,yV=dt,bV=hV,wV=iu,SV=Na,xV=mV,EV=n0.Function,kV=/MSIE .\./.test(wV)||bV==="BUN"&&function(){var e=n0.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),r0=function(e,t){var n=t?2:1;return kV?function(r,o){var i=xV(arguments.length,1)>n,a=yV(r)?r:EV(r),s=i?SV(arguments,n):[],l=i?function(){gV(a,this,s)}:a;return t?e(l,o):e(l)}:e},CV=De,o0=Qe,AV=r0,i0=AV(o0.setInterval,!0);CV({global:!0,bind:!0,forced:o0.setInterval!==i0},{setInterval:i0});var $V=De,a0=Qe,TV=r0,s0=TV(a0.setTimeout,!0);$V({global:!0,bind:!0,forced:a0.setTimeout!==s0},{setTimeout:s0});var IV=it,OV=IV.setInterval,PV=OV;const DV=be(PV);var _V=Je,l0=function(e,t){var n=[][e];return!!n&&_V(function(){n.call(null,t||function(){return 1},1)})},MV=De,NV=Zc,RV=Bb.indexOf,LV=l0,ad=NV([].indexOf),c0=!!ad&&1/ad([1],1,-0)<0,FV=c0||!LV("indexOf");MV({target:"Array",proto:!0,forced:FV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return c0?ad(this,t,n)||0:RV(this,t,n)}});var BV=Zn,jV=BV("Array","indexOf"),zV=hn,UV=jV,sd=Array.prototype,WV=function(e){var t=e.indexOf;return e===sd||zV(sd,e)&&t===sd.indexOf?UV:t},HV=WV,VV=HV,KV=VV;const qV=be(KV);var u0=xa,GV=TypeError,YV=function(e,t){if(!delete e[t])throw new GV("Cannot delete property "+u0(t)+" of "+u0(e))},QV=De,JV=vn,ZV=Tu,XV=Aa,eK=Yn,tK=x1,nK=xu,rK=$u,oK=Ro,ld=YV,iK=Ta,aK=iK("splice"),sK=Math.max,lK=Math.min;QV({target:"Array",proto:!0,forced:!aK},{splice:function(t,n){var r=JV(this),o=eK(r),i=ZV(t,o),a=arguments.length,s,l,c,u,f,p;for(a===0?s=l=0:a===1?(s=0,l=o-i):(s=a-2,l=lK(sK(XV(n),0),o-i)),nK(o+s-l),c=rK(r,l),u=0;u<l;u++)f=i+u,f in r&&oK(c,u,r[f]);if(c.length=l,s<l){for(u=i;u<o-l;u++)f=u+l,p=u+s,f in r?r[p]=r[f]:ld(r,p);for(u=o;u>o-l+s;u--)ld(r,u-1)}else if(s>l)for(u=o-l;u>i;u--)f=u+l-1,p=u+s-1,f in r?r[p]=r[f]:ld(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return tK(r,o-l+s),c}});var cK=Zn,uK=cK("Array","splice"),fK=hn,dK=uK,cd=Array.prototype,pK=function(e){var t=e.splice;return e===cd||fK(cd,e)&&t===cd.splice?dK:t},hK=pK,vK=hK,mK=vK;const gK=be(mK);var yK=Zn,bK=yK("Array","concat"),wK=hn,SK=bK,ud=Array.prototype,xK=function(e){var t=e.concat;return e===ud||wK(ud,e)&&t===ud.concat?SK:t},EK=xK,kK=EK,CK=kK;const je=be(CK);var AK=De,$K=Ve,f0=Date,TK=$K(f0.prototype.getTime);AK({target:"Date",stat:!0},{now:function(){return TK(new f0)}});var IK=it,OK=IK.Date.now,PK=OK,DK=PK,_K=DK;const Mn=be(_K);var MK=ju.forEach,NK=l0,RK=NK("forEach"),LK=RK?[].forEach:function(t){return MK(this,t,arguments.length>1?arguments[1]:void 0)},FK=De,d0=LK;FK({target:"Array",proto:!0,forced:[].forEach!==d0},{forEach:d0});var BK=Zn,jK=BK("Array","forEach"),zK=jK,UK=zK,WK=Lo,HK=$t,VK=hn,KK=UK,fd=Array.prototype,qK={DOMTokenList:!0,NodeList:!0},GK=function(e){var t=e.forEach;return e===fd||VK(fd,e)&&t===fd.forEach||HK(qK,WK(e))?KK:t},YK=GK;const fs=be(YK);var QK=De,JK=vn,p0=Pu,ZK=Je,XK=ZK(function(){p0(1)});QK({target:"Object",stat:!0,forced:XK},{keys:function(t){return p0(JK(t))}});var e8=it,t8=e8.Object.keys,n8=t8,r8=n8,o8=r8;const i8=be(o8);var a8=it,s8=a8.Object.getOwnPropertySymbols,l8=s8,c8=l8,u8=c8;const h0=be(u8);var f8=De,d8=ju.filter,p8=Ta,h8=p8("filter");f8({target:"Array",proto:!0,forced:!h8},{filter:function(t){return d8(this,t,arguments.length>1?arguments[1]:void 0)}});var v8=Zn,m8=v8("Array","filter"),g8=hn,y8=m8,dd=Array.prototype,b8=function(e){var t=e.filter;return e===dd||g8(dd,e)&&t===dd.filter?y8:t},w8=b8,S8=w8,x8=S8;const E8=be(x8);var v0={exports:{}},k8=De,C8=Je,A8=tn,m0=Po.f,g0=bt,$8=!g0||C8(function(){m0(1)});k8({target:"Object",stat:!0,forced:$8,sham:!g0},{getOwnPropertyDescriptor:function(t,n){return m0(A8(t),n)}});var T8=it,y0=T8.Object,I8=v0.exports=function(t,n){return y0.getOwnPropertyDescriptor(t,n)};y0.getOwnPropertyDescriptor.sham&&(I8.sham=!0);var O8=v0.exports,P8=O8,D8=P8,_8=D8;const b0=be(_8);var M8=nn,N8=Ve,R8=Ma,L8=Ra,F8=On,B8=N8([].concat),j8=M8("Reflect","ownKeys")||function(t){var n=R8.f(F8(t)),r=L8.f;return r?B8(n,r(t)):n},z8=De,U8=bt,W8=j8,H8=tn,V8=Po,K8=Ro;z8({target:"Object",stat:!0,sham:!U8},{getOwnPropertyDescriptors:function(t){for(var n=H8(t),r=V8.f,o=W8(n),i={},a=0,s,l;o.length>a;)l=r(n,s=o[a++]),l!==void 0&&K8(i,s,l);return i}});var q8=it,G8=q8.Object.getOwnPropertyDescriptors,Y8=G8,Q8=Y8,J8=Q8;const w0=be(J8);var S0={exports:{}},Z8=De,X8=bt,x0=Ia.f;Z8({target:"Object",stat:!0,forced:Object.defineProperties!==x0,sham:!X8},{defineProperties:x0});var e7=it,E0=e7.Object,t7=S0.exports=function(t,n){return E0.defineProperties(t,n)};E0.defineProperties.sham&&(t7.sham=!0);var n7=S0.exports,r7=n7,o7=r7,i7=o7;const a7=be(i7);var s7=U1;const l7=be(s7);var c7=!1;function u7(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 f7(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 d7=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!c7: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(f7(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=u7(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),pt="-ms-",ds="-moz-",Ce="-webkit-",k0="comm",pd="rule",hd="decl",p7="@import",C0="@keyframes",h7="@layer",v7=Math.abs,ps=String.fromCharCode,m7=Object.assign;function g7(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 A0(e){return e.trim()}function y7(e,t){return(e=t.exec(e))?e[0]:e}function Ae(e,t,n){return e.replace(t,n)}function vd(e,t){return e.indexOf(t)}function at(e,t){return e.charCodeAt(t)|0}function ri(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function md(e){return e.length}function hs(e,t){return t.push(e),e}function b7(e,t){return e.map(t).join("")}var vs=1,Lr=1,$0=0,St=0,Ke=0,Fr="";function ms(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:vs,column:Lr,length:a,return:""}}function oi(e,t){return m7(ms("",null,null,"",null,null,0),e,{length:-e.length},t)}function w7(){return Ke}function S7(){return Ke=St>0?at(Fr,--St):0,Lr--,Ke===10&&(Lr=1,vs--),Ke}function It(){return Ke=St<$0?at(Fr,St++):0,Lr++,Ke===10&&(Lr=1,vs++),Ke}function ln(){return at(Fr,St)}function gs(){return St}function ii(e,t){return ri(Fr,e,t)}function ai(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 T0(e){return vs=Lr=1,$0=sn(Fr=e),St=0,[]}function I0(e){return Fr="",e}function ys(e){return A0(ii(St-1,gd(e===91?e+2:e===40?e+1:e)))}function x7(e){for(;(Ke=ln())&&Ke<33;)It();return ai(e)>2||ai(Ke)>3?"":" "}function E7(e,t){for(;--t&&It()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return ii(e,gs()+(t<6&&ln()==32&&It()==32))}function gd(e){for(;It();)switch(Ke){case e:return St;case 34:case 39:e!==34&&e!==39&&gd(Ke);break;case 40:e===41&&gd(e);break;case 92:It();break}return St}function k7(e,t){for(;It()&&e+Ke!==57;)if(e+Ke===84&&ln()===47)break;return"/*"+ii(t,St-1)+"*"+ps(e===47?e:It())}function C7(e){for(;!ai(ln());)It();return ii(e,St)}function A7(e){return I0(bs("",null,null,null,[""],e=T0(e),0,[0],e))}function bs(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,p=0,d=0,v=0,h=1,g=1,m=1,b=0,w="",A=o,x=i,k=r,$=w;g;)switch(v=b,b=It()){case 40:if(v!=108&&at($,f-1)==58){vd($+=Ae(ys(b),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:$+=ys(b);break;case 9:case 10:case 13:case 32:$+=x7(v);break;case 92:$+=E7(gs()-1,7);continue;case 47:switch(ln()){case 42:case 47:hs($7(k7(It(),gs()),t,n),l);break;default:$+="/"}break;case 123*h:s[c++]=sn($)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:m==-1&&($=Ae($,/\f/g,"")),d>0&&sn($)-f&&hs(d>32?P0($+";",r,n,f-1):P0(Ae($," ","")+";",r,n,f-2),l);break;case 59:$+=";";default:if(hs(k=O0($,t,n,c,u,o,s,w,A=[],x=[],f),i),b===123)if(u===0)bs($,t,k,k,A,i,f,s,x);else switch(p===99&&at($,3)===110?100:p){case 100:case 108:case 109:case 115:bs(e,k,k,r&&hs(O0(e,k,k,0,0,o,s,w,o,A=[],f),x),o,x,f,s,r?A:x);break;default:bs($,k,k,k,[""],x,0,s,x)}}c=u=d=0,h=m=1,w=$="",f=a;break;case 58:f=1+sn($),d=v;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&S7()==125)continue}switch($+=ps(b),b*h){case 38:m=u>0?1:($+="\f",-1);break;case 44:s[c++]=(sn($)-1)*m,m=1;break;case 64:ln()===45&&($+=ys(It())),p=ln(),u=f=sn(w=$+=C7(gs())),b++;break;case 45:v===45&&sn($)==2&&(h=0)}}return i}function O0(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],d=md(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=ri(e,f+1,f=v7(h=a[v])),w=e;m<d;++m)(w=A0(h>0?p[m]+" "+b:Ae(b,/&\f/g,p[m])))&&(l[g++]=w);return ms(e,t,n,o===0?pd:s,l,c,u)}function $7(e,t,n){return ms(e,t,n,k0,ps(w7()),ri(e,2,-2),0)}function P0(e,t,n,r){return ms(e,t,n,hd,ri(e,0,r),ri(e,r+1,-1),r)}function Br(e,t){for(var n="",r=md(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function T7(e,t,n,r){switch(e.type){case h7:if(e.children.length)break;case p7:case hd:return e.return=e.return||e.value;case k0:return"";case C0:return e.return=e.value+"{"+Br(e.children,r)+"}";case pd:e.value=e.props.join(",")}return sn(n=Br(e.children,r))?e.return=e.value+"{"+n+"}":""}function I7(e){var t=md(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function O7(e){return function(t){t.root||(t=t.return)&&e(t)}}function P7(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var D7=function(t,n,r){for(var o=0,i=0;o=i,i=ln(),o===38&&i===12&&(n[r]=1),!ai(i);)It();return ii(t,St)},_7=function(t,n){var r=-1,o=44;do switch(ai(o)){case 0:o===38&&ln()===12&&(n[r]=1),t[r]+=D7(St-1,n,r);break;case 2:t[r]+=ys(o);break;case 4:if(o===44){t[++r]=ln()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ps(o)}while(o=It());return t},M7=function(t,n){return I0(_7(T0(t),n))},D0=new WeakMap,N7=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=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&&!D0.get(r))&&!o){D0.set(t,!0);for(var i=[],a=M7(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},R7=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function _0(e,t){switch(g7(e,t)){case 5103:return Ce+"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 Ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ce+e+ds+e+pt+e+e;case 6828:case 4268:return Ce+e+pt+e+e;case 6165:return Ce+e+pt+"flex-"+e+e;case 5187:return Ce+e+Ae(e,/(\w+).+(:[^]+)/,Ce+"box-$1$2"+pt+"flex-$1$2")+e;case 5443:return Ce+e+pt+"flex-item-"+Ae(e,/flex-|-self/,"")+e;case 4675:return Ce+e+pt+"flex-line-pack"+Ae(e,/align-content|flex-|-self/,"")+e;case 5548:return Ce+e+pt+Ae(e,"shrink","negative")+e;case 5292:return Ce+e+pt+Ae(e,"basis","preferred-size")+e;case 6060:return Ce+"box-"+Ae(e,"-grow","")+Ce+e+pt+Ae(e,"grow","positive")+e;case 4554:return Ce+Ae(e,/([^-])(transform)/g,"$1"+Ce+"$2")+e;case 6187:return Ae(Ae(Ae(e,/(zoom-|grab)/,Ce+"$1"),/(image-set)/,Ce+"$1"),e,"")+e;case 5495:case 3959:return Ae(e,/(image-set\([^]*)/,Ce+"$1$`$1");case 4968:return Ae(Ae(e,/(.+:)(flex-)?(.*)/,Ce+"box-pack:$3"+pt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ce+e+e;case 4095:case 3583:case 4068:case 2532:return Ae(e,/(.+)-inline(.+)/,Ce+"$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(sn(e)-1-t>6)switch(at(e,t+1)){case 109:if(at(e,t+4)!==45)break;case 102:return Ae(e,/(.+:)(.+)-([^]+)/,"$1"+Ce+"$2-$3$1"+ds+(at(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vd(e,"stretch")?_0(Ae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(at(e,t+1)!==115)break;case 6444:switch(at(e,sn(e)-3-(~vd(e,"!important")&&10))){case 107:return Ae(e,":",":"+Ce)+e;case 101:return Ae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ce+(at(e,14)===45?"inline-":"")+"box$3$1"+Ce+"$2$3$1"+pt+"$2box$3")+e}break;case 5936:switch(at(e,t+11)){case 114:return Ce+e+pt+Ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ce+e+pt+Ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ce+e+pt+Ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ce+e+pt+e+e}return e}var L7=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hd:t.return=_0(t.value,t.length);break;case C0:return Br([oi(t,{value:Ae(t.value,"@","@"+Ce)})],o);case pd:if(t.length)return b7(t.props,function(i){switch(y7(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Br([oi(t,{props:[Ae(i,/:(read-\w+)/,":"+ds+"$1")]})],o);case"::placeholder":return Br([oi(t,{props:[Ae(i,/:(plac\w+)/,":"+Ce+"input-$1")]}),oi(t,{props:[Ae(i,/:(plac\w+)/,":"+ds+"$1")]}),oi(t,{props:[Ae(i,/:(plac\w+)/,pt+"input-$1")]})],o)}return""})}},F7=[L7],B7=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 o=t.stylisPlugins||F7,i={},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(" "),m=1;m<g.length;m++)i[g[m]]=!0;s.push(h)});var l,c=[N7,R7];{var u,f=[T7,O7(function(h){u.insert(h)})],p=I7(c.concat(o,f)),d=function(g){return Br(A7(g),p)};l=function(g,m,b,w){u=b,d(g?g+"{"+m.styles+"}":m.styles),w&&(v.inserted[m.name]=!0)}}var v={key:n,sheet:new d7({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return v.sheet.hydrate(s),v};function j7(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=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(o){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 z7={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},U7=!1,W7=/[A-Z]|^ms/g,H7=/_EMO_([^_]+?)_([^]*?)_EMO_/g,M0=function(t){return t.charCodeAt(1)===45},N0=function(t){return t!=null&&typeof t!="boolean"},yd=P7(function(e){return M0(e)?e:e.replace(W7,"-$&").toLowerCase()}),R0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(H7,function(r,o,i){return Nn={name:o,styles:i,next:Nn},o})}return z7[t]!==1&&!M0(t)&&typeof n=="number"&&n!==0?n+"px":n},V7="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ws(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 o=n;if(o.anim===1)return Nn={name:o.name,styles:o.styles,next:Nn},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Nn={name:a.name,styles:a.styles,next:Nn},a=a.next;var s=i.styles+";";return s}return K7(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function K7(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ws(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":N0(s)&&(r+=yd(i)+":"+R0(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&U7)throw new Error(V7);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)N0(a[l])&&(r+=yd(i)+":"+R0(i,a[l])+";");else{var c=ws(e,t,a);switch(i){case"animation":case"animationName":{r+=yd(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}}return r}var L0=/label:\s*([^\s;{]+)\s*(;|$)/g,Nn;function bd(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,o="";Nn=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=ws(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=ws(n,t,e[s]),r){var l=i;o+=l[s]}L0.lastIndex=0;for(var c="",u;(u=L0.exec(o))!==null;)c+="-"+u[1];var f=j7(o)+c;return{name:f,styles:o,next:Nn}}function F0(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var q7=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},G7=function(t,n,r){q7(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function B0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function j0(e,t,n){var r=[],o=F0(e,r,n);return r.length<2?n:o+t(r)}var Y7=function(t){var n=B7(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,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=bd(c,n.registered,void 0);return G7(n,f),n.key+"-"+f.name},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=bd(c,n.registered),p="animation-"+f.name;return B0(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=bd(c,n.registered);B0(n,f)},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return j0(n.registered,r,Q7(c))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:F0.bind(null,n.registered),merge:j0.bind(null,n.registered,r)}},Q7=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},J7=ei,wd=Date.prototype,z0="Invalid Date",U0="toString",Z7=wd[U0],X7=wd.getTime;String(new Date(NaN))!=z0&&J7(wd,U0,function(){var t=X7.call(this);return t===t?Z7.call(this):z0});var eq=Yf,tq=FS,nq=eq?{}.toString:function(){return"[object "+tq(this)+"]"},rq=Yf,oq=ei,iq=nq;rq||oq(Object.prototype,"toString",iq,{unsafe:!0});var aq=Vf.PROPER,sq=ei,lq=_n,W0=as,cq=Vt,uq=BS,Sd="toString",H0=RegExp.prototype,V0=H0[Sd],fq=cq(function(){return V0.call({source:"a",flags:"b"})!="/a/b"}),dq=aq&&V0.name!=Sd;(fq||dq)&&sq(RegExp.prototype,Sd,function(){var t=lq(this),n=W0(t.source),r=t.flags,o=W0(r===void 0&&t instanceof RegExp&&!("flags"in H0)?uq.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var K0=typeof window<"u"?window:self,pq=K0.crypto||K0.msCrypto,hq=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}}(pq);const vq=be(hq);function mq(){return vq().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var gq=Ab;const q0=be(gq);function Ie(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 G0(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return je(n=[je(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Se(Ie("green","white")),i)}function yq(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 o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,l=on(s,1),c=l[0];typeof c=="function"&&(i=c());var u=q0(i[0])?i:[i],f=u.length===1;fs(u).call(u,function(p,d){if(f){var v,h;(v=console).log.apply(v,Se(G0.apply(void 0,je(h=[e]).call(h,Se(p)))))}else if(d){var g;(g=console).log.apply(g,Se(q0(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,Se(G0.apply(void 0,je(b=[e]).call(b,Se(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var bq=Xn,wq=Vf.EXISTS,Sq=Zo.f,Y0=Function.prototype,xq=Y0.toString,Eq=/^\s*function ([^ (]*)/,kq="name";bq&&!wq&&Sq(Y0,kq,{configurable:!0,get:function(){try{return xq.call(this).match(Eq)[1]}catch{return""}}});var Cq=it,Aq=Cq.setTimeout,$q=Aq;const Tq=be($q);function Iq(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=Mn();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Tq(function(){e.apply(void 0,i),n=Mn()},Math.max(0,t-s+n)))}}var Q0=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=I.useRef();a.current=o;var s=I.useMemo(function(){return Iq(function(c){var u=a.current;u&&u(c)},n)},[n,a]),l=I.useCallback(function(c){c.timeStampLow=Mn(),s(c)},[s]);return I.useLayoutEffect(function(){return i.addEventListener(r,l,{passive:!0}),l({target:i,type:r}),function(){return i.removeEventListener(r,l)}},[r,l,i]),!1};Q0.defaultProps={debounce:200};var Oq=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Pq=De,Dq=Oq;Pq({target:"Math",stat:!0},{sign:Dq});var _q=it,Mq=_q.Math.sign,Nq=Mq,Rq=Nq,Lq=Rq;const Fq=be(Lq);function Bq(e,t){var n=Fq(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function jq(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var J0=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=I.useRef(),s=I.useCallback(function(c,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Mn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var v=f==="100%"?o.scrollHeight-o.offsetHeight:f,h=jq(u,v,Bq,(Mn()-d)/5);Math.abs(v-h)<1.5&&(h=v),o[c]=h,v===h?r&&r(!0):s(c,u,f,p+1,d)}}))},[a,r,o]),l=I.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return I.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",l,{passive:!0}),o.addEventListener("wheel",l,{passive:!0}),function(){o.removeEventListener("pointerdown",l),o.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,o,i]),!1};J0.propTypes={name:Ee.string.isRequired,onEnd:Ee.func,target:Ee.any.isRequired,value:Ee.oneOfType([Ee.number,Ee.oneOf(["100%"])]).isRequired};function xd(e){var t=I.useState(e),n=on(t,2),r=n[0],o=n[1],i=I.useRef(),a=I.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function Z0(e,t){var n=i8(e);if(h0){var r=h0(e);t&&(r=E8(r).call(r,function(o){return b0(e,o).enumerable})),n.push.apply(n,r)}return n}function X0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;fs(r=Z0(Object(n),!0)).call(r,function(i){ZU(e,i,n[i])})}else if(w0)a7(e,w0(n));else{var o;fs(o=Z0(Object(n))).call(o,function(i){l7(e,i,b0(n,i))})}}return e}var zq=function(){return 1/0},ex=17,Uq="bottom",Kt="top",tx=1,Wq=34,nx={};function Hq(e,t){return e(),DV(e,t)}function rx(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<tx,s=i<tx,l=t===Kt?s:a,c=t!==Kt?s:a;return{atBottom:a,atEnd:l,atStart:c,atTop:s}}function si(e,t){return e===(t===Kt?0:"100%")}var Ed=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,c=t.scroller,u=I.useMemo(function(){return yq("<ScrollToBottom>",{force:i})},[i]);s=s===Kt?Kt:Uq;var f=I.useRef(0),p=I.useRef(a),d=xd(s===Kt?0:"100%"),v=on(d,3),h=v[0],g=v[1],m=v[2],b=xd(null),w=on(b,3),A=w[0],x=w[1],k=w[2],$=I.useRef(0),R=I.useRef(0),W=I.useRef(0),T=I.useState(!0),_=on(T,2),L=_[0],N=_[1],F=I.useState(!0),D=on(F,2),M=D[0],G=D[1],z=I.useState(!0),O=on(z,2),y=O[0],P=O[1],B=I.useState(!1),S=on(B,2),H=S[0],Y=S[1],q=xd(!0),Q=on(q,3),ee=Q[0],te=Q[1],J=Q[2],X=I.useRef([]),K=I.useCallback(function(j){var ne=k.current;return X.current.push(j),ne&&j({scrollTop:ne.scrollTop}),function(){var ae=X.current,ce=qV(ae).call(ae,j);~ce&&gK(ae).call(ae,ce,1)}},[X,k]),oe=I.useCallback(function(){var j=m.current;u(function(){var ne;return je(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,Se(Ie("magenta")),Se(Ie("orange")),[{animateTo:j}])}),f.current=Mn(),si(j,s)||te(!1),g(null)},[m,u,f,s,g,te]),V=I.useCallback(function(j){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=ne.behavior,ce=k.current;if(typeof j!="number"&&j!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var ve;return[je(ve=["%cscrollTo%c: Will scroll to %c".concat(typeof j=="number"?j+"px":j.replace(/%/g,"%%"),"%c")]).call(ve,Se(Ie("lime","")),Se(Ie("purple"))),{behavior:ae,nextAnimateTo:j,target:ce}]}),ae==="auto"?(oe(),ce&&(ce.scrollTop=j==="100%"?ce.scrollHeight-ce.offsetHeight:j)):(ae!=="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(j)),si(j,s)&&(u(function(){var ve;return[je(ve=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ve,Se(Ie("lime","")),Se(Ie("purple"))),[{mode:s,nextAnimateTo:j}]]}),te(!0))},[u,oe,s,g,te,k]),le=I.useCallback(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=j.behavior;u(function(){var ae;return je(ae=["%cscrollToBottom%c: Called"]).call(ae,Se(Ie("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.'),V("100%",{behavior:ne||"smooth"})},[u,V]),Z=I.useCallback(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=j.behavior;u(function(){var ae;return je(ae=["%cscrollToTop%c: Called"]).call(ae,Se(Ie("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.'),V(0,{behavior:ne||"smooth"})},[u,V]),fe=I.useCallback(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=j.behavior;u(function(){var ce;return je(ce=["%cscrollToEnd%c: Called"]).call(ce,Se(Ie("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 ae={behavior:ne||"smooth"};s===Kt?Z(ae):le(ae)},[u,s,le,Z]),pe=I.useCallback(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=j.behavior;u(function(){var ce;return je(ce=["%cscrollToStart%c: Called"]).call(ce,Se(Ie("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 ae={behavior:ne||"smooth"};s===Kt?le(ae):Z(ae)},[u,s,le,Z]),xe=I.useCallback(function(){var j=k.current;if(j){if(p.current==="auto"){u(function(){var nt;return je(nt=["%ctarget changed%c: Initial scroll"]).call(nt,Se(Ie("blue")))}),j.scrollTop=s===Kt?0:j.scrollHeight-j.offsetHeight,p.current=!1;return}var ne=$.current,ae=j.offsetHeight,ce=j.scrollHeight,ve=j.scrollTop,Ue=s===Kt?0:Math.max(0,ce-ae-ve),We=Math.max(0,ne-ve),mt=c({maxValue:Ue,minValue:We,offsetHeight:ae,scrollHeight:ce,scrollTop:ve}),tt=Math.max(0,Math.min(Ue,mt)),Pe;s===Kt||tt!==Ue?Pe=ve+tt:Pe="100%",u(function(){var nt,Ge,Bn;return[je(nt=[je(Ge=je(Bn="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(Bn,typeof Pe=="number"?Pe+"px":Pe.replace(/%/g,"%%"),"%c (%c")).call(Ge,(Pe==="100%"?Ue:Pe)+ne,"px%c)")]).call(nt,Se(Ie("orange")),Se(Ie("purple")),Se(Ie("purple")),Se(Ie("purple"))),{animateFrom:ne,maxValue:Ue,minValue:We,nextAnimateTo:Pe,nextValue:tt,offsetHeight:ae,rawNextValue:mt,scrollHeight:ce,scrollTop:ve}]}),V(Pe,{behavior:"smooth"})}},[$,u,s,c,V,k]),qe=I.useCallback(function(j){var ne,ae=j.timeStampLow,ce=m.current,ve=k.current,Ue=ce!==null;if(!(ae<=f.current||!ve)){var We=rx({mode:s,target:ve}),mt=We.atBottom,tt=We.atEnd,Pe=We.atStart,nt=We.atTop;N(mt),G(tt),Y(Pe),P(nt);var Ge=ve.offsetHeight,Bn=ve.scrollHeight,fE=R.current,dE=W.current,Xd=Ge!==fE,ep=Bn!==dE;if(Xd&&(R.current=Ge),ep&&(W.current=Bn),!Xd&&!ep){var _s=Ue&&si(ce,s)||tt;J.current!==_s&&(u(function(){var or,pE,hE,vE;return[je(or=["%conScroll%c: %csetSticky%c(%c".concat(_s,"%c)")]).call(or,Se(Ie("red")),Se(Ie("red")),Se(Ie("purple"))),je(pE=[je(hE=je(vE="(animating = %c".concat(Ue,"%c && isEnd = %c")).call(vE,si(ce,s),"%c) || atEnd = %c")).call(hE,tt,"%c")]).call(pE,Se(Ie("purple")),Se(Ie("purple")),Se(Ie("purple")),[{animating:Ue,animateTo:ce,atEnd:tt,mode:s,offsetHeight:ve.offsetHeight,scrollHeight:ve.scrollHeight,sticky:J.current,nextSticky:_s}])]}),te(_s))}else J.current&&(u(function(){var or;return[je(or=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(or,Se(Ie("red")),Se(Ie("orange")),[{offsetHeightChanged:Xd,scrollHeightChanged:ep}]),{nextOffsetHeight:Ge,prevOffsetHeight:fE,nextScrollHeight:Bn,prevScrollHeight:dE}]}),xe());var gQ=ve.scrollTop;fs(ne=X.current).call(ne,function(or){return or({scrollTop:gQ})})}},[m,u,f,s,R,W,X,xe,N,G,Y,P,te,J,k]);I.useEffect(function(){if(A){var j=!1,ne=Hq(function(){var ae=k.current,ce=m.current!==null;J.current?rx({mode:s,target:ae}).atEnd?j=!1:j?Mn()-j>Wq&&(ce||($.current=ae.scrollTop,u(function(){var ve;return je(ve=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ve,Se(Ie("navy")),Se(Ie("orange")))}),xe()),j=!1):j=Mn():ae.scrollHeight<=ae.offsetHeight&&!J.current&&(u(function(){var ve;return[je(ve=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ve,Se(Ie("navy")),Se(Ie("purple"))),[{offsetHeight:ae.offsetHeight,scrollHeight:ae.scrollHeight,sticky:J.current}]]}),te(!0))},Math.max(ex,n)||ex);return function(){return clearInterval(ne)}}},[m,n,u,s,xe,te,J,A,k]);var st=I.useMemo(function(){var j=nx[l]||(nx[l]=Y7({key:"react-scroll-to-bottom--css-"+mq(),nonce:l}));return function(ne){return j.css(ne)+""}},[l]),Et=I.useMemo(function(){return{observeScrollPosition:K,setTarget:x,styleToClassName:st}},[K,x,st]),lt=I.useMemo(function(){return{atBottom:L,atEnd:M,atStart:H,atTop:y,mode:s}},[L,M,H,y,s]),ie=I.useMemo(function(){var j=h!==null;return{animating:j,animatingToEnd:j&&si(h,s),sticky:ee}},[h,s,ee]),ue=I.useMemo(function(){return X0(X0({},lt),ie)},[lt,ie]),U=I.useMemo(function(){return{scrollTo:V,scrollToBottom:le,scrollToEnd:fe,scrollToStart:pe,scrollToTop:Z}},[V,le,fe,pe,Z]);return I.useEffect(function(){if(A){var j=function(){W.current=A.scrollHeight};return A.addEventListener("focus",j,{capture:!0,passive:!0}),function(){return A.removeEventListener("focus",j)}}},[A]),u(function(){var j;return[je(j=["%cRender%c: Render"]).call(j,Se(Ie("cyan",""))),{animateTo:h,animating:h!==null,sticky:ee,target:A}]}),I.createElement(Qa.Provider,{value:Et},I.createElement(xf.Provider,{value:U},I.createElement(Cf.Provider,{value:ue},I.createElement(Ef.Provider,{value:lt},I.createElement(kf.Provider,{value:ie},r,A&&I.createElement(Q0,{debounce:o,name:"scroll",onEvent:qe,target:A}),A&&h!==null&&I.createElement(J0,{name:"scrollTop",onEnd:oe,target:A,value:h}))))))};Ed.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:zq},Ed.propTypes={checkInterval:Ee.number,children:Ee.any,debounce:Ee.number,debug:Ee.bool,initialScrollBehavior:Ee.oneOf(["auto","smooth"]),mode:Ee.oneOf(["bottom","top"]),nonce:Ee.string,scroller:Ee.func};var Vq={height:"100%",overflowY:"auto",width:"100%"},kd=function(t){var n=t.children,r=t.className,o=I.useContext(Qa),i=o.setTarget,a=Af()(Vq);return I.createElement("div",{className:vf(a,(r||"")+""),ref:i},n)};kd.defaultProps={children:void 0,className:void 0},kd.propTypes={children:Ee.any,className:Ee.string};var Kq={position:"relative"},Cd=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Af()(Kq);return I.createElement("div",{className:vf(a,(r||"")+"")},I.createElement(kd,{className:(i||"")+""},n),I.createElement($f,{className:(o||"")+""}))};Cd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Cd.propTypes={children:Ee.any,className:Ee.string,followButtonClassName:Ee.string,scrollViewClassName:Ee.string};var Ad=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,c=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return I.createElement(Ed,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},I.createElement(Cd,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};Ad.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},Ad.propTypes={checkInterval:Ee.number,children:Ee.any,className:Ee.string,debounce:Ee.number,debug:Ee.bool,followButtonClassName:Ee.string,initialScrollBehavior:Ee.oneOf(["auto","smooth"]),mode:Ee.oneOf(["bottom","top"]),nonce:Ee.string,scroller:Ee.func,scrollViewClassName:Ee.string},XN();let ox=(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 $d=I.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:o,botAvatar:i,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:c,showMarquee:u=!0,showDateSystemMessage:f=!0,showMessageStatus:p=!0,showIncomingMessageAvatar:d=!0,showOutgoingMessageAvatar:v=!1,...h})=>{var A;const{messageList:g}=me,m=I.useMemo(()=>f?_E(t):t,[t]),b=I.useMemo(()=>{var k;const x=m.filter($=>$.direction==="outgoing"&&$.status!=="pending");return(k=x[x.length-1])==null?void 0:k.id},[m]),w=x=>{if(x.direction==="incoming")return d;if(x.direction==="outgoing")return v};return E.jsxs(Ad,{...h,className:Ao(g.container.className,e),followButtonClassName:g.scrollDownButton.className,scrollViewClassName:g.viewPort.className,children:[r&&E.jsx("span",{...g.headerMessage,children:r}),u&&E.jsx(JN,{botAvatar:i,botDescription:a,botName:s}),m.map(x=>{var k;return E.jsx(Yc,{renderers:o,sendMessage:l,addMessageFeedback:c,isLastDeliveredMessage:p&&x.id===b,showAvatar:w(x),...x},((k=x.metadata)==null?void 0:k.clientMessageId)||x.id)}),n&&E.jsx(Yc,{id:ox(),renderers:o,sendMessage:l,direction:"incoming",timestamp:new Date,showAvatar:d,block:void 0,sender:((A=t.filter(x=>x.direction==="incoming").at(-1))==null?void 0:A.sender)??{name:s||"Bot",avatar:i},children:E.jsx(Gc,{})})]})});$d.displayName="MessageList";const qq=({className:e,...t})=>{const{className:n}=me.loader;return E.jsx("div",{...t,className:Ao(e,n)})};function ix({error:e,restartConversation:t,closeWindow:n}){let r,o;const{error:i}=me;return e.type==="configuration"?(r="Configuration error",o=E.jsx(tP,{...i.icon})):e.type==="bot"?(r="Bot error",o=E.jsx(Jv,{...i.icon})):e.type==="network"?(r="Network error",o=E.jsx(uP,{...i.icon})):e.type==="disconnected"?(r="Disconnected",o=E.jsx(sP,{...i.icon})):(r="Unexpected error",o=E.jsx(Jv,{...i.icon})),E.jsx(Gq,{error:e,title:r,icon:o,restartConversation:t,closeWindow:n})}function Gq({error:e,title:t,icon:n,restartConversation:r,closeWindow:o}){const{error:i}=me;return E.jsxs("div",{...i.container,children:[E.jsxs("div",{...i.header.container,children:[`Webchat ${e.type} error`,E.jsxs("div",{...i.header.actions,children:[r&&E.jsx(qc,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),o&&E.jsx(Uy,{onClick:o,style:{color:"white",backgroundColor:"transparent"}})]})]}),E.jsxs("div",{...i.content,children:[n,E.jsx("div",{...i.errorTitle,children:t}),E.jsx("div",{...i.errorMessage,children:e.message}),e.id&&E.jsx("div",{...i.id,children:e.id})]})]})}const ax=({connected:e,configuration:t,isTyping:n,messages:r,user:o,isLoading:i,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:c,error:u,participants:f,closeWindow:p,sendMessage:d,uploadFile:v,addMessageFeedback:h,restartConversation:g,clientId:m,storageKey:b,soundOn:w,toggleSound:A,...x})=>{const{color:k,fontFamily:$,radius:R,themeMode:W,variant:T,headerVariant:_,botAvatar:L,botDescription:N,botName:F,composerPlaceholder:D,footer:M,feedbackEnabled:G,additionalStylesheetUrl:z}=t,O={color:k,fontFamily:$,radius:R,themeMode:W,variant:T,headerVariant:_,additionalStylesheetUrl:z};G||(h=void 0);const y=I.useMemo(()=>o?pp(r,f,o.id,F,L):[],[L,F,r,o,f]),P=S=>(S==null?void 0:S.type)==="network"||(S==null?void 0:S.type)==="disconnected",B=()=>{P(u)&&typeof navigator<"u"&&navigator.onLine&&g&&g()};return I.useEffect(()=>{if(g)return window.addEventListener("online",B),()=>{window.removeEventListener("online",B)}},[u,g]),I.useEffect(()=>{if(!P(u)||!g)return;const S=window.setInterval(()=>{B()},3e3);return()=>{window.clearInterval(S)}},[u,g]),E.jsxs(E.Fragment,{children:[E.jsx(Dy,{...O}),E.jsx(Bc,{connected:e,allowFileUpload:c,uploadFile:v,storageKey:b,...x,children:u?E.jsx(ix,{error:u,restartConversation:g,closeWindow:p}):E.jsxs(E.Fragment,{children:[E.jsx(Wy,{closeWindow:p,configuration:t,restartConversation:g,clientId:m,soundOn:w,toggleSound:A}),i?E.jsx(qq,{}):E.jsx($d,{botAvatar:L,botDescription:N,botName:F,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:y}),E.jsx(Zg,{sendMessage:d,uploadFile:v,connected:e,isReadOnly:s,disableComposer:l,footer:M,composerPlaceholder:D,allowFileUpload:c,storageKey:b})]})})]})};function Yq(){const[e,t]=I.useState(!1),n=I.useRef(null);return{isTyping:e,setIsTyping:(r,o)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!o)return()=>{};const i=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>o&&t(!1)},o+100);return()=>clearTimeout(i)}}}var Qq=Object.defineProperty,Jq=(e,t,n)=>t in e?Qq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t,n)=>Jq(e,t+"",n),Xq=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},eG={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},tG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},nG=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},rG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},sx=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){let s=(e?o:o.map(l=>encodeURIComponent(l))).join(nG(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let i=tG(r),a=o.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Ss({allowReserved:e,name:n,value:s})).join(i);return r==="label"||r==="matrix"?i+a:a},Ss=({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)}`},lx=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(o instanceof Date)return`${n}=${o.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(o).forEach(([c,u])=>{s=[...s,c,e?u:encodeURIComponent(u)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let i=rG(r),a=Object.entries(o).map(([s,l])=>Ss({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(i);return r==="label"||r==="matrix"?i+a:a},oG=/\{[^{}]+\}/g,iG=({path:e,url:t})=>{let n=t,r=t.match(oG);if(r)for(let o of r){let i=!1,a=o.substring(1,o.length-1),s="simple";a.endsWith("*")&&(i=!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(o,sx({explode:i,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(o,lx({explode:i,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(o,`;${Ss({name:a,value:l})}`);continue}let c=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(o,c)}return n},cx=({allowReserved:e,array:t,object:n}={})=>r=>{let o=[];if(r&&typeof r=="object")for(let i in r){let a=r[i];if(a!=null){if(Array.isArray(a)){o=[...o,sx({allowReserved:e,explode:!0,name:i,style:"form",value:a,...t})];continue}if(typeof a=="object"){o=[...o,lx({allowReserved:e,explode:!0,name:i,style:"deepObject",value:a,...n})];continue}o=[...o,Ss({allowReserved:e,name:i,value:a})]}}return o.join("&")},aG=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"}},sG=async({security:e,...t})=>{for(let n of e){let r=await Xq(n,t.auth);if(!r)continue;let o=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[o]=r;break;case"cookie":t.headers.append("Cookie",`${o}=${r}`);break;case"header":default:t.headers.set(o,r);break}return}},ux=e=>lG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:cx(e.querySerializer),url:e.url}),lG=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{let i=o.startsWith("/")?o:`/${o}`,a=(e??"")+i;t&&(a=iG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},fx=(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=dx(e.headers,t.headers),r},dx=(...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[o,i]of r)if(i===null)t.delete(o);else if(Array.isArray(i))for(let a of i)t.append(o,a);else i!==void 0&&t.set(o,typeof i=="object"?JSON.stringify(i):i)}return t},Td=class{constructor(){Zq(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]}},cG=()=>({error:new Td,request:new Td,response:new Td}),uG=cx({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fG={"Content-Type":"application/json"},px=(e={})=>({...eG,headers:fG,parseAs:"auto",querySerializer:uG,...e}),dG=(e={})=>{let t=fx(px(),e),n=()=>({...t}),r=a=>(t=fx(t,a),n()),o=cG(),i=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:dx(t.headers,a.headers)};s.security&&await sG({...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=ux(s),c={redirect:"follow",...s},u=new Request(l,c);for(let g of o.request._fns)u=await g(u,s);let f=s.fetch,p=await f(u);for(let g of o.response._fns)p=await g(p,u,s);let d={request:u,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?aG(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let m=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),{data:m,...d}}let v=await p.text();try{v=JSON.parse(v)}catch{}let h=v;for(let g of o.error._fns)h=await g(v,p,u,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:ux,connect:a=>i({...a,method:"CONNECT"}),delete:a=>i({...a,method:"DELETE"}),get:a=>i({...a,method:"GET"}),getConfig:n,head:a=>i({...a,method:"HEAD"}),interceptors:o,options:a=>i({...a,method:"OPTIONS"}),patch:a=>i({...a,method:"PATCH"}),post:a=>i({...a,method:"POST"}),put:a=>i({...a,method:"PUT"}),request:i,setConfig:r,trace:a=>i({...a,method:"TRACE"})}},pG=dG,hG=px;const Oe=pG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(hG({baseUrl:"https://webchat.botpress.cloud/"}))),vG=e=>(e.client??Oe).delete({url:"/conversations/{id}",...e}),mG=e=>(e.client??Oe).get({url:"/conversations/{id}",...e}),gG=e=>(e.client??Oe).get({url:"/conversations",...e}),yG=e=>(e.client??Oe).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),bG=e=>(e.client??Oe).get({url:"/conversations/{id}/messages",...e}),wG=e=>(e.client??Oe).get({url:"/conversations/{id}/participants",...e}),SG=e=>(e.client??Oe).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xG=e=>(e.client??Oe).delete({url:"/conversations/{id}/participants/{userId}",...e}),EG=e=>(e.client??Oe).get({url:"/conversations/{id}/participants/{userId}",...e}),kG=e=>(e.client??Oe).delete({url:"/messages/{id}",...e}),CG=e=>(e.client??Oe).get({url:"/messages/{id}",...e}),AG=e=>(e.client??Oe).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),$G=e=>(e.client??Oe).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),TG=e=>(e.client??Oe).delete({url:"/messages/{id}/feedback",...e}),IG=e=>(e.client??Oe).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),OG=e=>(e.client??Oe).delete({url:"/users/me",...e}),PG=e=>(e.client??Oe).get({url:"/users/me",...e}),DG=e=>(e.client??Oe).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hx=e=>((e==null?void 0:e.client)??Oe).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),_G=e=>((e==null?void 0:e.client)??Oe).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),MG=e=>(e.client??Oe).get({url:"/events/{id}",...e}),NG=e=>(e.client??Oe).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),RG=e=>(e.client??Oe).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let vx=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 Id(e){}function LG(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=Id,onError:n=Id,onRetry:r=Id,onComment:o}=e;let i="",a=!0,s,l="",c="";function u(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=FG(`${i}${g}`);for(const w of m)f(w);i=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){o&&o(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const m=h.slice(0,g),b=h[g+1]===" "?2:1,w=h.slice(g+b);p(m,w,h);return}p(h,"",h)}function p(h,g,m){switch(h){case"event":c=g;break;case"data":l=`${l}${g}
289
+ `)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),nd&&(s=new RegExp("^"+g+"$(?!\\s)",h)),td&&(l=n.lastIndex),c=cs.call(v?s:n,b),v?c?(c.input=c.input.slice(m),c[0]=c[0].slice(m),c.index=n.lastIndex,n.lastIndex+=c[0].length):n.lastIndex=0:td&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),nd&&c&&c.length>1&&C9.call(c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&d)for(c.groups=f=S9(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=c[p[1]];return c});var rd=ed,$9=MH,QS=rd;$9({target:"RegExp",proto:!0,forced:/./.exec!==QS},{exec:QS});var JS=ei,T9=rd,ZS=Vt,XS=Jo,I9=ts,O9=XS("species"),od=RegExp.prototype,P9=function(e,t,n,r){var o=XS(e),i=!ZS(function(){var c={};return c[o]=function(){return 7},""[e](c)!=7}),a=i&&!ZS(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[O9]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return c=!0,null},u[o](""),!c});if(!i||!a||n){var s=/./[o],l=t(o,""[e],function(c,u,f,p,d){var v=u.exec;return v===T9||v===od.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:c.call(f,u,p)}:{done:!1}});JS(String.prototype,e,l[0]),JS(od,o,l[1])}r&&I9(od[o],"sham",!0)},D9=os,_9=as,M9=Za,e0=function(e){return function(t,n){var r=_9(M9(t)),o=D9(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},N9={codeAt:e0(!1),charAt:e0(!0)},R9=N9.charAt,L9=function(e,t,n){return t+(n?R9(e,t).length:1)},F9=sS,B9=Math.floor,j9="".replace,z9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,U9=/\$([$&'`]|\d{1,2})/g,W9=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=U9;return o!==void 0&&(o=F9(o),l=z9),j9.call(i,l,function(c,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return c;if(p>s){var d=B9(p/10);return d===0?c:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):c}f=r[p-1]}return f===void 0?"":f})},H9=_n,V9=Nt,K9=If,q9=rd,G9=function(e,t){var n=e.exec;if(V9(n)){var r=n.call(e,t);return r!==null&&H9(r),r}if(K9(e)==="RegExp")return q9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Y9=P9,Q9=Vt,J9=_n,Z9=Nt,X9=os,eV=_S,Rr=as,tV=Za,nV=L9,rV=nS,oV=W9,iV=G9,aV=Jo,id=aV("replace"),sV=Math.max,lV=Math.min,cV=function(e){return e===void 0?e:String(e)},uV=function(){return"a".replace(/./,"$0")==="$0"}(),t0=function(){return/./[id]?/./[id]("a","$0")==="":!1}(),fV=!Q9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Y9("replace",function(e,t,n){var r=t0?"$":"$0";return[function(i,a){var s=tV(this),l=i==null?void 0:rV(i,id);return l?l.call(i,s,a):t.call(Rr(s),i,a)},function(o,i){var a=J9(this),s=Rr(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var l=n(t,a,s,i);if(l.done)return l.value}var c=Z9(i);c||(i=Rr(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=iV(a,s);if(d===null||(p.push(d),!u))break;var v=Rr(d[0]);v===""&&(a.lastIndex=nV(s,eV(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=Rr(d[0]),w=sV(lV(X9(d.index),s.length),0),A=[],x=1;x<d.length;x++)A.push(cV(d[x]));var k=d.groups;if(c){var $=[b].concat(A,w,s);k!==void 0&&$.push(k);var R=Rr(i.apply(void 0,$))}else R=oV(b,s,w,A,k,i);w>=g&&(h+=s.slice(g,w)+R,g=w+b.length)}return h+s.slice(g)}]},!fV||!uV||t0);var ni=Qe,dV=iu,pV=Gn,us=function(e){return dV.slice(0,e.length)===e},hV=function(){return us("Bun/")?"BUN":us("Cloudflare-Workers")?"CLOUDFLARE":us("Deno/")?"DENO":us("Node.js/")?"NODE":ni.Bun&&typeof Bun.version=="string"?"BUN":ni.Deno&&typeof Deno.version=="object"?"DENO":pV(ni.process)==="process"?"NODE":ni.window&&ni.document?"BROWSER":"REST"}(),vV=TypeError,mV=function(e,t){if(e<t)throw new vV("Not enough arguments");return e},n0=Qe,gV=Qc,yV=ut,bV=hV,wV=iu,SV=Na,xV=mV,EV=n0.Function,kV=/MSIE .\./.test(wV)||bV==="BUN"&&function(){var e=n0.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),r0=function(e,t){var n=t?2:1;return kV?function(r,o){var i=xV(arguments.length,1)>n,a=yV(r)?r:EV(r),s=i?SV(arguments,n):[],l=i?function(){gV(a,this,s)}:a;return t?e(l,o):e(l)}:e},CV=Pe,o0=Qe,AV=r0,i0=AV(o0.setInterval,!0);CV({global:!0,bind:!0,forced:o0.setInterval!==i0},{setInterval:i0});var $V=Pe,a0=Qe,TV=r0,s0=TV(a0.setTimeout,!0);$V({global:!0,bind:!0,forced:a0.setTimeout!==s0},{setTimeout:s0});var IV=it,OV=IV.setInterval,PV=OV;const DV=be(PV);var _V=Je,l0=function(e,t){var n=[][e];return!!n&&_V(function(){n.call(null,t||function(){return 1},1)})},MV=Pe,NV=Zc,RV=Bb.indexOf,LV=l0,ad=NV([].indexOf),c0=!!ad&&1/ad([1],1,-0)<0,FV=c0||!LV("indexOf");MV({target:"Array",proto:!0,forced:FV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return c0?ad(this,t,n)||0:RV(this,t,n)}});var BV=Zn,jV=BV("Array","indexOf"),zV=hn,UV=jV,sd=Array.prototype,WV=function(e){var t=e.indexOf;return e===sd||zV(sd,e)&&t===sd.indexOf?UV:t},HV=WV,VV=HV,KV=VV;const qV=be(KV);var u0=xa,GV=TypeError,YV=function(e,t){if(!delete e[t])throw new GV("Cannot delete property "+u0(t)+" of "+u0(e))},QV=Pe,JV=vn,ZV=Tu,XV=Aa,eK=Yn,tK=x1,nK=xu,rK=$u,oK=Ro,ld=YV,iK=Ta,aK=iK("splice"),sK=Math.max,lK=Math.min;QV({target:"Array",proto:!0,forced:!aK},{splice:function(t,n){var r=JV(this),o=eK(r),i=ZV(t,o),a=arguments.length,s,l,c,u,f,p;for(a===0?s=l=0:a===1?(s=0,l=o-i):(s=a-2,l=lK(sK(XV(n),0),o-i)),nK(o+s-l),c=rK(r,l),u=0;u<l;u++)f=i+u,f in r&&oK(c,u,r[f]);if(c.length=l,s<l){for(u=i;u<o-l;u++)f=u+l,p=u+s,f in r?r[p]=r[f]:ld(r,p);for(u=o;u>o-l+s;u--)ld(r,u-1)}else if(s>l)for(u=o-l;u>i;u--)f=u+l-1,p=u+s-1,f in r?r[p]=r[f]:ld(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return tK(r,o-l+s),c}});var cK=Zn,uK=cK("Array","splice"),fK=hn,dK=uK,cd=Array.prototype,pK=function(e){var t=e.splice;return e===cd||fK(cd,e)&&t===cd.splice?dK:t},hK=pK,vK=hK,mK=vK;const gK=be(mK);var yK=Zn,bK=yK("Array","concat"),wK=hn,SK=bK,ud=Array.prototype,xK=function(e){var t=e.concat;return e===ud||wK(ud,e)&&t===ud.concat?SK:t},EK=xK,kK=EK,CK=kK;const je=be(CK);var AK=Pe,$K=Ke,f0=Date,TK=$K(f0.prototype.getTime);AK({target:"Date",stat:!0},{now:function(){return TK(new f0)}});var IK=it,OK=IK.Date.now,PK=OK,DK=PK,_K=DK;const Mn=be(_K);var MK=ju.forEach,NK=l0,RK=NK("forEach"),LK=RK?[].forEach:function(t){return MK(this,t,arguments.length>1?arguments[1]:void 0)},FK=Pe,d0=LK;FK({target:"Array",proto:!0,forced:[].forEach!==d0},{forEach:d0});var BK=Zn,jK=BK("Array","forEach"),zK=jK,UK=zK,WK=Lo,HK=$t,VK=hn,KK=UK,fd=Array.prototype,qK={DOMTokenList:!0,NodeList:!0},GK=function(e){var t=e.forEach;return e===fd||VK(fd,e)&&t===fd.forEach||HK(qK,WK(e))?KK:t},YK=GK;const fs=be(YK);var QK=Pe,JK=vn,p0=Pu,ZK=Je,XK=ZK(function(){p0(1)});QK({target:"Object",stat:!0,forced:XK},{keys:function(t){return p0(JK(t))}});var e8=it,t8=e8.Object.keys,n8=t8,r8=n8,o8=r8;const i8=be(o8);var a8=it,s8=a8.Object.getOwnPropertySymbols,l8=s8,c8=l8,u8=c8;const h0=be(u8);var f8=Pe,d8=ju.filter,p8=Ta,h8=p8("filter");f8({target:"Array",proto:!0,forced:!h8},{filter:function(t){return d8(this,t,arguments.length>1?arguments[1]:void 0)}});var v8=Zn,m8=v8("Array","filter"),g8=hn,y8=m8,dd=Array.prototype,b8=function(e){var t=e.filter;return e===dd||g8(dd,e)&&t===dd.filter?y8:t},w8=b8,S8=w8,x8=S8;const E8=be(x8);var v0={exports:{}},k8=Pe,C8=Je,A8=tn,m0=Po.f,g0=wt,$8=!g0||C8(function(){m0(1)});k8({target:"Object",stat:!0,forced:$8,sham:!g0},{getOwnPropertyDescriptor:function(t,n){return m0(A8(t),n)}});var T8=it,y0=T8.Object,I8=v0.exports=function(t,n){return y0.getOwnPropertyDescriptor(t,n)};y0.getOwnPropertyDescriptor.sham&&(I8.sham=!0);var O8=v0.exports,P8=O8,D8=P8,_8=D8;const b0=be(_8);var M8=nn,N8=Ke,R8=Ma,L8=Ra,F8=On,B8=N8([].concat),j8=M8("Reflect","ownKeys")||function(t){var n=R8.f(F8(t)),r=L8.f;return r?B8(n,r(t)):n},z8=Pe,U8=wt,W8=j8,H8=tn,V8=Po,K8=Ro;z8({target:"Object",stat:!0,sham:!U8},{getOwnPropertyDescriptors:function(t){for(var n=H8(t),r=V8.f,o=W8(n),i={},a=0,s,l;o.length>a;)l=r(n,s=o[a++]),l!==void 0&&K8(i,s,l);return i}});var q8=it,G8=q8.Object.getOwnPropertyDescriptors,Y8=G8,Q8=Y8,J8=Q8;const w0=be(J8);var S0={exports:{}},Z8=Pe,X8=wt,x0=Ia.f;Z8({target:"Object",stat:!0,forced:Object.defineProperties!==x0,sham:!X8},{defineProperties:x0});var e7=it,E0=e7.Object,t7=S0.exports=function(t,n){return E0.defineProperties(t,n)};E0.defineProperties.sham&&(t7.sham=!0);var n7=S0.exports,r7=n7,o7=r7,i7=o7;const a7=be(i7);var s7=U1;const l7=be(s7);var c7=!1;function u7(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 f7(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 d7=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!c7: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(f7(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=u7(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ft="-ms-",ds="-moz-",ke="-webkit-",k0="comm",pd="rule",hd="decl",p7="@import",C0="@keyframes",h7="@layer",v7=Math.abs,ps=String.fromCharCode,m7=Object.assign;function g7(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 A0(e){return e.trim()}function y7(e,t){return(e=t.exec(e))?e[0]:e}function Ce(e,t,n){return e.replace(t,n)}function vd(e,t){return e.indexOf(t)}function at(e,t){return e.charCodeAt(t)|0}function ri(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function md(e){return e.length}function hs(e,t){return t.push(e),e}function b7(e,t){return e.map(t).join("")}var vs=1,Lr=1,$0=0,xt=0,qe=0,Fr="";function ms(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:vs,column:Lr,length:a,return:""}}function oi(e,t){return m7(ms("",null,null,"",null,null,0),e,{length:-e.length},t)}function w7(){return qe}function S7(){return qe=xt>0?at(Fr,--xt):0,Lr--,qe===10&&(Lr=1,vs--),qe}function It(){return qe=xt<$0?at(Fr,xt++):0,Lr++,qe===10&&(Lr=1,vs++),qe}function ln(){return at(Fr,xt)}function gs(){return xt}function ii(e,t){return ri(Fr,e,t)}function ai(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 T0(e){return vs=Lr=1,$0=sn(Fr=e),xt=0,[]}function I0(e){return Fr="",e}function ys(e){return A0(ii(xt-1,gd(e===91?e+2:e===40?e+1:e)))}function x7(e){for(;(qe=ln())&&qe<33;)It();return ai(e)>2||ai(qe)>3?"":" "}function E7(e,t){for(;--t&&It()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return ii(e,gs()+(t<6&&ln()==32&&It()==32))}function gd(e){for(;It();)switch(qe){case e:return xt;case 34:case 39:e!==34&&e!==39&&gd(qe);break;case 40:e===41&&gd(e);break;case 92:It();break}return xt}function k7(e,t){for(;It()&&e+qe!==57;)if(e+qe===84&&ln()===47)break;return"/*"+ii(t,xt-1)+"*"+ps(e===47?e:It())}function C7(e){for(;!ai(ln());)It();return ii(e,xt)}function A7(e){return I0(bs("",null,null,null,[""],e=T0(e),0,[0],e))}function bs(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,p=0,d=0,v=0,h=1,g=1,m=1,b=0,w="",A=o,x=i,k=r,$=w;g;)switch(v=b,b=It()){case 40:if(v!=108&&at($,f-1)==58){vd($+=Ce(ys(b),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:$+=ys(b);break;case 9:case 10:case 13:case 32:$+=x7(v);break;case 92:$+=E7(gs()-1,7);continue;case 47:switch(ln()){case 42:case 47:hs($7(k7(It(),gs()),t,n),l);break;default:$+="/"}break;case 123*h:s[c++]=sn($)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:m==-1&&($=Ce($,/\f/g,"")),d>0&&sn($)-f&&hs(d>32?P0($+";",r,n,f-1):P0(Ce($," ","")+";",r,n,f-2),l);break;case 59:$+=";";default:if(hs(k=O0($,t,n,c,u,o,s,w,A=[],x=[],f),i),b===123)if(u===0)bs($,t,k,k,A,i,f,s,x);else switch(p===99&&at($,3)===110?100:p){case 100:case 108:case 109:case 115:bs(e,k,k,r&&hs(O0(e,k,k,0,0,o,s,w,o,A=[],f),x),o,x,f,s,r?A:x);break;default:bs($,k,k,k,[""],x,0,s,x)}}c=u=d=0,h=m=1,w=$="",f=a;break;case 58:f=1+sn($),d=v;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&S7()==125)continue}switch($+=ps(b),b*h){case 38:m=u>0?1:($+="\f",-1);break;case 44:s[c++]=(sn($)-1)*m,m=1;break;case 64:ln()===45&&($+=ys(It())),p=ln(),u=f=sn(w=$+=C7(gs())),b++;break;case 45:v===45&&sn($)==2&&(h=0)}}return i}function O0(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],d=md(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=ri(e,f+1,f=v7(h=a[v])),w=e;m<d;++m)(w=A0(h>0?p[m]+" "+b:Ce(b,/&\f/g,p[m])))&&(l[g++]=w);return ms(e,t,n,o===0?pd:s,l,c,u)}function $7(e,t,n){return ms(e,t,n,k0,ps(w7()),ri(e,2,-2),0)}function P0(e,t,n,r){return ms(e,t,n,hd,ri(e,0,r),ri(e,r+1,-1),r)}function Br(e,t){for(var n="",r=md(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function T7(e,t,n,r){switch(e.type){case h7:if(e.children.length)break;case p7:case hd:return e.return=e.return||e.value;case k0:return"";case C0:return e.return=e.value+"{"+Br(e.children,r)+"}";case pd:e.value=e.props.join(",")}return sn(n=Br(e.children,r))?e.return=e.value+"{"+n+"}":""}function I7(e){var t=md(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function O7(e){return function(t){t.root||(t=t.return)&&e(t)}}function P7(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var D7=function(t,n,r){for(var o=0,i=0;o=i,i=ln(),o===38&&i===12&&(n[r]=1),!ai(i);)It();return ii(t,xt)},_7=function(t,n){var r=-1,o=44;do switch(ai(o)){case 0:o===38&&ln()===12&&(n[r]=1),t[r]+=D7(xt-1,n,r);break;case 2:t[r]+=ys(o);break;case 4:if(o===44){t[++r]=ln()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ps(o)}while(o=It());return t},M7=function(t,n){return I0(_7(T0(t),n))},D0=new WeakMap,N7=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=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&&!D0.get(r))&&!o){D0.set(t,!0);for(var i=[],a=M7(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},R7=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function _0(e,t){switch(g7(e,t)){case 5103:return ke+"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 ke+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ke+e+ds+e+ft+e+e;case 6828:case 4268:return ke+e+ft+e+e;case 6165:return ke+e+ft+"flex-"+e+e;case 5187:return ke+e+Ce(e,/(\w+).+(:[^]+)/,ke+"box-$1$2"+ft+"flex-$1$2")+e;case 5443:return ke+e+ft+"flex-item-"+Ce(e,/flex-|-self/,"")+e;case 4675:return ke+e+ft+"flex-line-pack"+Ce(e,/align-content|flex-|-self/,"")+e;case 5548:return ke+e+ft+Ce(e,"shrink","negative")+e;case 5292:return ke+e+ft+Ce(e,"basis","preferred-size")+e;case 6060:return ke+"box-"+Ce(e,"-grow","")+ke+e+ft+Ce(e,"grow","positive")+e;case 4554:return ke+Ce(e,/([^-])(transform)/g,"$1"+ke+"$2")+e;case 6187:return Ce(Ce(Ce(e,/(zoom-|grab)/,ke+"$1"),/(image-set)/,ke+"$1"),e,"")+e;case 5495:case 3959:return Ce(e,/(image-set\([^]*)/,ke+"$1$`$1");case 4968:return Ce(Ce(e,/(.+:)(flex-)?(.*)/,ke+"box-pack:$3"+ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ke+e+e;case 4095:case 3583:case 4068:case 2532:return Ce(e,/(.+)-inline(.+)/,ke+"$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(sn(e)-1-t>6)switch(at(e,t+1)){case 109:if(at(e,t+4)!==45)break;case 102:return Ce(e,/(.+:)(.+)-([^]+)/,"$1"+ke+"$2-$3$1"+ds+(at(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vd(e,"stretch")?_0(Ce(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(at(e,t+1)!==115)break;case 6444:switch(at(e,sn(e)-3-(~vd(e,"!important")&&10))){case 107:return Ce(e,":",":"+ke)+e;case 101:return Ce(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ke+(at(e,14)===45?"inline-":"")+"box$3$1"+ke+"$2$3$1"+ft+"$2box$3")+e}break;case 5936:switch(at(e,t+11)){case 114:return ke+e+ft+Ce(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ke+e+ft+Ce(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ke+e+ft+Ce(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ke+e+ft+e+e}return e}var L7=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hd:t.return=_0(t.value,t.length);break;case C0:return Br([oi(t,{value:Ce(t.value,"@","@"+ke)})],o);case pd:if(t.length)return b7(t.props,function(i){switch(y7(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Br([oi(t,{props:[Ce(i,/:(read-\w+)/,":"+ds+"$1")]})],o);case"::placeholder":return Br([oi(t,{props:[Ce(i,/:(plac\w+)/,":"+ke+"input-$1")]}),oi(t,{props:[Ce(i,/:(plac\w+)/,":"+ds+"$1")]}),oi(t,{props:[Ce(i,/:(plac\w+)/,ft+"input-$1")]})],o)}return""})}},F7=[L7],B7=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 o=t.stylisPlugins||F7,i={},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(" "),m=1;m<g.length;m++)i[g[m]]=!0;s.push(h)});var l,c=[N7,R7];{var u,f=[T7,O7(function(h){u.insert(h)})],p=I7(c.concat(o,f)),d=function(g){return Br(A7(g),p)};l=function(g,m,b,w){u=b,d(g?g+"{"+m.styles+"}":m.styles),w&&(v.inserted[m.name]=!0)}}var v={key:n,sheet:new d7({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return v.sheet.hydrate(s),v};function j7(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=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(o){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 z7={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},U7=!1,W7=/[A-Z]|^ms/g,H7=/_EMO_([^_]+?)_([^]*?)_EMO_/g,M0=function(t){return t.charCodeAt(1)===45},N0=function(t){return t!=null&&typeof t!="boolean"},yd=P7(function(e){return M0(e)?e:e.replace(W7,"-$&").toLowerCase()}),R0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(H7,function(r,o,i){return Nn={name:o,styles:i,next:Nn},o})}return z7[t]!==1&&!M0(t)&&typeof n=="number"&&n!==0?n+"px":n},V7="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ws(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 o=n;if(o.anim===1)return Nn={name:o.name,styles:o.styles,next:Nn},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Nn={name:a.name,styles:a.styles,next:Nn},a=a.next;var s=i.styles+";";return s}return K7(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function K7(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ws(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":N0(s)&&(r+=yd(i)+":"+R0(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&U7)throw new Error(V7);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)N0(a[l])&&(r+=yd(i)+":"+R0(i,a[l])+";");else{var c=ws(e,t,a);switch(i){case"animation":case"animationName":{r+=yd(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}}return r}var L0=/label:\s*([^\s;{]+)\s*(;|$)/g,Nn;function bd(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,o="";Nn=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=ws(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=ws(n,t,e[s]),r){var l=i;o+=l[s]}L0.lastIndex=0;for(var c="",u;(u=L0.exec(o))!==null;)c+="-"+u[1];var f=j7(o)+c;return{name:f,styles:o,next:Nn}}function F0(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var q7=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},G7=function(t,n,r){q7(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function B0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function j0(e,t,n){var r=[],o=F0(e,r,n);return r.length<2?n:o+t(r)}var Y7=function(t){var n=B7(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,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=bd(c,n.registered,void 0);return G7(n,f),n.key+"-"+f.name},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=bd(c,n.registered),p="animation-"+f.name;return B0(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=bd(c,n.registered);B0(n,f)},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return j0(n.registered,r,Q7(c))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:F0.bind(null,n.registered),merge:j0.bind(null,n.registered,r)}},Q7=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},J7=ei,wd=Date.prototype,z0="Invalid Date",U0="toString",Z7=wd[U0],X7=wd.getTime;String(new Date(NaN))!=z0&&J7(wd,U0,function(){var t=X7.call(this);return t===t?Z7.call(this):z0});var eq=Yf,tq=FS,nq=eq?{}.toString:function(){return"[object "+tq(this)+"]"},rq=Yf,oq=ei,iq=nq;rq||oq(Object.prototype,"toString",iq,{unsafe:!0});var aq=Vf.PROPER,sq=ei,lq=_n,W0=as,cq=Vt,uq=BS,Sd="toString",H0=RegExp.prototype,V0=H0[Sd],fq=cq(function(){return V0.call({source:"a",flags:"b"})!="/a/b"}),dq=aq&&V0.name!=Sd;(fq||dq)&&sq(RegExp.prototype,Sd,function(){var t=lq(this),n=W0(t.source),r=t.flags,o=W0(r===void 0&&t instanceof RegExp&&!("flags"in H0)?uq.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var K0=typeof window<"u"?window:self,pq=K0.crypto||K0.msCrypto,hq=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}}(pq);const vq=be(hq);function mq(){return vq().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var gq=Ab;const q0=be(gq);function Te(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 G0(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return je(n=[je(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Se(Te("green","white")),i)}function yq(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 o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,l=on(s,1),c=l[0];typeof c=="function"&&(i=c());var u=q0(i[0])?i:[i],f=u.length===1;fs(u).call(u,function(p,d){if(f){var v,h;(v=console).log.apply(v,Se(G0.apply(void 0,je(h=[e]).call(h,Se(p)))))}else if(d){var g;(g=console).log.apply(g,Se(q0(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,Se(G0.apply(void 0,je(b=[e]).call(b,Se(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var bq=Xn,wq=Vf.EXISTS,Sq=Zo.f,Y0=Function.prototype,xq=Y0.toString,Eq=/^\s*function ([^ (]*)/,kq="name";bq&&!wq&&Sq(Y0,kq,{configurable:!0,get:function(){try{return xq.call(this).match(Eq)[1]}catch{return""}}});var Cq=it,Aq=Cq.setTimeout,$q=Aq;const Tq=be($q);function Iq(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=Mn();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Tq(function(){e.apply(void 0,i),n=Mn()},Math.max(0,t-s+n)))}}var Q0=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=I.useRef();a.current=o;var s=I.useMemo(function(){return Iq(function(c){var u=a.current;u&&u(c)},n)},[n,a]),l=I.useCallback(function(c){c.timeStampLow=Mn(),s(c)},[s]);return I.useLayoutEffect(function(){return i.addEventListener(r,l,{passive:!0}),l({target:i,type:r}),function(){return i.removeEventListener(r,l)}},[r,l,i]),!1};Q0.defaultProps={debounce:200};var Oq=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Pq=Pe,Dq=Oq;Pq({target:"Math",stat:!0},{sign:Dq});var _q=it,Mq=_q.Math.sign,Nq=Mq,Rq=Nq,Lq=Rq;const Fq=be(Lq);function Bq(e,t){var n=Fq(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function jq(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var J0=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=I.useRef(),s=I.useCallback(function(c,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Mn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var v=f==="100%"?o.scrollHeight-o.offsetHeight:f,h=jq(u,v,Bq,(Mn()-d)/5);Math.abs(v-h)<1.5&&(h=v),o[c]=h,v===h?r&&r(!0):s(c,u,f,p+1,d)}}))},[a,r,o]),l=I.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return I.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",l,{passive:!0}),o.addEventListener("wheel",l,{passive:!0}),function(){o.removeEventListener("pointerdown",l),o.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,o,i]),!1};J0.propTypes={name:xe.string.isRequired,onEnd:xe.func,target:xe.any.isRequired,value:xe.oneOfType([xe.number,xe.oneOf(["100%"])]).isRequired};function xd(e){var t=I.useState(e),n=on(t,2),r=n[0],o=n[1],i=I.useRef(),a=I.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function Z0(e,t){var n=i8(e);if(h0){var r=h0(e);t&&(r=E8(r).call(r,function(o){return b0(e,o).enumerable})),n.push.apply(n,r)}return n}function X0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;fs(r=Z0(Object(n),!0)).call(r,function(i){ZU(e,i,n[i])})}else if(w0)a7(e,w0(n));else{var o;fs(o=Z0(Object(n))).call(o,function(i){l7(e,i,b0(n,i))})}}return e}var zq=function(){return 1/0},ex=17,Uq="bottom",Kt="top",tx=1,Wq=34,nx={};function Hq(e,t){return e(),DV(e,t)}function rx(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<tx,s=i<tx,l=t===Kt?s:a,c=t!==Kt?s:a;return{atBottom:a,atEnd:l,atStart:c,atTop:s}}function si(e,t){return e===(t===Kt?0:"100%")}var Ed=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,c=t.scroller,u=I.useMemo(function(){return yq("<ScrollToBottom>",{force:i})},[i]);s=s===Kt?Kt:Uq;var f=I.useRef(0),p=I.useRef(a),d=xd(s===Kt?0:"100%"),v=on(d,3),h=v[0],g=v[1],m=v[2],b=xd(null),w=on(b,3),A=w[0],x=w[1],k=w[2],$=I.useRef(0),R=I.useRef(0),H=I.useRef(0),T=I.useState(!0),_=on(T,2),F=_[0],N=_[1],B=I.useState(!0),D=on(B,2),M=D[0],G=D[1],U=I.useState(!0),O=on(U,2),y=O[0],P=O[1],j=I.useState(!1),S=on(j,2),V=S[0],Y=S[1],q=xd(!0),Q=on(q,3),X=Q[0],ee=Q[1],J=Q[2],Z=I.useRef([]),K=I.useCallback(function(z){var te=k.current;return Z.current.push(z),te&&z({scrollTop:te.scrollTop}),function(){var se=Z.current,ue=qV(se).call(se,z);~ue&&gK(se).call(se,ue,1)}},[Z,k]),L=I.useCallback(function(){var z=m.current;u(function(){var te;return je(te=["%cSpineTo%c: %conEnd%c is fired."]).call(te,Se(Te("magenta")),Se(Te("orange")),[{animateTo:z}])}),f.current=Mn(),si(z,s)||ee(!1),g(null)},[m,u,f,s,g,ee]),oe=I.useCallback(function(z){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=te.behavior,ue=k.current;if(typeof z!="number"&&z!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var he;return[je(he=["%cscrollTo%c: Will scroll to %c".concat(typeof z=="number"?z+"px":z.replace(/%/g,"%%"),"%c")]).call(he,Se(Te("lime","")),Se(Te("purple"))),{behavior:se,nextAnimateTo:z,target:ue}]}),se==="auto"?(L(),ue&&(ue.scrollTop=z==="100%"?ue.scrollHeight-ue.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)),si(z,s)&&(u(function(){var he;return[je(he=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(he,Se(Te("lime","")),Se(Te("purple"))),[{mode:s,nextAnimateTo:z}]]}),ee(!0))},[u,L,s,g,ee,k]),ae=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var se;return je(se=["%cscrollToBottom%c: Called"]).call(se,Se(Te("yellow","")))}),te!=="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.'),oe("100%",{behavior:te||"smooth"})},[u,oe]),ne=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var se;return je(se=["%cscrollToTop%c: Called"]).call(se,Se(Te("yellow","")))}),te!=="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.'),oe(0,{behavior:te||"smooth"})},[u,oe]),de=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var ue;return je(ue=["%cscrollToEnd%c: Called"]).call(ue,Se(Te("yellow","")))}),te!=="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:te||"smooth"};s===Kt?ne(se):ae(se)},[u,s,ae,ne]),me=I.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var ue;return je(ue=["%cscrollToStart%c: Called"]).call(ue,Se(Te("yellow","")))}),te!=="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:te||"smooth"};s===Kt?ae(se):ne(se)},[u,s,ae,ne]),De=I.useCallback(function(){var z=k.current;if(z){if(p.current==="auto"){u(function(){var nt;return je(nt=["%ctarget changed%c: Initial scroll"]).call(nt,Se(Te("blue")))}),z.scrollTop=s===Kt?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var te=$.current,se=z.offsetHeight,ue=z.scrollHeight,he=z.scrollTop,We=s===Kt?0:Math.max(0,ue-se-he),He=Math.max(0,te-he),gt=c({maxValue:We,minValue:He,offsetHeight:se,scrollHeight:ue,scrollTop:he}),tt=Math.max(0,Math.min(We,gt)),Oe;s===Kt||tt!==We?Oe=he+tt:Oe="100%",u(function(){var nt,Ge,Bn;return[je(nt=[je(Ge=je(Bn="%cscrollToSticky%c: Will animate from %c".concat(te,"px%c to %c")).call(Bn,typeof Oe=="number"?Oe+"px":Oe.replace(/%/g,"%%"),"%c (%c")).call(Ge,(Oe==="100%"?We:Oe)+te,"px%c)")]).call(nt,Se(Te("orange")),Se(Te("purple")),Se(Te("purple")),Se(Te("purple"))),{animateFrom:te,maxValue:We,minValue:He,nextAnimateTo:Oe,nextValue:tt,offsetHeight:se,rawNextValue:gt,scrollHeight:ue,scrollTop:he}]}),oe(Oe,{behavior:"smooth"})}},[$,u,s,c,oe,k]),Ue=I.useCallback(function(z){var te,se=z.timeStampLow,ue=m.current,he=k.current,We=ue!==null;if(!(se<=f.current||!he)){var He=rx({mode:s,target:he}),gt=He.atBottom,tt=He.atEnd,Oe=He.atStart,nt=He.atTop;N(gt),G(tt),Y(Oe),P(nt);var Ge=he.offsetHeight,Bn=he.scrollHeight,fE=R.current,dE=H.current,Xd=Ge!==fE,ep=Bn!==dE;if(Xd&&(R.current=Ge),ep&&(H.current=Bn),!Xd&&!ep){var _s=We&&si(ue,s)||tt;J.current!==_s&&(u(function(){var or,pE,hE,vE;return[je(or=["%conScroll%c: %csetSticky%c(%c".concat(_s,"%c)")]).call(or,Se(Te("red")),Se(Te("red")),Se(Te("purple"))),je(pE=[je(hE=je(vE="(animating = %c".concat(We,"%c && isEnd = %c")).call(vE,si(ue,s),"%c) || atEnd = %c")).call(hE,tt,"%c")]).call(pE,Se(Te("purple")),Se(Te("purple")),Se(Te("purple")),[{animating:We,animateTo:ue,atEnd:tt,mode:s,offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:J.current,nextSticky:_s}])]}),ee(_s))}else J.current&&(u(function(){var or;return[je(or=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(or,Se(Te("red")),Se(Te("orange")),[{offsetHeightChanged:Xd,scrollHeightChanged:ep}]),{nextOffsetHeight:Ge,prevOffsetHeight:fE,nextScrollHeight:Bn,prevScrollHeight:dE}]}),De());var mQ=he.scrollTop;fs(te=Z.current).call(te,function(or){return or({scrollTop:mQ})})}},[m,u,f,s,R,H,Z,De,N,G,Y,P,ee,J,k]);I.useEffect(function(){if(A){var z=!1,te=Hq(function(){var se=k.current,ue=m.current!==null;J.current?rx({mode:s,target:se}).atEnd?z=!1:z?Mn()-z>Wq&&(ue||($.current=se.scrollTop,u(function(){var he;return je(he=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(he,Se(Te("navy")),Se(Te("orange")))}),De()),z=!1):z=Mn():se.scrollHeight<=se.offsetHeight&&!J.current&&(u(function(){var he;return[je(he=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(he,Se(Te("navy")),Se(Te("purple"))),[{offsetHeight:se.offsetHeight,scrollHeight:se.scrollHeight,sticky:J.current}]]}),ee(!0))},Math.max(ex,n)||ex);return function(){return clearInterval(te)}}},[m,n,u,s,De,ee,J,A,k]);var dt=I.useMemo(function(){var z=nx[l]||(nx[l]=Y7({key:"react-scroll-to-bottom--css-"+mq(),nonce:l}));return function(te){return z.css(te)+""}},[l]),mt=I.useMemo(function(){return{observeScrollPosition:K,setTarget:x,styleToClassName:dt}},[K,x,dt]),pt=I.useMemo(function(){return{atBottom:F,atEnd:M,atStart:V,atTop:y,mode:s}},[F,M,V,y,s]),ie=I.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&si(h,s),sticky:X}},[h,s,X]),ce=I.useMemo(function(){return X0(X0({},pt),ie)},[pt,ie]),W=I.useMemo(function(){return{scrollTo:oe,scrollToBottom:ae,scrollToEnd:de,scrollToStart:me,scrollToTop:ne}},[oe,ae,de,me,ne]);return I.useEffect(function(){if(A){var z=function(){H.current=A.scrollHeight};return A.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return A.removeEventListener("focus",z)}}},[A]),u(function(){var z;return[je(z=["%cRender%c: Render"]).call(z,Se(Te("cyan",""))),{animateTo:h,animating:h!==null,sticky:X,target:A}]}),I.createElement(Qa.Provider,{value:mt},I.createElement(xf.Provider,{value:W},I.createElement(Cf.Provider,{value:ce},I.createElement(Ef.Provider,{value:pt},I.createElement(kf.Provider,{value:ie},r,A&&I.createElement(Q0,{debounce:o,name:"scroll",onEvent:Ue,target:A}),A&&h!==null&&I.createElement(J0,{name:"scrollTop",onEnd:L,target:A,value:h}))))))};Ed.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:zq},Ed.propTypes={checkInterval:xe.number,children:xe.any,debounce:xe.number,debug:xe.bool,initialScrollBehavior:xe.oneOf(["auto","smooth"]),mode:xe.oneOf(["bottom","top"]),nonce:xe.string,scroller:xe.func};var Vq={height:"100%",overflowY:"auto",width:"100%"},kd=function(t){var n=t.children,r=t.className,o=I.useContext(Qa),i=o.setTarget,a=Af()(Vq);return I.createElement("div",{className:vf(a,(r||"")+""),ref:i},n)};kd.defaultProps={children:void 0,className:void 0},kd.propTypes={children:xe.any,className:xe.string};var Kq={position:"relative"},Cd=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Af()(Kq);return I.createElement("div",{className:vf(a,(r||"")+"")},I.createElement(kd,{className:(i||"")+""},n),I.createElement($f,{className:(o||"")+""}))};Cd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Cd.propTypes={children:xe.any,className:xe.string,followButtonClassName:xe.string,scrollViewClassName:xe.string};var Ad=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,c=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return I.createElement(Ed,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},I.createElement(Cd,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};Ad.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},Ad.propTypes={checkInterval:xe.number,children:xe.any,className:xe.string,debounce:xe.number,debug:xe.bool,followButtonClassName:xe.string,initialScrollBehavior:xe.oneOf(["auto","smooth"]),mode:xe.oneOf(["bottom","top"]),nonce:xe.string,scroller:xe.func,scrollViewClassName:xe.string},XN();let ox=(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 $d=I.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:o,botAvatar:i,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:c,showMarquee:u=!0,showDateSystemMessage:f=!0,showMessageStatus:p=!0,showIncomingMessageAvatar:d=!0,showOutgoingMessageAvatar:v=!1,...h})=>{var A;const{messageList:g}=ve,m=I.useMemo(()=>f?_E(t):t,[t]),b=I.useMemo(()=>{var k;const x=m.filter($=>$.direction==="outgoing"&&$.status!=="pending");return(k=x[x.length-1])==null?void 0:k.id},[m]),w=x=>{if(x.direction==="incoming")return d;if(x.direction==="outgoing")return v};return E.jsxs(Ad,{...h,className:Ao(g.container.className,e),followButtonClassName:g.scrollDownButton.className,scrollViewClassName:g.viewPort.className,children:[r&&E.jsx("span",{...g.headerMessage,children:r}),u&&E.jsx(JN,{botAvatar:i,botDescription:a,botName:s}),m.map(x=>{var k;return E.jsx(Yc,{renderers:o,sendMessage:l,addMessageFeedback:c,isLastDeliveredMessage:p&&x.id===b,showAvatar:w(x),...x},((k=x.metadata)==null?void 0:k.clientMessageId)||x.id)}),n&&E.jsx(Yc,{id:ox(),renderers:o,sendMessage:l,direction:"incoming",timestamp:new Date,showAvatar:d,block:void 0,sender:((A=t.filter(x=>x.direction==="incoming").at(-1))==null?void 0:A.sender)??{name:s||"Bot",avatar:i},children:E.jsx(Gc,{})})]})});$d.displayName="MessageList";const qq=({className:e,...t})=>{const{className:n}=ve.loader;return E.jsx("div",{...t,className:Ao(e,n)})};function ix({error:e,restartConversation:t,closeWindow:n}){let r,o;const{error:i}=ve;return e.type==="configuration"?(r="Configuration error",o=E.jsx(tP,{...i.icon})):e.type==="bot"?(r="Bot error",o=E.jsx(Jv,{...i.icon})):e.type==="network"?(r="Network error",o=E.jsx(uP,{...i.icon})):e.type==="disconnected"?(r="Disconnected",o=E.jsx(sP,{...i.icon})):(r="Unexpected error",o=E.jsx(Jv,{...i.icon})),E.jsx(Gq,{error:e,title:r,icon:o,restartConversation:t,closeWindow:n})}function Gq({error:e,title:t,icon:n,restartConversation:r,closeWindow:o}){const{error:i}=ve;return E.jsxs("div",{...i.container,children:[E.jsxs("div",{...i.header.container,children:[`Webchat ${e.type} error`,E.jsxs("div",{...i.header.actions,children:[r&&E.jsx(qc,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),o&&E.jsx(Uy,{onClick:o,style:{color:"white",backgroundColor:"transparent"}})]})]}),E.jsxs("div",{...i.content,children:[n,E.jsx("div",{...i.errorTitle,children:t}),E.jsx("div",{...i.errorMessage,children:e.message}),e.id&&E.jsx("div",{...i.id,children:e.id})]})]})}const ax=({connected:e,configuration:t,isTyping:n,messages:r,user:o,isLoading:i,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:c,error:u,participants:f,closeWindow:p,sendMessage:d,uploadFile:v,addMessageFeedback:h,restartConversation:g,clientId:m,storageKey:b,soundOn:w,toggleSound:A,...x})=>{const{color:k,fontFamily:$,radius:R,themeMode:H,variant:T,headerVariant:_,botAvatar:F,botDescription:N,botName:B,composerPlaceholder:D,footer:M,feedbackEnabled:G,additionalStylesheetUrl:U}=t,O={color:k,fontFamily:$,radius:R,themeMode:H,variant:T,headerVariant:_,additionalStylesheetUrl:U};G||(h=void 0);const y=I.useMemo(()=>o?pp(r,f,o.id,B,F):[],[F,B,r,o,f]),P=S=>(S==null?void 0:S.type)==="network"||(S==null?void 0:S.type)==="disconnected",j=()=>{P(u)&&typeof navigator<"u"&&navigator.onLine&&g&&g()};return I.useEffect(()=>{if(g)return window.addEventListener("online",j),()=>{window.removeEventListener("online",j)}},[u,g]),I.useEffect(()=>{if(!P(u)||!g)return;const S=window.setInterval(()=>{j()},3e3);return()=>{window.clearInterval(S)}},[u,g]),E.jsxs(E.Fragment,{children:[E.jsx(Dy,{...O}),E.jsx(Bc,{connected:e,allowFileUpload:c,uploadFile:v,storageKey:b,...x,children:u?E.jsx(ix,{error:u,restartConversation:g,closeWindow:p}):E.jsxs(E.Fragment,{children:[E.jsx(Wy,{closeWindow:p,configuration:t,restartConversation:g,clientId:m,soundOn:w,toggleSound:A}),i?E.jsx(qq,{}):E.jsx($d,{botAvatar:F,botDescription:N,botName:B,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:y}),E.jsx(Zg,{sendMessage:d,uploadFile:v,connected:e,isReadOnly:s,disableComposer:l,footer:M,composerPlaceholder:D,allowFileUpload:c,storageKey:b})]})})]})};function Yq(){const[e,t]=I.useState(!1),n=I.useRef(null);return{isTyping:e,setIsTyping:(r,o)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!o)return()=>{};const i=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>o&&t(!1)},o+100);return()=>clearTimeout(i)}}}var Qq=Object.defineProperty,Jq=(e,t,n)=>t in e?Qq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t,n)=>Jq(e,t+"",n),Xq=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},eG={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},tG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},nG=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},rG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},sx=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){let s=(e?o:o.map(l=>encodeURIComponent(l))).join(nG(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let i=tG(r),a=o.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Ss({allowReserved:e,name:n,value:s})).join(i);return r==="label"||r==="matrix"?i+a:a},Ss=({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)}`},lx=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(o instanceof Date)return`${n}=${o.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(o).forEach(([c,u])=>{s=[...s,c,e?u:encodeURIComponent(u)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let i=rG(r),a=Object.entries(o).map(([s,l])=>Ss({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(i);return r==="label"||r==="matrix"?i+a:a},oG=/\{[^{}]+\}/g,iG=({path:e,url:t})=>{let n=t,r=t.match(oG);if(r)for(let o of r){let i=!1,a=o.substring(1,o.length-1),s="simple";a.endsWith("*")&&(i=!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(o,sx({explode:i,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(o,lx({explode:i,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(o,`;${Ss({name:a,value:l})}`);continue}let c=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(o,c)}return n},cx=({allowReserved:e,array:t,object:n}={})=>r=>{let o=[];if(r&&typeof r=="object")for(let i in r){let a=r[i];if(a!=null){if(Array.isArray(a)){o=[...o,sx({allowReserved:e,explode:!0,name:i,style:"form",value:a,...t})];continue}if(typeof a=="object"){o=[...o,lx({allowReserved:e,explode:!0,name:i,style:"deepObject",value:a,...n})];continue}o=[...o,Ss({allowReserved:e,name:i,value:a})]}}return o.join("&")},aG=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"}},sG=async({security:e,...t})=>{for(let n of e){let r=await Xq(n,t.auth);if(!r)continue;let o=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[o]=r;break;case"cookie":t.headers.append("Cookie",`${o}=${r}`);break;case"header":default:t.headers.set(o,r);break}return}},ux=e=>lG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:cx(e.querySerializer),url:e.url}),lG=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{let i=o.startsWith("/")?o:`/${o}`,a=(e??"")+i;t&&(a=iG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},fx=(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=dx(e.headers,t.headers),r},dx=(...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[o,i]of r)if(i===null)t.delete(o);else if(Array.isArray(i))for(let a of i)t.append(o,a);else i!==void 0&&t.set(o,typeof i=="object"?JSON.stringify(i):i)}return t},Td=class{constructor(){Zq(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]}},cG=()=>({error:new Td,request:new Td,response:new Td}),uG=cx({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fG={"Content-Type":"application/json"},px=(e={})=>({...eG,headers:fG,parseAs:"auto",querySerializer:uG,...e}),dG=(e={})=>{let t=fx(px(),e),n=()=>({...t}),r=a=>(t=fx(t,a),n()),o=cG(),i=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:dx(t.headers,a.headers)};s.security&&await sG({...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=ux(s),c={redirect:"follow",...s},u=new Request(l,c);for(let g of o.request._fns)u=await g(u,s);let f=s.fetch,p=await f(u);for(let g of o.response._fns)p=await g(p,u,s);let d={request:u,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?aG(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let m=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),{data:m,...d}}let v=await p.text();try{v=JSON.parse(v)}catch{}let h=v;for(let g of o.error._fns)h=await g(v,p,u,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:ux,connect:a=>i({...a,method:"CONNECT"}),delete:a=>i({...a,method:"DELETE"}),get:a=>i({...a,method:"GET"}),getConfig:n,head:a=>i({...a,method:"HEAD"}),interceptors:o,options:a=>i({...a,method:"OPTIONS"}),patch:a=>i({...a,method:"PATCH"}),post:a=>i({...a,method:"POST"}),put:a=>i({...a,method:"PUT"}),request:i,setConfig:r,trace:a=>i({...a,method:"TRACE"})}},pG=dG,hG=px;const Ie=pG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(hG({baseUrl:"https://webchat.botpress.cloud/"}))),vG=e=>(e.client??Ie).delete({url:"/conversations/{id}",...e}),mG=e=>(e.client??Ie).get({url:"/conversations/{id}",...e}),gG=e=>(e.client??Ie).get({url:"/conversations",...e}),yG=e=>(e.client??Ie).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),bG=e=>(e.client??Ie).get({url:"/conversations/{id}/messages",...e}),wG=e=>(e.client??Ie).get({url:"/conversations/{id}/participants",...e}),SG=e=>(e.client??Ie).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xG=e=>(e.client??Ie).delete({url:"/conversations/{id}/participants/{userId}",...e}),EG=e=>(e.client??Ie).get({url:"/conversations/{id}/participants/{userId}",...e}),kG=e=>(e.client??Ie).delete({url:"/messages/{id}",...e}),CG=e=>(e.client??Ie).get({url:"/messages/{id}",...e}),AG=e=>(e.client??Ie).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),$G=e=>(e.client??Ie).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),TG=e=>(e.client??Ie).delete({url:"/messages/{id}/feedback",...e}),IG=e=>(e.client??Ie).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),OG=e=>(e.client??Ie).delete({url:"/users/me",...e}),PG=e=>(e.client??Ie).get({url:"/users/me",...e}),DG=e=>(e.client??Ie).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hx=e=>((e==null?void 0:e.client)??Ie).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),_G=e=>((e==null?void 0:e.client)??Ie).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),MG=e=>(e.client??Ie).get({url:"/events/{id}",...e}),NG=e=>(e.client??Ie).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),RG=e=>(e.client??Ie).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let vx=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 Id(e){}function LG(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=Id,onError:n=Id,onRetry:r=Id,onComment:o}=e;let i="",a=!0,s,l="",c="";function u(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=FG(`${i}${g}`);for(const w of m)f(w);i=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){o&&o(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const m=h.slice(0,g),b=h[g+1]===" "?2:1,w=h.slice(g+b);p(m,w,h);return}p(h,"",h)}function p(h,g,m){switch(h){case"event":c=g;break;case"data":l=`${l}${g}
290
290
  `;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new vx(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:m}));break;default:n(new vx(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:m}));break}}function d(){l.length>0&&t({id:s,event:c||void 0,data:l.endsWith(`
291
291
  `)?l.slice(0,-1):l}),s=void 0,l="",c=""}function v(h={}){i&&h.consume&&f(i),a=!0,s=void 0,l="",c="",i=""}return{feed:u,reset:v}}function FG(e){const t=[];let n="",r=0;for(;r<e.length;){const o=e.indexOf("\r",r),i=e.indexOf(`
292
292
  `,r);let a=-1;if(o!==-1&&i!==-1?a=Math.min(o,i):o!==-1?a=o:i!==-1&&(a=i),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]===`
293
- `&&r++}}return[t,n]}class mx extends Event{constructor(t,n){var r,o;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(o=n==null?void 0:n.message)!=null?o:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(gx(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(gx(this),n)}}function BG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Od(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Od).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Od(e.cause)}`:e.message:`${e}`}function gx(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var yx=e=>{throw TypeError(e)},Pd=(e,t,n)=>t.has(e)||yx("Cannot "+n),ye=(e,t,n)=>(Pd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?yx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Re=(e,t,n,r)=>(Pd(e,t,"write to private field"),t.set(e,n),n),yn=(e,t,n)=>(Pd(e,t,"access private method"),n),xt,nr,jr,xs,Es,li,zr,ci,Rn,Ur,Wr,Hr,ui,qt,Dd,_d,Md,bx,Nd,Rd,fi,Ld,Fd;class ks extends EventTarget{constructor(t,n){var r,o;super(),Ze(this,qt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ze(this,xt),Ze(this,nr),Ze(this,jr),Ze(this,xs),Ze(this,Es),Ze(this,li),Ze(this,zr),Ze(this,ci,null),Ze(this,Rn),Ze(this,Ur),Ze(this,Wr,null),Ze(this,Hr,null),Ze(this,ui,null),Ze(this,_d,async i=>{var a;ye(this,Ur).reset();const{body:s,redirected:l,status:c,headers:u}=i;if(c===204){yn(this,qt,fi).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?Re(this,jr,new URL(i.url)):Re(this,jr,void 0),c!==200){yn(this,qt,fi).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){yn(this,qt,fi).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(ye(this,xt)===this.CLOSED)return;Re(this,xt,this.OPEN);const f=new Event("open");if((a=ye(this,ui))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){yn(this,qt,fi).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const p=new TextDecoder,d=s.getReader();let v=!0;do{const{done:h,value:g}=await d.read();g&&ye(this,Ur).feed(p.decode(g,{stream:!h})),h&&(v=!1,ye(this,Ur).reset(),yn(this,qt,Ld).call(this))}while(v)}),Ze(this,Md,i=>{Re(this,Rn,void 0),!(i.name==="AbortError"||i.type==="aborted")&&yn(this,qt,Ld).call(this,Od(i))}),Ze(this,Nd,i=>{typeof i.id=="string"&&Re(this,ci,i.id);const a=new MessageEvent(i.event||"message",{data:i.data,origin:ye(this,jr)?ye(this,jr).origin:ye(this,nr).origin,lastEventId:i.id||""});ye(this,Hr)&&(!i.event||i.event==="message")&&ye(this,Hr).call(this,a),this.dispatchEvent(a)}),Ze(this,Rd,i=>{Re(this,li,i)}),Ze(this,Fd,()=>{Re(this,zr,void 0),ye(this,xt)===this.CONNECTING&&yn(this,qt,Dd).call(this)});try{if(t instanceof URL)Re(this,nr,t);else if(typeof t=="string")Re(this,nr,new URL(t,jG()));else throw new Error("Invalid URL")}catch{throw BG("An invalid or illegal string was specified")}Re(this,Ur,LG({onEvent:ye(this,Nd),onRetry:ye(this,Rd)})),Re(this,xt,this.CONNECTING),Re(this,li,3e3),Re(this,Es,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),Re(this,xs,(o=n==null?void 0:n.withCredentials)!=null?o:!1),yn(this,qt,Dd).call(this)}get readyState(){return ye(this,xt)}get url(){return ye(this,nr).href}get withCredentials(){return ye(this,xs)}get onerror(){return ye(this,Wr)}set onerror(t){Re(this,Wr,t)}get onmessage(){return ye(this,Hr)}set onmessage(t){Re(this,Hr,t)}get onopen(){return ye(this,ui)}set onopen(t){Re(this,ui,t)}addEventListener(t,n,r){const o=n;super.addEventListener(t,o,r)}removeEventListener(t,n,r){const o=n;super.removeEventListener(t,o,r)}close(){ye(this,zr)&&clearTimeout(ye(this,zr)),ye(this,xt)!==this.CLOSED&&(ye(this,Rn)&&ye(this,Rn).abort(),Re(this,xt,this.CLOSED),Re(this,Rn,void 0))}}xt=new WeakMap,nr=new WeakMap,jr=new WeakMap,xs=new WeakMap,Es=new WeakMap,li=new WeakMap,zr=new WeakMap,ci=new WeakMap,Rn=new WeakMap,Ur=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,ui=new WeakMap,qt=new WeakSet,Dd=function(){Re(this,xt,this.CONNECTING),Re(this,Rn,new AbortController),ye(this,Es)(ye(this,nr),yn(this,qt,bx).call(this)).then(ye(this,_d)).catch(ye(this,Md))},_d=new WeakMap,Md=new WeakMap,bx=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ye(this,ci)?{"Last-Event-ID":ye(this,ci)}:void 0},cache:"no-store",signal:(e=ye(this,Rn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Nd=new WeakMap,Rd=new WeakMap,fi=function(e,t){var n;ye(this,xt)!==this.CLOSED&&Re(this,xt,this.CLOSED);const r=new mx("error",{code:t,message:e});(n=ye(this,Wr))==null||n.call(this,r),this.dispatchEvent(r)},Ld=function(e,t){var n;if(ye(this,xt)===this.CLOSED)return;Re(this,xt,this.CONNECTING);const r=new mx("error",{code:t,message:e});(n=ye(this,Wr))==null||n.call(this,r),this.dispatchEvent(r),Re(this,zr,setTimeout(ye(this,Fd),ye(this,li)))},Fd=new WeakMap,ks.CONNECTING=0,ks.OPEN=1,ks.CLOSED=2;function jG(){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 wx(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 zG=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var o;return(o=e[t])==null?void 0:o.delete(n)}},emit:(t,n)=>{var r,o;(r=e[t])==null||r.forEach(i=>i(n)),(o=e["*"])==null||o.forEach(i=>i({type:t,payload:n}))}}},Le=e=>e.data,Sx={throwOnError:!0},UG=async({clientId:e,apiUrl:t,adminSecret:n})=>{const r=`${t||Oe.getConfig().baseUrl}/${e}`;Oe.interceptors.response._fns.length===0&&Oe.interceptors.response.use(wx);const o={...Sx,baseUrl:r};return hx({...o,body:{},headers:n?{"x-admin-secret":n}:void 0}).then(Le)},WG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},o=`${n||Oe.getConfig().baseUrl}/${t}`,i={...Sx,baseUrl:o};return Oe.interceptors.response._fns.length===0&&Oe.interceptors.response.use(wx),{createConversation:()=>yG({...i,headers:r,body:{}}).then(Le),getConversation:({conversationId:a})=>mG({...i,headers:r,path:{id:a}}).then(Le),deleteConversation:({conversationId:a})=>vG({...i,headers:r,path:{id:a}}).then(Le),listConversations:({nextToken:a})=>gG({...i,headers:r,query:{nextToken:a}}).then(Le),listConversationMessages:({conversationId:a,nextToken:s})=>bG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Le),addParticipant:({conversationId:a,userId:s})=>SG({...i,headers:r,path:{id:a},body:{userId:s}}).then(Le),removeParticipant:({conversationId:a,userId:s})=>xG({...i,headers:r,path:{id:a,userId:s}}).then(Le),getParticipant:({conversationId:a,userId:s})=>EG({...i,headers:r,path:{id:a,userId:s}}).then(Le),listParticipants:({conversationId:a,nextToken:s})=>wG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Le),createMessage:a=>$G({...i,headers:r,body:a}).then(Le),updateMessage:({messageId:a,...s})=>AG({...i,headers:r,path:{id:a},body:s}).then(Le),getMessage:({messageId:a})=>CG({...i,headers:r,path:{id:a}}).then(Le),deleteMessage:({messageId:a})=>kG({...i,headers:r,path:{id:a}}).then(Le),createFile:a=>RG({...i,headers:r,body:a}).then(Le),createUser:a=>hx({...i,headers:r,body:a}).then(Le),getUser:()=>PG({...i,headers:r}).then(Le),updateUser:a=>DG({...i,headers:r,body:a}).then(Le),deleteUser:()=>OG({...i,headers:r}).then(Le),createEvent:a=>NG({...i,headers:r,body:a}).then(Le),getEvent:({eventId:a})=>MG({...i,headers:r,path:{id:a}}).then(Le),addMessageFeedback:({messageId:a,...s})=>IG({...i,headers:r,path:{id:a},body:s}).then(Le),removeMessageFeedback:({messageId:a})=>TG({...i,headers:r,path:{id:a}}).then(Le),generateUserKey:({adminSecret:a,...s})=>_G({...i,headers:{"x-admin-secret":a},body:s}).then(Le),listenConversation:({conversationId:a})=>{let s=0,l=null;const c=zG(),u=()=>{l&&l.close();const f=`${o}/conversations/${a}/listen`;l=new ks(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>c.emit("open"),l.onerror=p=>{s<10?(s++,setTimeout(()=>u(),3e3)):c.emit("error",p)},l.onmessage=p=>{const d=HG(p.data);c.emit(d.type,d.data)}};return u(),c.on}}},HG=e=>{try{return JSON.parse(e)}catch{return e}},xx={chatMessageNotification:new URL("data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVJAEzAAAAAOU+A6UBHgF2b3JiaXMAAAAAASJWAAD/////AH0AAP////+pAU9nZ1MAAAAAAAAAAAAAFSQBMwEAAAD3T/UfDpz////////////////FA3ZvcmJpcwwAAABMYXZmNjEuNy4xMDAEAAAAHwAAAGVuY29kZXI9TGF2YzYxLjE5LjEwMSBsaWJ2b3JiaXMrAAAAZW5jb2RlZF9ieT1BZG9iZSBQcmVtaWVyZSBQcm8gMjAyNS4wIChNYWNpbhcAAAB0aW1lX3JlZmVyZW5jZT0xMjExMDQwMA8AAABkYXRlPTIwMjUtMDgtMDUBBXZvcmJpcyJCQ1YBAEAAABhCECoFrWOOOsgVIYwZoqBCyinHHULQIaMkQ4g6xjXHGGNHuWSKQsmB0JBVAABAAACkHFdQckkt55xzoxhXzHHoIOecc+UgZ8xxCSXnnHOOOeeSco4x55xzoxhXDnIpLeecc4EUR4pxpxjnnHOkHEeKcagY55xzbTG3knLOOeecc+Ygh1JyrjXnnHOkGGcOcgsl55xzxiBnzHHrIOecc4w1t9RyzjnnnHPOOeecc84555xzjDHnnHPOOeecc24x5xZzrjnnnHPOOeccc84555xzIDRkFQCQAACgoSiK4igOEBqyCgDIAAAQQHEUR5EUS7Ecy9EkDQgNWQUAAAEACAAAoEiGpEiKpViOZmmeJnqiKJqiKquyacqyLMuy67ouEBqyCgBIAABQURTFcBQHCA1ZBQBkAAAIYCiKoziO5FiSpVmeB4SGrAIAgAAABAAAUAxHsRRN8STP8jzP8zzP8zzP8zzP8zzP8zzP8zwNCA1ZBQAgAAAAgihkGANCQ1YBAEAAAAghGhlDnVISXAoWQhwRQx1CzkOppYPgKYUlY9JTrEEIIXzvPffee++B0JBVAAAQAABhFDiIgcckCCGEYhQnRHGmIAghhOUkWMp56CQI3YMQQrice8u59957IDRkFQAACADAIIQQQgghhBBCCCmklFJIKaaYYoopxxxzzDHHIIMMMuigk046yaSSTjrKJKOOUmsptRRTTLHlFmOttdacc69BKWOMMcYYY4wxxhhjjDHGGCMIDVkFAIAAABAGGWSQQQghhBRSSCmmmHLMMcccA0JDVgEAgAAAAgAAABxFUiRHciRHkiTJkixJkzzLszzLszxN1ERNFVXVVW3X9m1f9m3f1WXf9mXb1WVdlmXdtW1d1l1d13Vd13Vd13Vd13Vd13Vd14HQkFUAgAQAgI7kOI7kOI7kSI6kSAoQGrIKAJABABAAgKM4iuNIjuRYjiVZkiZplmd5lqd5mqiJHhAasgoAAAQAEAAAAAAAgKIoiqM4jiRZlqZpnqd6oiiaqqqKpqmqqmqapmmapmmapmmapmmapmmapmmapmmapmmapmmapmmapmkCoSGrAAAJAAAdx3EcR3Ecx3EkR5IkIDRkFQAgAwAgAABDURxFcizHkjRLszzL00TP9FxRNnVTV20gNGQVAAAIACAAAAAAAADHczzHczzJkzzLczzHkzxJ0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRNA0JDVgIAZAAAEJOQSk6xV0YpxiS0XiqkFJPUe6iYYkw67alCBikHuYdKIaWg094ypZBSDHunmELIGOqhg5AxhbDX2nPPvfceCA1ZEQBEAQAAxiDGEGPIMSYlgxIxxyRkUiLnnJROSialpFZazKSEmEqLkXNOSiclk1JaC6llkkprJaYCAAACHAAAAiyEQkNWBABRAACIMUgppBRSSjGnmENKKceUY0gp5ZxyTjnHmHQQKucYdA5KpJRyjjmnnHMSMgeVcw5CJp0AAIAABwCAAAuh0JAVAUCcAACAkHOKMQgRYxBCCSmFUFKqnJPSQUmpg5JSSanFklKMlXNSOgkpdRJSKinFWFKKLaRUY2kt19JSjS3GnFuMvYaUYi2p1Vpaq7nFWHOLNffIOUqdlNY6Ka2l1mpNrdXaSWktpNZiaS3G1mLNKcacMymthZZiK6nF2GLLNbWYc2kt1xRjzynGnmusucecgzCt1ZxayznFmHvMseeYcw+Sc5Q6Ka11UlpLrdWaWqs1k9Jaaa3GkFqLLcacW4sxZ1JaLKnFWFqKMcWYc4st19BarinGnFOLOcdag5Kx9l5aqznFmHuKreeYczA2x547SrmW1nourfVecy5C1tyLaC3n1GoPKsaec87B2NyDEK3lnGrsPcXYe+45GNtz8K3W4FvNRcicg9C5+KZ7MEbV2oPMtQiZcxA66CJ08Ml4lGoureVcWus91hp8zTkI0VruKcbeU4u9156bsL0HIVrLPcXYg4ox+JpzMDrnYlStwcecg5C1FqF7L0rnIJSqtQeZa1Ay1yJ08MXooIsvAABgwAEAIMCEMlBoyIoAIE4AgEHIOaUYhEopCKGElEIoKVWMSciYg5IxJ6WUUloIJbWKMQiZY1Iyx6SEEloqJbQSSmmplNJaKKW1llqMKbUWQymphVJaK6W0llqqMbVWY8SYlMw5KZljUkoprZVSWqsck5IxKKmDkEopKcVSUouVc1Iy6Kh0EEoqqcRUUmmtpNJSKaXFklJsKcVUW4u1hlJaLKnEVlJqMbVUW4sx14gxKRlzUjLnpJRSUiultJY5J6WDjkrmoKSSUmulpBQz5qR0DkrKIKNSUootpRJTKKW1klJspaTWWoy1ptRaLSW1VlJqsZQSW4sx1xZLTZ2U1koqMYZSWmsx5ppaizGUElspKcaSSmytxZpbbDmGUlosqcRWSmqx1ZZja7Hm1FKNKbWaW2y5xpRTj7X2nFqrNbVUY2ux5lhbb7XWnDsprYVSWislxZhai7HFWHMoJbaSUmylpBhbbLm2FmMPobRYSmqxpBJjazHmGFuOqbVaW2y5ptRirbX2HFtuPaUWa4ux5tJSjTXX3mNNORUAADDgAAAQYEIZKDRkJQAQBQAAGMMYYxAapZxzTkqDlHPOScmcgxBCSplzEEJIKXNOQkotZc5BSKm1UEpKrcUWSkmptRYLAAAocAAACLBBU2JxgEJDVgIAUQAAiDFKMQahMUYp5yA0xijFGIRKKcack1ApxZhzUDLHnINQSuaccxBKCSGUUkpKIYRSSkmpAACAAgcAgAAbNCUWByg0ZEUAEAUAABhjnDPOIQqdpc5SJKmj1lFrKKUaS4ydxlZ767nTGnttuTeUSo2p1o5ry7nV3mlNPbccCwAAO3AAADuwEAoNWQkA5AEAEMYoxZhzzhmFGHPOOecMUow555xzijHnnIMQQsWYc85BCCFzzjkIoYSSOecchBBK6JyDUEoppXTOQQihlFI65yCEUkopnXMQSimllAIAgAocAAACbBTZnGAkqNCQlQBAHgAAYAxCzklprWHMOQgt1dgwxhyUlGKLnIOQUou5RsxBSCnGoDsoKbUYbPCdhJRaizkHk1KLNefeg0iptZqDzj3VVnPPvfecYqw1595zLwAAd8EBAOzARpHNCUaCCg1ZCQDkAQAQCCnFmHPOGaUYc8w554xSjDHmnHOKMcacc85BxRhjzjkHIWPMOecghJAx5pxzEELonHMOQgghdM45ByGEEDrnoIMQQgidcxBCCCGEAgCAChwAAAJsFNmcYCSo0JCVAEA4AAAAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELonHPOOeecc84555xzzjnnnHPOOScAyLfCAcD/wcYZVpLOCkeDCw1ZCQCEAwAACkEopWIQSiklkk46KZ2TUEopkYNSSumklFJKCaWUUkoIpZRSSggdlFJCKaWUUkoppZRSSimllFI6KaWUUkoppZTKOSmlk1JKKaVEzkkpIZRSSimlhFJKKaWUUkoppZRSSimllFJKKaWEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQCALgbHAAgEmycYSXprHA0uNCQlQBASAAAoBRzjkoIKZSQUqiYoo5CKSmkUkoKEWPOSeochVBSKKmDyjkIpaSUQiohdc5BByWFkFIJIZWOOugolFBSKiWU0jkopYQUSkoplZBCSKl0lFIoJZWUQiohlVJKSCWVEEoKnaRUSgqppFRSCJ10kEInJaSSSgqpk5RSKiWllEpKJXRSQioppRBCSqmUEEpIKaVOUkmppBRCKCGFlFJKJaWSSkohlVRCCaWklFIooaRUUkoppZJSKQAA4MABACDACDrJqLIIG0248AAUGrISACADAECUdNZpp0kiCDFFmScNKcYgtaQswxBTkonxFGOMOShGQw4x5JQYF0oIoYNiPCaVQ8pQUbm31DkFxRZjfO+xFwEAAAgCAASEBAAYICiYAQAGBwgjBwIdAQQObQCAgQiZCQwKocFBJgA8QERIBQCJCYrShS4IIYJ0EWTxwIUTN5644YQObRAAAAAAABAA8AEAkFAAERHRzFVYXGBkaGxwdHh8gIQEAAAAAAAIAHwAACQiQERENHMVFhcYGRobHB0eHyAhAQAAAAAAAAAAQEBAAAAAAAAgAAAAQEBPZ2dTAASuMwAAAAAAABUkATMCAAAACYS6sR4BAUQxGR89NxobGiEkKCknJiYmJSUhISEaFgwBAQEAAnyfvULHAlAEJgh2vpgQBMHIyMjIyNhIQOjz+ePz58+fL89xAwYBAFaH//3//7/xNw0MBoNB6qlPfWrUKQng+/0FABAAhLEjKuHFBwA4AHC9Fx4Oh7EwDEOgvnJ3RtV+Op0+nU6n5cyzEwAoltTpwed5dgVKMPoru90zNHGA7F0CP98BAAAAAHl9ePviAgCW+3rugPIDwC6BbWoTAFEAAADh5GpCCACgc+0zxlAAVKddkjDsA14GDoJtf7R+NkE4W23hI5mF3d74iVGvzg9PpA4cCQs66joePTmOfhgl7vNZzYzQADDyz30FAGSvVUZ6wJ4MAKbCGeb4+v5NLIdK3YvrLkCu98uV//FpXQNyKAKAV7r186fTktcJJgjAlVp1fUmaGgtrdAAuDXYJSPs/AAAAAHDnAeHxciEUAB76CvfarGjDzIjALoEd+/0EAAAAQNYeMrkBAF6ZKm8xuw94NtgloHDUCAAAAIAMJ5Qz2iUAvjhKL8lkfmA6wi6BWfNHgiAAAABq4eeqGgCg8+LAAXQAfhgqz2RKHzAVYJeAynEAIQEAALwq6tFbIQAEEIIO8iULngMAXhgajrw3D5iFWhe7BLZNrwCVKAAA0t2TfT8mADx0aMfS4CULeACvA14YWnasNht80ZpdAhv8BEiiAADgcbm4jo0JANAVCTRV6JqQS0OTADoAXhg6zWy+AZ3GsiDRAYJzgiQAAICnb9FLAQAUNQFd44AioMNJICUAfhi67ZRjA2IMSHTAJK0KkgAAAG7W0uLlEgC6KnQdDkgBlAAdJAB+GHpL40hATAASHSC5CZIAAAAGZ3J60ioBoKsBTQKE5KFJIJFAAp4Y+jp7cg4qINEBi+MASQAAAM8rmdZcAKApwFhNPHQkQEBRQwIAnhj6OZ8KIBwDiQ4Q9ApIFAAAQHRFd6FEALA0NaApQAegnPrDA54Y+nN+AYAIJDoAfgIkCgAAcLRlPVsLALqmKqFpHIwUwQEJCwCeKPpzEQA8kOgAyTlBAgAAgPnK3q8jAWAuJFBYOsbAAgCeKPolEQA8rMFCohQAAMxD2BdSAJYFdNThKcCkBQCOgwKeGPpzEQA8rEEhCQAAoCz4MRGA41gaQMBRjACexHugAACeGPqFCAAeugQAAHryFgBdRYGFhGeow8x7AJ4Y+iURADyIigIAliFAAcYWCQC11gGeGPolEQA8UAAAABoODg4=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ns&&Ns.tagName.toUpperCase()==="SCRIPT"&&Ns.src||new URL("index.umd.cjs",document.baseURI).href).href},VG=3e3;function Ex({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminSecret:o,soundEnabled:i,...a}){var K,oe;const s=Em(n,r),l=s(V=>V.conversationId),c=s(V=>V.user),u=s(V=>V.setConversationId),f=s(V=>V.setUser),p=Hn(V=>V.messages),d=Hn(V=>V.saveMessage),v=Hn(V=>V.updateMessage),h=Hn(V=>V.fetchMessages),g=Hn(V=>V.setMessages),m=Hn(V=>V.clearMessages),b=Hn(V=>V.isFetching),w=ho(V=>V.participants),A=ho(V=>V.setParticipants),x=ho(V=>V.addParticipant),k=ho(V=>V.removeParticipant),$=ho(V=>V.clearParticipants),R=Cm(`webchat-sound-${t}`),W=R(V=>V.soundOn),T=R(V=>V.toggleSound),{isTyping:_,setIsTyping:L}=Yq(),N=I.useMemo(()=>gp(),[]),[F,D]=I.useState("connecting"),[M,G]=I.useState(a.conversationId),[z,O]=I.useState(a.user),[y,P]=I.useState(void 0),[B,S]=I.useState(void 0),H=I.useRef(!1),Y=I.useRef(null),q=I.useRef(void 0),Q=I.useRef(i??!1);I.useEffect(()=>{Q.current=i??!1},[i]);const ee=I.useRef(W);I.useEffect(()=>{ee.current=W},[W]);const te=async()=>{if(!H.current){H.current=!0,S(void 0),L(!1),D("connecting");try{const V=a.user||c;let le=V;if(!le){const{key:pe,user:xe}=await UG({clientId:t,apiUrl:e,adminSecret:o});le={userId:xe.id,userToken:pe}}const Z=WG({userKey:le.userToken,clientId:t,apiUrl:e});let fe=a.conversationId||l;if(!fe||!V){m(),$();const{conversation:pe}=await Z.createConversation();fe=pe.id}else{const pe=await h({client:Z,conversationId:fe});g(pe);const{participants:xe}=await Z.listParticipants({conversationId:fe});A(xe)}O(le),f(le),P(Z),G(fe),u(fe),Y.current=new Audio,Y.current.preload="auto",Y.current.src=xx.chatMessageNotification,Y.current.volume=.9,D("connected")}catch(V){m(),S(hi(V)),D("error")}finally{H.current=!1}}};Om(async()=>{const V=KG(t,e);if(V){S(V),D("error");return}await te()},[(K=a.user)==null?void 0:K.userId,(oe=a.user)==null?void 0:oe.userToken,a.conversationId]);const J=async()=>{await te()};if(I.useEffect(()=>{if(!y||!M)return;const V=y.listenConversation({conversationId:M}),le=[V("open",async()=>{var fe,pe;S(void 0);const{event:Z}=await y.createEvent({conversationId:M,payload:{type:"conversation_started",data:{}}});(pe=(fe=Z.payload.data)==null?void 0:fe.status)!=null&&pe.isInitial&&N.emit("conversation",M),D("connected")}),V("error",Z=>{S(fe=>fe||hi(Z)),D("error"),N.emit("error",new Error(`Connection to conversation lost: ${Z==null?void 0:Z.message}`))}),V("message_created",Z=>{const fe=Ri(Z);(z==null?void 0:z.userId)!==fe.authorId&&(Q.current&&ee.current&&Y.current&&Y.current.play().catch(()=>{}),L(!1),q.current=setTimeout(()=>{L(!0)},VG)),d(fe),N.emit("message",fe)}),V("message_status_changed",Z=>{Z.newStatus==="processing"&&(L(!0),N.emit("isTyping",{isTyping:!0,timeout:5e3}),v(Z.message.metadata.clientMessageId,{status:Z.newStatus}))}),V("typing_stopped",()=>{N.emit("isTyping",{isTyping:!1,timeout:0}),L(!1),clearTimeout(q.current),q.current=void 0}),V("participant_added",Z=>{x(Z.participant),N.emit("participantAdded",Z.participant)}),V("participant_removed",Z=>{k(Z.participantId),N.emit("participantRemoved",Z.participantId)}),V("webchat_visibility",Z=>N.emit("webchatVisibility",Z.visibility)),V("webchat_config",Z=>N.emit("webchatConfig",Z.config)),V("custom",Z=>N.emit("customEvent",Z.event))];return()=>{le.forEach(Z=>Z())}},[M,y]),F!=="connected"||!z||!M||!y)return{clientState:F,on:N.on,client:void 0,messages:[],conversationId:void 0,newConversation:J,user:void 0,isTyping:void 0,isFetchingMessages:b,participants:[],toggleSound:T,soundOn:W,error:B};const X={sendMessage:async V=>{const le=ox(),Z={id:le,createdAt:new Date().toISOString(),userId:z.userId,conversationId:M,payload:V,metadata:{clientMessageId:le,delivered:!1}},fe=Ri(Z);fe.status="pending",d(fe),await y.createMessage({conversationId:M,payload:V,metadata:{clientMessageId:le}}).catch(pe=>N.emit("error",pe))},sendEvent:async V=>{await y.createEvent({conversationId:M,payload:{type:"custom",data:V}})},uploadFile:async V=>{const{size:le,name:Z}=V,pe=await(ue=>new Promise((U,j)=>{const ne=new FileReader;ne.onload=ae=>{var ce;return U((ce=ae.target)==null?void 0:ce.result)},ne.onerror=ae=>{var ce;return j((ce=ae.target)==null?void 0:ce.error)},ne.readAsArrayBuffer(ue)}))(V),xe=new Date;xe.setDate(xe.getDate()+30);const{file:{uploadUrl:qe,contentType:st,url:Et}}=await y.createFile({size:le,key:Z,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:xe.toISOString()});await fetch(qe,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":st},body:pe});const lt=st.split("/").shift()??"",ie=Tp(lt)?lt:"file";return{fileUrl:Et,name:Z,type:ie}},addMessageFeedback:async(V,le)=>{v(V,{feedback:le.value}),await y.addMessageFeedback({messageId:V,...le})},getUser:async()=>{const{user:V}=await y.getUser();return V},updateUser:async V=>{const{user:le}=await y.updateUser({name:V.name,pictureUrl:V.pictureUrl,userData:V.data});return le}};return{clientState:"connected",on:N.on,client:X,messages:p,conversationId:M,newConversation:async()=>{try{m(),$(),L(!1);const{conversation:V}=await y.createConversation();G(V.id),u(V.id)}catch(V){S(hi(V)),D("error")}},user:c,isTyping:_,isFetchingMessages:b,participants:w,error:B,soundOn:W,toggleSound:T}}const KG=(e,t)=>{if(!e)return{type:"configuration",message:Ip};if(!URL.canParse(t))return{type:"configuration",message:Op}},qG=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:o,user:i,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:c,client:u,isFetchingMessages:f,isTyping:p,newConversation:d,messages:v,participants:h,user:g,error:m,soundOn:b,toggleSound:w}=Ex({clientId:e,apiUrl:o,conversationId:a,user:i,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminSecret:n==null?void 0:n.adminSecret,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:A,uploadFile:x,addMessageFeedback:k}=u??{};return E.jsx(ax,{configuration:n??{},user:g!=null&&g.userId?{id:g==null?void 0:g.userId}:void 0,isLoading:f||c==="connecting",isTyping:p,connected:c==="connected"?!0:c==="disconnected"?!1:void 0,messages:v,sendMessage:A,uploadFile:x,addMessageFeedback:k,allowFileUpload:r,restartConversation:d,...s,participants:h,error:m,clientId:e,soundOn:b,toggleSound:w})};var Bd=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(YG);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(jd,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(jd,{...r,ref:t,children:n})});Bd.displayName="Slot";var jd=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=JG(n),i=QG(r,n.props);return n.type!==C.Fragment&&(i.ref=t?jc(t,o):o),C.cloneElement(n,i)}return C.Children.count(n)>1?C.Children.only(null):null});jd.displayName="SlotClone";var GG=({children:e})=>E.jsx(E.Fragment,{children:e});function YG(e){return C.isValidElement(e)&&e.type===GG}function QG(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function JG(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ln=ZG.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Bd:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function XG(e,t){e&&rp.flushSync(()=>e.dispatchEvent(t))}function eY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e);C.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var tY="DismissableLayer",zd="dismissableLayer.update",nY="dismissableLayer.pointerDownOutside",rY="dismissableLayer.focusOutside",kx,Cx=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ax=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=C.useContext(Cx),[u,f]=C.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),v=In(t,$=>f($)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g),b=u?h.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,A=b>=m,x=aY($=>{const R=$.target,W=[...c.branches].some(T=>T.contains(R));!A||W||(o==null||o($),a==null||a($),$.defaultPrevented||s==null||s())},p),k=sY($=>{const R=$.target;[...c.branches].some(T=>T.contains(R))||(i==null||i($),a==null||a($),$.defaultPrevented||s==null||s())},p);return eY($=>{b===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},p),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),$x(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=kx)}},[u,p,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),$x())},[u,c]),C.useEffect(()=>{const $=()=>d({});return document.addEventListener(zd,$),()=>document.removeEventListener(zd,$)},[]),E.jsx(Ln.div,{...l,ref:v,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:pn(e.onFocusCapture,k.onFocusCapture),onBlurCapture:pn(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:pn(e.onPointerDownCapture,x.onPointerDownCapture)})});Ax.displayName=tY;var oY="DismissableLayerBranch",iY=C.forwardRef((e,t)=>{const n=C.useContext(Cx),r=C.useRef(null),o=In(t,r);return C.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(Ln.div,{...e,ref:o})});iY.displayName=oY;function aY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Tx(nY,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function sY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=i=>{i.target&&!r.current&&Tx(rY,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $x(){const e=new CustomEvent(zd);document.dispatchEvent(e)}function Tx(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?XG(o,i):o.dispatchEvent(i)}var Ud="focusScope.autoFocusOnMount",Wd="focusScope.autoFocusOnUnmount",Ix={bubbles:!1,cancelable:!0},lY="FocusScope",Ox=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=C.useState(null),c=bn(o),u=bn(i),f=C.useRef(null),p=In(t,h=>l(h)),d=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const A=w.target;s.contains(A)?f.current=A:Fn(f.current,{select:!0})},g=function(w){if(d.paused||!s)return;const A=w.relatedTarget;A!==null&&(s.contains(A)||Fn(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&Fn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),C.useEffect(()=>{if(s){_x.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(Ud,Ix);s.addEventListener(Ud,c),s.dispatchEvent(m),m.defaultPrevented||(cY(hY(Px(s)),{select:!0}),document.activeElement===h&&Fn(s))}return()=>{s.removeEventListener(Ud,c),setTimeout(()=>{const m=new CustomEvent(Wd,Ix);s.addEventListener(Wd,u),s.dispatchEvent(m),m.defaultPrevented||Fn(h??document.body,{select:!0}),s.removeEventListener(Wd,u),_x.remove(d)},0)}}},[s,c,u,d]);const v=C.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,m=document.activeElement;if(g&&m){const b=h.currentTarget,[w,A]=uY(b);w&&A?!h.shiftKey&&m===A?(h.preventDefault(),n&&Fn(w,{select:!0})):h.shiftKey&&m===w&&(h.preventDefault(),n&&Fn(A,{select:!0})):m===b&&h.preventDefault()}},[n,r,d.paused]);return E.jsx(Ln.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Ox.displayName=lY;function cY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fn(r,{select:t}),document.activeElement!==n)return}function uY(e){const t=Px(e),n=Dx(t,e),r=Dx(t.reverse(),e);return[n,r]}function Px(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dx(e,t){for(const n of e)if(!fY(n,{upTo:t}))return n}function fY(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 dY(e){return e instanceof HTMLInputElement&&"select"in e}function Fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dY(e)&&t&&e.select()}}var _x=pY();function pY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Mx(e,t),e.unshift(t)},remove(t){var n;e=Mx(e,t),(n=e[0])==null||n.resume()}}}function Mx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hY(e){return e.filter(t=>t.tagName!=="A")}var Hd=0;function vY(){C.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nx()),document.body.insertAdjacentElement("beforeend",e[1]??Nx()),Hd++,()=>{Hd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hd--}},[])}function Nx(){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 Cs="right-scroll-bar-position",As="width-before-scroll-bar",mY="with-scroll-bars-hidden",gY="--removed-body-scroll-bar-size";function Vd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yY(e,t){var n=I.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var bY=typeof window<"u"?C.useLayoutEffect:C.useEffect,Rx=new WeakMap;function wY(e,t){var n=yY(null,function(r){return e.forEach(function(o){return Vd(o,r)})});return bY(function(){var r=Rx.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Vd(s,null)}),i.forEach(function(s){o.has(s)||Vd(s,a)})}Rx.set(n,e)},[e]),n}function SY(e){return e}function xY(e,t){t===void 0&&(t=SY);var n=[],r=!1,o={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(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var u=a;a=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return o}function EY(e){e===void 0&&(e={});var t=xY(null);return t.options=_t({async:!0,ssr:!1},e),t}var Lx=function(e){var t=e.sideCar,n=Tm(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 C.createElement(r,_t({},n))};Lx.isSideCarExport=!0;function kY(e,t){return e.useMedium(t),Lx}var Fx=EY(),Kd=function(){},$s=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:Kd,onWheelCapture:Kd,onTouchMoveCapture:Kd}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noRelative,v=e.noIsolation,h=e.inert,g=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,w=e.gapMode,A=Tm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,k=wY([n,t]),$=_t(_t({},A),o);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Fx,removeScrollBar:c,shards:f,noRelative:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?C.cloneElement(C.Children.only(s),_t(_t({},$),{ref:k})):C.createElement(b,_t({},$,{className:l,ref:k}),s))});$s.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$s.classNames={fullWidth:As,zeroRight:Cs};var CY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=CY();return t&&e.setAttribute("nonce",t),e}function $Y(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function TY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var IY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=AY())&&($Y(t,n),TY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},OY=function(){var e=IY();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bx=function(){var e=OY(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},PY={left:0,top:0,right:0,gap:0},qd=function(e){return parseInt(e||"",10)||0},DY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qd(n),qd(r),qd(o)]},_Y=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return PY;var t=DY(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])}},MY=Bx(),Vr="data-scroll-locked",NY=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
294
- .`.concat(mY,` {
293
+ `&&r++}}return[t,n]}class mx extends Event{constructor(t,n){var r,o;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(o=n==null?void 0:n.message)!=null?o:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(gx(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(gx(this),n)}}function BG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Od(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Od).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Od(e.cause)}`:e.message:`${e}`}function gx(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var yx=e=>{throw TypeError(e)},Pd=(e,t,n)=>t.has(e)||yx("Cannot "+n),ye=(e,t,n)=>(Pd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?yx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Re=(e,t,n,r)=>(Pd(e,t,"write to private field"),t.set(e,n),n),yn=(e,t,n)=>(Pd(e,t,"access private method"),n),Et,nr,jr,xs,Es,li,zr,ci,Rn,Ur,Wr,Hr,ui,qt,Dd,_d,Md,bx,Nd,Rd,fi,Ld,Fd;class ks extends EventTarget{constructor(t,n){var r,o;super(),Ze(this,qt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ze(this,Et),Ze(this,nr),Ze(this,jr),Ze(this,xs),Ze(this,Es),Ze(this,li),Ze(this,zr),Ze(this,ci,null),Ze(this,Rn),Ze(this,Ur),Ze(this,Wr,null),Ze(this,Hr,null),Ze(this,ui,null),Ze(this,_d,async i=>{var a;ye(this,Ur).reset();const{body:s,redirected:l,status:c,headers:u}=i;if(c===204){yn(this,qt,fi).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?Re(this,jr,new URL(i.url)):Re(this,jr,void 0),c!==200){yn(this,qt,fi).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){yn(this,qt,fi).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(ye(this,Et)===this.CLOSED)return;Re(this,Et,this.OPEN);const f=new Event("open");if((a=ye(this,ui))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){yn(this,qt,fi).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const p=new TextDecoder,d=s.getReader();let v=!0;do{const{done:h,value:g}=await d.read();g&&ye(this,Ur).feed(p.decode(g,{stream:!h})),h&&(v=!1,ye(this,Ur).reset(),yn(this,qt,Ld).call(this))}while(v)}),Ze(this,Md,i=>{Re(this,Rn,void 0),!(i.name==="AbortError"||i.type==="aborted")&&yn(this,qt,Ld).call(this,Od(i))}),Ze(this,Nd,i=>{typeof i.id=="string"&&Re(this,ci,i.id);const a=new MessageEvent(i.event||"message",{data:i.data,origin:ye(this,jr)?ye(this,jr).origin:ye(this,nr).origin,lastEventId:i.id||""});ye(this,Hr)&&(!i.event||i.event==="message")&&ye(this,Hr).call(this,a),this.dispatchEvent(a)}),Ze(this,Rd,i=>{Re(this,li,i)}),Ze(this,Fd,()=>{Re(this,zr,void 0),ye(this,Et)===this.CONNECTING&&yn(this,qt,Dd).call(this)});try{if(t instanceof URL)Re(this,nr,t);else if(typeof t=="string")Re(this,nr,new URL(t,jG()));else throw new Error("Invalid URL")}catch{throw BG("An invalid or illegal string was specified")}Re(this,Ur,LG({onEvent:ye(this,Nd),onRetry:ye(this,Rd)})),Re(this,Et,this.CONNECTING),Re(this,li,3e3),Re(this,Es,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),Re(this,xs,(o=n==null?void 0:n.withCredentials)!=null?o:!1),yn(this,qt,Dd).call(this)}get readyState(){return ye(this,Et)}get url(){return ye(this,nr).href}get withCredentials(){return ye(this,xs)}get onerror(){return ye(this,Wr)}set onerror(t){Re(this,Wr,t)}get onmessage(){return ye(this,Hr)}set onmessage(t){Re(this,Hr,t)}get onopen(){return ye(this,ui)}set onopen(t){Re(this,ui,t)}addEventListener(t,n,r){const o=n;super.addEventListener(t,o,r)}removeEventListener(t,n,r){const o=n;super.removeEventListener(t,o,r)}close(){ye(this,zr)&&clearTimeout(ye(this,zr)),ye(this,Et)!==this.CLOSED&&(ye(this,Rn)&&ye(this,Rn).abort(),Re(this,Et,this.CLOSED),Re(this,Rn,void 0))}}Et=new WeakMap,nr=new WeakMap,jr=new WeakMap,xs=new WeakMap,Es=new WeakMap,li=new WeakMap,zr=new WeakMap,ci=new WeakMap,Rn=new WeakMap,Ur=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,ui=new WeakMap,qt=new WeakSet,Dd=function(){Re(this,Et,this.CONNECTING),Re(this,Rn,new AbortController),ye(this,Es)(ye(this,nr),yn(this,qt,bx).call(this)).then(ye(this,_d)).catch(ye(this,Md))},_d=new WeakMap,Md=new WeakMap,bx=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ye(this,ci)?{"Last-Event-ID":ye(this,ci)}:void 0},cache:"no-store",signal:(e=ye(this,Rn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Nd=new WeakMap,Rd=new WeakMap,fi=function(e,t){var n;ye(this,Et)!==this.CLOSED&&Re(this,Et,this.CLOSED);const r=new mx("error",{code:t,message:e});(n=ye(this,Wr))==null||n.call(this,r),this.dispatchEvent(r)},Ld=function(e,t){var n;if(ye(this,Et)===this.CLOSED)return;Re(this,Et,this.CONNECTING);const r=new mx("error",{code:t,message:e});(n=ye(this,Wr))==null||n.call(this,r),this.dispatchEvent(r),Re(this,zr,setTimeout(ye(this,Fd),ye(this,li)))},Fd=new WeakMap,ks.CONNECTING=0,ks.OPEN=1,ks.CLOSED=2;function jG(){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 wx(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 zG=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var o;return(o=e[t])==null?void 0:o.delete(n)}},emit:(t,n)=>{var r,o;(r=e[t])==null||r.forEach(i=>i(n)),(o=e["*"])==null||o.forEach(i=>i({type:t,payload:n}))}}},Le=e=>e.data,Sx={throwOnError:!0},UG=async({clientId:e,apiUrl:t,adminSecret:n})=>{const r=`${t||Ie.getConfig().baseUrl}/${e}`;Ie.interceptors.response._fns.length===0&&Ie.interceptors.response.use(wx);const o={...Sx,baseUrl:r};return hx({...o,body:{},headers:n?{"x-admin-secret":n}:void 0}).then(Le)},WG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},o=`${n||Ie.getConfig().baseUrl}/${t}`,i={...Sx,baseUrl:o};return Ie.interceptors.response._fns.length===0&&Ie.interceptors.response.use(wx),{createConversation:()=>yG({...i,headers:r,body:{}}).then(Le),getConversation:({conversationId:a})=>mG({...i,headers:r,path:{id:a}}).then(Le),deleteConversation:({conversationId:a})=>vG({...i,headers:r,path:{id:a}}).then(Le),listConversations:({nextToken:a})=>gG({...i,headers:r,query:{nextToken:a}}).then(Le),listConversationMessages:({conversationId:a,nextToken:s})=>bG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Le),addParticipant:({conversationId:a,userId:s})=>SG({...i,headers:r,path:{id:a},body:{userId:s}}).then(Le),removeParticipant:({conversationId:a,userId:s})=>xG({...i,headers:r,path:{id:a,userId:s}}).then(Le),getParticipant:({conversationId:a,userId:s})=>EG({...i,headers:r,path:{id:a,userId:s}}).then(Le),listParticipants:({conversationId:a,nextToken:s})=>wG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Le),createMessage:a=>$G({...i,headers:r,body:a}).then(Le),updateMessage:({messageId:a,...s})=>AG({...i,headers:r,path:{id:a},body:s}).then(Le),getMessage:({messageId:a})=>CG({...i,headers:r,path:{id:a}}).then(Le),deleteMessage:({messageId:a})=>kG({...i,headers:r,path:{id:a}}).then(Le),createFile:a=>RG({...i,headers:r,body:a}).then(Le),createUser:a=>hx({...i,headers:r,body:a}).then(Le),getUser:()=>PG({...i,headers:r}).then(Le),updateUser:a=>DG({...i,headers:r,body:a}).then(Le),deleteUser:()=>OG({...i,headers:r}).then(Le),createEvent:a=>NG({...i,headers:r,body:a}).then(Le),getEvent:({eventId:a})=>MG({...i,headers:r,path:{id:a}}).then(Le),addMessageFeedback:({messageId:a,...s})=>IG({...i,headers:r,path:{id:a},body:s}).then(Le),removeMessageFeedback:({messageId:a})=>TG({...i,headers:r,path:{id:a}}).then(Le),generateUserKey:({adminSecret:a,...s})=>_G({...i,headers:{"x-admin-secret":a},body:s}).then(Le),listenConversation:({conversationId:a})=>{let s=0,l=null;const c=zG(),u=()=>{l&&l.close();const f=`${o}/conversations/${a}/listen`;l=new ks(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>c.emit("open"),l.onerror=p=>{s<10?(s++,setTimeout(()=>u(),3e3)):c.emit("error",p)},l.onmessage=p=>{const d=HG(p.data);c.emit(d.type,d.data)}};return u(),c.on}}},HG=e=>{try{return JSON.parse(e)}catch{return e}},xx={chatMessageNotification:new URL("data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVJAEzAAAAAOU+A6UBHgF2b3JiaXMAAAAAASJWAAD/////AH0AAP////+pAU9nZ1MAAAAAAAAAAAAAFSQBMwEAAAD3T/UfDpz////////////////FA3ZvcmJpcwwAAABMYXZmNjEuNy4xMDAEAAAAHwAAAGVuY29kZXI9TGF2YzYxLjE5LjEwMSBsaWJ2b3JiaXMrAAAAZW5jb2RlZF9ieT1BZG9iZSBQcmVtaWVyZSBQcm8gMjAyNS4wIChNYWNpbhcAAAB0aW1lX3JlZmVyZW5jZT0xMjExMDQwMA8AAABkYXRlPTIwMjUtMDgtMDUBBXZvcmJpcyJCQ1YBAEAAABhCECoFrWOOOsgVIYwZoqBCyinHHULQIaMkQ4g6xjXHGGNHuWSKQsmB0JBVAABAAACkHFdQckkt55xzoxhXzHHoIOecc+UgZ8xxCSXnnHOOOeeSco4x55xzoxhXDnIpLeecc4EUR4pxpxjnnHOkHEeKcagY55xzbTG3knLOOeecc+Ygh1JyrjXnnHOkGGcOcgsl55xzxiBnzHHrIOecc4w1t9RyzjnnnHPOOeecc84555xzjDHnnHPOOeecc24x5xZzrjnnnHPOOeccc84555xzIDRkFQCQAACgoSiK4igOEBqyCgDIAAAQQHEUR5EUS7Ecy9EkDQgNWQUAAAEACAAAoEiGpEiKpViOZmmeJnqiKJqiKquyacqyLMuy67ouEBqyCgBIAABQURTFcBQHCA1ZBQBkAAAIYCiKoziO5FiSpVmeB4SGrAIAgAAABAAAUAxHsRRN8STP8jzP8zzP8zzP8zzP8zzP8zzP8zwNCA1ZBQAgAAAAgihkGANCQ1YBAEAAAAghGhlDnVISXAoWQhwRQx1CzkOppYPgKYUlY9JTrEEIIXzvPffee++B0JBVAAAQAABhFDiIgcckCCGEYhQnRHGmIAghhOUkWMp56CQI3YMQQrice8u59957IDRkFQAACADAIIQQQgghhBBCCCmklFJIKaaYYoopxxxzzDHHIIMMMuigk046yaSSTjrKJKOOUmsptRRTTLHlFmOttdacc69BKWOMMcYYY4wxxhhjjDHGGCMIDVkFAIAAABAGGWSQQQghhBRSSCmmmHLMMcccA0JDVgEAgAAAAgAAABxFUiRHciRHkiTJkixJkzzLszzLszxN1ERNFVXVVW3X9m1f9m3f1WXf9mXb1WVdlmXdtW1d1l1d13Vd13Vd13Vd13Vd13Vd14HQkFUAgAQAgI7kOI7kOI7kSI6kSAoQGrIKAJABABAAgKM4iuNIjuRYjiVZkiZplmd5lqd5mqiJHhAasgoAAAQAEAAAAAAAgKIoiqM4jiRZlqZpnqd6oiiaqqqKpqmqqmqapmmapmmapmmapmmapmmapmmapmmapmmapmmapmmapmkCoSGrAAAJAAAdx3EcR3Ecx3EkR5IkIDRkFQAgAwAgAABDURxFcizHkjRLszzL00TP9FxRNnVTV20gNGQVAAAIACAAAAAAAADHczzHczzJkzzLczzHkzxJ0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRNA0JDVgIAZAAAEJOQSk6xV0YpxiS0XiqkFJPUe6iYYkw67alCBikHuYdKIaWg094ypZBSDHunmELIGOqhg5AxhbDX2nPPvfceCA1ZEQBEAQAAxiDGEGPIMSYlgxIxxyRkUiLnnJROSialpFZazKSEmEqLkXNOSiclk1JaC6llkkprJaYCAAACHAAAAiyEQkNWBABRAACIMUgppBRSSjGnmENKKceUY0gp5ZxyTjnHmHQQKucYdA5KpJRyjjmnnHMSMgeVcw5CJp0AAIAABwCAAAuh0JAVAUCcAACAkHOKMQgRYxBCCSmFUFKqnJPSQUmpg5JSSanFklKMlXNSOgkpdRJSKinFWFKKLaRUY2kt19JSjS3GnFuMvYaUYi2p1Vpaq7nFWHOLNffIOUqdlNY6Ka2l1mpNrdXaSWktpNZiaS3G1mLNKcacMymthZZiK6nF2GLLNbWYc2kt1xRjzynGnmusucecgzCt1ZxayznFmHvMseeYcw+Sc5Q6Ka11UlpLrdWaWqs1k9Jaaa3GkFqLLcacW4sxZ1JaLKnFWFqKMcWYc4st19BarinGnFOLOcdag5Kx9l5aqznFmHuKreeYczA2x547SrmW1nourfVecy5C1tyLaC3n1GoPKsaec87B2NyDEK3lnGrsPcXYe+45GNtz8K3W4FvNRcicg9C5+KZ7MEbV2oPMtQiZcxA66CJ08Ml4lGoureVcWus91hp8zTkI0VruKcbeU4u9156bsL0HIVrLPcXYg4ox+JpzMDrnYlStwcecg5C1FqF7L0rnIJSqtQeZa1Ay1yJ08MXooIsvAABgwAEAIMCEMlBoyIoAIE4AgEHIOaUYhEopCKGElEIoKVWMSciYg5IxJ6WUUloIJbWKMQiZY1Iyx6SEEloqJbQSSmmplNJaKKW1llqMKbUWQymphVJaK6W0llqqMbVWY8SYlMw5KZljUkoprZVSWqsck5IxKKmDkEopKcVSUouVc1Iy6Kh0EEoqqcRUUmmtpNJSKaXFklJsKcVUW4u1hlJaLKnEVlJqMbVUW4sx14gxKRlzUjLnpJRSUiultJY5J6WDjkrmoKSSUmulpBQz5qR0DkrKIKNSUootpRJTKKW1klJspaTWWoy1ptRaLSW1VlJqsZQSW4sx1xZLTZ2U1koqMYZSWmsx5ppaizGUElspKcaSSmytxZpbbDmGUlosqcRWSmqx1ZZja7Hm1FKNKbWaW2y5xpRTj7X2nFqrNbVUY2ux5lhbb7XWnDsprYVSWislxZhai7HFWHMoJbaSUmylpBhbbLm2FmMPobRYSmqxpBJjazHmGFuOqbVaW2y5ptRirbX2HFtuPaUWa4ux5tJSjTXX3mNNORUAADDgAAAQYEIZKDRkJQAQBQAAGMMYYxAapZxzTkqDlHPOScmcgxBCSplzEEJIKXNOQkotZc5BSKm1UEpKrcUWSkmptRYLAAAocAAACLBBU2JxgEJDVgIAUQAAiDFKMQahMUYp5yA0xijFGIRKKcack1ApxZhzUDLHnINQSuaccxBKCSGUUkpKIYRSSkmpAACAAgcAgAAbNCUWByg0ZEUAEAUAABhjnDPOIQqdpc5SJKmj1lFrKKUaS4ydxlZ767nTGnttuTeUSo2p1o5ry7nV3mlNPbccCwAAO3AAADuwEAoNWQkA5AEAEMYoxZhzzhmFGHPOOecMUow555xzijHnnIMQQsWYc85BCCFzzjkIoYSSOecchBBK6JyDUEoppXTOQQihlFI65yCEUkopnXMQSimllAIAgAocAAACbBTZnGAkqNCQlQBAHgAAYAxCzklprWHMOQgt1dgwxhyUlGKLnIOQUou5RsxBSCnGoDsoKbUYbPCdhJRaizkHk1KLNefeg0iptZqDzj3VVnPPvfecYqw1595zLwAAd8EBAOzARpHNCUaCCg1ZCQDkAQAQCCnFmHPOGaUYc8w554xSjDHmnHOKMcacc85BxRhjzjkHIWPMOecghJAx5pxzEELonHMOQgghdM45ByGEEDrnoIMQQgidcxBCCCGEAgCAChwAAAJsFNmcYCSo0JCVAEA4AAAAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELonHPOOeecc84555xzzjnnnHPOOScAyLfCAcD/wcYZVpLOCkeDCw1ZCQCEAwAACkEopWIQSiklkk46KZ2TUEopkYNSSumklFJKCaWUUkoIpZRSSggdlFJCKaWUUkoppZRSSimllFI6KaWUUkoppZTKOSmlk1JKKaVEzkkpIZRSSimlhFJKKaWUUkoppZRSSimllFJKKaWEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQCALgbHAAgEmycYSXprHA0uNCQlQBASAAAoBRzjkoIKZSQUqiYoo5CKSmkUkoKEWPOSeochVBSKKmDyjkIpaSUQiohdc5BByWFkFIJIZWOOugolFBSKiWU0jkopYQUSkoplZBCSKl0lFIoJZWUQiohlVJKSCWVEEoKnaRUSgqppFRSCJ10kEInJaSSSgqpk5RSKiWllEpKJXRSQioppRBCSqmUEEpIKaVOUkmppBRCKCGFlFJKJaWSSkohlVRCCaWklFIooaRUUkoppZJSKQAA4MABACDACDrJqLIIG0248AAUGrISACADAECUdNZpp0kiCDFFmScNKcYgtaQswxBTkonxFGOMOShGQw4x5JQYF0oIoYNiPCaVQ8pQUbm31DkFxRZjfO+xFwEAAAgCAASEBAAYICiYAQAGBwgjBwIdAQQObQCAgQiZCQwKocFBJgA8QERIBQCJCYrShS4IIYJ0EWTxwIUTN5644YQObRAAAAAAABAA8AEAkFAAERHRzFVYXGBkaGxwdHh8gIQEAAAAAAAIAHwAACQiQERENHMVFhcYGRobHB0eHyAhAQAAAAAAAAAAQEBAAAAAAAAgAAAAQEBPZ2dTAASuMwAAAAAAABUkATMCAAAACYS6sR4BAUQxGR89NxobGiEkKCknJiYmJSUhISEaFgwBAQEAAnyfvULHAlAEJgh2vpgQBMHIyMjIyNhIQOjz+ePz58+fL89xAwYBAFaH//3//7/xNw0MBoNB6qlPfWrUKQng+/0FABAAhLEjKuHFBwA4AHC9Fx4Oh7EwDEOgvnJ3RtV+Op0+nU6n5cyzEwAoltTpwed5dgVKMPoru90zNHGA7F0CP98BAAAAAHl9ePviAgCW+3rugPIDwC6BbWoTAFEAAADh5GpCCACgc+0zxlAAVKddkjDsA14GDoJtf7R+NkE4W23hI5mF3d74iVGvzg9PpA4cCQs66joePTmOfhgl7vNZzYzQADDyz30FAGSvVUZ6wJ4MAKbCGeb4+v5NLIdK3YvrLkCu98uV//FpXQNyKAKAV7r186fTktcJJgjAlVp1fUmaGgtrdAAuDXYJSPs/AAAAAHDnAeHxciEUAB76CvfarGjDzIjALoEd+/0EAAAAQNYeMrkBAF6ZKm8xuw94NtgloHDUCAAAAIAMJ5Qz2iUAvjhKL8lkfmA6wi6BWfNHgiAAAABq4eeqGgCg8+LAAXQAfhgqz2RKHzAVYJeAynEAIQEAALwq6tFbIQAEEIIO8iULngMAXhgajrw3D5iFWhe7BLZNrwCVKAAA0t2TfT8mADx0aMfS4CULeACvA14YWnasNht80ZpdAhv8BEiiAADgcbm4jo0JANAVCTRV6JqQS0OTADoAXhg6zWy+AZ3GsiDRAYJzgiQAAICnb9FLAQAUNQFd44AioMNJICUAfhi67ZRjA2IMSHTAJK0KkgAAAG7W0uLlEgC6KnQdDkgBlAAdJAB+GHpL40hATAASHSC5CZIAAAAGZ3J60ioBoKsBTQKE5KFJIJFAAp4Y+jp7cg4qINEBi+MASQAAAM8rmdZcAKApwFhNPHQkQEBRQwIAnhj6OZ8KIBwDiQ4Q9ApIFAAAQHRFd6FEALA0NaApQAegnPrDA54Y+nN+AYAIJDoAfgIkCgAAcLRlPVsLALqmKqFpHIwUwQEJCwCeKPpzEQA8kOgAyTlBAgAAgPnK3q8jAWAuJFBYOsbAAgCeKPolEQA8rMFCohQAAMxD2BdSAJYFdNThKcCkBQCOgwKeGPpzEQA8rEEhCQAAoCz4MRGA41gaQMBRjACexHugAACeGPqFCAAeugQAAHryFgBdRYGFhGeow8x7AJ4Y+iURADyIigIAliFAAcYWCQC11gGeGPolEQA8UAAAABoODg4=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ns&&Ns.tagName.toUpperCase()==="SCRIPT"&&Ns.src||new URL("index.umd.cjs",document.baseURI).href).href};function Ex({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminSecret:o,soundEnabled:i,...a}){var Z,K;const s=Em(n,r),l=s(L=>L.conversationId),c=s(L=>L.user),u=s(L=>L.setConversationId),f=s(L=>L.setUser),p=Hn(L=>L.messages),d=Hn(L=>L.saveMessage),v=Hn(L=>L.updateMessage),h=Hn(L=>L.fetchMessages),g=Hn(L=>L.setMessages),m=Hn(L=>L.clearMessages),b=Hn(L=>L.isFetching),w=ho(L=>L.participants),A=ho(L=>L.setParticipants),x=ho(L=>L.addParticipant),k=ho(L=>L.removeParticipant),$=ho(L=>L.clearParticipants),R=Cm(`webchat-sound-${t}`),H=R(L=>L.soundOn),T=R(L=>L.toggleSound),{isTyping:_,setIsTyping:F}=Yq(),N=I.useMemo(()=>gp(),[]),[B,D]=I.useState("connecting"),[M,G]=I.useState(a.conversationId),[U,O]=I.useState(a.user),[y,P]=I.useState(void 0),[j,S]=I.useState(void 0),V=I.useRef(!1),Y=I.useRef(null),q=I.useRef(i??!1);I.useEffect(()=>{q.current=i??!1},[i]);const Q=I.useRef(H);I.useEffect(()=>{Q.current=H},[H]);const X=async()=>{if(!V.current){V.current=!0,S(void 0),F(!1),D("connecting");try{const L=a.user||c;let oe=L;if(!oe){const{key:de,user:me}=await UG({clientId:t,apiUrl:e,adminSecret:o});oe={userId:me.id,userToken:de}}const ae=WG({userKey:oe.userToken,clientId:t,apiUrl:e});let ne=a.conversationId||l;if(!ne||!L){m(),$();const{conversation:de}=await ae.createConversation();ne=de.id}else{const de=await h({client:ae,conversationId:ne});g(de);const{participants:me}=await ae.listParticipants({conversationId:ne});A(me)}O(oe),f(oe),P(ae),G(ne),u(ne),Y.current=new Audio,Y.current.preload="auto",Y.current.src=xx.chatMessageNotification,Y.current.volume=.9,D("connected")}catch(L){m(),S(hi(L)),D("error")}finally{V.current=!1}}};Om(async()=>{const L=VG(t,e);if(L){S(L),D("error");return}await X()},[(Z=a.user)==null?void 0:Z.userId,(K=a.user)==null?void 0:K.userToken,a.conversationId]);const ee=async()=>{await X()};if(I.useEffect(()=>{if(!y||!M)return;const L=y.listenConversation({conversationId:M}),oe=[L("open",async()=>{var ne,de;S(void 0);const{event:ae}=await y.createEvent({conversationId:M,payload:{type:"conversation_started",data:{}}});(de=(ne=ae.payload.data)==null?void 0:ne.status)!=null&&de.isInitial&&N.emit("conversation",M),D("connected")}),L("error",ae=>{S(ne=>ne||hi(ae)),D("error"),N.emit("error",new Error(`Connection to conversation lost: ${ae==null?void 0:ae.message}`))}),L("message_created",ae=>{const ne=Ri(ae);(U==null?void 0:U.userId)!==ne.authorId&&(q.current&&Q.current&&Y.current&&Y.current.play().catch(()=>{}),F(!1),N.emit("isTyping",{isTyping:!1,timeout:0})),d(ne),N.emit("message",ne)}),L("message_status_changed",ae=>{ae.newStatus==="processing"&&(F(!0,5e3),N.emit("isTyping",{isTyping:!0,timeout:5e3}),v(ae.message.metadata.clientMessageId,{status:ae.newStatus}))}),L("participant_added",ae=>{x(ae.participant),N.emit("participantAdded",ae.participant)}),L("participant_removed",ae=>{k(ae.participantId),N.emit("participantRemoved",ae.participantId)}),L("webchat_visibility",ae=>N.emit("webchatVisibility",ae.visibility)),L("webchat_config",ae=>N.emit("webchatConfig",ae.config)),L("custom",ae=>N.emit("customEvent",ae.event))];return()=>{oe.forEach(ae=>ae())}},[M,y]),B!=="connected"||!U||!M||!y)return{clientState:B,on:N.on,client:void 0,messages:[],conversationId:void 0,newConversation:ee,user:void 0,isTyping:void 0,isFetchingMessages:b,participants:[],toggleSound:T,soundOn:H,error:j};const J={sendMessage:async L=>{const oe=ox(),ae={id:oe,createdAt:new Date().toISOString(),userId:U.userId,conversationId:M,payload:L,metadata:{clientMessageId:oe,delivered:!1}},ne=Ri(ae);ne.status="pending",d(ne),await y.createMessage({conversationId:M,payload:L,metadata:{clientMessageId:oe}}).catch(de=>N.emit("error",de))},sendEvent:async L=>{await y.createEvent({conversationId:M,payload:{type:"custom",data:L}})},uploadFile:async L=>{const{size:oe,name:ae}=L,de=await(ie=>new Promise((ce,W)=>{const z=new FileReader;z.onload=te=>{var se;return ce((se=te.target)==null?void 0:se.result)},z.onerror=te=>{var se;return W((se=te.target)==null?void 0:se.error)},z.readAsArrayBuffer(ie)}))(L),me=new Date;me.setDate(me.getDate()+30);const{file:{uploadUrl:De,contentType:Ue,url:dt}}=await y.createFile({size:oe,key:ae,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:me.toISOString()});await fetch(De,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":Ue},body:de});const mt=Ue.split("/").shift()??"",pt=Tp(mt)?mt:"file";return{fileUrl:dt,name:ae,type:pt}},addMessageFeedback:async(L,oe)=>{v(L,{feedback:oe.value}),await y.addMessageFeedback({messageId:L,...oe})},getUser:async()=>{const{user:L}=await y.getUser();return L},updateUser:async L=>{const{user:oe}=await y.updateUser({name:L.name,pictureUrl:L.pictureUrl,userData:L.data});return oe}};return{clientState:"connected",on:N.on,client:J,messages:p,conversationId:M,newConversation:async()=>{try{m(),$(),F(!1);const{conversation:L}=await y.createConversation();G(L.id),u(L.id)}catch(L){S(hi(L)),D("error")}},user:c,isTyping:_,isFetchingMessages:b,participants:w,error:j,soundOn:H,toggleSound:T}}const VG=(e,t)=>{if(!e)return{type:"configuration",message:Ip};if(!URL.canParse(t))return{type:"configuration",message:Op}},KG=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:o,user:i,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:c,client:u,isFetchingMessages:f,isTyping:p,newConversation:d,messages:v,participants:h,user:g,error:m,soundOn:b,toggleSound:w}=Ex({clientId:e,apiUrl:o,conversationId:a,user:i,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminSecret:n==null?void 0:n.adminSecret,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:A,uploadFile:x,addMessageFeedback:k}=u??{};return E.jsx(ax,{configuration:n??{},user:g!=null&&g.userId?{id:g==null?void 0:g.userId}:void 0,isLoading:f||c==="connecting",isTyping:p,connected:c==="connected"?!0:c==="disconnected"?!1:void 0,messages:v,sendMessage:A,uploadFile:x,addMessageFeedback:k,allowFileUpload:r,restartConversation:d,...s,participants:h,error:m,clientId:e,soundOn:b,toggleSound:w})};var Bd=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(GG);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(jd,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(jd,{...r,ref:t,children:n})});Bd.displayName="Slot";var jd=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=QG(n),i=YG(r,n.props);return n.type!==C.Fragment&&(i.ref=t?jc(t,o):o),C.cloneElement(n,i)}return C.Children.count(n)>1?C.Children.only(null):null});jd.displayName="SlotClone";var qG=({children:e})=>E.jsx(E.Fragment,{children:e});function GG(e){return C.isValidElement(e)&&e.type===qG}function YG(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function QG(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var JG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ln=JG.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Bd:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZG(e,t){e&&rp.flushSync(()=>e.dispatchEvent(t))}function XG(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e);C.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var eY="DismissableLayer",zd="dismissableLayer.update",tY="dismissableLayer.pointerDownOutside",nY="dismissableLayer.focusOutside",kx,Cx=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ax=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=C.useContext(Cx),[u,f]=C.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),v=In(t,$=>f($)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g),b=u?h.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,A=b>=m,x=iY($=>{const R=$.target,H=[...c.branches].some(T=>T.contains(R));!A||H||(o==null||o($),a==null||a($),$.defaultPrevented||s==null||s())},p),k=aY($=>{const R=$.target;[...c.branches].some(T=>T.contains(R))||(i==null||i($),a==null||a($),$.defaultPrevented||s==null||s())},p);return XG($=>{b===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},p),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),$x(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=kx)}},[u,p,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),$x())},[u,c]),C.useEffect(()=>{const $=()=>d({});return document.addEventListener(zd,$),()=>document.removeEventListener(zd,$)},[]),E.jsx(Ln.div,{...l,ref:v,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:pn(e.onFocusCapture,k.onFocusCapture),onBlurCapture:pn(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:pn(e.onPointerDownCapture,x.onPointerDownCapture)})});Ax.displayName=eY;var rY="DismissableLayerBranch",oY=C.forwardRef((e,t)=>{const n=C.useContext(Cx),r=C.useRef(null),o=In(t,r);return C.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(Ln.div,{...e,ref:o})});oY.displayName=rY;function iY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Tx(tY,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function aY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=i=>{i.target&&!r.current&&Tx(nY,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $x(){const e=new CustomEvent(zd);document.dispatchEvent(e)}function Tx(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ZG(o,i):o.dispatchEvent(i)}var Ud="focusScope.autoFocusOnMount",Wd="focusScope.autoFocusOnUnmount",Ix={bubbles:!1,cancelable:!0},sY="FocusScope",Ox=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=C.useState(null),c=bn(o),u=bn(i),f=C.useRef(null),p=In(t,h=>l(h)),d=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const A=w.target;s.contains(A)?f.current=A:Fn(f.current,{select:!0})},g=function(w){if(d.paused||!s)return;const A=w.relatedTarget;A!==null&&(s.contains(A)||Fn(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&Fn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),C.useEffect(()=>{if(s){_x.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(Ud,Ix);s.addEventListener(Ud,c),s.dispatchEvent(m),m.defaultPrevented||(lY(pY(Px(s)),{select:!0}),document.activeElement===h&&Fn(s))}return()=>{s.removeEventListener(Ud,c),setTimeout(()=>{const m=new CustomEvent(Wd,Ix);s.addEventListener(Wd,u),s.dispatchEvent(m),m.defaultPrevented||Fn(h??document.body,{select:!0}),s.removeEventListener(Wd,u),_x.remove(d)},0)}}},[s,c,u,d]);const v=C.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,m=document.activeElement;if(g&&m){const b=h.currentTarget,[w,A]=cY(b);w&&A?!h.shiftKey&&m===A?(h.preventDefault(),n&&Fn(w,{select:!0})):h.shiftKey&&m===w&&(h.preventDefault(),n&&Fn(A,{select:!0})):m===b&&h.preventDefault()}},[n,r,d.paused]);return E.jsx(Ln.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Ox.displayName=sY;function lY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fn(r,{select:t}),document.activeElement!==n)return}function cY(e){const t=Px(e),n=Dx(t,e),r=Dx(t.reverse(),e);return[n,r]}function Px(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dx(e,t){for(const n of e)if(!uY(n,{upTo:t}))return n}function uY(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 fY(e){return e instanceof HTMLInputElement&&"select"in e}function Fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fY(e)&&t&&e.select()}}var _x=dY();function dY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Mx(e,t),e.unshift(t)},remove(t){var n;e=Mx(e,t),(n=e[0])==null||n.resume()}}}function Mx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pY(e){return e.filter(t=>t.tagName!=="A")}var Hd=0;function hY(){C.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nx()),document.body.insertAdjacentElement("beforeend",e[1]??Nx()),Hd++,()=>{Hd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hd--}},[])}function Nx(){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 Cs="right-scroll-bar-position",As="width-before-scroll-bar",vY="with-scroll-bars-hidden",mY="--removed-body-scroll-bar-size";function Vd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gY(e,t){var n=I.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var yY=typeof window<"u"?C.useLayoutEffect:C.useEffect,Rx=new WeakMap;function bY(e,t){var n=gY(null,function(r){return e.forEach(function(o){return Vd(o,r)})});return yY(function(){var r=Rx.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Vd(s,null)}),i.forEach(function(s){o.has(s)||Vd(s,a)})}Rx.set(n,e)},[e]),n}function wY(e){return e}function SY(e,t){t===void 0&&(t=wY);var n=[],r=!1,o={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(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var u=a;a=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return o}function xY(e){e===void 0&&(e={});var t=SY(null);return t.options=_t({async:!0,ssr:!1},e),t}var Lx=function(e){var t=e.sideCar,n=Tm(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 C.createElement(r,_t({},n))};Lx.isSideCarExport=!0;function EY(e,t){return e.useMedium(t),Lx}var Fx=xY(),Kd=function(){},$s=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:Kd,onWheelCapture:Kd,onTouchMoveCapture:Kd}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noRelative,v=e.noIsolation,h=e.inert,g=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,w=e.gapMode,A=Tm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,k=bY([n,t]),$=_t(_t({},A),o);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Fx,removeScrollBar:c,shards:f,noRelative:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?C.cloneElement(C.Children.only(s),_t(_t({},$),{ref:k})):C.createElement(b,_t({},$,{className:l,ref:k}),s))});$s.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$s.classNames={fullWidth:As,zeroRight:Cs};var kY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kY();return t&&e.setAttribute("nonce",t),e}function AY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $Y(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var TY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=CY())&&(AY(t,n),$Y(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},IY=function(){var e=TY();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bx=function(){var e=IY(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},OY={left:0,top:0,right:0,gap:0},qd=function(e){return parseInt(e||"",10)||0},PY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qd(n),qd(r),qd(o)]},DY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return OY;var t=PY(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])}},_Y=Bx(),Vr="data-scroll-locked",MY=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
294
+ .`.concat(vY,` {
295
295
  overflow: hidden `).concat(r,`;
296
296
  padding-right: `).concat(s,"px ").concat(r,`;
297
297
  }
@@ -325,13 +325,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
325
325
  }
326
326
 
327
327
  body[`).concat(Vr,`] {
328
- `).concat(gY,": ").concat(s,`px;
328
+ `).concat(mY,": ").concat(s,`px;
329
329
  }
330
- `)},jx=function(){var e=parseInt(document.body.getAttribute(Vr)||"0",10);return isFinite(e)?e:0},RY=function(){C.useEffect(function(){return document.body.setAttribute(Vr,(jx()+1).toString()),function(){var e=jx()-1;e<=0?document.body.removeAttribute(Vr):document.body.setAttribute(Vr,e.toString())}},[])},LY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;RY();var i=C.useMemo(function(){return _Y(o)},[o]);return C.createElement(MY,{styles:NY(i,!t,o,n?"":"!important")})},Gd=!1;if(typeof window<"u")try{var Ts=Object.defineProperty({},"passive",{get:function(){return Gd=!0,!0}});window.addEventListener("test",Ts,Ts),window.removeEventListener("test",Ts,Ts)}catch{Gd=!1}var Kr=Gd?{passive:!1}:!1,FY=function(e){return e.tagName==="TEXTAREA"},zx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!FY(e)&&n[t]==="visible")},BY=function(e){return zx(e,"overflowY")},jY=function(e){return zx(e,"overflowX")},Ux=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Wx(e,r);if(o){var i=Hx(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},UY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Wx=function(e,t){return e==="v"?BY(t):jY(t)},Hx=function(e,t){return e==="v"?zY(t):UY(t)},WY=function(e,t){return e==="h"&&t==="rtl"?-1:1},HY=function(e,t,n,r,o){var i=WY(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,f=0,p=0;do{if(!s)break;var d=Hx(e,s),v=d[0],h=d[1],g=d[2],m=h-g-i*v;(v||m)&&Wx(e,s)&&(f+=m,p+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(Math.abs(f)<1||!o)||!u&&(Math.abs(p)<1||!o))&&(c=!0),c},Is=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vx=function(e){return[e.deltaX,e.deltaY]},Kx=function(e){return e&&"current"in e?e.current:e},VY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KY=function(e){return`
330
+ `)},jx=function(){var e=parseInt(document.body.getAttribute(Vr)||"0",10);return isFinite(e)?e:0},NY=function(){C.useEffect(function(){return document.body.setAttribute(Vr,(jx()+1).toString()),function(){var e=jx()-1;e<=0?document.body.removeAttribute(Vr):document.body.setAttribute(Vr,e.toString())}},[])},RY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;NY();var i=C.useMemo(function(){return DY(o)},[o]);return C.createElement(_Y,{styles:MY(i,!t,o,n?"":"!important")})},Gd=!1;if(typeof window<"u")try{var Ts=Object.defineProperty({},"passive",{get:function(){return Gd=!0,!0}});window.addEventListener("test",Ts,Ts),window.removeEventListener("test",Ts,Ts)}catch{Gd=!1}var Kr=Gd?{passive:!1}:!1,LY=function(e){return e.tagName==="TEXTAREA"},zx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LY(e)&&n[t]==="visible")},FY=function(e){return zx(e,"overflowY")},BY=function(e){return zx(e,"overflowX")},Ux=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Wx(e,r);if(o){var i=Hx(e,r),a=i[1],s=i[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]},Wx=function(e,t){return e==="v"?FY(t):BY(t)},Hx=function(e,t){return e==="v"?jY(t):zY(t)},UY=function(e,t){return e==="h"&&t==="rtl"?-1:1},WY=function(e,t,n,r,o){var i=UY(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,f=0,p=0;do{if(!s)break;var d=Hx(e,s),v=d[0],h=d[1],g=d[2],m=h-g-i*v;(v||m)&&Wx(e,s)&&(f+=m,p+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(Math.abs(f)<1||!o)||!u&&(Math.abs(p)<1||!o))&&(c=!0),c},Is=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vx=function(e){return[e.deltaX,e.deltaY]},Kx=function(e){return e&&"current"in e?e.current:e},HY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VY=function(e){return`
331
331
  .block-interactivity-`.concat(e,` {pointer-events: none;}
332
332
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
333
- `)},qY=0,qr=[];function GY(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(qY++)[0],i=C.useState(Bx)[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Gl([e.lockRef.current],(e.shards||[]).map(Kx),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var m=Is(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-m[0],A="deltaY"in h?h.deltaY:b[1]-m[1],x,k=h.target,$=Math.abs(w)>Math.abs(A)?"h":"v";if("touches"in h&&$==="h"&&k.type==="range")return!1;var R=Ux($,k);if(!R)return!0;if(R?x=$:(x=$==="v"?"h":"v",R=Ux($,k)),!R)return!1;if(!r.current&&"changedTouches"in h&&(w||A)&&(r.current=x),!x)return!0;var W=r.current||x;return HY(W,g,h,W==="h"?w:A,!0)},[]),l=C.useCallback(function(h){var g=h;if(!(!qr.length||qr[qr.length-1]!==i)){var m="deltaY"in g?Vx(g):Is(g),b=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&VY(x.delta,m)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(Kx).filter(Boolean).filter(function(x){return x.contains(g.target)}),A=w.length>0?s(g,w[0]):!a.current.noIsolation;A&&g.cancelable&&g.preventDefault()}}},[]),c=C.useCallback(function(h,g,m,b){var w={name:h,delta:g,target:m,should:b,shadowParent:YY(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(A){return A!==w})},1)},[]),u=C.useCallback(function(h){n.current=Is(h),r.current=void 0},[]),f=C.useCallback(function(h){c(h.type,Vx(h),h.target,s(h,e.lockRef.current))},[]),p=C.useCallback(function(h){c(h.type,Is(h),h.target,s(h,e.lockRef.current))},[]);C.useEffect(function(){return qr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Kr),document.addEventListener("touchmove",l,Kr),document.addEventListener("touchstart",u,Kr),function(){qr=qr.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Kr),document.removeEventListener("touchmove",l,Kr),document.removeEventListener("touchstart",u,Kr)}},[]);var d=e.removeScrollBar,v=e.inert;return C.createElement(C.Fragment,null,v?C.createElement(i,{styles:KY(o)}):null,d?C.createElement(LY,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function YY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const QY=kY(Fx,GY);var qx=C.forwardRef(function(e,t){return C.createElement($s,_t({},e,{ref:t,sideCar:QY}))});qx.classNames=$s.classNames;var JY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gr=new WeakMap,Os=new WeakMap,Ps={},Yd=0,Gx=function(e){return e&&(e.host||Gx(e.parentNode))},ZY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gx(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})},XY=function(e,t,n,r){var o=ZY(t,Array.isArray(e)?e:[e]);Ps[n]||(Ps[n]=new WeakMap);var i=Ps[n],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else try{var d=p.getAttribute(r),v=d!==null&&d!=="false",h=(Gr.get(p)||0)+1,g=(i.get(p)||0)+1;Gr.set(p,h),i.set(p,g),a.push(p),h===1&&v&&Os.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return u(t),s.clear(),Yd++,function(){a.forEach(function(f){var p=Gr.get(f)-1,d=i.get(f)-1;Gr.set(f,p),i.set(f,d),p||(Os.has(f)||f.removeAttribute(r),Os.delete(f)),d||f.removeAttribute(n)}),Yd--,Yd||(Gr=new WeakMap,Gr=new WeakMap,Os=new WeakMap,Ps={})}},eQ=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=JY(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),XY(r,o,n,"aria-hidden")):function(){return null}},Qd="Dialog",[Yx,bJ]=My(Qd),[tQ,cn]=Yx(Qd),Qx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=C.useRef(null),l=C.useRef(null),[c=!1,u]=Ny({prop:r,defaultProp:o,onChange:i});return E.jsx(tQ,{scope:t,triggerRef:s,contentRef:l,contentId:ga(),titleId:ga(),descriptionId:ga(),open:c,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(f=>!f),[u]),modal:a,children:n})};Qx.displayName=Qd;var Jx="DialogTrigger",Zx=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Jx,n),i=In(t,o.triggerRef);return E.jsx(Ln.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zd(o.open),...r,ref:i,onClick:pn(e.onClick,o.onOpenToggle)})});Zx.displayName=Jx;var nQ="DialogPortal",[wJ,Xx]=Yx(nQ,{forceMount:void 0}),Ds="DialogOverlay",eE=C.forwardRef((e,t)=>{const n=Xx(Ds,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=cn(Ds,e.__scopeDialog);return i.modal?E.jsx(va,{present:r||i.open,children:E.jsx(rQ,{...o,ref:t})}):null});eE.displayName=Ds;var rQ=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Ds,n);return E.jsx(qx,{as:Bd,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(Ln.div,{"data-state":Zd(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rr="DialogContent",tE=C.forwardRef((e,t)=>{const n=Xx(rr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=cn(rr,e.__scopeDialog);return E.jsx(va,{present:r||i.open,children:i.modal?E.jsx(oQ,{...o,ref:t}):E.jsx(iQ,{...o,ref:t})})});tE.displayName=rr;var oQ=C.forwardRef((e,t)=>{const n=cn(rr,e.__scopeDialog),r=C.useRef(null),o=In(t,n.contentRef,r);return C.useEffect(()=>{const i=r.current;if(i)return eQ(i)},[]),E.jsx(nE,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pn(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:pn(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:pn(e.onFocusOutside,i=>i.preventDefault())})}),iQ=C.forwardRef((e,t)=>{const n=cn(rr,e.__scopeDialog),r=C.useRef(!1),o=C.useRef(!1);return E.jsx(nE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),nE=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=cn(rr,n),l=C.useRef(null),c=In(t,l);return vY(),E.jsxs(E.Fragment,{children:[E.jsx(Ox,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(Ax,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Zd(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(aQ,{titleId:s.titleId}),E.jsx(lQ,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Jd="DialogTitle",rE=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Jd,n);return E.jsx(Ln.h2,{id:o.titleId,...r,ref:t})});rE.displayName=Jd;var oE="DialogDescription",iE=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(oE,n);return E.jsx(Ln.p,{id:o.descriptionId,...r,ref:t})});iE.displayName=oE;var aE="DialogClose",sE=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(aE,n);return E.jsx(Ln.button,{type:"button",...r,ref:t,onClick:pn(e.onClick,()=>o.onOpenChange(!1))})});sE.displayName=aE;function Zd(e){return e?"open":"closed"}var lE="DialogTitleWarning",[SJ,cE]=DN(lE,{contentName:rr,titleName:Jd,docsSlug:"dialog"}),aQ=({titleId:e})=>{const t=cE(lE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
333
+ `)},KY=0,qr=[];function qY(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(KY++)[0],i=C.useState(Bx)[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Gl([e.lockRef.current],(e.shards||[]).map(Kx),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var m=Is(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-m[0],A="deltaY"in h?h.deltaY:b[1]-m[1],x,k=h.target,$=Math.abs(w)>Math.abs(A)?"h":"v";if("touches"in h&&$==="h"&&k.type==="range")return!1;var R=Ux($,k);if(!R)return!0;if(R?x=$:(x=$==="v"?"h":"v",R=Ux($,k)),!R)return!1;if(!r.current&&"changedTouches"in h&&(w||A)&&(r.current=x),!x)return!0;var H=r.current||x;return WY(H,g,h,H==="h"?w:A,!0)},[]),l=C.useCallback(function(h){var g=h;if(!(!qr.length||qr[qr.length-1]!==i)){var m="deltaY"in g?Vx(g):Is(g),b=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&HY(x.delta,m)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(Kx).filter(Boolean).filter(function(x){return x.contains(g.target)}),A=w.length>0?s(g,w[0]):!a.current.noIsolation;A&&g.cancelable&&g.preventDefault()}}},[]),c=C.useCallback(function(h,g,m,b){var w={name:h,delta:g,target:m,should:b,shadowParent:GY(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(A){return A!==w})},1)},[]),u=C.useCallback(function(h){n.current=Is(h),r.current=void 0},[]),f=C.useCallback(function(h){c(h.type,Vx(h),h.target,s(h,e.lockRef.current))},[]),p=C.useCallback(function(h){c(h.type,Is(h),h.target,s(h,e.lockRef.current))},[]);C.useEffect(function(){return qr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Kr),document.addEventListener("touchmove",l,Kr),document.addEventListener("touchstart",u,Kr),function(){qr=qr.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Kr),document.removeEventListener("touchmove",l,Kr),document.removeEventListener("touchstart",u,Kr)}},[]);var d=e.removeScrollBar,v=e.inert;return C.createElement(C.Fragment,null,v?C.createElement(i,{styles:VY(o)}):null,d?C.createElement(RY,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const YY=EY(Fx,qY);var qx=C.forwardRef(function(e,t){return C.createElement($s,_t({},e,{ref:t,sideCar:YY}))});qx.classNames=$s.classNames;var QY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gr=new WeakMap,Os=new WeakMap,Ps={},Yd=0,Gx=function(e){return e&&(e.host||Gx(e.parentNode))},JY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gx(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})},ZY=function(e,t,n,r){var o=JY(t,Array.isArray(e)?e:[e]);Ps[n]||(Ps[n]=new WeakMap);var i=Ps[n],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else try{var d=p.getAttribute(r),v=d!==null&&d!=="false",h=(Gr.get(p)||0)+1,g=(i.get(p)||0)+1;Gr.set(p,h),i.set(p,g),a.push(p),h===1&&v&&Os.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return u(t),s.clear(),Yd++,function(){a.forEach(function(f){var p=Gr.get(f)-1,d=i.get(f)-1;Gr.set(f,p),i.set(f,d),p||(Os.has(f)||f.removeAttribute(r),Os.delete(f)),d||f.removeAttribute(n)}),Yd--,Yd||(Gr=new WeakMap,Gr=new WeakMap,Os=new WeakMap,Ps={})}},XY=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=QY(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),ZY(r,o,n,"aria-hidden")):function(){return null}},Qd="Dialog",[Yx,yJ]=My(Qd),[eQ,cn]=Yx(Qd),Qx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=C.useRef(null),l=C.useRef(null),[c=!1,u]=Ny({prop:r,defaultProp:o,onChange:i});return E.jsx(eQ,{scope:t,triggerRef:s,contentRef:l,contentId:ga(),titleId:ga(),descriptionId:ga(),open:c,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(f=>!f),[u]),modal:a,children:n})};Qx.displayName=Qd;var Jx="DialogTrigger",Zx=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Jx,n),i=In(t,o.triggerRef);return E.jsx(Ln.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zd(o.open),...r,ref:i,onClick:pn(e.onClick,o.onOpenToggle)})});Zx.displayName=Jx;var tQ="DialogPortal",[bJ,Xx]=Yx(tQ,{forceMount:void 0}),Ds="DialogOverlay",eE=C.forwardRef((e,t)=>{const n=Xx(Ds,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=cn(Ds,e.__scopeDialog);return i.modal?E.jsx(va,{present:r||i.open,children:E.jsx(nQ,{...o,ref:t})}):null});eE.displayName=Ds;var nQ=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Ds,n);return E.jsx(qx,{as:Bd,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(Ln.div,{"data-state":Zd(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rr="DialogContent",tE=C.forwardRef((e,t)=>{const n=Xx(rr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=cn(rr,e.__scopeDialog);return E.jsx(va,{present:r||i.open,children:i.modal?E.jsx(rQ,{...o,ref:t}):E.jsx(oQ,{...o,ref:t})})});tE.displayName=rr;var rQ=C.forwardRef((e,t)=>{const n=cn(rr,e.__scopeDialog),r=C.useRef(null),o=In(t,n.contentRef,r);return C.useEffect(()=>{const i=r.current;if(i)return XY(i)},[]),E.jsx(nE,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pn(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:pn(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:pn(e.onFocusOutside,i=>i.preventDefault())})}),oQ=C.forwardRef((e,t)=>{const n=cn(rr,e.__scopeDialog),r=C.useRef(!1),o=C.useRef(!1);return E.jsx(nE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),nE=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=cn(rr,n),l=C.useRef(null),c=In(t,l);return hY(),E.jsxs(E.Fragment,{children:[E.jsx(Ox,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(Ax,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Zd(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(iQ,{titleId:s.titleId}),E.jsx(sQ,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Jd="DialogTitle",rE=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Jd,n);return E.jsx(Ln.h2,{id:o.titleId,...r,ref:t})});rE.displayName=Jd;var oE="DialogDescription",iE=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(oE,n);return E.jsx(Ln.p,{id:o.descriptionId,...r,ref:t})});iE.displayName=oE;var aE="DialogClose",sE=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(aE,n);return E.jsx(Ln.button,{type:"button",...r,ref:t,onClick:pn(e.onClick,()=>o.onOpenChange(!1))})});sE.displayName=aE;function Zd(e){return e?"open":"closed"}var lE="DialogTitleWarning",[wJ,cE]=DN(lE,{contentName:rr,titleName:Jd,docsSlug:"dialog"}),iQ=({titleId:e})=>{const t=cE(lE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
334
334
 
335
335
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
336
336
 
337
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sQ="DialogDescriptionWarning",lQ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cE(sQ).contentName}}.`;return C.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},cQ=Qx,uQ=Zx,fQ=eE,dQ=tE,pQ=rE,hQ=iE,vQ=sE;function Yr({open:e,onOpenChange:t,children:n}){const{modal:r}=me;return E.jsxs(cQ,{open:e,onOpenChange:t,children:[E.jsx(fQ,{...r==null?void 0:r.overlay}),n]})}function mQ({title:e,description:t,onConfirm:n,onCancel:r,confirmButtonText:o,cancelButtonText:i,children:a}){const{modal:s}=me;return E.jsx(E.Fragment,{children:E.jsxs(dQ,{...s.dialog.container,children:[E.jsx(pQ,{...s.dialog.title,children:e}),E.jsx(hQ,{...s.dialog.description,children:t}),E.jsx("div",{...s.dialog.content.container,children:a}),E.jsxs("div",{...s.dialog.button.container,children:[o&&E.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:n,children:o}),i&&E.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:r,children:i})]})]})})}Yr.Button=uQ,Yr.Close=vQ,Yr.Content=mQ;const uE=I.forwardRef(({children:e,onClick:t,avatarUrl:n,botName:r,description:o,onClose:i,...a},s)=>{const{messagePreview:l}=me,{container:c,closeButton:u,message:f,avatar:p,description:d}=l??{};return E.jsxs("div",{...a,...c,ref:s,onClick:t,children:[E.jsx(to,{src:n,...p,children:r||"Bot"}),E.jsx("p",{...f,children:e}),E.jsx("p",{...d,children:o}),E.jsx(nm,{...u,onClick:v=>{v.stopPropagation(),i==null||i()}})]})});uE.displayName="MessagePreview",se.Avatar=to,se.BOT_IS_BLOCKED=_p,se.Block=Kn,se.CONFIG_ACCESS_DENIED=lk,se.Chat=ax,se.Composer=Zg,se.Container=Bc,se.ErrorState=ix,se.Fab=_y,se.Header=Wy,se.INVALID_API_URL=Op,se.INVALID_BOTPRESS_URL=Dp,se.INVALID_CLIENT_ID=Pp,se.INVALID_CONFIGURATION=sk,se.INVALID_CONFIG_URL=ak,se.INVALID_MESSAGE_CONTENT_TYPE=Fp,se.MISSING_API_URL=rk,se.MISSING_BOT_ID=ok,se.MISSING_CLIENT_ID=Ip,se.MISSING_CONFIG_URL=ik,se.Message=Yc,se.MessageContext=Vl,se.MessageList=$d,se.MessagePreview=uE,se.Modal=Yr,se.ModalContext=Kl,se.ModalProvider=Py,se.NETWORK_ERROR=Rp,se.NOT_A_PARTICIPANT=Np,se.QUOTA_EXCEEDED=Mp,se.RestartConversationButton=qc,se.SOUND_EFFECTS=xx,se.SSE_DISCONNECTED_ERROR=Lp,se.StylesheetProvider=Dy,se.TypingIndicator=Gc,se.Webchat=qG,se.commonApiErrorMap=Hs,se.enrichMessage=pp,se.fileTypes=$p,se.generateThemeOverride=Ap,se.generateThemeStylesheet=Cp,se.getUseChatSoundStore=Cm,se.getUseWebchatClientStore=Em,se.handleIntegrationError=hi,se.integrationMessagePayloadToBlockPayload=hm,se.integrationMessageToBlockMessage=Ri,se.isCommonApiErrorType=jp,se.isEventError=Up,se.isFileType=Tp,se.isIntegrationError=zp,se.isWebhookHandlerErrorType=Bp,se.renderers=Wg,se.useMessageContext=Am,se.useModalContext=ql,se.useWebchat=Ex,se.useWebchatStore=Li,se.webchatClasses=me,se.webhookHandlerErrorMap=Ws,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
337
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},aQ="DialogDescriptionWarning",sQ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cE(aQ).contentName}}.`;return C.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},lQ=Qx,cQ=Zx,uQ=eE,fQ=tE,dQ=rE,pQ=iE,hQ=sE;function Yr({open:e,onOpenChange:t,children:n}){const{modal:r}=ve;return E.jsxs(lQ,{open:e,onOpenChange:t,children:[E.jsx(uQ,{...r==null?void 0:r.overlay}),n]})}function vQ({title:e,description:t,onConfirm:n,onCancel:r,confirmButtonText:o,cancelButtonText:i,children:a}){const{modal:s}=ve;return E.jsx(E.Fragment,{children:E.jsxs(fQ,{...s.dialog.container,children:[E.jsx(dQ,{...s.dialog.title,children:e}),E.jsx(pQ,{...s.dialog.description,children:t}),E.jsx("div",{...s.dialog.content.container,children:a}),E.jsxs("div",{...s.dialog.button.container,children:[o&&E.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:n,children:o}),i&&E.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:r,children:i})]})]})})}Yr.Button=cQ,Yr.Close=hQ,Yr.Content=vQ;const uE=I.forwardRef(({children:e,onClick:t,avatarUrl:n,botName:r,description:o,onClose:i,...a},s)=>{const{messagePreview:l}=ve,{container:c,closeButton:u,message:f,avatar:p,description:d}=l??{};return E.jsxs("div",{...a,...c,ref:s,onClick:t,children:[E.jsx(to,{src:n,...p,children:r||"Bot"}),E.jsx("p",{...f,children:e}),E.jsx("p",{...d,children:o}),E.jsx(nm,{...u,onClick:v=>{v.stopPropagation(),i==null||i()}})]})});uE.displayName="MessagePreview",le.Avatar=to,le.BOT_IS_BLOCKED=_p,le.Block=Kn,le.CONFIG_ACCESS_DENIED=lk,le.Chat=ax,le.Composer=Zg,le.Container=Bc,le.ErrorState=ix,le.Fab=_y,le.Header=Wy,le.INVALID_API_URL=Op,le.INVALID_BOTPRESS_URL=Dp,le.INVALID_CLIENT_ID=Pp,le.INVALID_CONFIGURATION=sk,le.INVALID_CONFIG_URL=ak,le.INVALID_MESSAGE_CONTENT_TYPE=Fp,le.MISSING_API_URL=rk,le.MISSING_BOT_ID=ok,le.MISSING_CLIENT_ID=Ip,le.MISSING_CONFIG_URL=ik,le.Message=Yc,le.MessageContext=Vl,le.MessageList=$d,le.MessagePreview=uE,le.Modal=Yr,le.ModalContext=Kl,le.ModalProvider=Py,le.NETWORK_ERROR=Rp,le.NOT_A_PARTICIPANT=Np,le.QUOTA_EXCEEDED=Mp,le.RestartConversationButton=qc,le.SOUND_EFFECTS=xx,le.SSE_DISCONNECTED_ERROR=Lp,le.StylesheetProvider=Dy,le.TypingIndicator=Gc,le.Webchat=KG,le.commonApiErrorMap=Hs,le.enrichMessage=pp,le.fileTypes=$p,le.generateThemeOverride=Ap,le.generateThemeStylesheet=Cp,le.getUseChatSoundStore=Cm,le.getUseWebchatClientStore=Em,le.handleIntegrationError=hi,le.integrationMessagePayloadToBlockPayload=hm,le.integrationMessageToBlockMessage=Ri,le.isCommonApiErrorType=jp,le.isEventError=Up,le.isFileType=Tp,le.isIntegrationError=zp,le.isWebhookHandlerErrorType=Bp,le.renderers=Wg,le.useMessageContext=Am,le.useModalContext=ql,le.useWebchat=Ex,le.useWebchatStore=Li,le.webchatClasses=ve,le.webhookHandlerErrorMap=Ws,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});