@desivocal/agents-cdn 1.0.20-alpha.41 → 1.0.20-alpha.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dv-agent.es.js +11 -11
- package/dist/dv-agent.umd.js +4 -4
- package/package.json +1 -1
package/dist/dv-agent.es.js
CHANGED
|
@@ -13164,7 +13164,7 @@ Check the render method of \`` + i + "`." : "";
|
|
|
13164
13164
|
};
|
|
13165
13165
|
}
|
|
13166
13166
|
}
|
|
13167
|
-
function
|
|
13167
|
+
function Yse(i) {
|
|
13168
13168
|
return i;
|
|
13169
13169
|
}
|
|
13170
13170
|
function A6(i) {
|
|
@@ -15394,9 +15394,9 @@ Incoming: %s`, Ae, "[" + o.join(", ") + "]", "[" + i.join(", ") + "]");
|
|
|
15394
15394
|
}
|
|
15395
15395
|
return [P, C];
|
|
15396
15396
|
}
|
|
15397
|
-
function
|
|
15397
|
+
function Kse(i, o, f) {
|
|
15398
15398
|
}
|
|
15399
|
-
function
|
|
15399
|
+
function Zse(i, o, f) {
|
|
15400
15400
|
}
|
|
15401
15401
|
function nx(i, o, f) {
|
|
15402
15402
|
var m = lr, y = jl(), C, w = oa();
|
|
@@ -27736,7 +27736,7 @@ function LH() {
|
|
|
27736
27736
|
return typeof window.RTCRtpSender < "u" && // @ts-ignore
|
|
27737
27737
|
typeof window.RTCRtpSender.prototype.createEncodedStreams < "u";
|
|
27738
27738
|
}
|
|
27739
|
-
class
|
|
27739
|
+
class Xse extends au.EventEmitter {
|
|
27740
27740
|
constructor() {
|
|
27741
27741
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
27742
27742
|
super(), this.onKeyRatcheted = (n, r) => {
|
|
@@ -36600,7 +36600,7 @@ class mq extends zd {
|
|
|
36600
36600
|
});
|
|
36601
36601
|
}
|
|
36602
36602
|
}
|
|
36603
|
-
class
|
|
36603
|
+
class Jse extends au.EventEmitter {
|
|
36604
36604
|
constructor(e, n) {
|
|
36605
36605
|
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
36606
36606
|
super(), this.options = {}, this.checkResults = /* @__PURE__ */ new Map(), this.url = e, this.token = n, this.options = r;
|
|
@@ -60418,9 +60418,8 @@ function $se(t, e) {
|
|
|
60418
60418
|
});
|
|
60419
60419
|
}), n;
|
|
60420
60420
|
}
|
|
60421
|
-
const qse =
|
|
60421
|
+
const qse = ({ room: t, config: e }) => {
|
|
60422
60422
|
var zi, Qi, Xi, Ja, Go, Yo, eo;
|
|
60423
|
-
console.log(`[Ringg CDN] Version: ${qse}`);
|
|
60424
60423
|
const [n, r] = G.useState({}), a = e, {
|
|
60425
60424
|
mode: s = Em.mode,
|
|
60426
60425
|
title: l = Em.title,
|
|
@@ -60882,11 +60881,12 @@ const qse = "1.0.20-alpha.41", Wse = ({ room: t, config: e }) => {
|
|
|
60882
60881
|
/* @__PURE__ */ W.jsx(iG, {}),
|
|
60883
60882
|
!1
|
|
60884
60883
|
] });
|
|
60885
|
-
}, Gse = ({ config: t }) => {
|
|
60884
|
+
}, Wse = "1.0.20-alpha.44", Gse = ({ config: t }) => {
|
|
60886
60885
|
const [e] = G.useState(() => new Zm({ dynacast: !0, adaptiveStream: !0 }));
|
|
60887
|
-
return
|
|
60888
|
-
}
|
|
60889
|
-
|
|
60886
|
+
return G.useEffect(() => {
|
|
60887
|
+
console.log(`%c[Ringg CDN] v${Wse} initialized`, "background: #7c3aed; color: white; padding: 2px 8px; border-radius: 4px;"), console.log("[Ringg CDN] Config:", t);
|
|
60888
|
+
}, [t]), /* @__PURE__ */ W.jsx(LR.Provider, { value: e, children: /* @__PURE__ */ W.jsx(qse, { config: t, room: e }) });
|
|
60889
|
+
};
|
|
60890
60890
|
{
|
|
60891
60891
|
const t = "ringg_ai_container";
|
|
60892
60892
|
(function(e, n) {
|
package/dist/dv-agent.umd.js
CHANGED
|
@@ -125,7 +125,7 @@ Check the render method of \``+i+"`.":""}var Eu=["value","defaultValue"];functio
|
|
|
125
125
|
* @internal
|
|
126
126
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
127
127
|
*/function hh(i){if(!_r)return!1;var o="on"+i,f=o in document;if(!f){var m=document.createElement("div");m.setAttribute(o,"return;"),f=typeof m[o]=="function"}return f}function eE(){tn("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function ph(i,o,f,m){$v(m);var y=GC(o,"onChange");if(y.length>0){var C=new Ga("onChange","change",null,f,m);i.push({event:C,listeners:y})}}var u=null,d=null;function g(i){var o=i.nodeName&&i.nodeName.toLowerCase();return o==="select"||o==="input"&&i.type==="file"}function S(i){var o=[];ph(o,d,i,Ip(i)),nC(x,o)}function x(i){SU(i,0)}function _(i){var o=Hm(i);if(El(o))return i}function L(i,o){if(i==="change")return o}var q=!1;_r&&(q=hh("input")&&(!document.documentMode||document.documentMode>9));function te(i,o){u=i,d=o,u.attachEvent("onpropertychange",Fe)}function ye(){u&&(u.detachEvent("onpropertychange",Fe),u=null,d=null)}function Fe(i){i.propertyName==="value"&&_(d)&&S(i)}function $e(i,o,f){i==="focusin"?(ye(),te(o,f)):i==="focusout"&&ye()}function Ue(i,o){if(i==="selectionchange"||i==="keyup"||i==="keydown")return _(d)}function mt(i){var o=i.nodeName;return o&&o.toLowerCase()==="input"&&(i.type==="checkbox"||i.type==="radio")}function wt(i,o){if(i==="click")return _(o)}function Et(i,o){if(i==="input"||i==="change")return _(o)}function Zr(i){var o=i._wrapperState;!o||!o.controlled||i.type!=="number"||Tt(i,"number",i.value)}function ue(i,o,f,m,y,C,w){var P=f?Hm(f):window,D,F;if(g(P)?D=L:HC(P)?q?D=Et:(D=Ue,F=$e):mt(P)&&(D=wt),D){var B=D(o,f);if(B){ph(i,B,m,y);return}}F&&F(o,P,f),o==="focusout"&&Zr(P)}function ie(){qn("onMouseEnter",["mouseout","mouseover"]),qn("onMouseLeave",["mouseout","mouseover"]),qn("onPointerEnter",["pointerout","pointerover"]),qn("onPointerLeave",["pointerout","pointerover"])}function he(i,o,f,m,y,C,w){var P=o==="mouseover"||o==="pointerover",D=o==="mouseout"||o==="pointerout";if(P&&!j_(m)){var F=m.relatedTarget||m.fromElement;if(F&&(vh(F)||Gy(F)))return}if(!(!D&&!P)){var B;if(y.window===y)B=y;else{var ae=y.ownerDocument;ae?B=ae.defaultView||ae.parentWindow:B=window}var re,ge;if(D){var be=m.relatedTarget||m.toElement;if(re=f,ge=be?vh(be):null,ge!==null){var we=aa(ge);(ge!==we||ge.tag!==E&&ge.tag!==R)&&(ge=null)}}else re=null,ge=f;if(re!==ge){var st=Em,Vt="onMouseLeave",Pt="onMouseEnter",Ln="mouse";(o==="pointerout"||o==="pointerover")&&(st=Ry,Vt="onPointerLeave",Pt="onPointerEnter",Ln="pointer");var wn=re==null?B:Hm(re),ce=ge==null?B:Hm(ge),_e=new st(Vt,Ln+"leave",re,m,y);_e.target=wn,_e.relatedTarget=ce;var de=null,qe=vh(y);if(qe===f){var yt=new st(Pt,Ln+"enter",ge,m,y);yt.target=ce,yt.relatedTarget=wn,de=yt}lne(i,_e,de,re,ge)}}}function Ke(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var dt=typeof Object.is=="function"?Object.is:Ke;function Ut(i,o){if(dt(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var f=Object.keys(i),m=Object.keys(o);if(f.length!==m.length)return!1;for(var y=0;y<f.length;y++){var C=f[y];if(!vr.call(o,C)||!dt(i[C],o[C]))return!1}return!0}function zt(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Qt(i){for(;i;){if(i.nextSibling)return i.nextSibling;i=i.parentNode}}function pi(i,o){for(var f=zt(i),m=0,y=0;f;){if(f.nodeType===Hs){if(y=m+f.textContent.length,m<=o&&y>=o)return{node:f,offset:o-m};m=y}f=zt(Qt(f))}}function zn(i){var o=i.ownerDocument,f=o&&o.defaultView||window,m=f.getSelection&&f.getSelection();if(!m||m.rangeCount===0)return null;var y=m.anchorNode,C=m.anchorOffset,w=m.focusNode,P=m.focusOffset;try{y.nodeType,w.nodeType}catch{return null}return Zl(i,y,C,w,P)}function Zl(i,o,f,m,y){var C=0,w=-1,P=-1,D=0,F=0,B=i,ae=null;e:for(;;){for(var re=null;B===o&&(f===0||B.nodeType===Hs)&&(w=C+f),B===m&&(y===0||B.nodeType===Hs)&&(P=C+y),B.nodeType===Hs&&(C+=B.nodeValue.length),(re=B.firstChild)!==null;)ae=B,B=re;for(;;){if(B===i)break e;if(ae===o&&++D===f&&(w=C),ae===m&&++F===y&&(P=C),(re=B.nextSibling)!==null)break;B=ae,ae=B.parentNode}B=re}return w===-1||P===-1?null:{start:w,end:P}}function tE(i,o){var f=i.ownerDocument||document,m=f&&f.defaultView||window;if(m.getSelection){var y=m.getSelection(),C=i.textContent.length,w=Math.min(o.start,C),P=o.end===void 0?w:Math.min(o.end,C);if(!y.extend&&w>P){var D=P;P=w,w=D}var F=pi(i,w),B=pi(i,P);if(F&&B){if(y.rangeCount===1&&y.anchorNode===F.node&&y.anchorOffset===F.offset&&y.focusNode===B.node&&y.focusOffset===B.offset)return;var ae=f.createRange();ae.setStart(F.node,F.offset),y.removeAllRanges(),w>P?(y.addRange(ae),y.extend(B.node,B.offset)):(ae.setEnd(B.node,B.offset),y.addRange(ae))}}}function lU(i){return i&&i.nodeType===Hs}function uU(i,o){return!i||!o?!1:i===o?!0:lU(i)?!1:lU(o)?uU(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1}function $te(i){return i&&i.ownerDocument&&uU(i.ownerDocument.documentElement,i)}function qte(i){try{return typeof i.contentWindow.location.href=="string"}catch{return!1}}function cU(){for(var i=window,o=Vs();o instanceof i.HTMLIFrameElement;){if(qte(o))i=o.contentWindow;else return o;o=Vs(i.document)}return o}function nE(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function Wte(){var i=cU();return{focusedElem:i,selectionRange:nE(i)?Yte(i):null}}function Gte(i){var o=cU(),f=i.focusedElem,m=i.selectionRange;if(o!==f&&$te(f)){m!==null&&nE(f)&&Kte(f,m);for(var y=[],C=f;C=C.parentNode;)C.nodeType===xa&&y.push({element:C,left:C.scrollLeft,top:C.scrollTop});typeof f.focus=="function"&&f.focus();for(var w=0;w<y.length;w++){var P=y[w];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}}function Yte(i){var o;return"selectionStart"in i?o={start:i.selectionStart,end:i.selectionEnd}:o=zn(i),o||{start:0,end:0}}function Kte(i,o){var f=o.start,m=o.end;m===void 0&&(m=f),"selectionStart"in i?(i.selectionStart=f,i.selectionEnd=Math.min(m,i.value.length)):tE(i,o)}var Zte=_r&&"documentMode"in document&&document.documentMode<=11;function Qte(){tn("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Fm=null,rE=null,Ly=null,iE=!1;function Xte(i){if("selectionStart"in i&&nE(i))return{start:i.selectionStart,end:i.selectionEnd};var o=i.ownerDocument&&i.ownerDocument.defaultView||window,f=o.getSelection();return{anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}}function Jte(i){return i.window===i?i.document:i.nodeType===$s?i:i.ownerDocument}function dU(i,o,f){var m=Jte(f);if(!(iE||Fm==null||Fm!==Vs(m))){var y=Xte(Fm);if(!Ly||!Ut(Ly,y)){Ly=y;var C=GC(rE,"onSelect");if(C.length>0){var w=new Ga("onSelect","select",null,o,f);i.push({event:w,listeners:C}),w.target=Fm}}}}function ene(i,o,f,m,y,C,w){var P=f?Hm(f):window;switch(o){case"focusin":(HC(P)||P.contentEditable==="true")&&(Fm=P,rE=f,Ly=null);break;case"focusout":Fm=null,rE=null,Ly=null;break;case"mousedown":iE=!0;break;case"contextmenu":case"mouseup":case"dragend":iE=!1,dU(i,m,y);break;case"selectionchange":if(Zte)break;case"keydown":case"keyup":dU(i,m,y)}}function $C(i,o){var f={};return f[i.toLowerCase()]=o.toLowerCase(),f["Webkit"+i]="webkit"+o,f["Moz"+i]="moz"+o,f}var jm={animationend:$C("Animation","AnimationEnd"),animationiteration:$C("Animation","AnimationIteration"),animationstart:$C("Animation","AnimationStart"),transitionend:$C("Transition","TransitionEnd")},aE={},fU={};_r&&(fU=document.createElement("div").style,"AnimationEvent"in window||(delete jm.animationend.animation,delete jm.animationiteration.animation,delete jm.animationstart.animation),"TransitionEvent"in window||delete jm.transitionend.transition);function qC(i){if(aE[i])return aE[i];if(!jm[i])return i;var o=jm[i];for(var f in o)if(o.hasOwnProperty(f)&&f in fU)return aE[i]=o[f];return i}var hU=qC("animationend"),pU=qC("animationiteration"),mU=qC("animationstart"),gU=qC("transitionend"),vU=new Map,yU=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function Rd(i,o){vU.set(i,o),tn(o,[i])}function tne(){for(var i=0;i<yU.length;i++){var o=yU[i],f=o.toLowerCase(),m=o[0].toUpperCase()+o.slice(1);Rd(f,"on"+m)}Rd(hU,"onAnimationEnd"),Rd(pU,"onAnimationIteration"),Rd(mU,"onAnimationStart"),Rd("dblclick","onDoubleClick"),Rd("focusin","onFocus"),Rd("focusout","onBlur"),Rd(gU,"onTransitionEnd")}function nne(i,o,f,m,y,C,w){var P=vU.get(o);if(P!==void 0){var D=Ga,F=o;switch(o){case"keypress":if(wd(m)===0)return;case"keydown":case"keyup":D=K_;break;case"focusin":F="focus",D=Rm;break;case"focusout":F="blur",D=Rm;break;case"beforeblur":case"afterblur":D=Rm;break;case"click":if(m.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=Em;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=xy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Q_;break;case hU:case pU:case mU:D=wy;break;case gU:D=Py;break;case"scroll":D=AC;break;case"wheel":D=Gl;break;case"copy":case"cut":case"paste":D=W_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Ry;break}var B=(C&Pu)!==0;{var ae=!B&&o==="scroll",re=one(f,P,m.type,B,ae);if(re.length>0){var ge=new D(P,F,null,m,y);i.push({event:ge,listeners:re})}}}}tne(),ie(),eE(),Qte(),jC();function rne(i,o,f,m,y,C,w){nne(i,o,f,m,y,C);var P=(C&Hv)===0;P&&(he(i,o,f,m,y),ue(i,o,f,m,y),ene(i,o,f,m,y),J_(i,o,f,m,y))}var Ny=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],oE=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Ny));function bU(i,o,f){var m=i.type||"unknown-event";i.currentTarget=f,If(m,o,void 0,i),i.currentTarget=null}function ine(i,o,f){var m;if(f)for(var y=o.length-1;y>=0;y--){var C=o[y],w=C.instance,P=C.currentTarget,D=C.listener;if(w!==m&&i.isPropagationStopped())return;bU(i,D,P),m=w}else for(var F=0;F<o.length;F++){var B=o[F],ae=B.instance,re=B.currentTarget,ge=B.listener;if(ae!==m&&i.isPropagationStopped())return;bU(i,ge,re),m=ae}}function SU(i,o){for(var f=(o&Pu)!==0,m=0;m<i.length;m++){var y=i[m],C=y.event,w=y.listeners;ine(C,w,f)}qs()}function ane(i,o,f,m,y){var C=Ip(f),w=[];rne(w,i,m,f,C,o),SU(w,o)}function Ir(i,o){oE.has(i)||c('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',i);var f=!1,m=Nre(o),y=une(i);m.has(y)||(CU(o,i,ss,f),m.add(y))}function sE(i,o,f){oE.has(i)&&!o&&c('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',i);var m=0;o&&(m|=Pu),CU(f,i,m,o)}var WC="_reactListening"+Math.random().toString(36).slice(2);function Iy(i){if(!i[WC]){i[WC]=!0,bt.forEach(function(f){f!=="selectionchange"&&(oE.has(f)||sE(f,!1,i),sE(f,!0,i))});var o=i.nodeType===$s?i:i.ownerDocument;o!==null&&(o[WC]||(o[WC]=!0,sE("selectionchange",!1,o)))}}function CU(i,o,f,m,y){var C=qa(i,o,f),w=void 0;Nf&&(o==="touchstart"||o==="touchmove"||o==="wheel")&&(w=!0),i=i,m?w!==void 0?Td(i,o,C,w):Ty(i,o,C):w!==void 0?Zs(i,o,C,w):Ma(i,o,C)}function kU(i,o){return i===o||i.nodeType===ti&&i.parentNode===o}function lE(i,o,f,m,y){var C=m;if(!(o&Bv)&&!(o&ss)){var w=y;if(m!==null){var P=m;e:for(;;){if(P===null)return;var D=P.tag;if(D===k||D===T){var F=P.stateNode.containerInfo;if(kU(F,w))break;if(D===T)for(var B=P.return;B!==null;){var ae=B.tag;if(ae===k||ae===T){var re=B.stateNode.containerInfo;if(kU(re,w))return}B=B.return}for(;F!==null;){var ge=vh(F);if(ge===null)return;var be=ge.tag;if(be===E||be===R){P=C=ge;continue e}F=F.parentNode}}P=P.return}}}nC(function(){return ane(i,o,f,C)})}function Uy(i,o,f){return{instance:i,listener:o,currentTarget:f}}function one(i,o,f,m,y,C){for(var w=o!==null?o+"Capture":null,P=m?w:o,D=[],F=i,B=null;F!==null;){var ae=F,re=ae.stateNode,ge=ae.tag;if(ge===E&&re!==null&&(B=re,P!==null)){var be=Au(F,P);be!=null&&D.push(Uy(F,be,B))}if(y)break;F=F.return}return D}function GC(i,o){for(var f=o+"Capture",m=[],y=i;y!==null;){var C=y,w=C.stateNode,P=C.tag;if(P===E&&w!==null){var D=w,F=Au(y,f);F!=null&&m.unshift(Uy(y,F,D));var B=Au(y,o);B!=null&&m.push(Uy(y,B,D))}y=y.return}return m}function Vm(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==E);return i||null}function sne(i,o){for(var f=i,m=o,y=0,C=f;C;C=Vm(C))y++;for(var w=0,P=m;P;P=Vm(P))w++;for(;y-w>0;)f=Vm(f),y--;for(;w-y>0;)m=Vm(m),w--;for(var D=y;D--;){if(f===m||m!==null&&f===m.alternate)return f;f=Vm(f),m=Vm(m)}return null}function TU(i,o,f,m,y){for(var C=o._reactName,w=[],P=f;P!==null&&P!==m;){var D=P,F=D.alternate,B=D.stateNode,ae=D.tag;if(F!==null&&F===m)break;if(ae===E&&B!==null){var re=B;if(y){var ge=Au(P,C);ge!=null&&w.unshift(Uy(P,ge,re))}else if(!y){var be=Au(P,C);be!=null&&w.push(Uy(P,be,re))}}P=P.return}w.length!==0&&i.push({event:o,listeners:w})}function lne(i,o,f,m,y){var C=m&&y?sne(m,y):null;m!==null&&TU(i,o,m,C,!1),y!==null&&f!==null&&TU(i,f,y,C,!0)}function une(i,o){return i+"__bubble"}var xo=!1,Fy="dangerouslySetInnerHTML",YC="suppressContentEditableWarning",Pd="suppressHydrationWarning",xU="autoFocus",mh="children",gh="style",KC="__html",uE,ZC,jy,wU,QC,_U,EU;uE={dialog:!0,webview:!0},ZC=function(i,o){ZS(i,o),rd(i,o),tC(i,o,{registrationNameDependencies:it,possibleRegistrationNames:xt})},_U=_r&&!document.documentMode,jy=function(i,o,f){if(!xo){var m=XC(f),y=XC(o);y!==m&&(xo=!0,c("Prop `%s` did not match. Server: %s Client: %s",i,JSON.stringify(y),JSON.stringify(m)))}},wU=function(i){if(!xo){xo=!0;var o=[];i.forEach(function(f){o.push(f)}),c("Extra attributes from the server: %s",o)}},QC=function(i,o){o===!1?c("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",i,i,i):c("Expected `%s` listener to be a function, instead got a value of `%s` type.",i,typeof o)},EU=function(i,o){var f=i.namespaceURI===Io?i.ownerDocument.createElement(i.tagName):i.ownerDocument.createElementNS(i.namespaceURI,i.tagName);return f.innerHTML=o,f.innerHTML};var cne=/\r\n?/g,dne=/\u0000|\uFFFD/g;function XC(i){Ve(i);var o=typeof i=="string"?i:""+i;return o.replace(cne,`
|
|
128
|
-
`).replace(dne,"")}function JC(i,o,f,m){var y=XC(o),C=XC(i);if(C!==y&&(m&&(xo||(xo=!0,c('Text content did not match. Server: "%s" Client: "%s"',C,y))),f&&ve))throw new Error("Text content does not match server-rendered HTML.")}function RU(i){return i.nodeType===$s?i:i.ownerDocument}function fne(){}function ek(i){i.onclick=fne}function hne(i,o,f,m,y){for(var C in m)if(m.hasOwnProperty(C)){var w=m[C];if(C===gh)w&&Object.freeze(w),qS(o,w);else if(C===Fy){var P=w?w[KC]:void 0;P!=null&&MS(o,P)}else if(C===mh)if(typeof w=="string"){var D=i!=="textarea"||w!=="";D&&Pl(o,w)}else typeof w=="number"&&Pl(o,""+w);else C===YC||C===Pd||C===xU||(it.hasOwnProperty(C)?w!=null&&(typeof w!="function"&&QC(C,w),C==="onScroll"&&Ir("scroll",o)):w!=null&&It(o,C,w,y))}}function pne(i,o,f,m){for(var y=0;y<o.length;y+=2){var C=o[y],w=o[y+1];C===gh?qS(i,w):C===Fy?MS(i,w):C===mh?Pl(i,w):It(i,C,w,m)}}function mne(i,o,f,m){var y,C=RU(f),w,P=m;if(P===Io&&(P=Iv(i)),P===Io){if(y=Dl(i,o),!y&&i!==i.toLowerCase()&&c("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",i),i==="script"){var D=C.createElement("div");D.innerHTML="<script><\/script>";var F=D.firstChild;w=D.removeChild(F)}else if(typeof o.is=="string")w=C.createElement(i,{is:o.is});else if(w=C.createElement(i),i==="select"){var B=w;o.multiple?B.multiple=!0:o.size&&(B.size=o.size)}}else w=C.createElementNS(P,i);return P===Io&&!y&&Object.prototype.toString.call(w)==="[object HTMLUnknownElement]"&&!vr.call(uE,i)&&(uE[i]=!0,c("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",i)),w}function gne(i,o){return RU(o).createTextNode(i)}function vne(i,o,f,m){var y=Dl(o,f);ZC(o,f);var C;switch(o){case"dialog":Ir("cancel",i),Ir("close",i),C=f;break;case"iframe":case"object":case"embed":Ir("load",i),C=f;break;case"video":case"audio":for(var w=0;w<Ny.length;w++)Ir(Ny[w],i);C=f;break;case"source":Ir("error",i),C=f;break;case"img":case"image":case"link":Ir("error",i),Ir("load",i),C=f;break;case"details":Ir("toggle",i),C=f;break;case"input":Zc(i,f),C=go(i,f),Ir("invalid",i);break;case"option":Kn(i,f),C=f;break;case"select":Tf(i,f),C=Ru(i,f),Ir("invalid",i);break;case"textarea":DS(i,f),C=Dp(i,f),Ir("invalid",i);break;default:C=f}switch(Lp(o,C),hne(o,i,m,C,y),o){case"input":mo(i),pe(i,f,!1);break;case"textarea":mo(i),OS(i);break;case"option":lr(i,f);break;case"select":Mv(i,f);break;default:typeof C.onClick=="function"&&ek(i);break}}function yne(i,o,f,m,y){ZC(o,m);var C=null,w,P;switch(o){case"input":w=go(i,f),P=go(i,m),C=[];break;case"select":w=Ru(i,f),P=Ru(i,m),C=[];break;case"textarea":w=Dp(i,f),P=Dp(i,m),C=[];break;default:w=f,P=m,typeof w.onClick!="function"&&typeof P.onClick=="function"&&ek(i);break}Lp(o,P);var D,F,B=null;for(D in w)if(!(P.hasOwnProperty(D)||!w.hasOwnProperty(D)||w[D]==null))if(D===gh){var ae=w[D];for(F in ae)ae.hasOwnProperty(F)&&(B||(B={}),B[F]="")}else D===Fy||D===mh||D===YC||D===Pd||D===xU||(it.hasOwnProperty(D)?C||(C=[]):(C=C||[]).push(D,null));for(D in P){var re=P[D],ge=w!=null?w[D]:void 0;if(!(!P.hasOwnProperty(D)||re===ge||re==null&&ge==null))if(D===gh)if(re&&Object.freeze(re),ge){for(F in ge)ge.hasOwnProperty(F)&&(!re||!re.hasOwnProperty(F))&&(B||(B={}),B[F]="");for(F in re)re.hasOwnProperty(F)&&ge[F]!==re[F]&&(B||(B={}),B[F]=re[F])}else B||(C||(C=[]),C.push(D,B)),B=re;else if(D===Fy){var be=re?re[KC]:void 0,we=ge?ge[KC]:void 0;be!=null&&we!==be&&(C=C||[]).push(D,be)}else D===mh?(typeof re=="string"||typeof re=="number")&&(C=C||[]).push(D,""+re):D===YC||D===Pd||(it.hasOwnProperty(D)?(re!=null&&(typeof re!="function"&&QC(D,re),D==="onScroll"&&Ir("scroll",i)),!C&&ge!==re&&(C=[])):(C=C||[]).push(D,re))}return B&&(Uo(B,P[gh]),(C=C||[]).push(gh,B)),C}function bne(i,o,f,m,y){f==="input"&&y.type==="radio"&&y.name!=null&&O(i,y);var C=Dl(f,m),w=Dl(f,y);switch(pne(i,o,C,w),f){case"input":Y(i,y);break;case"textarea":AS(i,y);break;case"select":Pp(i,y);break}}function Sne(i){{var o=i.toLowerCase();return ed.hasOwnProperty(o)&&ed[o]||null}}function Cne(i,o,f,m,y,C,w){var P,D;switch(P=Dl(o,f),ZC(o,f),o){case"dialog":Ir("cancel",i),Ir("close",i);break;case"iframe":case"object":case"embed":Ir("load",i);break;case"video":case"audio":for(var F=0;F<Ny.length;F++)Ir(Ny[F],i);break;case"source":Ir("error",i);break;case"img":case"image":case"link":Ir("error",i),Ir("load",i);break;case"details":Ir("toggle",i);break;case"input":Zc(i,f),Ir("invalid",i);break;case"option":Kn(i,f);break;case"select":Tf(i,f),Ir("invalid",i);break;case"textarea":DS(i,f),Ir("invalid",i);break}Lp(o,f);{D=new Set;for(var B=i.attributes,ae=0;ae<B.length;ae++){var re=B[ae].name.toLowerCase();switch(re){case"value":break;case"checked":break;case"selected":break;default:D.add(B[ae].name)}}}var ge=null;for(var be in f)if(f.hasOwnProperty(be)){var we=f[be];if(be===mh)typeof we=="string"?i.textContent!==we&&(f[Pd]!==!0&&JC(i.textContent,we,C,w),ge=[mh,we]):typeof we=="number"&&i.textContent!==""+we&&(f[Pd]!==!0&&JC(i.textContent,we,C,w),ge=[mh,""+we]);else if(it.hasOwnProperty(be))we!=null&&(typeof we!="function"&&QC(be,we),be==="onScroll"&&Ir("scroll",i));else if(w&&typeof P=="boolean"){var st=void 0,Vt=Jn(be);if(f[Pd]!==!0){if(!(be===YC||be===Pd||be==="value"||be==="checked"||be==="selected")){if(be===Fy){var Pt=i.innerHTML,Ln=we?we[KC]:void 0;if(Ln!=null){var wn=EU(i,Ln);wn!==Pt&&jy(be,Pt,wn)}}else if(be===gh){if(D.delete(be),_U){var ce=I_(we);st=i.getAttribute("style"),ce!==st&&jy(be,st,ce)}}else if(P&&!Ce)D.delete(be.toLowerCase()),st=Me(i,be,we),we!==st&&jy(be,st,we);else if(!un(be,Vt,P)&&!Wn(be,we,Vt,P)){var _e=!1;if(Vt!==null)D.delete(Vt.attributeName),st=et(i,be,we,Vt);else{var de=m;if(de===Io&&(de=Iv(o)),de===Io)D.delete(be.toLowerCase());else{var qe=Sne(be);qe!==null&&qe!==be&&(_e=!0,D.delete(qe)),D.delete(be)}st=Me(i,be,we)}var yt=Ce;!yt&&we!==st&&!_e&&jy(be,st,we)}}}}}switch(w&&D.size>0&&f[Pd]!==!0&&wU(D),o){case"input":mo(i),pe(i,f,!0);break;case"textarea":mo(i),OS(i);break;case"select":case"option":break;default:typeof f.onClick=="function"&&ek(i);break}return ge}function kne(i,o,f){var m=i.nodeValue!==o;return m}function cE(i,o){{if(xo)return;xo=!0,c("Did not expect server HTML to contain a <%s> in <%s>.",o.nodeName.toLowerCase(),i.nodeName.toLowerCase())}}function dE(i,o){{if(xo)return;xo=!0,c('Did not expect server HTML to contain the text node "%s" in <%s>.',o.nodeValue,i.nodeName.toLowerCase())}}function fE(i,o,f){{if(xo)return;xo=!0,c("Expected server HTML to contain a matching <%s> in <%s>.",o,i.nodeName.toLowerCase())}}function hE(i,o){{if(o===""||xo)return;xo=!0,c('Expected server HTML to contain a matching text node for "%s" in <%s>.',o,i.nodeName.toLowerCase())}}function Tne(i,o,f){switch(o){case"input":Te(i,f);return;case"textarea":P_(i,f);return;case"select":Lv(i,f);return}}var Vy=function(){},zy=function(){};{var xne=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],PU=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],wne=PU.concat(["button"]),_ne=["dd","dt","li","option","optgroup","p","rp","rt"],DU={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};zy=function(i,o){var f=rn({},i||DU),m={tag:o};return PU.indexOf(o)!==-1&&(f.aTagInScope=null,f.buttonTagInScope=null,f.nobrTagInScope=null),wne.indexOf(o)!==-1&&(f.pTagInButtonScope=null),xne.indexOf(o)!==-1&&o!=="address"&&o!=="div"&&o!=="p"&&(f.listItemTagAutoclosing=null,f.dlItemTagAutoclosing=null),f.current=m,o==="form"&&(f.formTag=m),o==="a"&&(f.aTagInScope=m),o==="button"&&(f.buttonTagInScope=m),o==="nobr"&&(f.nobrTagInScope=m),o==="p"&&(f.pTagInButtonScope=m),o==="li"&&(f.listItemTagAutoclosing=m),(o==="dd"||o==="dt")&&(f.dlItemTagAutoclosing=m),f};var Ene=function(i,o){switch(o){case"select":return i==="option"||i==="optgroup"||i==="#text";case"optgroup":return i==="option"||i==="#text";case"option":return i==="#text";case"tr":return i==="th"||i==="td"||i==="style"||i==="script"||i==="template";case"tbody":case"thead":case"tfoot":return i==="tr"||i==="style"||i==="script"||i==="template";case"colgroup":return i==="col"||i==="template";case"table":return i==="caption"||i==="colgroup"||i==="tbody"||i==="tfoot"||i==="thead"||i==="style"||i==="script"||i==="template";case"head":return i==="base"||i==="basefont"||i==="bgsound"||i==="link"||i==="meta"||i==="title"||i==="noscript"||i==="noframes"||i==="style"||i==="script"||i==="template";case"html":return i==="head"||i==="body"||i==="frameset";case"frameset":return i==="frame";case"#document":return i==="html"}switch(i){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o!=="h1"&&o!=="h2"&&o!=="h3"&&o!=="h4"&&o!=="h5"&&o!=="h6";case"rp":case"rt":return _ne.indexOf(o)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return o==null}return!0},Rne=function(i,o){switch(i){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o.pTagInButtonScope;case"form":return o.formTag||o.pTagInButtonScope;case"li":return o.listItemTagAutoclosing;case"dd":case"dt":return o.dlItemTagAutoclosing;case"button":return o.buttonTagInScope;case"a":return o.aTagInScope;case"nobr":return o.nobrTagInScope}return null},AU={};Vy=function(i,o,f){f=f||DU;var m=f.current,y=m&&m.tag;o!=null&&(i!=null&&c("validateDOMNesting: when childText is passed, childTag should be null"),i="#text");var C=Ene(i,y)?null:m,w=C?null:Rne(i,f),P=C||w;if(P){var D=P.tag,F=!!C+"|"+i+"|"+D;if(!AU[F]){AU[F]=!0;var B=i,ae="";if(i==="#text"?/\S/.test(o)?B="Text nodes":(B="Whitespace text nodes",ae=" Make sure you don't have any extra whitespace between tags on each line of your source code."):B="<"+i+">",C){var re="";D==="table"&&i==="tr"&&(re+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),c("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",B,D,ae,re)}else c("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",B,D)}}}}var tk="suppressHydrationWarning",nk="$",rk="/$",By="$?",Hy="$!",Pne="style",pE=null,mE=null;function Dne(i){var o,f,m=i.nodeType;switch(m){case $s:case xf:{o=m===$s?"#document":"#fragment";var y=i.documentElement;f=y?y.namespaceURI:Ap(null,"");break}default:{var C=m===ti?i.parentNode:i,w=C.namespaceURI||null;o=C.tagName,f=Ap(w,o);break}}{var P=o.toLowerCase(),D=zy(null,P);return{namespace:f,ancestorInfo:D}}}function Ane(i,o,f){{var m=i,y=Ap(m.namespace,o),C=zy(m.ancestorInfo,o);return{namespace:y,ancestorInfo:C}}}function tle(i){return i}function One(i){pE=Oi(),mE=Wte();var o=null;return Kr(!1),o}function Mne(i){Gte(mE),Kr(pE),pE=null,mE=null}function Lne(i,o,f,m,y){var C;{var w=m;if(Vy(i,null,w.ancestorInfo),typeof o.children=="string"||typeof o.children=="number"){var P=""+o.children,D=zy(w.ancestorInfo,i);Vy(null,P,D)}C=w.namespace}var F=mne(i,o,f,C);return Wy(y,F),TE(F,o),F}function Nne(i,o){i.appendChild(o)}function Ine(i,o,f,m,y){switch(vne(i,o,f,m),o){case"button":case"input":case"select":case"textarea":return!!f.autoFocus;case"img":return!0;default:return!1}}function Une(i,o,f,m,y,C){{var w=C;if(typeof m.children!=typeof f.children&&(typeof m.children=="string"||typeof m.children=="number")){var P=""+m.children,D=zy(w.ancestorInfo,o);Vy(null,P,D)}}return yne(i,o,f,m)}function gE(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}function Fne(i,o,f,m){{var y=f;Vy(null,i,y.ancestorInfo)}var C=gne(i,o);return Wy(m,C),C}function jne(){var i=window.event;return i===void 0?Di:kd(i.type)}var vE=typeof setTimeout=="function"?setTimeout:void 0,Vne=typeof clearTimeout=="function"?clearTimeout:void 0,yE=-1,OU=typeof Promise=="function"?Promise:void 0,zne=typeof queueMicrotask=="function"?queueMicrotask:typeof OU<"u"?function(i){return OU.resolve(null).then(i).catch(Bne)}:vE;function Bne(i){setTimeout(function(){throw i})}function Hne(i,o,f,m){switch(o){case"button":case"input":case"select":case"textarea":f.autoFocus&&i.focus();return;case"img":{f.src&&(i.src=f.src);return}}}function $ne(i,o,f,m,y,C){bne(i,o,f,m,y),TE(i,y)}function MU(i){Pl(i,"")}function qne(i,o,f){i.nodeValue=f}function Wne(i,o){i.appendChild(o)}function Gne(i,o){var f;i.nodeType===ti?(f=i.parentNode,f.insertBefore(o,i)):(f=i,f.appendChild(o));var m=i._reactRootContainer;m==null&&f.onclick===null&&ek(f)}function Yne(i,o,f){i.insertBefore(o,f)}function Kne(i,o,f){i.nodeType===ti?i.parentNode.insertBefore(o,f):i.insertBefore(o,f)}function Zne(i,o){i.removeChild(o)}function Qne(i,o){i.nodeType===ti?i.parentNode.removeChild(o):i.removeChild(o)}function bE(i,o){var f=o,m=0;do{var y=f.nextSibling;if(i.removeChild(f),y&&y.nodeType===ti){var C=y.data;if(C===rk)if(m===0){i.removeChild(y),Zi(o);return}else m--;else(C===nk||C===By||C===Hy)&&m++}f=y}while(f);Zi(o)}function Xne(i,o){i.nodeType===ti?bE(i.parentNode,o):i.nodeType===xa&&bE(i,o),Zi(i)}function Jne(i){i=i;var o=i.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}function ere(i){i.nodeValue=""}function tre(i,o){i=i;var f=o[Pne],m=f!=null&&f.hasOwnProperty("display")?f.display:null;i.style.display=Mp("display",m)}function nre(i,o){i.nodeValue=o}function rre(i){i.nodeType===xa?i.textContent="":i.nodeType===$s&&i.documentElement&&i.removeChild(i.documentElement)}function ire(i,o,f){return i.nodeType!==xa||o.toLowerCase()!==i.nodeName.toLowerCase()?null:i}function are(i,o){return o===""||i.nodeType!==Hs?null:i}function ore(i){return i.nodeType!==ti?null:i}function LU(i){return i.data===By}function SE(i){return i.data===Hy}function sre(i){var o=i.nextSibling&&i.nextSibling.dataset,f,m,y;return o&&(f=o.dgst,m=o.msg,y=o.stck),{message:m,digest:f,stack:y}}function lre(i,o){i._reactRetry=o}function ik(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===xa||o===Hs)break;if(o===ti){var f=i.data;if(f===nk||f===Hy||f===By)break;if(f===rk)return null}}return i}function $y(i){return ik(i.nextSibling)}function ure(i){return ik(i.firstChild)}function cre(i){return ik(i.firstChild)}function dre(i){return ik(i.nextSibling)}function fre(i,o,f,m,y,C,w){Wy(C,i),TE(i,f);var P;{var D=y;P=D.namespace}var F=(C.mode&vn)!==Mt;return Cne(i,o,f,P,m,F,w)}function hre(i,o,f,m){return Wy(f,i),f.mode&vn,kne(i,o)}function pre(i,o){Wy(o,i)}function mre(i){for(var o=i.nextSibling,f=0;o;){if(o.nodeType===ti){var m=o.data;if(m===rk){if(f===0)return $y(o);f--}else(m===nk||m===Hy||m===By)&&f++}o=o.nextSibling}return null}function NU(i){for(var o=i.previousSibling,f=0;o;){if(o.nodeType===ti){var m=o.data;if(m===nk||m===Hy||m===By){if(f===0)return o;f--}else m===rk&&f++}o=o.previousSibling}return null}function gre(i){Zi(i)}function vre(i){Zi(i)}function yre(i){return i!=="head"&&i!=="body"}function bre(i,o,f,m){var y=!0;JC(o.nodeValue,f,m,y)}function Sre(i,o,f,m,y,C){if(o[tk]!==!0){var w=!0;JC(m.nodeValue,y,C,w)}}function Cre(i,o){o.nodeType===xa?cE(i,o):o.nodeType===ti||dE(i,o)}function kre(i,o){{var f=i.parentNode;f!==null&&(o.nodeType===xa?cE(f,o):o.nodeType===ti||dE(f,o))}}function Tre(i,o,f,m,y){(y||o[tk]!==!0)&&(m.nodeType===xa?cE(f,m):m.nodeType===ti||dE(f,m))}function xre(i,o,f){fE(i,o)}function wre(i,o){hE(i,o)}function _re(i,o,f){{var m=i.parentNode;m!==null&&fE(m,o)}}function Ere(i,o){{var f=i.parentNode;f!==null&&hE(f,o)}}function Rre(i,o,f,m,y,C){(C||o[tk]!==!0)&&fE(f,m)}function Pre(i,o,f,m,y){(y||o[tk]!==!0)&&hE(f,m)}function Dre(i){c("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",i.nodeName.toLowerCase())}function Are(i){Iy(i)}var zm=Math.random().toString(36).slice(2),Bm="__reactFiber$"+zm,CE="__reactProps$"+zm,qy="__reactContainer$"+zm,kE="__reactEvents$"+zm,Ore="__reactListeners$"+zm,Mre="__reactHandles$"+zm;function Lre(i){delete i[Bm],delete i[CE],delete i[kE],delete i[Ore],delete i[Mre]}function Wy(i,o){o[Bm]=i}function ak(i,o){o[qy]=i}function IU(i){i[qy]=null}function Gy(i){return!!i[qy]}function vh(i){var o=i[Bm];if(o)return o;for(var f=i.parentNode;f;){if(o=f[qy]||f[Bm],o){var m=o.alternate;if(o.child!==null||m!==null&&m.child!==null)for(var y=NU(i);y!==null;){var C=y[Bm];if(C)return C;y=NU(y)}return o}i=f,f=i.parentNode}return null}function Dd(i){var o=i[Bm]||i[qy];return o&&(o.tag===E||o.tag===R||o.tag===N||o.tag===k)?o:null}function Hm(i){if(i.tag===E||i.tag===R)return i.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function ok(i){return i[CE]||null}function TE(i,o){i[CE]=o}function Nre(i){var o=i[kE];return o===void 0&&(o=i[kE]=new Set),o}var UU={},FU=r.ReactDebugCurrentFrame;function sk(i){if(i){var o=i._owner,f=yf(i.type,i._source,o?o.type:null);FU.setExtraStackFrame(f)}else FU.setExtraStackFrame(null)}function Qs(i,o,f,m,y){{var C=Function.call.bind(vr);for(var w in i)if(C(i,w)){var P=void 0;try{if(typeof i[w]!="function"){var D=Error((m||"React class")+": "+f+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}P=i[w](o,w,m,f,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){P=F}P&&!(P instanceof Error)&&(sk(y),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",m||"React class",f,w,typeof P),sk(null)),P instanceof Error&&!(P.message in UU)&&(UU[P.message]=!0,sk(y),c("Failed %s type: %s",f,P.message),sk(null))}}}var xE=[],lk;lk=[];var ec=-1;function Ad(i){return{current:i}}function La(i,o){if(ec<0){c("Unexpected pop.");return}o!==lk[ec]&&c("Unexpected Fiber popped."),i.current=xE[ec],xE[ec]=null,lk[ec]=null,ec--}function Na(i,o,f){ec++,xE[ec]=i.current,lk[ec]=f,i.current=o}var wE;wE={};var $o={};Object.freeze($o);var tc=Ad($o),Ql=Ad(!1),_E=$o;function $m(i,o,f){return f&&Xl(o)?_E:tc.current}function jU(i,o,f){{var m=i.stateNode;m.__reactInternalMemoizedUnmaskedChildContext=o,m.__reactInternalMemoizedMaskedChildContext=f}}function qm(i,o){{var f=i.type,m=f.contextTypes;if(!m)return $o;var y=i.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===o)return y.__reactInternalMemoizedMaskedChildContext;var C={};for(var w in m)C[w]=o[w];{var P=Zt(i)||"Unknown";Qs(m,C,"context",P)}return y&&jU(i,o,C),C}}function uk(){return Ql.current}function Xl(i){{var o=i.childContextTypes;return o!=null}}function ck(i){La(Ql,i),La(tc,i)}function EE(i){La(Ql,i),La(tc,i)}function VU(i,o,f){{if(tc.current!==$o)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Na(tc,o,i),Na(Ql,f,i)}}function zU(i,o,f){{var m=i.stateNode,y=o.childContextTypes;if(typeof m.getChildContext!="function"){{var C=Zt(i)||"Unknown";wE[C]||(wE[C]=!0,c("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",C,C))}return f}var w=m.getChildContext();for(var P in w)if(!(P in y))throw new Error((Zt(i)||"Unknown")+'.getChildContext(): key "'+P+'" is not defined in childContextTypes.');{var D=Zt(i)||"Unknown";Qs(y,w,"child context",D)}return rn({},f,w)}}function dk(i){{var o=i.stateNode,f=o&&o.__reactInternalMemoizedMergedChildContext||$o;return _E=tc.current,Na(tc,f,i),Na(Ql,Ql.current,i),!0}}function BU(i,o,f){{var m=i.stateNode;if(!m)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(f){var y=zU(i,o,_E);m.__reactInternalMemoizedMergedChildContext=y,La(Ql,i),La(tc,i),Na(tc,y,i),Na(Ql,f,i)}else La(Ql,i),Na(Ql,f,i)}}function Ire(i){{if(!oC(i)||i.tag!==v)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var o=i;do{switch(o.tag){case k:return o.stateNode.context;case v:{var f=o.type;if(Xl(f))return o.stateNode.__reactInternalMemoizedMergedChildContext;break}}o=o.return}while(o!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var Od=0,fk=1,nc=null,RE=!1,PE=!1;function HU(i){nc===null?nc=[i]:nc.push(i)}function Ure(i){RE=!0,HU(i)}function $U(){RE&&Md()}function Md(){if(!PE&&nc!==null){PE=!0;var i=0,o=$a();try{var f=!0,m=nc;for(fi(Oa);i<m.length;i++){var y=m[i];do y=y(f);while(y!==null)}nc=null,RE=!1}catch(C){throw nc!==null&&(nc=nc.slice(i+1)),Qv(Gs,Md),C}finally{fi(o),PE=!1}}return null}var Wm=[],Gm=0,hk=null,pk=0,ps=[],ms=0,yh=null,rc=1,ic="";function Fre(i){return Sh(),(i.flags&Ff)!==Ot}function jre(i){return Sh(),pk}function Vre(){var i=ic,o=rc,f=o&~zre(o);return f.toString(32)+i}function bh(i,o){Sh(),Wm[Gm++]=pk,Wm[Gm++]=hk,hk=i,pk=o}function qU(i,o,f){Sh(),ps[ms++]=rc,ps[ms++]=ic,ps[ms++]=yh,yh=i;var m=rc,y=ic,C=mk(m)-1,w=m&~(1<<C),P=f+1,D=mk(o)+C;if(D>30){var F=C-C%5,B=(1<<F)-1,ae=(w&B).toString(32),re=w>>F,ge=C-F,be=mk(o)+ge,we=P<<ge,st=we|re,Vt=ae+y;rc=1<<be|st,ic=Vt}else{var Pt=P<<C,Ln=Pt|w,wn=y;rc=1<<D|Ln,ic=wn}}function DE(i){Sh();var o=i.return;if(o!==null){var f=1,m=0;bh(i,f),qU(i,f,m)}}function mk(i){return 32-di(i)}function zre(i){return 1<<mk(i)-1}function AE(i){for(;i===hk;)hk=Wm[--Gm],Wm[Gm]=null,pk=Wm[--Gm],Wm[Gm]=null;for(;i===yh;)yh=ps[--ms],ps[ms]=null,ic=ps[--ms],ps[ms]=null,rc=ps[--ms],ps[ms]=null}function Bre(){return Sh(),yh!==null?{id:rc,overflow:ic}:null}function Hre(i,o){Sh(),ps[ms++]=rc,ps[ms++]=ic,ps[ms++]=yh,rc=o.id,ic=o.overflow,yh=i}function Sh(){la()||c("Expected to be hydrating. This is a bug in React. Please file an issue.")}var sa=null,gs=null,Xs=!1,Ch=!1,Ld=null;function $re(){Xs&&c("We should not be hydrating here. This is a bug in React. Please file a bug.")}function WU(){Ch=!0}function qre(){return Ch}function Wre(i){var o=i.stateNode.containerInfo;return gs=cre(o),sa=i,Xs=!0,Ld=null,Ch=!1,!0}function Gre(i,o,f){return gs=dre(o),sa=i,Xs=!0,Ld=null,Ch=!1,f!==null&&Hre(i,f),!0}function GU(i,o){switch(i.tag){case k:{Cre(i.stateNode.containerInfo,o);break}case E:{var f=(i.mode&vn)!==Mt;Tre(i.type,i.memoizedProps,i.stateNode,o,f);break}case N:{var m=i.memoizedState;m.dehydrated!==null&&kre(m.dehydrated,o);break}}}function YU(i,o){GU(i,o);var f=Qoe();f.stateNode=o,f.return=i;var m=i.deletions;m===null?(i.deletions=[f],i.flags|=wa):m.push(f)}function OE(i,o){{if(Ch)return;switch(i.tag){case k:{var f=i.stateNode.containerInfo;switch(o.tag){case E:var m=o.type;o.pendingProps,xre(f,m);break;case R:var y=o.pendingProps;wre(f,y);break}break}case E:{var C=i.type,w=i.memoizedProps,P=i.stateNode;switch(o.tag){case E:{var D=o.type,F=o.pendingProps,B=(i.mode&vn)!==Mt;Rre(C,w,P,D,F,B);break}case R:{var ae=o.pendingProps,re=(i.mode&vn)!==Mt;Pre(C,w,P,ae,re);break}}break}case N:{var ge=i.memoizedState,be=ge.dehydrated;if(be!==null)switch(o.tag){case E:var we=o.type;o.pendingProps,_re(be,we);break;case R:var st=o.pendingProps;Ere(be,st);break}break}default:return}}}function KU(i,o){o.flags=o.flags&~Vr|jr,OE(i,o)}function ZU(i,o){switch(i.tag){case E:{var f=i.type;i.pendingProps;var m=ire(o,f);return m!==null?(i.stateNode=m,sa=i,gs=ure(m),!0):!1}case R:{var y=i.pendingProps,C=are(o,y);return C!==null?(i.stateNode=C,sa=i,gs=null,!0):!1}case N:{var w=ore(o);if(w!==null){var P={dehydrated:w,treeContext:Bre(),retryLane:Pa};i.memoizedState=P;var D=Xoe(w);return D.return=i,i.child=D,sa=i,gs=null,!0}return!1}default:return!1}}function ME(i){return(i.mode&vn)!==Mt&&(i.flags&pn)===Ot}function LE(i){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function NE(i){if(Xs){var o=gs;if(!o){ME(i)&&(OE(sa,i),LE()),KU(sa,i),Xs=!1,sa=i;return}var f=o;if(!ZU(i,o)){ME(i)&&(OE(sa,i),LE()),o=$y(f);var m=sa;if(!o||!ZU(i,o)){KU(sa,i),Xs=!1,sa=i;return}YU(m,f)}}}function Yre(i,o,f){var m=i.stateNode,y=!Ch,C=fre(m,i.type,i.memoizedProps,o,f,i,y);return i.updateQueue=C,C!==null}function Kre(i){var o=i.stateNode,f=i.memoizedProps,m=hre(o,f,i);if(m){var y=sa;if(y!==null)switch(y.tag){case k:{var C=y.stateNode.containerInfo,w=(y.mode&vn)!==Mt;bre(C,o,f,w);break}case E:{var P=y.type,D=y.memoizedProps,F=y.stateNode,B=(y.mode&vn)!==Mt;Sre(P,D,F,o,f,B);break}}}return m}function Zre(i){var o=i.memoizedState,f=o!==null?o.dehydrated:null;if(!f)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");pre(f,i)}function Qre(i){var o=i.memoizedState,f=o!==null?o.dehydrated:null;if(!f)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return mre(f)}function QU(i){for(var o=i.return;o!==null&&o.tag!==E&&o.tag!==k&&o.tag!==N;)o=o.return;sa=o}function gk(i){if(i!==sa)return!1;if(!Xs)return QU(i),Xs=!0,!1;if(i.tag!==k&&(i.tag!==E||yre(i.type)&&!gE(i.type,i.memoizedProps))){var o=gs;if(o)if(ME(i))XU(i),LE();else for(;o;)YU(i,o),o=$y(o)}return QU(i),i.tag===N?gs=Qre(i):gs=sa?$y(i.stateNode):null,!0}function Xre(){return Xs&&gs!==null}function XU(i){for(var o=gs;o;)GU(i,o),o=$y(o)}function Ym(){sa=null,gs=null,Xs=!1,Ch=!1}function JU(){Ld!==null&&(W9(Ld),Ld=null)}function la(){return Xs}function IE(i){Ld===null?Ld=[i]:Ld.push(i)}var Jre=r.ReactCurrentBatchConfig,eie=null;function tie(){return Jre.transition}var Js={recordUnsafeLifecycleWarnings:function(i,o){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(i,o){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var nie=function(i){for(var o=null,f=i;f!==null;)f.mode&an&&(o=f),f=f.return;return o},kh=function(i){var o=[];return i.forEach(function(f){o.push(f)}),o.sort().join(", ")},Yy=[],Ky=[],Zy=[],Qy=[],Xy=[],Jy=[],Th=new Set;Js.recordUnsafeLifecycleWarnings=function(i,o){Th.has(i.type)||(typeof o.componentWillMount=="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&Yy.push(i),i.mode&an&&typeof o.UNSAFE_componentWillMount=="function"&&Ky.push(i),typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Zy.push(i),i.mode&an&&typeof o.UNSAFE_componentWillReceiveProps=="function"&&Qy.push(i),typeof o.componentWillUpdate=="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&Xy.push(i),i.mode&an&&typeof o.UNSAFE_componentWillUpdate=="function"&&Jy.push(i))},Js.flushPendingUnsafeLifecycleWarnings=function(){var i=new Set;Yy.length>0&&(Yy.forEach(function(re){i.add(Zt(re)||"Component"),Th.add(re.type)}),Yy=[]);var o=new Set;Ky.length>0&&(Ky.forEach(function(re){o.add(Zt(re)||"Component"),Th.add(re.type)}),Ky=[]);var f=new Set;Zy.length>0&&(Zy.forEach(function(re){f.add(Zt(re)||"Component"),Th.add(re.type)}),Zy=[]);var m=new Set;Qy.length>0&&(Qy.forEach(function(re){m.add(Zt(re)||"Component"),Th.add(re.type)}),Qy=[]);var y=new Set;Xy.length>0&&(Xy.forEach(function(re){y.add(Zt(re)||"Component"),Th.add(re.type)}),Xy=[]);var C=new Set;if(Jy.length>0&&(Jy.forEach(function(re){C.add(Zt(re)||"Component"),Th.add(re.type)}),Jy=[]),o.size>0){var w=kh(o);c(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
128
|
+
`).replace(dne,"")}function JC(i,o,f,m){var y=XC(o),C=XC(i);if(C!==y&&(m&&(xo||(xo=!0,c('Text content did not match. Server: "%s" Client: "%s"',C,y))),f&&ve))throw new Error("Text content does not match server-rendered HTML.")}function RU(i){return i.nodeType===$s?i:i.ownerDocument}function fne(){}function ek(i){i.onclick=fne}function hne(i,o,f,m,y){for(var C in m)if(m.hasOwnProperty(C)){var w=m[C];if(C===gh)w&&Object.freeze(w),qS(o,w);else if(C===Fy){var P=w?w[KC]:void 0;P!=null&&MS(o,P)}else if(C===mh)if(typeof w=="string"){var D=i!=="textarea"||w!=="";D&&Pl(o,w)}else typeof w=="number"&&Pl(o,""+w);else C===YC||C===Pd||C===xU||(it.hasOwnProperty(C)?w!=null&&(typeof w!="function"&&QC(C,w),C==="onScroll"&&Ir("scroll",o)):w!=null&&It(o,C,w,y))}}function pne(i,o,f,m){for(var y=0;y<o.length;y+=2){var C=o[y],w=o[y+1];C===gh?qS(i,w):C===Fy?MS(i,w):C===mh?Pl(i,w):It(i,C,w,m)}}function mne(i,o,f,m){var y,C=RU(f),w,P=m;if(P===Io&&(P=Iv(i)),P===Io){if(y=Dl(i,o),!y&&i!==i.toLowerCase()&&c("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",i),i==="script"){var D=C.createElement("div");D.innerHTML="<script><\/script>";var F=D.firstChild;w=D.removeChild(F)}else if(typeof o.is=="string")w=C.createElement(i,{is:o.is});else if(w=C.createElement(i),i==="select"){var B=w;o.multiple?B.multiple=!0:o.size&&(B.size=o.size)}}else w=C.createElementNS(P,i);return P===Io&&!y&&Object.prototype.toString.call(w)==="[object HTMLUnknownElement]"&&!vr.call(uE,i)&&(uE[i]=!0,c("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",i)),w}function gne(i,o){return RU(o).createTextNode(i)}function vne(i,o,f,m){var y=Dl(o,f);ZC(o,f);var C;switch(o){case"dialog":Ir("cancel",i),Ir("close",i),C=f;break;case"iframe":case"object":case"embed":Ir("load",i),C=f;break;case"video":case"audio":for(var w=0;w<Ny.length;w++)Ir(Ny[w],i);C=f;break;case"source":Ir("error",i),C=f;break;case"img":case"image":case"link":Ir("error",i),Ir("load",i),C=f;break;case"details":Ir("toggle",i),C=f;break;case"input":Zc(i,f),C=go(i,f),Ir("invalid",i);break;case"option":Kn(i,f),C=f;break;case"select":Tf(i,f),C=Ru(i,f),Ir("invalid",i);break;case"textarea":DS(i,f),C=Dp(i,f),Ir("invalid",i);break;default:C=f}switch(Lp(o,C),hne(o,i,m,C,y),o){case"input":mo(i),pe(i,f,!1);break;case"textarea":mo(i),OS(i);break;case"option":lr(i,f);break;case"select":Mv(i,f);break;default:typeof C.onClick=="function"&&ek(i);break}}function yne(i,o,f,m,y){ZC(o,m);var C=null,w,P;switch(o){case"input":w=go(i,f),P=go(i,m),C=[];break;case"select":w=Ru(i,f),P=Ru(i,m),C=[];break;case"textarea":w=Dp(i,f),P=Dp(i,m),C=[];break;default:w=f,P=m,typeof w.onClick!="function"&&typeof P.onClick=="function"&&ek(i);break}Lp(o,P);var D,F,B=null;for(D in w)if(!(P.hasOwnProperty(D)||!w.hasOwnProperty(D)||w[D]==null))if(D===gh){var ae=w[D];for(F in ae)ae.hasOwnProperty(F)&&(B||(B={}),B[F]="")}else D===Fy||D===mh||D===YC||D===Pd||D===xU||(it.hasOwnProperty(D)?C||(C=[]):(C=C||[]).push(D,null));for(D in P){var re=P[D],ge=w!=null?w[D]:void 0;if(!(!P.hasOwnProperty(D)||re===ge||re==null&&ge==null))if(D===gh)if(re&&Object.freeze(re),ge){for(F in ge)ge.hasOwnProperty(F)&&(!re||!re.hasOwnProperty(F))&&(B||(B={}),B[F]="");for(F in re)re.hasOwnProperty(F)&&ge[F]!==re[F]&&(B||(B={}),B[F]=re[F])}else B||(C||(C=[]),C.push(D,B)),B=re;else if(D===Fy){var be=re?re[KC]:void 0,we=ge?ge[KC]:void 0;be!=null&&we!==be&&(C=C||[]).push(D,be)}else D===mh?(typeof re=="string"||typeof re=="number")&&(C=C||[]).push(D,""+re):D===YC||D===Pd||(it.hasOwnProperty(D)?(re!=null&&(typeof re!="function"&&QC(D,re),D==="onScroll"&&Ir("scroll",i)),!C&&ge!==re&&(C=[])):(C=C||[]).push(D,re))}return B&&(Uo(B,P[gh]),(C=C||[]).push(gh,B)),C}function bne(i,o,f,m,y){f==="input"&&y.type==="radio"&&y.name!=null&&O(i,y);var C=Dl(f,m),w=Dl(f,y);switch(pne(i,o,C,w),f){case"input":Y(i,y);break;case"textarea":AS(i,y);break;case"select":Pp(i,y);break}}function Sne(i){{var o=i.toLowerCase();return ed.hasOwnProperty(o)&&ed[o]||null}}function Cne(i,o,f,m,y,C,w){var P,D;switch(P=Dl(o,f),ZC(o,f),o){case"dialog":Ir("cancel",i),Ir("close",i);break;case"iframe":case"object":case"embed":Ir("load",i);break;case"video":case"audio":for(var F=0;F<Ny.length;F++)Ir(Ny[F],i);break;case"source":Ir("error",i);break;case"img":case"image":case"link":Ir("error",i),Ir("load",i);break;case"details":Ir("toggle",i);break;case"input":Zc(i,f),Ir("invalid",i);break;case"option":Kn(i,f);break;case"select":Tf(i,f),Ir("invalid",i);break;case"textarea":DS(i,f),Ir("invalid",i);break}Lp(o,f);{D=new Set;for(var B=i.attributes,ae=0;ae<B.length;ae++){var re=B[ae].name.toLowerCase();switch(re){case"value":break;case"checked":break;case"selected":break;default:D.add(B[ae].name)}}}var ge=null;for(var be in f)if(f.hasOwnProperty(be)){var we=f[be];if(be===mh)typeof we=="string"?i.textContent!==we&&(f[Pd]!==!0&&JC(i.textContent,we,C,w),ge=[mh,we]):typeof we=="number"&&i.textContent!==""+we&&(f[Pd]!==!0&&JC(i.textContent,we,C,w),ge=[mh,""+we]);else if(it.hasOwnProperty(be))we!=null&&(typeof we!="function"&&QC(be,we),be==="onScroll"&&Ir("scroll",i));else if(w&&typeof P=="boolean"){var st=void 0,Vt=Jn(be);if(f[Pd]!==!0){if(!(be===YC||be===Pd||be==="value"||be==="checked"||be==="selected")){if(be===Fy){var Pt=i.innerHTML,Ln=we?we[KC]:void 0;if(Ln!=null){var wn=EU(i,Ln);wn!==Pt&&jy(be,Pt,wn)}}else if(be===gh){if(D.delete(be),_U){var ce=I_(we);st=i.getAttribute("style"),ce!==st&&jy(be,st,ce)}}else if(P&&!Ce)D.delete(be.toLowerCase()),st=Me(i,be,we),we!==st&&jy(be,st,we);else if(!un(be,Vt,P)&&!Wn(be,we,Vt,P)){var _e=!1;if(Vt!==null)D.delete(Vt.attributeName),st=et(i,be,we,Vt);else{var de=m;if(de===Io&&(de=Iv(o)),de===Io)D.delete(be.toLowerCase());else{var qe=Sne(be);qe!==null&&qe!==be&&(_e=!0,D.delete(qe)),D.delete(be)}st=Me(i,be,we)}var yt=Ce;!yt&&we!==st&&!_e&&jy(be,st,we)}}}}}switch(w&&D.size>0&&f[Pd]!==!0&&wU(D),o){case"input":mo(i),pe(i,f,!0);break;case"textarea":mo(i),OS(i);break;case"select":case"option":break;default:typeof f.onClick=="function"&&ek(i);break}return ge}function kne(i,o,f){var m=i.nodeValue!==o;return m}function cE(i,o){{if(xo)return;xo=!0,c("Did not expect server HTML to contain a <%s> in <%s>.",o.nodeName.toLowerCase(),i.nodeName.toLowerCase())}}function dE(i,o){{if(xo)return;xo=!0,c('Did not expect server HTML to contain the text node "%s" in <%s>.',o.nodeValue,i.nodeName.toLowerCase())}}function fE(i,o,f){{if(xo)return;xo=!0,c("Expected server HTML to contain a matching <%s> in <%s>.",o,i.nodeName.toLowerCase())}}function hE(i,o){{if(o===""||xo)return;xo=!0,c('Expected server HTML to contain a matching text node for "%s" in <%s>.',o,i.nodeName.toLowerCase())}}function Tne(i,o,f){switch(o){case"input":Te(i,f);return;case"textarea":P_(i,f);return;case"select":Lv(i,f);return}}var Vy=function(){},zy=function(){};{var xne=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],PU=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],wne=PU.concat(["button"]),_ne=["dd","dt","li","option","optgroup","p","rp","rt"],DU={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};zy=function(i,o){var f=rn({},i||DU),m={tag:o};return PU.indexOf(o)!==-1&&(f.aTagInScope=null,f.buttonTagInScope=null,f.nobrTagInScope=null),wne.indexOf(o)!==-1&&(f.pTagInButtonScope=null),xne.indexOf(o)!==-1&&o!=="address"&&o!=="div"&&o!=="p"&&(f.listItemTagAutoclosing=null,f.dlItemTagAutoclosing=null),f.current=m,o==="form"&&(f.formTag=m),o==="a"&&(f.aTagInScope=m),o==="button"&&(f.buttonTagInScope=m),o==="nobr"&&(f.nobrTagInScope=m),o==="p"&&(f.pTagInButtonScope=m),o==="li"&&(f.listItemTagAutoclosing=m),(o==="dd"||o==="dt")&&(f.dlItemTagAutoclosing=m),f};var Ene=function(i,o){switch(o){case"select":return i==="option"||i==="optgroup"||i==="#text";case"optgroup":return i==="option"||i==="#text";case"option":return i==="#text";case"tr":return i==="th"||i==="td"||i==="style"||i==="script"||i==="template";case"tbody":case"thead":case"tfoot":return i==="tr"||i==="style"||i==="script"||i==="template";case"colgroup":return i==="col"||i==="template";case"table":return i==="caption"||i==="colgroup"||i==="tbody"||i==="tfoot"||i==="thead"||i==="style"||i==="script"||i==="template";case"head":return i==="base"||i==="basefont"||i==="bgsound"||i==="link"||i==="meta"||i==="title"||i==="noscript"||i==="noframes"||i==="style"||i==="script"||i==="template";case"html":return i==="head"||i==="body"||i==="frameset";case"frameset":return i==="frame";case"#document":return i==="html"}switch(i){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o!=="h1"&&o!=="h2"&&o!=="h3"&&o!=="h4"&&o!=="h5"&&o!=="h6";case"rp":case"rt":return _ne.indexOf(o)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return o==null}return!0},Rne=function(i,o){switch(i){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o.pTagInButtonScope;case"form":return o.formTag||o.pTagInButtonScope;case"li":return o.listItemTagAutoclosing;case"dd":case"dt":return o.dlItemTagAutoclosing;case"button":return o.buttonTagInScope;case"a":return o.aTagInScope;case"nobr":return o.nobrTagInScope}return null},AU={};Vy=function(i,o,f){f=f||DU;var m=f.current,y=m&&m.tag;o!=null&&(i!=null&&c("validateDOMNesting: when childText is passed, childTag should be null"),i="#text");var C=Ene(i,y)?null:m,w=C?null:Rne(i,f),P=C||w;if(P){var D=P.tag,F=!!C+"|"+i+"|"+D;if(!AU[F]){AU[F]=!0;var B=i,ae="";if(i==="#text"?/\S/.test(o)?B="Text nodes":(B="Whitespace text nodes",ae=" Make sure you don't have any extra whitespace between tags on each line of your source code."):B="<"+i+">",C){var re="";D==="table"&&i==="tr"&&(re+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),c("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",B,D,ae,re)}else c("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",B,D)}}}}var tk="suppressHydrationWarning",nk="$",rk="/$",By="$?",Hy="$!",Pne="style",pE=null,mE=null;function Dne(i){var o,f,m=i.nodeType;switch(m){case $s:case xf:{o=m===$s?"#document":"#fragment";var y=i.documentElement;f=y?y.namespaceURI:Ap(null,"");break}default:{var C=m===ti?i.parentNode:i,w=C.namespaceURI||null;o=C.tagName,f=Ap(w,o);break}}{var P=o.toLowerCase(),D=zy(null,P);return{namespace:f,ancestorInfo:D}}}function Ane(i,o,f){{var m=i,y=Ap(m.namespace,o),C=zy(m.ancestorInfo,o);return{namespace:y,ancestorInfo:C}}}function ele(i){return i}function One(i){pE=Oi(),mE=Wte();var o=null;return Kr(!1),o}function Mne(i){Gte(mE),Kr(pE),pE=null,mE=null}function Lne(i,o,f,m,y){var C;{var w=m;if(Vy(i,null,w.ancestorInfo),typeof o.children=="string"||typeof o.children=="number"){var P=""+o.children,D=zy(w.ancestorInfo,i);Vy(null,P,D)}C=w.namespace}var F=mne(i,o,f,C);return Wy(y,F),TE(F,o),F}function Nne(i,o){i.appendChild(o)}function Ine(i,o,f,m,y){switch(vne(i,o,f,m),o){case"button":case"input":case"select":case"textarea":return!!f.autoFocus;case"img":return!0;default:return!1}}function Une(i,o,f,m,y,C){{var w=C;if(typeof m.children!=typeof f.children&&(typeof m.children=="string"||typeof m.children=="number")){var P=""+m.children,D=zy(w.ancestorInfo,o);Vy(null,P,D)}}return yne(i,o,f,m)}function gE(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}function Fne(i,o,f,m){{var y=f;Vy(null,i,y.ancestorInfo)}var C=gne(i,o);return Wy(m,C),C}function jne(){var i=window.event;return i===void 0?Di:kd(i.type)}var vE=typeof setTimeout=="function"?setTimeout:void 0,Vne=typeof clearTimeout=="function"?clearTimeout:void 0,yE=-1,OU=typeof Promise=="function"?Promise:void 0,zne=typeof queueMicrotask=="function"?queueMicrotask:typeof OU<"u"?function(i){return OU.resolve(null).then(i).catch(Bne)}:vE;function Bne(i){setTimeout(function(){throw i})}function Hne(i,o,f,m){switch(o){case"button":case"input":case"select":case"textarea":f.autoFocus&&i.focus();return;case"img":{f.src&&(i.src=f.src);return}}}function $ne(i,o,f,m,y,C){bne(i,o,f,m,y),TE(i,y)}function MU(i){Pl(i,"")}function qne(i,o,f){i.nodeValue=f}function Wne(i,o){i.appendChild(o)}function Gne(i,o){var f;i.nodeType===ti?(f=i.parentNode,f.insertBefore(o,i)):(f=i,f.appendChild(o));var m=i._reactRootContainer;m==null&&f.onclick===null&&ek(f)}function Yne(i,o,f){i.insertBefore(o,f)}function Kne(i,o,f){i.nodeType===ti?i.parentNode.insertBefore(o,f):i.insertBefore(o,f)}function Zne(i,o){i.removeChild(o)}function Qne(i,o){i.nodeType===ti?i.parentNode.removeChild(o):i.removeChild(o)}function bE(i,o){var f=o,m=0;do{var y=f.nextSibling;if(i.removeChild(f),y&&y.nodeType===ti){var C=y.data;if(C===rk)if(m===0){i.removeChild(y),Zi(o);return}else m--;else(C===nk||C===By||C===Hy)&&m++}f=y}while(f);Zi(o)}function Xne(i,o){i.nodeType===ti?bE(i.parentNode,o):i.nodeType===xa&&bE(i,o),Zi(i)}function Jne(i){i=i;var o=i.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}function ere(i){i.nodeValue=""}function tre(i,o){i=i;var f=o[Pne],m=f!=null&&f.hasOwnProperty("display")?f.display:null;i.style.display=Mp("display",m)}function nre(i,o){i.nodeValue=o}function rre(i){i.nodeType===xa?i.textContent="":i.nodeType===$s&&i.documentElement&&i.removeChild(i.documentElement)}function ire(i,o,f){return i.nodeType!==xa||o.toLowerCase()!==i.nodeName.toLowerCase()?null:i}function are(i,o){return o===""||i.nodeType!==Hs?null:i}function ore(i){return i.nodeType!==ti?null:i}function LU(i){return i.data===By}function SE(i){return i.data===Hy}function sre(i){var o=i.nextSibling&&i.nextSibling.dataset,f,m,y;return o&&(f=o.dgst,m=o.msg,y=o.stck),{message:m,digest:f,stack:y}}function lre(i,o){i._reactRetry=o}function ik(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===xa||o===Hs)break;if(o===ti){var f=i.data;if(f===nk||f===Hy||f===By)break;if(f===rk)return null}}return i}function $y(i){return ik(i.nextSibling)}function ure(i){return ik(i.firstChild)}function cre(i){return ik(i.firstChild)}function dre(i){return ik(i.nextSibling)}function fre(i,o,f,m,y,C,w){Wy(C,i),TE(i,f);var P;{var D=y;P=D.namespace}var F=(C.mode&vn)!==Mt;return Cne(i,o,f,P,m,F,w)}function hre(i,o,f,m){return Wy(f,i),f.mode&vn,kne(i,o)}function pre(i,o){Wy(o,i)}function mre(i){for(var o=i.nextSibling,f=0;o;){if(o.nodeType===ti){var m=o.data;if(m===rk){if(f===0)return $y(o);f--}else(m===nk||m===Hy||m===By)&&f++}o=o.nextSibling}return null}function NU(i){for(var o=i.previousSibling,f=0;o;){if(o.nodeType===ti){var m=o.data;if(m===nk||m===Hy||m===By){if(f===0)return o;f--}else m===rk&&f++}o=o.previousSibling}return null}function gre(i){Zi(i)}function vre(i){Zi(i)}function yre(i){return i!=="head"&&i!=="body"}function bre(i,o,f,m){var y=!0;JC(o.nodeValue,f,m,y)}function Sre(i,o,f,m,y,C){if(o[tk]!==!0){var w=!0;JC(m.nodeValue,y,C,w)}}function Cre(i,o){o.nodeType===xa?cE(i,o):o.nodeType===ti||dE(i,o)}function kre(i,o){{var f=i.parentNode;f!==null&&(o.nodeType===xa?cE(f,o):o.nodeType===ti||dE(f,o))}}function Tre(i,o,f,m,y){(y||o[tk]!==!0)&&(m.nodeType===xa?cE(f,m):m.nodeType===ti||dE(f,m))}function xre(i,o,f){fE(i,o)}function wre(i,o){hE(i,o)}function _re(i,o,f){{var m=i.parentNode;m!==null&&fE(m,o)}}function Ere(i,o){{var f=i.parentNode;f!==null&&hE(f,o)}}function Rre(i,o,f,m,y,C){(C||o[tk]!==!0)&&fE(f,m)}function Pre(i,o,f,m,y){(y||o[tk]!==!0)&&hE(f,m)}function Dre(i){c("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",i.nodeName.toLowerCase())}function Are(i){Iy(i)}var zm=Math.random().toString(36).slice(2),Bm="__reactFiber$"+zm,CE="__reactProps$"+zm,qy="__reactContainer$"+zm,kE="__reactEvents$"+zm,Ore="__reactListeners$"+zm,Mre="__reactHandles$"+zm;function Lre(i){delete i[Bm],delete i[CE],delete i[kE],delete i[Ore],delete i[Mre]}function Wy(i,o){o[Bm]=i}function ak(i,o){o[qy]=i}function IU(i){i[qy]=null}function Gy(i){return!!i[qy]}function vh(i){var o=i[Bm];if(o)return o;for(var f=i.parentNode;f;){if(o=f[qy]||f[Bm],o){var m=o.alternate;if(o.child!==null||m!==null&&m.child!==null)for(var y=NU(i);y!==null;){var C=y[Bm];if(C)return C;y=NU(y)}return o}i=f,f=i.parentNode}return null}function Dd(i){var o=i[Bm]||i[qy];return o&&(o.tag===E||o.tag===R||o.tag===N||o.tag===k)?o:null}function Hm(i){if(i.tag===E||i.tag===R)return i.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function ok(i){return i[CE]||null}function TE(i,o){i[CE]=o}function Nre(i){var o=i[kE];return o===void 0&&(o=i[kE]=new Set),o}var UU={},FU=r.ReactDebugCurrentFrame;function sk(i){if(i){var o=i._owner,f=yf(i.type,i._source,o?o.type:null);FU.setExtraStackFrame(f)}else FU.setExtraStackFrame(null)}function Qs(i,o,f,m,y){{var C=Function.call.bind(vr);for(var w in i)if(C(i,w)){var P=void 0;try{if(typeof i[w]!="function"){var D=Error((m||"React class")+": "+f+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}P=i[w](o,w,m,f,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){P=F}P&&!(P instanceof Error)&&(sk(y),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",m||"React class",f,w,typeof P),sk(null)),P instanceof Error&&!(P.message in UU)&&(UU[P.message]=!0,sk(y),c("Failed %s type: %s",f,P.message),sk(null))}}}var xE=[],lk;lk=[];var ec=-1;function Ad(i){return{current:i}}function La(i,o){if(ec<0){c("Unexpected pop.");return}o!==lk[ec]&&c("Unexpected Fiber popped."),i.current=xE[ec],xE[ec]=null,lk[ec]=null,ec--}function Na(i,o,f){ec++,xE[ec]=i.current,lk[ec]=f,i.current=o}var wE;wE={};var $o={};Object.freeze($o);var tc=Ad($o),Ql=Ad(!1),_E=$o;function $m(i,o,f){return f&&Xl(o)?_E:tc.current}function jU(i,o,f){{var m=i.stateNode;m.__reactInternalMemoizedUnmaskedChildContext=o,m.__reactInternalMemoizedMaskedChildContext=f}}function qm(i,o){{var f=i.type,m=f.contextTypes;if(!m)return $o;var y=i.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===o)return y.__reactInternalMemoizedMaskedChildContext;var C={};for(var w in m)C[w]=o[w];{var P=Zt(i)||"Unknown";Qs(m,C,"context",P)}return y&&jU(i,o,C),C}}function uk(){return Ql.current}function Xl(i){{var o=i.childContextTypes;return o!=null}}function ck(i){La(Ql,i),La(tc,i)}function EE(i){La(Ql,i),La(tc,i)}function VU(i,o,f){{if(tc.current!==$o)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Na(tc,o,i),Na(Ql,f,i)}}function zU(i,o,f){{var m=i.stateNode,y=o.childContextTypes;if(typeof m.getChildContext!="function"){{var C=Zt(i)||"Unknown";wE[C]||(wE[C]=!0,c("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",C,C))}return f}var w=m.getChildContext();for(var P in w)if(!(P in y))throw new Error((Zt(i)||"Unknown")+'.getChildContext(): key "'+P+'" is not defined in childContextTypes.');{var D=Zt(i)||"Unknown";Qs(y,w,"child context",D)}return rn({},f,w)}}function dk(i){{var o=i.stateNode,f=o&&o.__reactInternalMemoizedMergedChildContext||$o;return _E=tc.current,Na(tc,f,i),Na(Ql,Ql.current,i),!0}}function BU(i,o,f){{var m=i.stateNode;if(!m)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(f){var y=zU(i,o,_E);m.__reactInternalMemoizedMergedChildContext=y,La(Ql,i),La(tc,i),Na(tc,y,i),Na(Ql,f,i)}else La(Ql,i),Na(Ql,f,i)}}function Ire(i){{if(!oC(i)||i.tag!==v)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var o=i;do{switch(o.tag){case k:return o.stateNode.context;case v:{var f=o.type;if(Xl(f))return o.stateNode.__reactInternalMemoizedMergedChildContext;break}}o=o.return}while(o!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var Od=0,fk=1,nc=null,RE=!1,PE=!1;function HU(i){nc===null?nc=[i]:nc.push(i)}function Ure(i){RE=!0,HU(i)}function $U(){RE&&Md()}function Md(){if(!PE&&nc!==null){PE=!0;var i=0,o=$a();try{var f=!0,m=nc;for(fi(Oa);i<m.length;i++){var y=m[i];do y=y(f);while(y!==null)}nc=null,RE=!1}catch(C){throw nc!==null&&(nc=nc.slice(i+1)),Qv(Gs,Md),C}finally{fi(o),PE=!1}}return null}var Wm=[],Gm=0,hk=null,pk=0,ps=[],ms=0,yh=null,rc=1,ic="";function Fre(i){return Sh(),(i.flags&Ff)!==Ot}function jre(i){return Sh(),pk}function Vre(){var i=ic,o=rc,f=o&~zre(o);return f.toString(32)+i}function bh(i,o){Sh(),Wm[Gm++]=pk,Wm[Gm++]=hk,hk=i,pk=o}function qU(i,o,f){Sh(),ps[ms++]=rc,ps[ms++]=ic,ps[ms++]=yh,yh=i;var m=rc,y=ic,C=mk(m)-1,w=m&~(1<<C),P=f+1,D=mk(o)+C;if(D>30){var F=C-C%5,B=(1<<F)-1,ae=(w&B).toString(32),re=w>>F,ge=C-F,be=mk(o)+ge,we=P<<ge,st=we|re,Vt=ae+y;rc=1<<be|st,ic=Vt}else{var Pt=P<<C,Ln=Pt|w,wn=y;rc=1<<D|Ln,ic=wn}}function DE(i){Sh();var o=i.return;if(o!==null){var f=1,m=0;bh(i,f),qU(i,f,m)}}function mk(i){return 32-di(i)}function zre(i){return 1<<mk(i)-1}function AE(i){for(;i===hk;)hk=Wm[--Gm],Wm[Gm]=null,pk=Wm[--Gm],Wm[Gm]=null;for(;i===yh;)yh=ps[--ms],ps[ms]=null,ic=ps[--ms],ps[ms]=null,rc=ps[--ms],ps[ms]=null}function Bre(){return Sh(),yh!==null?{id:rc,overflow:ic}:null}function Hre(i,o){Sh(),ps[ms++]=rc,ps[ms++]=ic,ps[ms++]=yh,rc=o.id,ic=o.overflow,yh=i}function Sh(){la()||c("Expected to be hydrating. This is a bug in React. Please file an issue.")}var sa=null,gs=null,Xs=!1,Ch=!1,Ld=null;function $re(){Xs&&c("We should not be hydrating here. This is a bug in React. Please file a bug.")}function WU(){Ch=!0}function qre(){return Ch}function Wre(i){var o=i.stateNode.containerInfo;return gs=cre(o),sa=i,Xs=!0,Ld=null,Ch=!1,!0}function Gre(i,o,f){return gs=dre(o),sa=i,Xs=!0,Ld=null,Ch=!1,f!==null&&Hre(i,f),!0}function GU(i,o){switch(i.tag){case k:{Cre(i.stateNode.containerInfo,o);break}case E:{var f=(i.mode&vn)!==Mt;Tre(i.type,i.memoizedProps,i.stateNode,o,f);break}case N:{var m=i.memoizedState;m.dehydrated!==null&&kre(m.dehydrated,o);break}}}function YU(i,o){GU(i,o);var f=Qoe();f.stateNode=o,f.return=i;var m=i.deletions;m===null?(i.deletions=[f],i.flags|=wa):m.push(f)}function OE(i,o){{if(Ch)return;switch(i.tag){case k:{var f=i.stateNode.containerInfo;switch(o.tag){case E:var m=o.type;o.pendingProps,xre(f,m);break;case R:var y=o.pendingProps;wre(f,y);break}break}case E:{var C=i.type,w=i.memoizedProps,P=i.stateNode;switch(o.tag){case E:{var D=o.type,F=o.pendingProps,B=(i.mode&vn)!==Mt;Rre(C,w,P,D,F,B);break}case R:{var ae=o.pendingProps,re=(i.mode&vn)!==Mt;Pre(C,w,P,ae,re);break}}break}case N:{var ge=i.memoizedState,be=ge.dehydrated;if(be!==null)switch(o.tag){case E:var we=o.type;o.pendingProps,_re(be,we);break;case R:var st=o.pendingProps;Ere(be,st);break}break}default:return}}}function KU(i,o){o.flags=o.flags&~Vr|jr,OE(i,o)}function ZU(i,o){switch(i.tag){case E:{var f=i.type;i.pendingProps;var m=ire(o,f);return m!==null?(i.stateNode=m,sa=i,gs=ure(m),!0):!1}case R:{var y=i.pendingProps,C=are(o,y);return C!==null?(i.stateNode=C,sa=i,gs=null,!0):!1}case N:{var w=ore(o);if(w!==null){var P={dehydrated:w,treeContext:Bre(),retryLane:Pa};i.memoizedState=P;var D=Xoe(w);return D.return=i,i.child=D,sa=i,gs=null,!0}return!1}default:return!1}}function ME(i){return(i.mode&vn)!==Mt&&(i.flags&pn)===Ot}function LE(i){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function NE(i){if(Xs){var o=gs;if(!o){ME(i)&&(OE(sa,i),LE()),KU(sa,i),Xs=!1,sa=i;return}var f=o;if(!ZU(i,o)){ME(i)&&(OE(sa,i),LE()),o=$y(f);var m=sa;if(!o||!ZU(i,o)){KU(sa,i),Xs=!1,sa=i;return}YU(m,f)}}}function Yre(i,o,f){var m=i.stateNode,y=!Ch,C=fre(m,i.type,i.memoizedProps,o,f,i,y);return i.updateQueue=C,C!==null}function Kre(i){var o=i.stateNode,f=i.memoizedProps,m=hre(o,f,i);if(m){var y=sa;if(y!==null)switch(y.tag){case k:{var C=y.stateNode.containerInfo,w=(y.mode&vn)!==Mt;bre(C,o,f,w);break}case E:{var P=y.type,D=y.memoizedProps,F=y.stateNode,B=(y.mode&vn)!==Mt;Sre(P,D,F,o,f,B);break}}}return m}function Zre(i){var o=i.memoizedState,f=o!==null?o.dehydrated:null;if(!f)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");pre(f,i)}function Qre(i){var o=i.memoizedState,f=o!==null?o.dehydrated:null;if(!f)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return mre(f)}function QU(i){for(var o=i.return;o!==null&&o.tag!==E&&o.tag!==k&&o.tag!==N;)o=o.return;sa=o}function gk(i){if(i!==sa)return!1;if(!Xs)return QU(i),Xs=!0,!1;if(i.tag!==k&&(i.tag!==E||yre(i.type)&&!gE(i.type,i.memoizedProps))){var o=gs;if(o)if(ME(i))XU(i),LE();else for(;o;)YU(i,o),o=$y(o)}return QU(i),i.tag===N?gs=Qre(i):gs=sa?$y(i.stateNode):null,!0}function Xre(){return Xs&&gs!==null}function XU(i){for(var o=gs;o;)GU(i,o),o=$y(o)}function Ym(){sa=null,gs=null,Xs=!1,Ch=!1}function JU(){Ld!==null&&(W9(Ld),Ld=null)}function la(){return Xs}function IE(i){Ld===null?Ld=[i]:Ld.push(i)}var Jre=r.ReactCurrentBatchConfig,eie=null;function tie(){return Jre.transition}var Js={recordUnsafeLifecycleWarnings:function(i,o){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(i,o){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var nie=function(i){for(var o=null,f=i;f!==null;)f.mode&an&&(o=f),f=f.return;return o},kh=function(i){var o=[];return i.forEach(function(f){o.push(f)}),o.sort().join(", ")},Yy=[],Ky=[],Zy=[],Qy=[],Xy=[],Jy=[],Th=new Set;Js.recordUnsafeLifecycleWarnings=function(i,o){Th.has(i.type)||(typeof o.componentWillMount=="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&Yy.push(i),i.mode&an&&typeof o.UNSAFE_componentWillMount=="function"&&Ky.push(i),typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Zy.push(i),i.mode&an&&typeof o.UNSAFE_componentWillReceiveProps=="function"&&Qy.push(i),typeof o.componentWillUpdate=="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&Xy.push(i),i.mode&an&&typeof o.UNSAFE_componentWillUpdate=="function"&&Jy.push(i))},Js.flushPendingUnsafeLifecycleWarnings=function(){var i=new Set;Yy.length>0&&(Yy.forEach(function(re){i.add(Zt(re)||"Component"),Th.add(re.type)}),Yy=[]);var o=new Set;Ky.length>0&&(Ky.forEach(function(re){o.add(Zt(re)||"Component"),Th.add(re.type)}),Ky=[]);var f=new Set;Zy.length>0&&(Zy.forEach(function(re){f.add(Zt(re)||"Component"),Th.add(re.type)}),Zy=[]);var m=new Set;Qy.length>0&&(Qy.forEach(function(re){m.add(Zt(re)||"Component"),Th.add(re.type)}),Qy=[]);var y=new Set;Xy.length>0&&(Xy.forEach(function(re){y.add(Zt(re)||"Component"),Th.add(re.type)}),Xy=[]);var C=new Set;if(Jy.length>0&&(Jy.forEach(function(re){C.add(Zt(re)||"Component"),Th.add(re.type)}),Jy=[]),o.size>0){var w=kh(o);c(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
129
129
|
|
|
130
130
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
131
131
|
|
|
@@ -177,7 +177,7 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}retur
|
|
|
177
177
|
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function sR(i,o){if(oR)return!1;if(o===null)return c("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Ae),!1;i.length!==o.length&&c(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
178
178
|
|
|
179
179
|
Previous: %s
|
|
180
|
-
Incoming: %s`,Ae,"["+o.join(", ")+"]","["+i.join(", ")+"]");for(var f=0;f<o.length&&f<i.length;f++)if(!dt(i[f],o[f]))return!1;return!0}function rg(i,o,f,m,y,C){wh=C,dr=o,vs=i!==null?i._debugHookTypes:null,Fd=-1,oR=i!==null&&i.type!==o.type,o.memoizedState=null,o.updateQueue=null,o.lanes=Pe,i!==null&&i.memoizedState!==null?gt.current=jF:vs!==null?gt.current=FF:gt.current=UF;var w=f(m,y);if(a0){var P=0;do{if(a0=!1,o0=0,P>=bie)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");P+=1,oR=!1,Ni=null,Ii=null,o.updateQueue=null,Fd=-1,gt.current=VF,w=f(m,y)}while(a0)}gt.current=Wk,o._debugHookTypes=vs;var D=Ni!==null&&Ni.next!==null;if(wh=Pe,dr=null,Ni=null,Ii=null,Ae=null,vs=null,Fd=-1,i!==null&&(i.flags&ri)!==(o.flags&ri)&&(i.mode&vn)!==Mt&&c("Internal React error: Expected static flag was missing. Please notify the React team."),Mk=!1,D)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return w}function ig(){var i=o0!==0;return o0=0,i}function yF(i,o,f){o.updateQueue=i.updateQueue,(o.mode&cr)!==Mt?o.flags&=-50333701:o.flags&=-2053,i.lanes=Jf(i.lanes,f)}function bF(){if(gt.current=Wk,Mk){for(var i=dr.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Mk=!1}wh=Pe,dr=null,Ni=null,Ii=null,vs=null,Fd=-1,Ae=null,OF=!1,a0=!1,o0=0}function eu(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ii===null?dr.memoizedState=Ii=i:Ii=Ii.next=i,Ii}function ys(){var i;if(Ni===null){var o=dr.alternate;o!==null?i=o.memoizedState:i=null}else i=Ni.next;var f;if(Ii===null?f=dr.memoizedState:f=Ii.next,f!==null)Ii=f,f=Ii.next,Ni=i;else{if(i===null)throw new Error("Rendered more hooks than during the previous render.");Ni=i;var m={memoizedState:Ni.memoizedState,baseState:Ni.baseState,baseQueue:Ni.baseQueue,queue:Ni.queue,next:null};Ii===null?dr.memoizedState=Ii=m:Ii=Ii.next=m}return Ii}function SF(){return{lastEffect:null,stores:null}}function lR(i,o){return typeof o=="function"?o(i):o}function uR(i,o,f){var m=eu(),y;f!==void 0?y=f(o):y=o,m.memoizedState=m.baseState=y;var C={pending:null,interleaved:null,lanes:Pe,dispatch:null,lastRenderedReducer:i,lastRenderedState:y};m.queue=C;var w=C.dispatch=xie.bind(null,dr,C);return[m.memoizedState,w]}function cR(i,o,f){var m=ys(),y=m.queue;if(y===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");y.lastRenderedReducer=i;var C=Ni,w=C.baseQueue,P=y.pending;if(P!==null){if(w!==null){var D=w.next,F=P.next;w.next=F,P.next=D}C.baseQueue!==w&&c("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),C.baseQueue=w=P,y.pending=null}if(w!==null){var B=w.next,ae=C.baseState,re=null,ge=null,be=null,we=B;do{var st=we.lane;if(Hu(wh,st)){if(be!==null){var Pt={lane:ii,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null};be=be.next=Pt}if(we.hasEagerState)ae=we.eagerState;else{var Ln=we.action;ae=i(ae,Ln)}}else{var Vt={lane:st,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null};be===null?(ge=be=Vt,re=ae):be=be.next=Vt,dr.lanes=sn(dr.lanes,st),E0(st)}we=we.next}while(we!==null&&we!==B);be===null?re=ae:be.next=ge,dt(ae,m.memoizedState)||m0(),m.memoizedState=ae,m.baseState=re,m.baseQueue=be,y.lastRenderedState=ae}var wn=y.interleaved;if(wn!==null){var ce=wn;do{var _e=ce.lane;dr.lanes=sn(dr.lanes,_e),E0(_e),ce=ce.next}while(ce!==wn)}else w===null&&(y.lanes=Pe);var de=y.dispatch;return[m.memoizedState,de]}function dR(i,o,f){var m=ys(),y=m.queue;if(y===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");y.lastRenderedReducer=i;var C=y.dispatch,w=y.pending,P=m.memoizedState;if(w!==null){y.pending=null;var D=w.next,F=D;do{var B=F.action;P=i(P,B),F=F.next}while(F!==D);dt(P,m.memoizedState)||m0(),m.memoizedState=P,m.baseQueue===null&&(m.baseState=P),y.lastRenderedState=P}return[P,C]}function nle(i,o,f){}function rle(i,o,f){}function fR(i,o,f){var m=dr,y=eu(),C,w=la();if(w){if(f===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");C=f(),tg||C!==f()&&(c("The result of getServerSnapshot should be cached to avoid an infinite loop"),tg=!0)}else{if(C=o(),!tg){var P=o();dt(C,P)||(c("The result of getSnapshot should be cached to avoid an infinite loop"),tg=!0)}var D=d1();if(D===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Xf(D,wh)||CF(m,o,C)}y.memoizedState=C;var F={value:C,getSnapshot:o};return y.queue=F,Fk(TF.bind(null,m,F,i),[i]),m.flags|=Ba,s0(Mi|ua,kF.bind(null,m,F,C,o),void 0,null),C}function Lk(i,o,f){var m=dr,y=ys(),C=o();if(!tg){var w=o();dt(C,w)||(c("The result of getSnapshot should be cached to avoid an infinite loop"),tg=!0)}var P=y.memoizedState,D=!dt(P,C);D&&(y.memoizedState=C,m0());var F=y.queue;if(u0(TF.bind(null,m,F,i),[i]),F.getSnapshot!==o||D||Ii!==null&&Ii.memoizedState.tag&Mi){m.flags|=Ba,s0(Mi|ua,kF.bind(null,m,F,C,o),void 0,null);var B=d1();if(B===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Xf(B,wh)||CF(m,o,C)}return C}function CF(i,o,f){i.flags|=$p;var m={getSnapshot:o,value:f},y=dr.updateQueue;if(y===null)y=SF(),dr.updateQueue=y,y.stores=[m];else{var C=y.stores;C===null?y.stores=[m]:C.push(m)}}function kF(i,o,f,m){o.value=f,o.getSnapshot=m,xF(o)&&wF(i)}function TF(i,o,f){var m=function(){xF(o)&&wF(i)};return f(m)}function xF(i){var o=i.getSnapshot,f=i.value;try{var m=o();return!dt(f,m)}catch{return!0}}function wF(i){var o=wo(i,$t);o!==null&&Vi(o,i,$t,rr)}function Nk(i){var o=eu();typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i;var f={pending:null,interleaved:null,lanes:Pe,dispatch:null,lastRenderedReducer:lR,lastRenderedState:i};o.queue=f;var m=f.dispatch=wie.bind(null,dr,f);return[o.memoizedState,m]}function hR(i){return cR(lR)}function pR(i){return dR(lR)}function s0(i,o,f,m){var y={tag:i,create:o,destroy:f,deps:m,next:null},C=dr.updateQueue;if(C===null)C=SF(),dr.updateQueue=C,C.lastEffect=y.next=y;else{var w=C.lastEffect;if(w===null)C.lastEffect=y.next=y;else{var P=w.next;w.next=y,y.next=P,C.lastEffect=y}}return y}function mR(i){var o=eu();{var f={current:i};return o.memoizedState=f,f}}function Ik(i){var o=ys();return o.memoizedState}function l0(i,o,f,m){var y=eu(),C=m===void 0?null:m;dr.flags|=i,y.memoizedState=s0(Mi|o,f,void 0,C)}function Uk(i,o,f,m){var y=ys(),C=m===void 0?null:m,w=void 0;if(Ni!==null){var P=Ni.memoizedState;if(w=P.destroy,C!==null){var D=P.deps;if(sR(C,D)){y.memoizedState=s0(o,f,w,C);return}}}dr.flags|=i,y.memoizedState=s0(Mi|o,f,w,C)}function Fk(i,o){return(dr.mode&cr)!==Mt?l0(Ml|Ba|Yv,ua,i,o):l0(Ba|Yv,ua,i,o)}function u0(i,o){return Uk(Ba,ua,i,o)}function gR(i,o){return l0(Tn,Jl,i,o)}function jk(i,o){return Uk(Tn,Jl,i,o)}function vR(i,o){var f=Tn;return f|=Ol,(dr.mode&cr)!==Mt&&(f|=ia),l0(f,Li,i,o)}function Vk(i,o){return Uk(Tn,Li,i,o)}function _F(i,o){if(typeof o=="function"){var f=o,m=i();return f(m),function(){f(null)}}else if(o!=null){var y=o;y.hasOwnProperty("current")||c("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(y).join(", ")+"}");var C=i();return y.current=C,function(){y.current=null}}}function yR(i,o,f){typeof o!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null");var m=f!=null?f.concat([i]):null,y=Tn;return y|=Ol,(dr.mode&cr)!==Mt&&(y|=ia),l0(y,Li,_F.bind(null,o,i),m)}function zk(i,o,f){typeof o!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null");var m=f!=null?f.concat([i]):null;return Uk(Tn,Li,_F.bind(null,o,i),m)}function Cie(i,o){}var Bk=Cie;function bR(i,o){var f=eu(),m=o===void 0?null:o;return f.memoizedState=[i,m],i}function Hk(i,o){var f=ys(),m=o===void 0?null:o,y=f.memoizedState;if(y!==null&&m!==null){var C=y[1];if(sR(m,C))return y[0]}return f.memoizedState=[i,m],i}function SR(i,o){var f=eu(),m=o===void 0?null:o,y=i();return f.memoizedState=[y,m],y}function $k(i,o){var f=ys(),m=o===void 0?null:o,y=f.memoizedState;if(y!==null&&m!==null){var C=y[1];if(sR(m,C))return y[0]}var w=i();return f.memoizedState=[w,m],w}function CR(i){var o=eu();return o.memoizedState=i,i}function EF(i){var o=ys(),f=Ni,m=f.memoizedState;return PF(o,m,i)}function RF(i){var o=ys();if(Ni===null)return o.memoizedState=i,i;var f=Ni.memoizedState;return PF(o,f,i)}function PF(i,o,f){var m=!hy(wh);if(m){if(!dt(f,o)){var y=my();dr.lanes=sn(dr.lanes,y),E0(y),i.baseState=!0}return o}else return i.baseState&&(i.baseState=!1,m0()),i.memoizedState=f,f}function kie(i,o,f){var m=$a();fi(th(m,So)),i(!0);var y=i0.transition;i0.transition={};var C=i0.transition;i0.transition._updatedFibers=new Set;try{i(!1),o()}finally{if(fi(m),i0.transition=y,y===null&&C._updatedFibers){var w=C._updatedFibers.size;w>10&&l("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),C._updatedFibers.clear()}}}function kR(){var i=Nk(!1),o=i[0],f=i[1],m=kie.bind(null,f),y=eu();return y.memoizedState=m,[o,m]}function DF(){var i=hR(),o=i[0],f=ys(),m=f.memoizedState;return[o,m]}function AF(){var i=pR(),o=i[0],f=ys(),m=f.memoizedState;return[o,m]}var OF=!1;function Tie(){return OF}function TR(){var i=eu(),o=d1(),f=o.identifierPrefix,m;if(la()){var y=Vre();m=":"+f+"R"+y;var C=o0++;C>0&&(m+="H"+C.toString(32)),m+=":"}else{var w=yie++;m=":"+f+"r"+w.toString(32)+":"}return i.memoizedState=m,m}function qk(){var i=ys(),o=i.memoizedState;return o}function xie(i,o,f){typeof arguments[3]=="function"&&c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var m=Hd(i),y={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null};if(MF(i))LF(o,y);else{var C=lF(i,o,y,m);if(C!==null){var w=Za();Vi(C,i,m,w),NF(C,o,m)}}IF(i,m)}function wie(i,o,f){typeof arguments[3]=="function"&&c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var m=Hd(i),y={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null};if(MF(i))LF(o,y);else{var C=i.alternate;if(i.lanes===Pe&&(C===null||C.lanes===Pe)){var w=o.lastRenderedReducer;if(w!==null){var P;P=gt.current,gt.current=tl;try{var D=o.lastRenderedState,F=w(D,f);if(y.hasEagerState=!0,y.eagerState=F,dt(F,D)){uie(i,o,y,m);return}}catch{}finally{gt.current=P}}}var B=lF(i,o,y,m);if(B!==null){var ae=Za();Vi(B,i,m,ae),NF(B,o,m)}}IF(i,m)}function MF(i){var o=i.alternate;return i===dr||o!==null&&o===dr}function LF(i,o){a0=Mk=!0;var f=i.pending;f===null?o.next=o:(o.next=f.next,f.next=o),i.pending=o}function NF(i,o,f){if(py(f)){var m=o.lanes;m=gm(m,i.pendingLanes);var y=sn(m,f);o.lanes=y,eh(i,y)}}function IF(i,o,f){$f(i,o)}var Wk={readContext:Ti,useCallback:Ia,useContext:Ia,useEffect:Ia,useImperativeHandle:Ia,useInsertionEffect:Ia,useLayoutEffect:Ia,useMemo:Ia,useReducer:Ia,useRef:Ia,useState:Ia,useDebugValue:Ia,useDeferredValue:Ia,useTransition:Ia,useMutableSource:Ia,useSyncExternalStore:Ia,useId:Ia,unstable_isNewReconciler:He},UF=null,FF=null,jF=null,VF=null,tu=null,tl=null,Gk=null;{var xR=function(){c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},en=function(){c("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};UF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",Qn(),ng(o),bR(i,o)},useContext:function(i){return Ae="useContext",Qn(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",Qn(),ng(o),Fk(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",Qn(),ng(f),yR(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",Qn(),ng(o),gR(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",Qn(),ng(o),vR(i,o)},useMemo:function(i,o){Ae="useMemo",Qn(),ng(o);var f=gt.current;gt.current=tu;try{return SR(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",Qn();var m=gt.current;gt.current=tu;try{return uR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",Qn(),mR(i)},useState:function(i){Ae="useState",Qn();var o=gt.current;gt.current=tu;try{return Nk(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",Qn(),void 0},useDeferredValue:function(i){return Ae="useDeferredValue",Qn(),CR(i)},useTransition:function(){return Ae="useTransition",Qn(),kR()},useMutableSource:function(i,o,f){return Ae="useMutableSource",Qn(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",Qn(),fR(i,o,f)},useId:function(){return Ae="useId",Qn(),TR()},unstable_isNewReconciler:He},FF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",nt(),bR(i,o)},useContext:function(i){return Ae="useContext",nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",nt(),Fk(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",nt(),yR(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",nt(),gR(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",nt(),vR(i,o)},useMemo:function(i,o){Ae="useMemo",nt();var f=gt.current;gt.current=tu;try{return SR(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",nt();var m=gt.current;gt.current=tu;try{return uR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",nt(),mR(i)},useState:function(i){Ae="useState",nt();var o=gt.current;gt.current=tu;try{return Nk(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",nt(),void 0},useDeferredValue:function(i){return Ae="useDeferredValue",nt(),CR(i)},useTransition:function(){return Ae="useTransition",nt(),kR()},useMutableSource:function(i,o,f){return Ae="useMutableSource",nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",nt(),fR(i,o,f)},useId:function(){return Ae="useId",nt(),TR()},unstable_isNewReconciler:He},jF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",nt();var f=gt.current;gt.current=tl;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",nt();var m=gt.current;gt.current=tl;try{return cR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",nt(),Ik()},useState:function(i){Ae="useState",nt();var o=gt.current;gt.current=tl;try{return hR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",nt(),EF(i)},useTransition:function(){return Ae="useTransition",nt(),DF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",nt(),Lk(i,o)},useId:function(){return Ae="useId",nt(),qk()},unstable_isNewReconciler:He},VF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",nt();var f=gt.current;gt.current=Gk;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",nt();var m=gt.current;gt.current=Gk;try{return dR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",nt(),Ik()},useState:function(i){Ae="useState",nt();var o=gt.current;gt.current=Gk;try{return pR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",nt(),RF(i)},useTransition:function(){return Ae="useTransition",nt(),AF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",nt(),Lk(i,o)},useId:function(){return Ae="useId",nt(),qk()},unstable_isNewReconciler:He},tu={readContext:function(i){return xR(),Ti(i)},useCallback:function(i,o){return Ae="useCallback",en(),Qn(),bR(i,o)},useContext:function(i){return Ae="useContext",en(),Qn(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",en(),Qn(),Fk(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",en(),Qn(),yR(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",en(),Qn(),gR(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",en(),Qn(),vR(i,o)},useMemo:function(i,o){Ae="useMemo",en(),Qn();var f=gt.current;gt.current=tu;try{return SR(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",en(),Qn();var m=gt.current;gt.current=tu;try{return uR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",en(),Qn(),mR(i)},useState:function(i){Ae="useState",en(),Qn();var o=gt.current;gt.current=tu;try{return Nk(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",en(),Qn(),void 0},useDeferredValue:function(i){return Ae="useDeferredValue",en(),Qn(),CR(i)},useTransition:function(){return Ae="useTransition",en(),Qn(),kR()},useMutableSource:function(i,o,f){return Ae="useMutableSource",en(),Qn(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",en(),Qn(),fR(i,o,f)},useId:function(){return Ae="useId",en(),Qn(),TR()},unstable_isNewReconciler:He},tl={readContext:function(i){return xR(),Ti(i)},useCallback:function(i,o){return Ae="useCallback",en(),nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",en(),nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",en(),nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",en(),nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",en(),nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",en(),nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",en(),nt();var f=gt.current;gt.current=tl;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",en(),nt();var m=gt.current;gt.current=tl;try{return cR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",en(),nt(),Ik()},useState:function(i){Ae="useState",en(),nt();var o=gt.current;gt.current=tl;try{return hR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",en(),nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",en(),nt(),EF(i)},useTransition:function(){return Ae="useTransition",en(),nt(),DF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",en(),nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",en(),nt(),Lk(i,o)},useId:function(){return Ae="useId",en(),nt(),qk()},unstable_isNewReconciler:He},Gk={readContext:function(i){return xR(),Ti(i)},useCallback:function(i,o){return Ae="useCallback",en(),nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",en(),nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",en(),nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",en(),nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",en(),nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",en(),nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",en(),nt();var f=gt.current;gt.current=tl;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",en(),nt();var m=gt.current;gt.current=tl;try{return dR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",en(),nt(),Ik()},useState:function(i){Ae="useState",en(),nt();var o=gt.current;gt.current=tl;try{return pR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",en(),nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",en(),nt(),RF(i)},useTransition:function(){return Ae="useTransition",en(),nt(),AF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",en(),nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",en(),nt(),Lk(i,o)},useId:function(){return Ae="useId",en(),nt(),qk()},unstable_isNewReconciler:He}}var jd=n.unstable_now,zF=0,Yk=-1,c0=-1,Kk=-1,wR=!1,Zk=!1;function BF(){return wR}function _ie(){Zk=!0}function Eie(){wR=!1,Zk=!1}function Rie(){wR=Zk,Zk=!1}function HF(){return zF}function $F(){zF=jd()}function _R(i){c0=jd(),i.actualStartTime<0&&(i.actualStartTime=jd())}function qF(i){c0=-1}function Qk(i,o){if(c0>=0){var f=jd()-c0;i.actualDuration+=f,o&&(i.selfBaseDuration=f),c0=-1}}function nu(i){if(Yk>=0){var o=jd()-Yk;Yk=-1;for(var f=i.return;f!==null;){switch(f.tag){case k:var m=f.stateNode;m.effectDuration+=o;return;case I:var y=f.stateNode;y.effectDuration+=o;return}f=f.return}}}function ER(i){if(Kk>=0){var o=jd()-Kk;Kk=-1;for(var f=i.return;f!==null;){switch(f.tag){case k:var m=f.stateNode;m!==null&&(m.passiveEffectDuration+=o);return;case I:var y=f.stateNode;y!==null&&(y.passiveEffectDuration+=o);return}f=f.return}}}function ru(){Yk=jd()}function RR(){Kk=jd()}function PR(i){for(var o=i.child;o;)i.actualDuration+=o.actualDuration,o=o.sibling}function nl(i,o){if(i&&i.defaultProps){var f=rn({},o),m=i.defaultProps;for(var y in m)f[y]===void 0&&(f[y]=m[y]);return f}return o}var DR={},AR,OR,MR,LR,NR,WF,Xk,IR,UR,FR,d0;{AR=new Set,OR=new Set,MR=new Set,LR=new Set,IR=new Set,NR=new Set,UR=new Set,FR=new Set,d0=new Set;var GF=new Set;Xk=function(i,o){if(!(i===null||typeof i=="function")){var f=o+"_"+i;GF.has(f)||(GF.add(f),c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",o,i))}},WF=function(i,o){if(o===void 0){var f=On(i)||"Component";NR.has(f)||(NR.add(f),c("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",f))}},Object.defineProperty(DR,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(DR)}function jR(i,o,f,m){var y=i.memoizedState,C=f(m,y);{if(i.mode&an){nr(!0);try{C=f(m,y)}finally{nr(!1)}}WF(o,C)}var w=C==null?y:rn({},y,C);if(i.memoizedState=w,i.lanes===Pe){var P=i.updateQueue;P.baseState=w}}var VR={isMounted:Kv,enqueueSetState:function(i,o,f){var m=ld(i),y=Za(),C=Hd(m),w=ac(y,C);w.payload=o,f!=null&&(Xk(f,"setState"),w.callback=f);var P=Nd(m,w,C);P!==null&&(Vi(P,m,C,y),Ek(P,m,C)),$f(m,C)},enqueueReplaceState:function(i,o,f){var m=ld(i),y=Za(),C=Hd(m),w=ac(y,C);w.tag=cF,w.payload=o,f!=null&&(Xk(f,"replaceState"),w.callback=f);var P=Nd(m,w,C);P!==null&&(Vi(P,m,C,y),Ek(P,m,C)),$f(m,C)},enqueueForceUpdate:function(i,o){var f=ld(i),m=Za(),y=Hd(f),C=ac(m,y);C.tag=xk,o!=null&&(Xk(o,"forceUpdate"),C.callback=o);var w=Nd(f,C,y);w!==null&&(Vi(w,f,y,m),Ek(w,f,y)),uy(f,y)}};function YF(i,o,f,m,y,C,w){var P=i.stateNode;if(typeof P.shouldComponentUpdate=="function"){var D=P.shouldComponentUpdate(m,C,w);{if(i.mode&an){nr(!0);try{D=P.shouldComponentUpdate(m,C,w)}finally{nr(!1)}}D===void 0&&c("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",On(o)||"Component")}return D}return o.prototype&&o.prototype.isPureReactComponent?!Ut(f,m)||!Ut(y,C):!0}function Pie(i,o,f){var m=i.stateNode;{var y=On(o)||"Component",C=m.render;C||(o.prototype&&typeof o.prototype.render=="function"?c("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",y):c("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",y)),m.getInitialState&&!m.getInitialState.isReactClassApproved&&!m.state&&c("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",y),m.getDefaultProps&&!m.getDefaultProps.isReactClassApproved&&c("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",y),m.propTypes&&c("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",y),m.contextType&&c("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",y),o.childContextTypes&&!d0.has(o)&&(i.mode&an)===Mt&&(d0.add(o),c(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
180
|
+
Incoming: %s`,Ae,"["+o.join(", ")+"]","["+i.join(", ")+"]");for(var f=0;f<o.length&&f<i.length;f++)if(!dt(i[f],o[f]))return!1;return!0}function rg(i,o,f,m,y,C){wh=C,dr=o,vs=i!==null?i._debugHookTypes:null,Fd=-1,oR=i!==null&&i.type!==o.type,o.memoizedState=null,o.updateQueue=null,o.lanes=Pe,i!==null&&i.memoizedState!==null?gt.current=jF:vs!==null?gt.current=FF:gt.current=UF;var w=f(m,y);if(a0){var P=0;do{if(a0=!1,o0=0,P>=bie)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");P+=1,oR=!1,Ni=null,Ii=null,o.updateQueue=null,Fd=-1,gt.current=VF,w=f(m,y)}while(a0)}gt.current=Wk,o._debugHookTypes=vs;var D=Ni!==null&&Ni.next!==null;if(wh=Pe,dr=null,Ni=null,Ii=null,Ae=null,vs=null,Fd=-1,i!==null&&(i.flags&ri)!==(o.flags&ri)&&(i.mode&vn)!==Mt&&c("Internal React error: Expected static flag was missing. Please notify the React team."),Mk=!1,D)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return w}function ig(){var i=o0!==0;return o0=0,i}function yF(i,o,f){o.updateQueue=i.updateQueue,(o.mode&cr)!==Mt?o.flags&=-50333701:o.flags&=-2053,i.lanes=Jf(i.lanes,f)}function bF(){if(gt.current=Wk,Mk){for(var i=dr.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Mk=!1}wh=Pe,dr=null,Ni=null,Ii=null,vs=null,Fd=-1,Ae=null,OF=!1,a0=!1,o0=0}function eu(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ii===null?dr.memoizedState=Ii=i:Ii=Ii.next=i,Ii}function ys(){var i;if(Ni===null){var o=dr.alternate;o!==null?i=o.memoizedState:i=null}else i=Ni.next;var f;if(Ii===null?f=dr.memoizedState:f=Ii.next,f!==null)Ii=f,f=Ii.next,Ni=i;else{if(i===null)throw new Error("Rendered more hooks than during the previous render.");Ni=i;var m={memoizedState:Ni.memoizedState,baseState:Ni.baseState,baseQueue:Ni.baseQueue,queue:Ni.queue,next:null};Ii===null?dr.memoizedState=Ii=m:Ii=Ii.next=m}return Ii}function SF(){return{lastEffect:null,stores:null}}function lR(i,o){return typeof o=="function"?o(i):o}function uR(i,o,f){var m=eu(),y;f!==void 0?y=f(o):y=o,m.memoizedState=m.baseState=y;var C={pending:null,interleaved:null,lanes:Pe,dispatch:null,lastRenderedReducer:i,lastRenderedState:y};m.queue=C;var w=C.dispatch=xie.bind(null,dr,C);return[m.memoizedState,w]}function cR(i,o,f){var m=ys(),y=m.queue;if(y===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");y.lastRenderedReducer=i;var C=Ni,w=C.baseQueue,P=y.pending;if(P!==null){if(w!==null){var D=w.next,F=P.next;w.next=F,P.next=D}C.baseQueue!==w&&c("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),C.baseQueue=w=P,y.pending=null}if(w!==null){var B=w.next,ae=C.baseState,re=null,ge=null,be=null,we=B;do{var st=we.lane;if(Hu(wh,st)){if(be!==null){var Pt={lane:ii,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null};be=be.next=Pt}if(we.hasEagerState)ae=we.eagerState;else{var Ln=we.action;ae=i(ae,Ln)}}else{var Vt={lane:st,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null};be===null?(ge=be=Vt,re=ae):be=be.next=Vt,dr.lanes=sn(dr.lanes,st),E0(st)}we=we.next}while(we!==null&&we!==B);be===null?re=ae:be.next=ge,dt(ae,m.memoizedState)||m0(),m.memoizedState=ae,m.baseState=re,m.baseQueue=be,y.lastRenderedState=ae}var wn=y.interleaved;if(wn!==null){var ce=wn;do{var _e=ce.lane;dr.lanes=sn(dr.lanes,_e),E0(_e),ce=ce.next}while(ce!==wn)}else w===null&&(y.lanes=Pe);var de=y.dispatch;return[m.memoizedState,de]}function dR(i,o,f){var m=ys(),y=m.queue;if(y===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");y.lastRenderedReducer=i;var C=y.dispatch,w=y.pending,P=m.memoizedState;if(w!==null){y.pending=null;var D=w.next,F=D;do{var B=F.action;P=i(P,B),F=F.next}while(F!==D);dt(P,m.memoizedState)||m0(),m.memoizedState=P,m.baseQueue===null&&(m.baseState=P),y.lastRenderedState=P}return[P,C]}function tle(i,o,f){}function nle(i,o,f){}function fR(i,o,f){var m=dr,y=eu(),C,w=la();if(w){if(f===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");C=f(),tg||C!==f()&&(c("The result of getServerSnapshot should be cached to avoid an infinite loop"),tg=!0)}else{if(C=o(),!tg){var P=o();dt(C,P)||(c("The result of getSnapshot should be cached to avoid an infinite loop"),tg=!0)}var D=d1();if(D===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Xf(D,wh)||CF(m,o,C)}y.memoizedState=C;var F={value:C,getSnapshot:o};return y.queue=F,Fk(TF.bind(null,m,F,i),[i]),m.flags|=Ba,s0(Mi|ua,kF.bind(null,m,F,C,o),void 0,null),C}function Lk(i,o,f){var m=dr,y=ys(),C=o();if(!tg){var w=o();dt(C,w)||(c("The result of getSnapshot should be cached to avoid an infinite loop"),tg=!0)}var P=y.memoizedState,D=!dt(P,C);D&&(y.memoizedState=C,m0());var F=y.queue;if(u0(TF.bind(null,m,F,i),[i]),F.getSnapshot!==o||D||Ii!==null&&Ii.memoizedState.tag&Mi){m.flags|=Ba,s0(Mi|ua,kF.bind(null,m,F,C,o),void 0,null);var B=d1();if(B===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Xf(B,wh)||CF(m,o,C)}return C}function CF(i,o,f){i.flags|=$p;var m={getSnapshot:o,value:f},y=dr.updateQueue;if(y===null)y=SF(),dr.updateQueue=y,y.stores=[m];else{var C=y.stores;C===null?y.stores=[m]:C.push(m)}}function kF(i,o,f,m){o.value=f,o.getSnapshot=m,xF(o)&&wF(i)}function TF(i,o,f){var m=function(){xF(o)&&wF(i)};return f(m)}function xF(i){var o=i.getSnapshot,f=i.value;try{var m=o();return!dt(f,m)}catch{return!0}}function wF(i){var o=wo(i,$t);o!==null&&Vi(o,i,$t,rr)}function Nk(i){var o=eu();typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i;var f={pending:null,interleaved:null,lanes:Pe,dispatch:null,lastRenderedReducer:lR,lastRenderedState:i};o.queue=f;var m=f.dispatch=wie.bind(null,dr,f);return[o.memoizedState,m]}function hR(i){return cR(lR)}function pR(i){return dR(lR)}function s0(i,o,f,m){var y={tag:i,create:o,destroy:f,deps:m,next:null},C=dr.updateQueue;if(C===null)C=SF(),dr.updateQueue=C,C.lastEffect=y.next=y;else{var w=C.lastEffect;if(w===null)C.lastEffect=y.next=y;else{var P=w.next;w.next=y,y.next=P,C.lastEffect=y}}return y}function mR(i){var o=eu();{var f={current:i};return o.memoizedState=f,f}}function Ik(i){var o=ys();return o.memoizedState}function l0(i,o,f,m){var y=eu(),C=m===void 0?null:m;dr.flags|=i,y.memoizedState=s0(Mi|o,f,void 0,C)}function Uk(i,o,f,m){var y=ys(),C=m===void 0?null:m,w=void 0;if(Ni!==null){var P=Ni.memoizedState;if(w=P.destroy,C!==null){var D=P.deps;if(sR(C,D)){y.memoizedState=s0(o,f,w,C);return}}}dr.flags|=i,y.memoizedState=s0(Mi|o,f,w,C)}function Fk(i,o){return(dr.mode&cr)!==Mt?l0(Ml|Ba|Yv,ua,i,o):l0(Ba|Yv,ua,i,o)}function u0(i,o){return Uk(Ba,ua,i,o)}function gR(i,o){return l0(Tn,Jl,i,o)}function jk(i,o){return Uk(Tn,Jl,i,o)}function vR(i,o){var f=Tn;return f|=Ol,(dr.mode&cr)!==Mt&&(f|=ia),l0(f,Li,i,o)}function Vk(i,o){return Uk(Tn,Li,i,o)}function _F(i,o){if(typeof o=="function"){var f=o,m=i();return f(m),function(){f(null)}}else if(o!=null){var y=o;y.hasOwnProperty("current")||c("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(y).join(", ")+"}");var C=i();return y.current=C,function(){y.current=null}}}function yR(i,o,f){typeof o!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null");var m=f!=null?f.concat([i]):null,y=Tn;return y|=Ol,(dr.mode&cr)!==Mt&&(y|=ia),l0(y,Li,_F.bind(null,o,i),m)}function zk(i,o,f){typeof o!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null");var m=f!=null?f.concat([i]):null;return Uk(Tn,Li,_F.bind(null,o,i),m)}function Cie(i,o){}var Bk=Cie;function bR(i,o){var f=eu(),m=o===void 0?null:o;return f.memoizedState=[i,m],i}function Hk(i,o){var f=ys(),m=o===void 0?null:o,y=f.memoizedState;if(y!==null&&m!==null){var C=y[1];if(sR(m,C))return y[0]}return f.memoizedState=[i,m],i}function SR(i,o){var f=eu(),m=o===void 0?null:o,y=i();return f.memoizedState=[y,m],y}function $k(i,o){var f=ys(),m=o===void 0?null:o,y=f.memoizedState;if(y!==null&&m!==null){var C=y[1];if(sR(m,C))return y[0]}var w=i();return f.memoizedState=[w,m],w}function CR(i){var o=eu();return o.memoizedState=i,i}function EF(i){var o=ys(),f=Ni,m=f.memoizedState;return PF(o,m,i)}function RF(i){var o=ys();if(Ni===null)return o.memoizedState=i,i;var f=Ni.memoizedState;return PF(o,f,i)}function PF(i,o,f){var m=!hy(wh);if(m){if(!dt(f,o)){var y=my();dr.lanes=sn(dr.lanes,y),E0(y),i.baseState=!0}return o}else return i.baseState&&(i.baseState=!1,m0()),i.memoizedState=f,f}function kie(i,o,f){var m=$a();fi(th(m,So)),i(!0);var y=i0.transition;i0.transition={};var C=i0.transition;i0.transition._updatedFibers=new Set;try{i(!1),o()}finally{if(fi(m),i0.transition=y,y===null&&C._updatedFibers){var w=C._updatedFibers.size;w>10&&l("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),C._updatedFibers.clear()}}}function kR(){var i=Nk(!1),o=i[0],f=i[1],m=kie.bind(null,f),y=eu();return y.memoizedState=m,[o,m]}function DF(){var i=hR(),o=i[0],f=ys(),m=f.memoizedState;return[o,m]}function AF(){var i=pR(),o=i[0],f=ys(),m=f.memoizedState;return[o,m]}var OF=!1;function Tie(){return OF}function TR(){var i=eu(),o=d1(),f=o.identifierPrefix,m;if(la()){var y=Vre();m=":"+f+"R"+y;var C=o0++;C>0&&(m+="H"+C.toString(32)),m+=":"}else{var w=yie++;m=":"+f+"r"+w.toString(32)+":"}return i.memoizedState=m,m}function qk(){var i=ys(),o=i.memoizedState;return o}function xie(i,o,f){typeof arguments[3]=="function"&&c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var m=Hd(i),y={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null};if(MF(i))LF(o,y);else{var C=lF(i,o,y,m);if(C!==null){var w=Za();Vi(C,i,m,w),NF(C,o,m)}}IF(i,m)}function wie(i,o,f){typeof arguments[3]=="function"&&c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var m=Hd(i),y={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null};if(MF(i))LF(o,y);else{var C=i.alternate;if(i.lanes===Pe&&(C===null||C.lanes===Pe)){var w=o.lastRenderedReducer;if(w!==null){var P;P=gt.current,gt.current=tl;try{var D=o.lastRenderedState,F=w(D,f);if(y.hasEagerState=!0,y.eagerState=F,dt(F,D)){uie(i,o,y,m);return}}catch{}finally{gt.current=P}}}var B=lF(i,o,y,m);if(B!==null){var ae=Za();Vi(B,i,m,ae),NF(B,o,m)}}IF(i,m)}function MF(i){var o=i.alternate;return i===dr||o!==null&&o===dr}function LF(i,o){a0=Mk=!0;var f=i.pending;f===null?o.next=o:(o.next=f.next,f.next=o),i.pending=o}function NF(i,o,f){if(py(f)){var m=o.lanes;m=gm(m,i.pendingLanes);var y=sn(m,f);o.lanes=y,eh(i,y)}}function IF(i,o,f){$f(i,o)}var Wk={readContext:Ti,useCallback:Ia,useContext:Ia,useEffect:Ia,useImperativeHandle:Ia,useInsertionEffect:Ia,useLayoutEffect:Ia,useMemo:Ia,useReducer:Ia,useRef:Ia,useState:Ia,useDebugValue:Ia,useDeferredValue:Ia,useTransition:Ia,useMutableSource:Ia,useSyncExternalStore:Ia,useId:Ia,unstable_isNewReconciler:He},UF=null,FF=null,jF=null,VF=null,tu=null,tl=null,Gk=null;{var xR=function(){c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},en=function(){c("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};UF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",Qn(),ng(o),bR(i,o)},useContext:function(i){return Ae="useContext",Qn(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",Qn(),ng(o),Fk(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",Qn(),ng(f),yR(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",Qn(),ng(o),gR(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",Qn(),ng(o),vR(i,o)},useMemo:function(i,o){Ae="useMemo",Qn(),ng(o);var f=gt.current;gt.current=tu;try{return SR(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",Qn();var m=gt.current;gt.current=tu;try{return uR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",Qn(),mR(i)},useState:function(i){Ae="useState",Qn();var o=gt.current;gt.current=tu;try{return Nk(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",Qn(),void 0},useDeferredValue:function(i){return Ae="useDeferredValue",Qn(),CR(i)},useTransition:function(){return Ae="useTransition",Qn(),kR()},useMutableSource:function(i,o,f){return Ae="useMutableSource",Qn(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",Qn(),fR(i,o,f)},useId:function(){return Ae="useId",Qn(),TR()},unstable_isNewReconciler:He},FF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",nt(),bR(i,o)},useContext:function(i){return Ae="useContext",nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",nt(),Fk(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",nt(),yR(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",nt(),gR(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",nt(),vR(i,o)},useMemo:function(i,o){Ae="useMemo",nt();var f=gt.current;gt.current=tu;try{return SR(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",nt();var m=gt.current;gt.current=tu;try{return uR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",nt(),mR(i)},useState:function(i){Ae="useState",nt();var o=gt.current;gt.current=tu;try{return Nk(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",nt(),void 0},useDeferredValue:function(i){return Ae="useDeferredValue",nt(),CR(i)},useTransition:function(){return Ae="useTransition",nt(),kR()},useMutableSource:function(i,o,f){return Ae="useMutableSource",nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",nt(),fR(i,o,f)},useId:function(){return Ae="useId",nt(),TR()},unstable_isNewReconciler:He},jF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",nt();var f=gt.current;gt.current=tl;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",nt();var m=gt.current;gt.current=tl;try{return cR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",nt(),Ik()},useState:function(i){Ae="useState",nt();var o=gt.current;gt.current=tl;try{return hR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",nt(),EF(i)},useTransition:function(){return Ae="useTransition",nt(),DF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",nt(),Lk(i,o)},useId:function(){return Ae="useId",nt(),qk()},unstable_isNewReconciler:He},VF={readContext:function(i){return Ti(i)},useCallback:function(i,o){return Ae="useCallback",nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",nt();var f=gt.current;gt.current=Gk;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",nt();var m=gt.current;gt.current=Gk;try{return dR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",nt(),Ik()},useState:function(i){Ae="useState",nt();var o=gt.current;gt.current=Gk;try{return pR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",nt(),RF(i)},useTransition:function(){return Ae="useTransition",nt(),AF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",nt(),Lk(i,o)},useId:function(){return Ae="useId",nt(),qk()},unstable_isNewReconciler:He},tu={readContext:function(i){return xR(),Ti(i)},useCallback:function(i,o){return Ae="useCallback",en(),Qn(),bR(i,o)},useContext:function(i){return Ae="useContext",en(),Qn(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",en(),Qn(),Fk(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",en(),Qn(),yR(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",en(),Qn(),gR(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",en(),Qn(),vR(i,o)},useMemo:function(i,o){Ae="useMemo",en(),Qn();var f=gt.current;gt.current=tu;try{return SR(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",en(),Qn();var m=gt.current;gt.current=tu;try{return uR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",en(),Qn(),mR(i)},useState:function(i){Ae="useState",en(),Qn();var o=gt.current;gt.current=tu;try{return Nk(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",en(),Qn(),void 0},useDeferredValue:function(i){return Ae="useDeferredValue",en(),Qn(),CR(i)},useTransition:function(){return Ae="useTransition",en(),Qn(),kR()},useMutableSource:function(i,o,f){return Ae="useMutableSource",en(),Qn(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",en(),Qn(),fR(i,o,f)},useId:function(){return Ae="useId",en(),Qn(),TR()},unstable_isNewReconciler:He},tl={readContext:function(i){return xR(),Ti(i)},useCallback:function(i,o){return Ae="useCallback",en(),nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",en(),nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",en(),nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",en(),nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",en(),nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",en(),nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",en(),nt();var f=gt.current;gt.current=tl;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",en(),nt();var m=gt.current;gt.current=tl;try{return cR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",en(),nt(),Ik()},useState:function(i){Ae="useState",en(),nt();var o=gt.current;gt.current=tl;try{return hR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",en(),nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",en(),nt(),EF(i)},useTransition:function(){return Ae="useTransition",en(),nt(),DF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",en(),nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",en(),nt(),Lk(i,o)},useId:function(){return Ae="useId",en(),nt(),qk()},unstable_isNewReconciler:He},Gk={readContext:function(i){return xR(),Ti(i)},useCallback:function(i,o){return Ae="useCallback",en(),nt(),Hk(i,o)},useContext:function(i){return Ae="useContext",en(),nt(),Ti(i)},useEffect:function(i,o){return Ae="useEffect",en(),nt(),u0(i,o)},useImperativeHandle:function(i,o,f){return Ae="useImperativeHandle",en(),nt(),zk(i,o,f)},useInsertionEffect:function(i,o){return Ae="useInsertionEffect",en(),nt(),jk(i,o)},useLayoutEffect:function(i,o){return Ae="useLayoutEffect",en(),nt(),Vk(i,o)},useMemo:function(i,o){Ae="useMemo",en(),nt();var f=gt.current;gt.current=tl;try{return $k(i,o)}finally{gt.current=f}},useReducer:function(i,o,f){Ae="useReducer",en(),nt();var m=gt.current;gt.current=tl;try{return dR(i,o,f)}finally{gt.current=m}},useRef:function(i){return Ae="useRef",en(),nt(),Ik()},useState:function(i){Ae="useState",en(),nt();var o=gt.current;gt.current=tl;try{return pR(i)}finally{gt.current=o}},useDebugValue:function(i,o){return Ae="useDebugValue",en(),nt(),Bk()},useDeferredValue:function(i){return Ae="useDeferredValue",en(),nt(),RF(i)},useTransition:function(){return Ae="useTransition",en(),nt(),AF()},useMutableSource:function(i,o,f){return Ae="useMutableSource",en(),nt(),void 0},useSyncExternalStore:function(i,o,f){return Ae="useSyncExternalStore",en(),nt(),Lk(i,o)},useId:function(){return Ae="useId",en(),nt(),qk()},unstable_isNewReconciler:He}}var jd=n.unstable_now,zF=0,Yk=-1,c0=-1,Kk=-1,wR=!1,Zk=!1;function BF(){return wR}function _ie(){Zk=!0}function Eie(){wR=!1,Zk=!1}function Rie(){wR=Zk,Zk=!1}function HF(){return zF}function $F(){zF=jd()}function _R(i){c0=jd(),i.actualStartTime<0&&(i.actualStartTime=jd())}function qF(i){c0=-1}function Qk(i,o){if(c0>=0){var f=jd()-c0;i.actualDuration+=f,o&&(i.selfBaseDuration=f),c0=-1}}function nu(i){if(Yk>=0){var o=jd()-Yk;Yk=-1;for(var f=i.return;f!==null;){switch(f.tag){case k:var m=f.stateNode;m.effectDuration+=o;return;case I:var y=f.stateNode;y.effectDuration+=o;return}f=f.return}}}function ER(i){if(Kk>=0){var o=jd()-Kk;Kk=-1;for(var f=i.return;f!==null;){switch(f.tag){case k:var m=f.stateNode;m!==null&&(m.passiveEffectDuration+=o);return;case I:var y=f.stateNode;y!==null&&(y.passiveEffectDuration+=o);return}f=f.return}}}function ru(){Yk=jd()}function RR(){Kk=jd()}function PR(i){for(var o=i.child;o;)i.actualDuration+=o.actualDuration,o=o.sibling}function nl(i,o){if(i&&i.defaultProps){var f=rn({},o),m=i.defaultProps;for(var y in m)f[y]===void 0&&(f[y]=m[y]);return f}return o}var DR={},AR,OR,MR,LR,NR,WF,Xk,IR,UR,FR,d0;{AR=new Set,OR=new Set,MR=new Set,LR=new Set,IR=new Set,NR=new Set,UR=new Set,FR=new Set,d0=new Set;var GF=new Set;Xk=function(i,o){if(!(i===null||typeof i=="function")){var f=o+"_"+i;GF.has(f)||(GF.add(f),c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",o,i))}},WF=function(i,o){if(o===void 0){var f=On(i)||"Component";NR.has(f)||(NR.add(f),c("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",f))}},Object.defineProperty(DR,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(DR)}function jR(i,o,f,m){var y=i.memoizedState,C=f(m,y);{if(i.mode&an){nr(!0);try{C=f(m,y)}finally{nr(!1)}}WF(o,C)}var w=C==null?y:rn({},y,C);if(i.memoizedState=w,i.lanes===Pe){var P=i.updateQueue;P.baseState=w}}var VR={isMounted:Kv,enqueueSetState:function(i,o,f){var m=ld(i),y=Za(),C=Hd(m),w=ac(y,C);w.payload=o,f!=null&&(Xk(f,"setState"),w.callback=f);var P=Nd(m,w,C);P!==null&&(Vi(P,m,C,y),Ek(P,m,C)),$f(m,C)},enqueueReplaceState:function(i,o,f){var m=ld(i),y=Za(),C=Hd(m),w=ac(y,C);w.tag=cF,w.payload=o,f!=null&&(Xk(f,"replaceState"),w.callback=f);var P=Nd(m,w,C);P!==null&&(Vi(P,m,C,y),Ek(P,m,C)),$f(m,C)},enqueueForceUpdate:function(i,o){var f=ld(i),m=Za(),y=Hd(f),C=ac(m,y);C.tag=xk,o!=null&&(Xk(o,"forceUpdate"),C.callback=o);var w=Nd(f,C,y);w!==null&&(Vi(w,f,y,m),Ek(w,f,y)),uy(f,y)}};function YF(i,o,f,m,y,C,w){var P=i.stateNode;if(typeof P.shouldComponentUpdate=="function"){var D=P.shouldComponentUpdate(m,C,w);{if(i.mode&an){nr(!0);try{D=P.shouldComponentUpdate(m,C,w)}finally{nr(!1)}}D===void 0&&c("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",On(o)||"Component")}return D}return o.prototype&&o.prototype.isPureReactComponent?!Ut(f,m)||!Ut(y,C):!0}function Pie(i,o,f){var m=i.stateNode;{var y=On(o)||"Component",C=m.render;C||(o.prototype&&typeof o.prototype.render=="function"?c("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",y):c("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",y)),m.getInitialState&&!m.getInitialState.isReactClassApproved&&!m.state&&c("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",y),m.getDefaultProps&&!m.getDefaultProps.isReactClassApproved&&c("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",y),m.propTypes&&c("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",y),m.contextType&&c("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",y),o.childContextTypes&&!d0.has(o)&&(i.mode&an)===Mt&&(d0.add(o),c(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
181
181
|
|
|
182
182
|
.Learn more about this warning here: https://reactjs.org/link/legacy-context`,y)),o.contextTypes&&!d0.has(o)&&(i.mode&an)===Mt&&(d0.add(o),c(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
|
|
183
183
|
|
|
@@ -422,5 +422,5 @@ a=extmap-allow-mixed`)!==-1){const s=a.sdp.split(`
|
|
|
422
422
|
`))+1))}const l="#".repeat(a),c=n.enter("headingAtx"),h=n.enter("phrasing");s.move(l+" ");let p=n.containerPhrasing(t,{before:"# ",after:`
|
|
423
423
|
`,...s.current()});return/^[\t ]/.test(p)&&(p=Dv(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),h(),c(),p}V5.peek=yee;function V5(t){return t.value||""}function yee(){return"<"}z5.peek=bee;function z5(t,e,n,r){const a=T_(n),s=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const h=n.createTracker(r);let p=h.move("![");return p+=h.move(n.safe(t.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),c(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(c=n.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(n.safe(t.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(c=n.enter("destinationRaw"),p+=h.move(n.safe(t.url,{before:p,after:t.title?" ":")",...h.current()}))),c(),t.title&&(c=n.enter(`title${s}`),p+=h.move(" "+a),p+=h.move(n.safe(t.title,{before:p,after:a,...h.current()})),p+=h.move(a),c()),p+=h.move(")"),l(),p}function bee(){return"!"}B5.peek=See;function B5(t,e,n,r){const a=t.referenceType,s=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let h=c.move("![");const p=n.safe(t.alt,{before:h,after:"]",...c.current()});h+=c.move(p+"]["),l();const v=n.stack;n.stack=[],l=n.enter("reference");const b=n.safe(n.associationId(t),{before:h,after:"]",...c.current()});return l(),n.stack=v,s(),a==="full"||!p||p!==b?h+=c.move(b+"]"):a==="shortcut"?h=h.slice(0,-1):h+=c.move("]"),h}function See(){return"!"}H5.peek=Cee;function H5(t,e,n){let r=t.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const l=n.unsafe[s],c=n.compilePattern(l);let h;if(l.atBreak)for(;h=c.exec(r);){let p=h.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(h.index+1)}}return a+r+a}function Cee(){return"`"}function $5(t,e){const n=Zw(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}q5.peek=kee;function q5(t,e,n,r){const a=T_(n),s=a==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,h;if($5(t,n)){const v=n.stack;n.stack=[],c=n.enter("autolink");let b=l.move("<");return b+=l.move(n.containerPhrasing(t,{before:b,after:">",...l.current()})),b+=l.move(">"),c(),n.stack=v,b}c=n.enter("link"),h=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(t,{before:p,after:"](",...l.current()})),p+=l.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(t.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(h=n.enter("destinationRaw"),p+=l.move(n.safe(t.url,{before:p,after:t.title?" ":")",...l.current()}))),h(),t.title&&(h=n.enter(`title${s}`),p+=l.move(" "+a),p+=l.move(n.safe(t.title,{before:p,after:a,...l.current()})),p+=l.move(a),h()),p+=l.move(")"),c(),p}function kee(t,e,n){return $5(t,n)?"<":"["}W5.peek=Tee;function W5(t,e,n,r){const a=t.referenceType,s=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let h=c.move("[");const p=n.containerPhrasing(t,{before:h,after:"]",...c.current()});h+=c.move(p+"]["),l();const v=n.stack;n.stack=[],l=n.enter("reference");const b=n.safe(n.associationId(t),{before:h,after:"]",...c.current()});return l(),n.stack=v,s(),a==="full"||!p||p!==b?h+=c.move(b+"]"):a==="shortcut"?h=h.slice(0,-1):h+=c.move("]"),h}function Tee(){return"["}function x_(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function xee(t){const e=x_(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function wee(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function G5(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function _ee(t,e,n,r){const a=n.enter("list"),s=n.bulletCurrent;let l=t.ordered?wee(n):x_(n);const c=t.ordered?l==="."?")":".":xee(n);let h=e&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!t.ordered){const v=t.children?t.children[0]:void 0;if((l==="*"||l==="-")&&v&&(!v.children||!v.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&&(h=!0),G5(n)===l&&v){let b=-1;for(;++b<t.children.length;){const k=t.children[b];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(l=c),n.bulletCurrent=l;const p=n.containerFlow(t,r);return n.bulletLastUsed=l,n.bulletCurrent=s,a(),p}function Eee(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function Ree(t,e,n,r){const a=Eee(n);let s=n.bulletCurrent||x_(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let l=s.length+1;(a==="tab"||a==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(l-s.length)),c.shift(l);const h=n.enter("listItem"),p=n.indentLines(n.containerFlow(t,c.current()),v);return h(),p;function v(b,k,T){return k?(T?"":" ".repeat(l))+b:(T?s:s+" ".repeat(l-s.length))+b}}function Pee(t,e,n,r){const a=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(t,r);return s(),a(),l}const Dee=kS(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Aee(t,e,n,r){return(t.children.some(function(l){return Dee(l)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function Oee(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Y5.peek=Mee;function Y5(t,e,n,r){const a=Oee(n),s=n.enter("strong"),l=n.createTracker(r),c=l.move(a+a);let h=l.move(n.containerPhrasing(t,{after:a,before:c,...l.current()}));const p=h.charCodeAt(0),v=_S(r.before.charCodeAt(r.before.length-1),p,a);v.inside&&(h=Dv(p)+h.slice(1));const b=h.charCodeAt(h.length-1),k=_S(r.after.charCodeAt(0),b,a);k.inside&&(h=h.slice(0,-1)+Dv(b));const T=l.move(a+a);return s(),n.attentionEncodeSurroundingInfo={after:k.outside,before:v.outside},c+h+T}function Mee(t,e,n){return n.options.strong||"*"}function Lee(t,e,n,r){return n.safe(t.value,r)}function Nee(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Iee(t,e,n){const r=(G5(n)+(n.options.ruleSpaces?" ":"")).repeat(Nee(n));return n.options.ruleSpaces?r.slice(0,-1):r}const K5={blockquote:aee,break:F5,code:dee,definition:hee,emphasis:j5,hardBreak:F5,heading:vee,html:V5,image:z5,imageReference:B5,inlineCode:H5,link:q5,linkReference:W5,list:_ee,listItem:Ree,paragraph:Pee,root:Aee,strong:Y5,text:Lee,thematicBreak:Iee};function Uee(){return{enter:{table:Fee,tableData:Z5,tableHeader:Z5,tableRow:Vee},exit:{codeText:zee,table:jee,tableData:w_,tableHeader:w_,tableRow:w_}}}function Fee(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function jee(t){this.exit(t),this.data.inTable=void 0}function Vee(t){this.enter({type:"tableRow",children:[]},t)}function w_(t){this.exit(t)}function Z5(t){this.enter({type:"tableCell",children:[]},t)}function zee(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Bee));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function Bee(t,e){return e==="|"?e:t}function Hee(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,a=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
424
424
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:k,table:l,tableCell:h,tableRow:c}};function l(T,E,R,M){return p(v(T,R,M),T.align)}function c(T,E,R,M){const A=b(T,R,M),U=p([A]);return U.slice(0,U.indexOf(`
|
|
425
|
-
`))}function h(T,E,R,M){const A=R.enter("tableCell"),U=R.enter("phrasing"),V=R.containerPhrasing(T,{...M,before:s,after:s});return U(),A(),V}function p(T,E){return ree(T,{align:E,alignDelimiters:r,padding:n,stringLength:a})}function v(T,E,R){const M=T.children;let A=-1;const U=[],V=E.enter("table");for(;++A<M.length;)U[A]=b(M[A],E,R);return V(),U}function b(T,E,R){const M=T.children;let A=-1;const U=[],V=E.enter("tableRow");for(;++A<M.length;)U[A]=h(M[A],T,E,R);return V(),U}function k(T,E,R){let M=K5.inlineCode(T,E,R);return R.stack.includes("tableCell")&&(M=M.replace(/\|/g,"\\$&")),M}}function $ee(){return{exit:{taskListCheckValueChecked:Q5,taskListCheckValueUnchecked:Q5,paragraph:Wee}}}function qee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Gee}}}function Q5(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function Wee(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=e.children;let s=-1,l;for(;++s<a.length;){const c=a[s];if(c.type==="paragraph"){l=c;break}}l===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(t)}function Gee(t,e,n,r){const a=t.children[0],s=typeof t.checked=="boolean"&&a&&a.type==="paragraph",l="["+(t.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(l);let h=K5.listItem(t,e,n,{...r,...c.current()});return s&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(v){return v+l}}function Yee(){return[wJ(),UJ(),QJ(),Uee(),$ee()]}function Kee(t){return{extensions:[_J(),FJ(),XJ(),Hee(t),qee()]}}const Zee={tokenize:nte,partial:!0},X5={tokenize:rte,partial:!0},J5={tokenize:ite,partial:!0},eU={tokenize:ate,partial:!0},Qee={tokenize:ote,partial:!0},tU={name:"wwwAutolink",tokenize:ete,previous:rU},nU={name:"protocolAutolink",tokenize:tte,previous:iU},Cu={name:"emailAutolink",tokenize:Jee,previous:aU},kl={};function Xee(){return{text:kl}}let mf=48;for(;mf<123;)kl[mf]=Cu,mf++,mf===58?mf=65:mf===91&&(mf=97);kl[43]=Cu,kl[45]=Cu,kl[46]=Cu,kl[95]=Cu,kl[72]=[Cu,nU],kl[104]=[Cu,nU],kl[87]=[Cu,tU],kl[119]=[Cu,tU];function Jee(t,e,n){const r=this;let a,s;return l;function l(b){return!__(b)||!aU.call(r,r.previous)||E_(r.events)?n(b):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),c(b))}function c(b){return __(b)?(t.consume(b),c):b===64?(t.consume(b),h):n(b)}function h(b){return b===46?t.check(Qee,v,p)(b):b===45||b===95||Sa(b)?(s=!0,t.consume(b),h):v(b)}function p(b){return t.consume(b),a=!0,h}function v(b){return s&&a&&za(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(b)):n(b)}}function ete(t,e,n){const r=this;return a;function a(l){return l!==87&&l!==119||!rU.call(r,r.previous)||E_(r.events)?n(l):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Zee,t.attempt(X5,t.attempt(J5,s),n),n)(l))}function s(l){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(l)}}function tte(t,e,n){const r=this;let a="",s=!1;return l;function l(b){return(b===72||b===104)&&iU.call(r,r.previous)&&!E_(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),a+=String.fromCodePoint(b),t.consume(b),c):n(b)}function c(b){if(za(b)&&a.length<5)return a+=String.fromCodePoint(b),t.consume(b),c;if(b===58){const k=a.toLowerCase();if(k==="http"||k==="https")return t.consume(b),h}return n(b)}function h(b){return b===47?(t.consume(b),s?p:(s=!0,h)):n(b)}function p(b){return b===null||fS(b)||Sr(b)||pf(b)||hS(b)?n(b):t.attempt(X5,t.attempt(J5,v),n)(b)}function v(b){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(b)}}function nte(t,e,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,t.consume(l),a):l===46&&r===3?(t.consume(l),s):n(l)}function s(l){return l===null?n(l):e(l)}}function rte(t,e,n){let r,a,s;return l;function l(p){return p===46||p===95?t.check(eU,h,c)(p):p===null||Sr(p)||pf(p)||p!==45&&hS(p)?h(p):(s=!0,t.consume(p),l)}function c(p){return p===95?r=!0:(a=r,r=void 0),t.consume(p),l}function h(p){return a||r||!s?n(p):e(p)}}function ite(t,e){let n=0,r=0;return a;function a(l){return l===40?(n++,t.consume(l),a):l===41&&r<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?t.check(eU,e,s)(l):l===null||Sr(l)||pf(l)?e(l):(t.consume(l),a)}function s(l){return l===41&&r++,t.consume(l),a}}function ate(t,e,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(t.consume(c),r):c===38?(t.consume(c),s):c===93?(t.consume(c),a):c===60||c===null||Sr(c)||pf(c)?e(c):n(c)}function a(c){return c===null||c===40||c===91||Sr(c)||pf(c)?e(c):r(c)}function s(c){return za(c)?l(c):n(c)}function l(c){return c===59?(t.consume(c),r):za(c)?(t.consume(c),l):n(c)}}function ote(t,e,n){return r;function r(s){return t.consume(s),a}function a(s){return Sa(s)?n(s):e(s)}}function rU(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Sr(t)}function iU(t){return!za(t)}function aU(t){return!(t===47||__(t))}function __(t){return t===43||t===45||t===46||t===95||Sa(t)}function E_(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ste={tokenize:mte,partial:!0};function lte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fte,continuation:{tokenize:hte},exit:pte}},text:{91:{name:"gfmFootnoteCall",tokenize:dte},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ute,resolveTo:cte}}}}function ute(t,e,n){const r=this;let a=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const h=r.events[a][1];if(h.type==="labelImage"){l=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return c;function c(h){if(!l||!l._balanced)return n(h);const p=Ns(r.sliceSerialize({start:l.end,end:r.now()}));return p.codePointAt(0)!==94||!s.includes(p.slice(1))?n(h):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),e(h))}}function cte(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",a,e],["exit",a,e],["enter",s,e],["enter",l,e],["exit",l,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...c),t}function dte(t,e,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return c;function c(b){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?n(b):(t.enter("gfmFootnoteCallMarker"),t.consume(b),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(b){if(s>999||b===93&&!l||b===null||b===91||Sr(b))return n(b);if(b===93){t.exit("chunkString");const k=t.exit("gfmFootnoteCallString");return a.includes(Ns(r.sliceSerialize(k)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(b)}return Sr(b)||(l=!0),s++,t.consume(b),b===92?v:p}function v(b){return b===91||b===92||b===93?(t.consume(b),s++,p):p(b)}}function fte(t,e,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,c;return h;function h(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",v):n(E)}function v(E){if(l>999||E===93&&!c||E===null||E===91||Sr(E))return n(E);if(E===93){t.exit("chunkString");const R=t.exit("gfmFootnoteDefinitionLabelString");return s=Ns(r.sliceSerialize(R)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),k}return Sr(E)||(c=!0),l++,t.consume(E),E===92?b:v}function b(E){return E===91||E===92||E===93?(t.consume(E),l++,v):v(E)}function k(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),a.includes(s)||a.push(s),Vn(t,T,"gfmFootnoteDefinitionWhitespace")):n(E)}function T(E){return e(E)}}function hte(t,e,n){return t.check(wv,e,t.attempt(ste,e,n))}function pte(t){t.exit("gfmFootnoteDefinition")}function mte(t,e,n){const r=this;return Vn(t,a,"gfmFootnoteDefinitionIndent",5);function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?e(s):n(s)}}function gte(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,c){let h=-1;for(;++h<l.length;)if(l[h][0]==="enter"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._close){let p=h;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[h][1].end.offset-l[h][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[h][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const v={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[h][1].end)},b={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[h][1].start)},k=[["enter",v,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",b,c]],T=c.parser.constructs.insideSpan.null;T&&Mo(k,k.length,0,pS(T,l.slice(p+1,h),c)),Mo(k,k.length,0,[["exit",b,c],["enter",l[h][1],c],["exit",l[h][1],c],["exit",v,c]]),Mo(l,p-1,h-p+3,k),h=p+k.length-2;break}}for(h=-1;++h<l.length;)l[h][1].type==="strikethroughSequenceTemporary"&&(l[h][1].type="data");return l}function s(l,c,h){const p=this.previous,v=this.events;let b=0;return k;function k(E){return p===126&&v[v.length-1][1].type!=="characterEscape"?h(E):(l.enter("strikethroughSequenceTemporary"),T(E))}function T(E){const R=Cp(p);if(E===126)return b>1?h(E):(l.consume(E),b++,T);if(b<2&&!n)return h(E);const M=l.exit("strikethroughSequenceTemporary"),A=Cp(E);return M._open=!A||A===2&&!!R,M._close=!R||R===2&&!!A,c(E)}}}class vte{constructor(){this.map=[]}add(e,n,r){yte(this,e,n,r)}consume(e){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push([...e]),e.length=0;let a=r.pop();for(;a;)e.push(...a),a=r.pop();this.map.length=0}}function yte(t,e,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<t.map.length;){if(t.map[a][0]===e){t.map[a][1]+=n,t.map[a][2].push(...r);return}a+=1}t.map.push([e,n,r])}}function bte(t,e){let n=!1;const r=[];for(;e<t.length;){const a=t[e];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function Ste(){return{flow:{null:{name:"table",tokenize:Cte,resolveAll:kte}}}}function Cte(t,e,n){const r=this;let a=0,s=0,l;return c;function c($){let oe=r.events.length-1;for(;oe>-1;){const ke=r.events[oe][1].type;if(ke==="lineEnding"||ke==="linePrefix")oe--;else break}const J=oe>-1?r.events[oe][1].type:null,xe=J==="tableHead"||J==="tableRow"?N:h;return xe===N&&r.parser.lazy[r.now().line]?n($):xe($)}function h($){return t.enter("tableHead"),t.enter("tableRow"),p($)}function p($){return $===124||(l=!0,s+=1),v($)}function v($){return $===null?n($):Bt($)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume($),t.exit("lineEnding"),T):n($):Pn($)?Vn(t,v,"whitespace")($):(s+=1,l&&(l=!1,a+=1),$===124?(t.enter("tableCellDivider"),t.consume($),t.exit("tableCellDivider"),l=!0,v):(t.enter("data"),b($)))}function b($){return $===null||$===124||Sr($)?(t.exit("data"),v($)):(t.consume($),$===92?k:b)}function k($){return $===92||$===124?(t.consume($),b):b($)}function T($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(t.enter("tableDelimiterRow"),l=!1,Pn($)?Vn(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):E($))}function E($){return $===45||$===58?M($):$===124?(l=!0,t.enter("tableCellDivider"),t.consume($),t.exit("tableCellDivider"),R):I($)}function R($){return Pn($)?Vn(t,M,"whitespace")($):M($)}function M($){return $===58?(s+=1,l=!0,t.enter("tableDelimiterMarker"),t.consume($),t.exit("tableDelimiterMarker"),A):$===45?(s+=1,A($)):$===null||Bt($)?j($):I($)}function A($){return $===45?(t.enter("tableDelimiterFiller"),U($)):I($)}function U($){return $===45?(t.consume($),U):$===58?(l=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume($),t.exit("tableDelimiterMarker"),V):(t.exit("tableDelimiterFiller"),V($))}function V($){return Pn($)?Vn(t,j,"whitespace")($):j($)}function j($){return $===124?E($):$===null||Bt($)?!l||a!==s?I($):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e($)):I($)}function I($){return n($)}function N($){return t.enter("tableRow"),ne($)}function ne($){return $===124?(t.enter("tableCellDivider"),t.consume($),t.exit("tableCellDivider"),ne):$===null||Bt($)?(t.exit("tableRow"),e($)):Pn($)?Vn(t,ne,"whitespace")($):(t.enter("data"),X($))}function X($){return $===null||$===124||Sr($)?(t.exit("data"),ne($)):(t.consume($),$===92?se:X)}function se($){return $===92||$===124?(t.consume($),X):X($)}}function kte(t,e){let n=-1,r=!0,a=0,s=[0,0,0,0],l=[0,0,0,0],c=!1,h=0,p,v,b;const k=new vte;for(;++n<t.length;){const T=t[n],E=T[1];T[0]==="enter"?E.type==="tableHead"?(c=!1,h!==0&&(oU(k,e,h,p,v),v=void 0,h=0),p={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},k.add(n,0,[["enter",p,e]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,b=void 0,s=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,v={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},k.add(n,0,[["enter",v,e]])),a=E.type==="tableDelimiterRow"?2:v?3:1):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],b=ES(k,e,s,a,void 0,b),s=[0,0,0,0]),l[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],b=ES(k,e,s,a,void 0,b)),s=l,l=[s[1],n,0,0])):E.type==="tableHead"?(c=!0,h=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=n,s[1]!==0?(l[0]=l[1],b=ES(k,e,s,a,n,b)):l[1]!==0&&(b=ES(k,e,l,a,n,b)),a=0):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(l[3]=n)}for(h!==0&&oU(k,e,h,p,v),k.consume(e.events),n=-1;++n<e.events.length;){const T=e.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=bte(e.events,n))}return t}function ES(t,e,n,r,a,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},Tp(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const h=Tp(e.events,n[1]);if(s={type:l,start:Object.assign({},h),end:Object.assign({},h)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const p=Tp(e.events,n[2]),v=Tp(e.events,n[3]),b={type:c,start:Object.assign({},p),end:Object.assign({},v)};if(t.add(n[2],0,[["enter",b,e]]),r!==2){const k=e.events[n[2]],T=e.events[n[3]];if(k[1].end=Object.assign({},T[1].end),k[1].type="chunkText",k[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,R=n[3]-n[2]-1;t.add(E,R,[])}}t.add(n[3]+1,0,[["exit",b,e]])}return a!==void 0&&(s.end=Object.assign({},Tp(e.events,a)),t.add(a,0,[["exit",s,e]]),s=void 0),s}function oU(t,e,n,r,a){const s=[],l=Tp(e.events,n);a&&(a.end=Object.assign({},l),s.push(["exit",a,e])),r.end=Object.assign({},l),s.push(["exit",r,e]),t.add(n+1,0,s)}function Tp(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const Tte={name:"tasklistCheck",tokenize:wte};function xte(){return{text:{91:Tte}}}function wte(t,e,n){const r=this;return a;function a(h){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(h):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),s)}function s(h){return Sr(h)?(t.enter("taskListCheckValueUnchecked"),t.consume(h),t.exit("taskListCheckValueUnchecked"),l):h===88||h===120?(t.enter("taskListCheckValueChecked"),t.consume(h),t.exit("taskListCheckValueChecked"),l):n(h)}function l(h){return h===93?(t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),c):n(h)}function c(h){return Bt(h)?e(h):Pn(h)?t.check({tokenize:_te},e,n)(h):n(h)}}function _te(t,e,n){return Vn(t,r,"whitespace");function r(a){return a===null?n(a):e(a)}}function Ete(t){return I4([Xee(),lte(),gte(t),Ste(),xte()])}const Rte={};function Pte(t){const e=this,n=t||Rte,r=e.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Ete(n)),s.push(Yee()),l.push(Kee(n))}const Dte=({itemIndex:t,message:e})=>{const n=Zo(),r=WW(e.name),a=r?n.textColor:n.primaryTextColor;return W.jsx("div",{className:xr("ringg_ai-flex ringg_ai-flex-col ringg_ai-items-start ringg_ai-gap-1 ringg_ai-justify-start",r?"ringg_ai-flex-row":"ringg_ai-flex-row-reverse"),children:W.jsx("div",{className:xr("ringg_ai-flex ringg_ai-items-center ringg_ai-justify-start ringg_ai-gap-2 ringg_ai-px-4 ringg_ai-py-2 ringg_ai-rounded-xl ringg_ai-max-w-[90%]",r?"ringg_ai-mr-auto ringg_ai-text-left ringg_ai-rounded-bl-none":"ringg_ai-ml-auto ringg_ai-text-right ringg_ai-rounded-br-none"),style:{backgroundColor:r?n.surfaceColor:n.primaryColor,color:a},children:W.jsxs("div",{className:"ringg_ai-flex ringg_ai-flex-col ringg_ai-gap-2.5 ringg_ai-w-full ringg_ai-overflow-x-auto",children:[W.jsx("div",{className:"ringg_ai-prose ringg_ai-prose-sm ringg_ai-max-w-none [&_p]:ringg_ai-text-sm [&_li]:ringg_ai-text-sm [&_table]:ringg_ai-w-max",style:{"--tw-prose-body":a,"--tw-prose-headings":a,"--tw-prose-bold":a,"--tw-prose-counters":a,"--tw-prose-bullets":a,"--tw-prose-quotes":a,"--tw-prose-code":a,"--tw-prose-th-borders":n.borderColor,"--tw-prose-td-borders":n.borderColor,color:a},children:W.jsx(mJ,{remarkPlugins:[Pte],children:e.message})}),(e==null?void 0:e.sourceUrl)&&W.jsxs("a",{href:e.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"ringg_ai-text-sm ringg_ai-break-all ringg_ai-w-fit ringg_ai-hover:underline",style:{color:r?n.primaryColor:n.primaryTextColor},children:["Source: ",e.sourceUrl]})]})},`${e.name}__${t}`)},`${e.timestamp}__${t}`)};function Ate({tabs:t=[],activeTab:e="voice-call",onTabChange:n}){const r=Zo(),[a,s]=G.useState(e),l=c=>{s(c),n==null||n(c)};return W.jsx("div",{className:"ringg_ai-w-full ringg_ai-border-t",style:{backgroundColor:r.backgroundColor,borderColor:r.borderColor},children:W.jsx("div",{className:"ringg_ai-flex ringg_ai-items-center ringg_ai-px-0",children:t.map(c=>{const h=c.icon,p=a===c.id,v=p?r.primaryColor:r.mutedTextColor;return W.jsxs("button",{onClick:()=>l(c.id),className:xr("ringg_ai-flex ringg_ai-flex-col ringg_ai-items-center ringg_ai-gap-1 ringg_ai-border-t-2 ringg_ai-py-3 ringg_ai-transition-all ringg_ai-duration-200 ringg_ai-flex-1"),style:{borderTopColor:p?r.primaryColor:"transparent"},children:[W.jsx(h,{className:"ringg_ai-w-5 ringg_ai-h-5 ringg_ai-transition-colors",fill:v,style:{color:v}}),W.jsx("span",{className:"ringg_ai-text-xs ringg_ai-font-medium ringg_ai-transition-colors",style:{color:v},children:c.label})]},c.id)})})})}const Ote=Y3("ringg_ai-inline-flex ringg_ai-items-center ringg_ai-justify-center ringg_ai-gap-2 ringg_ai-whitespace-nowrap ringg_ai-rounded-md ringg_ai-text-sm ringg_ai-font-medium ringg_ai-ring-offset-background ringg_ai-transition-colors focus-visible:ringg_ai-outline-none focus-visible:ringg_ai-ring-2 focus-visible:ringg_ai-ring-ring focus-visible:ringg_ai-ring-offset-2 disabled:ringg_ai-pointer-events-none disabled:ringg_ai-opacity-50 [&_svg]:ringg_ai-pointer-events-none [&_svg]:ringg_ai-size-4 [&_svg]:ringg_ai-shrink-0",{variants:{variant:{default:"ringg_ai-bg-primary ringg_ai-text-primary-foreground ringg_ai-shadow hover:ringg_ai-bg-primary/90",destructive:"ringg_ai-bg-destructive ringg_ai-text-destructive-foreground ringg_ai-shadow-sm hover:ringg_ai-bg-destructive/90",outline:"ringg_ai-border ringg_ai-border-input ringg_ai-bg-background ringg_ai-shadow-sm hover:ringg_ai-bg-accent hover:ringg_ai-text-accent-foreground",secondary:"ringg_ai-bg-secondary ringg_ai-text-secondary-foreground ringg_ai-shadow-sm hover:ringg_ai-bg-secondary/80",ghost:"hover:ringg_ai-bg-accent hover:ringg_ai-text-accent-foreground",link:"ringg_ai-text-primary ringg_ai-underline-offset-4 hover:ringg_ai-underline"},size:{default:"ringg_ai-h-9 ringg_ai-px-4 ringg_ai-py-2",sm:"ringg_ai-h-8 ringg_ai-rounded-md ringg_ai-px-3 ringg_ai-text-xs",lg:"ringg_ai-h-10 ringg_ai-rounded-md ringg_ai-px-8",icon:"ringg_ai-h-9 ringg_ai-w-9"}},defaultVariants:{variant:"default",size:"default"}}),Av=G.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...a},s)=>{const l=r?uS:"button";return W.jsx(l,{className:xr(Ote({variant:e,size:n,className:t})),ref:s,...a})});Av.displayName="Button";function Bc(t,e){typeof window<"u"&&window.dispatchEvent(new CustomEvent(t,{detail:e}))}function Mte({callMode:t}){const[e,n]=G.useState(!1),[r,a]=G.useState(!1),[s,l]=G.useState(null),c=G.useRef(!1),h=G.useRef(t);h.current=t;const p=G.useCallback(()=>{c.current||(c.current=!0,n(!0),Bc("ringg:widget_status",{status:"maximised",mode:h.current}))},[]),v=G.useCallback(()=>{c.current=!1,n(!1),Bc("ringg:widget_status",{status:"minimised",mode:h.current})},[]),b=G.useCallback(()=>{a(!1),l(null),v()},[v]),k=G.useCallback(()=>{c.current?v():p()},[p,v]);return G.useMemo(()=>({isOpen:e,showFeedback:r,currentCallId:s,setShowFeedback:a,setCurrentCallId:l,open:p,minimize:v,close:b,toggle:k}),[e,r,s,p,v,b,k])}function Lte({room:t,onError:e}){const[n,r]=G.useState("unknown"),a=G.useRef(e);a.current=e;const s=G.useCallback(async()=>{var h;try{if((h=navigator.permissions)!=null&&h.query){const p=await navigator.permissions.query({name:"microphone"});r(p.state),p.onchange=()=>{r(p.state)}}else try{await navigator.mediaDevices.getUserMedia({audio:!0}),r("granted")}catch{r("denied")}}catch(p){console.error("Error checking microphone permission:",p),r("unknown")}},[]),l=G.useCallback(async()=>{var h;try{const p=await navigator.mediaDevices.getUserMedia({audio:!0});return r("granted"),p.getTracks().forEach(v=>v.stop()),!0}catch(p){return console.error("Error requesting microphone permission:",p),r("denied"),(h=a.current)==null||h.call(a,"Microphone access was denied. Please enable it in your browser settings."),!1}},[]);G.useEffect(()=>{s();const h=()=>{var p;(p=a.current)==null||p.call(a,"Error acquiring microphone permission. Please make sure you grant the necessary permissions in your browser and reload the tab"),r("denied")};return t.on(Ee.MediaDevicesError,h),()=>{t.off(Ee.MediaDevicesError,h)}},[t,s]);const c=n==="granted";return G.useMemo(()=>({state:n,isGranted:c,check:s,request:l}),[n,c,s,l])}function Nte({containerRef:t,enabled:e}){G.useEffect(()=>{const n=t.current;if(!n||!e)return;const r=c=>{const h=n.querySelector('[data-scrollable="true"]');if(!h){c.preventDefault();return}const{scrollTop:p,scrollHeight:v,clientHeight:b}=h,k=p===0&&c.deltaY<0,T=p+b>=v-1&&c.deltaY>0;(k||T)&&c.preventDefault()};let a=0;const s=c=>{a=c.touches[0].clientY},l=c=>{const h=n.querySelector('[data-scrollable="true"]'),p=c.touches[0].clientY,v=a-p;if(!h){c.preventDefault();return}const{scrollTop:b,scrollHeight:k,clientHeight:T}=h,E=b===0&&v<0,R=b+T>=k-1&&v>0;(E||R)&&c.preventDefault()};return n.addEventListener("wheel",r,{passive:!1}),n.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("touchmove",l,{passive:!1}),()=>{n.removeEventListener("wheel",r),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l)}},[e])}const xp={mode:"prod",title:"Ringg AI Support",description:"Ringg AI offers 24/7 voice support to handle your business calls efficiently and professionally",defaultTab:"audio",hideTabSelector:!1,notificationTuneUrl:"https://assets.ringg.ai/audios/misc/widget_notification.mp3"};function R_(t){switch(t){case"dev":return"https://calling-dev.ringg.ai/ca/api/v0";case"stage":return"https://stage-api2.desivocal.com/ca/api/v0";default:return"https://prod-api.ringg.ai/ca/api/v0"}}function Ite(t){switch(t){case"dev":return"wss://ringg-ai-dev-92tubwpz.livekit.cloud";case"stage":return"wss://ringg-ai-ujrjmhgy.livekit.cloud";default:return"wss://ringg-ai-prod-r0vhjzhs.livekit.cloud"}}function Jse(t){return t}const sU={center:{top:0,left:0,right:0,bottom:0,margin:"auto"},"top-left":{top:"2%",left:"2%"},"top-right":{top:"2%",right:"2%"},"bottom-left":{bottom:"2%",left:"2%"},"bottom-right":{bottom:"2%",right:"2%"},"bottom-center":{bottom:"2%",left:"50%"}};function Ute(t){return sU[t]??sU["bottom-right"]}function Fte(t){return t==="bottom-center"?{left:"50%"}:t==="bottom-left"?{left:"2%"}:{right:"2%"}}function RS(t){if(t!==void 0)return typeof t=="number"?`${t}px`:t}function jte(t){return t?{width:RS(t.width),height:RS(t.height),borderRadius:RS(t.borderRadius)}:{}}function Vte(t,e){if(!e)return t;let n=[t];return Object.entries(e).forEach(([r,a])=>{n=n.flatMap((s,l)=>{if(typeof s!="string")return s;const c=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),h=new RegExp(`\\b(${c})\\b`,"g");return s.split(h).map((p,v)=>p===r?W.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"ringg_ai-text-blue-500 hover:ringg_ai-underline",href:a,children:r},`${l}-${v}`):p)})}),n}const zte="1.0.20-alpha.41",Bte=({room:t,config:e})=>{var Hi,Ji,ea,co,es,ts,fo;console.log(`[Ringg CDN] Version: ${zte}`);const[n,r]=G.useState({}),a=e,{mode:s=xp.mode,title:l=xp.title,description:c=xp.description,agentId:h,variables:p,buttons:v,xApiKey:b="",defaultTab:k=xp.defaultTab,hideTabSelector:T=xp.hideTabSelector,innerWindowProps:E,logoUrl:R,logoStyles:M,legalDisclaimer:A,feedbackScreen:U,notificationTuneUrl:V=xp.notificationTuneUrl,widgetPosition:j,theme:I}=a,N=WI(I),ne=mw(N.buttonStyle),X=(j==null?void 0:j.triggerPlacement)??"fixed",se=(j==null?void 0:j.triggerAlignment)??"bottom-right",$=(j==null?void 0:j.hideTriggerOnExpand)??!0,oe=(j==null?void 0:j.widgetAlignment)??"bottom-right",J=Ute(se),xe=jte(E),[ke,Ge]=G.useState(k),[Je,je]=G.useState(!1),[ve,He]=G.useState(!1),[z,ee]=G.useState({hasError:!1,message:""}),[Ce,H]=G.useState([]),[Ct,Rt]=G.useState(new Map),ht=G.useRef(null),bt=G.useRef(null),it=G.useRef(null),xt=G.useRef(""),tn=G.useRef(),qn=G.useRef(new Set),_r=G.useRef(null),vr=G.useRef(!1),Xn=G.useRef(new Map),Nr=ex(t),bn=Nr==="connected",Lt=Mte({callMode:ke}),Z=Lte({room:t,onError:et=>ee({hasError:!0,message:et})});Nte({containerRef:bt,enabled:Lt.isOpen});const{chatMessages:le}=$M(),me=hB(),Ve=aB(),ze=HM(),Oe=tx(me.audioTrack||void 0),ut=tx({publication:Ve.microphoneTrack,source:De.Source.Microphone,participant:Ve.localParticipant}),Nt=G.useMemo(()=>ze.find(et=>{var Me;return(Me=et.identity)==null?void 0:Me.includes("agent")}),[ze]),fe=G.useCallback((et,Me)=>{vr.current=!1,console.log("%c[Conversation Started]","background: #22c55e; color: white; padding: 2px 6px; border-radius: 3px;",{mode:et,callId:Me}),Bc("ringg:conversation_status",{status:"started",mode:et,callId:Me})},[]),Re=G.useCallback((et,Me)=>{vr.current||(vr.current=!0,console.log("%c[Conversation Ended]","background: #ef4444; color: white; padding: 2px 6px; border-radius: 3px;",{mode:et,callId:Me}),Bc("ringg:conversation_status",{status:"ended",mode:et,callId:Me}))},[]),vt=G.useCallback(async et=>{if(!(et==="audio"&&!Z.isGranted&&!await Z.request())){je(!0),Ge(et);try{const Me=await fetch(`${R_(s)}/calling/webcall`,{method:"POST",body:JSON.stringify({agent_id:h,custom_args_values:p,media_type:et}),headers:{"Content-Type":"application/json","X-API-KEY":b}}),It=await Me.json();if(!Me.ok)throw new Error((It==null?void 0:It.message)||"Failed to make call");It!=null&&It.call_id&&Lt.setCurrentCallId(It.call_id),await t.connect(Ite(s),It==null?void 0:It.user_token),et==="audio"&&await t.localParticipant.setMicrophoneEnabled(!0),fe(et,It.call_id),ee({hasError:!1,message:""})}catch(Me){ee({hasError:!0,message:Me.message})}finally{je(!1)}}},[t,s,h,p,b,Z,Lt,fe]),Ft=G.useCallback(async()=>{je(!0);try{Lt.currentCallId&&Re(ke,Lt.currentCallId),H([]),Rt(new Map),qn.current=new Set,xt.current="",tn.current=void 0,t.disconnect(),He(!1),Lt.setShowFeedback(!0),Lt.open()}catch(et){ee({hasError:!0,message:"Error ending call: "+et.message})}finally{je(!1)}},[t,ke,Lt,Re]),Kt=G.useCallback(async(et,Me)=>{if(!Lt.currentCallId){Lt.close();return}je(!0);try{await fetch(`${R_(s)}/calling/${Lt.currentCallId}/feedback`,{method:"POST",body:JSON.stringify({rating:et,comment:Me}),headers:{"Content-Type":"application/json","X-API-KEY":b}}),Bc("ringg:feedback_status",{status:"submitted",callId:Lt.currentCallId,rating:et})}catch(It){console.error("Error submitting feedback:",It)}finally{je(!1),Lt.close()}},[s,b,Lt]),Be=G.useCallback(()=>{Lt.currentCallId&&Bc("ringg:feedback_status",{status:"skipped",callId:Lt.currentCallId}),Lt.close()},[Lt]),ct=G.useCallback(et=>{var It;const Me={name:"Agent",message:"",isSelf:!1,timestamp:Date.now()+Math.random(),componentType:et.component_type,componentData:et};H(Ht=>[...Ht,Me]),Bc("ringg:calendar_booking",{status:"shown",componentId:et.component_id}),(It=it.current)==null||It.play().catch(()=>{}),Lt.open()},[Lt]),At=G.useCallback(et=>{qn.current.add(et),Bc("ringg:calendar_booking",{status:"confirmed",componentId:et,message:"Flow completed"})},[]),ln=G.useCallback(async(et,Me)=>{const It=Xn.current.get(et);if(!It){console.warn(`[RPC] No pending response found for component: ${et}`);return}if(!Nt){console.warn("[RPC] No agent participant found to send response to");return}const{name:Ht,originalConfig:Sn}=It,jt="receive_dynamic_data";let Cn;if(Ht==="calendar"){const Er=Me.step_data&&Me.step_data.slot_id;Cn=(Array.isArray(Sn)?Sn:[]).find(Xe=>Xe.id===Er)||{id:Er,datetime:Me.step_data&&Me.step_data.slot_datetime}}else if(Ht==="form")Cn=Me.step_data||Me.all_data;else if(Ht==="buttons"){const Er=Me.step_data&&Me.step_data.selected_button;Cn=(Array.isArray(Sn)?Sn:[]).find(Xe=>Xe.id===Er)||{id:Er}}else Cn=Me;const er=JSON.stringify({componant_type:`receive_component_${Ht}`,component_id:et,componant_data:Cn});try{console.log(`[RPC] Sending ${jt}:`,er);const Er=await Ve.localParticipant.performRpc({destinationIdentity:Nt.identity,method:jt,payload:er});console.log(`[RPC] Response from ${jt}:`,Er),Xn.current.delete(et)}catch(Er){console.error(`[RPC] Error sending ${jt}:`,Er)}},[Nt,Ve.localParticipant]),En=G.useMemo(()=>null,[]),un=G.useCallback(async(et,Me,It)=>(await fetch(Me.startsWith("http")?Me:`${R_(s)}${Me}`,{method:et,body:JSON.stringify(It),headers:{"Content-Type":"application/json","X-API-KEY":b}})).json(),[s,b,bn,En]),Dn=G.useCallback(async et=>{try{const Me=JSON.parse(et.payload);return Array.isArray(Me.source_urls)?xt.current=Me.source_urls.join(", "):Me.source_url&&(xt.current=Me.source_url),JSON.stringify({status:"received"})}catch(Me){throw console.error("Failed to parse RPC payload:",Me),new Error("Invalid payload for send_source_urls")}},[]),Wn=G.useCallback(async et=>{try{console.log("Received dynamic data:",et.payload);const Me=JSON.parse(et.payload);return Me.component_type&&Me.component_id&&ct(Me),JSON.stringify({status:"received"})}catch(Me){throw console.error("Failed to parse component payload:",Me),new Error("Invalid component payload")}},[ct]),Jn=G.useCallback((et,Me)=>{const It=`${et}_${Date.now()}`,Ht=Me.componant_config||Me.component_config;if(et==="calendar"){const Sn=Array.isArray(Ht)?Ht:[];return{component_type:"calendar_booking",component_id:It,data:{available_slots:Sn.map(jt=>({id:jt.id,datetime:jt.datetime})),timezone:Me.timezone||"UTC",title:Me.title||"Select a time slot"},actions:{on_select:{method:"POST",endpoint:"/mock/calendar",payload:{selected_slot_id:"{slot_id}"}}}}}return et==="form"?{component_type:"form",component_id:It,data:{title:Me.title||"Form",description:Me.description,fields:Array.isArray(Ht)?Ht:[],submit_label:Me.submit_label},actions:{on_submit:{method:"POST",endpoint:"/mock/form",payload:{form_data:"{form_data}"}}}}:et==="buttons"?{component_type:"buttons",component_id:It,data:{title:Me.title,buttons:Array.isArray(Ht)?Ht:[]}}:et==="confirmation"?{component_type:"confirmation",component_id:It,data:{title:Me.title||"Confirmed",message:Me.message||"",icon:Me.icon||"success",details:Me.details}}:Me.component_type&&Me.component_id?Me:null},[]),Gn=G.useCallback(async et=>{try{const Me=JSON.parse(et.payload);console.log("[RPC] Received send_dynamic_data:",Me);const It=Me.componant_type||Me.component_type;if(!It)return console.warn("[RPC] No componant_type in payload"),JSON.stringify({status:"error",message:"No componant_type provided"});const Ht=It.replace("render_component_","");console.log(`[RPC] Routing to component: ${Ht}`);const Sn=Jn(Ht,Me);return Sn?(Xn.current.set(Sn.component_id,{name:Ht,originalConfig:Me.componant_config||Me.component_config}),ct(Sn),JSON.stringify({status:"received",component_id:Sn.component_id})):(console.warn(`[RPC] Unknown component type: ${Ht}`),JSON.stringify({status:"error",message:`Unknown component type: ${Ht}`}))}catch(Me){throw console.error("[RPC] Failed to parse send_dynamic_data payload:",Me),new Error("Invalid send_dynamic_data payload")}},[ct,Jn]);G.useEffect(()=>{_r.current=ct},[ct]);const In=G.useRef(Lt.open);return In.current=Lt.open,G.useEffect(()=>{},[]),G.useEffect(()=>{var Ht,Sn;if(!t||ke!=="audio")return;const et=new Map(Ct);me.audioTrack&&Oe.segments.forEach(jt=>{const Cn=et.get(jt.id),er=bw(jt,Cn,me.audioTrack.participant);et.set(jt.id,er),jt.text&&jt.text!==(Cn==null?void 0:Cn.message)&&(jt.final?console.log("%c[Agent Message Complete]","background: #22c55e; color: white; padding: 2px 6px; border-radius: 3px;",jt.text):console.log("%c[Agent Speaking...]","color: #22c55e;",jt.text))}),ut.segments.forEach(jt=>{const Cn=et.get(jt.id),er=bw(jt,Cn,Ve.localParticipant);et.set(jt.id,er),jt.text&&jt.text!==(Cn==null?void 0:Cn.message)&&(jt.final?console.log("%c[User Message Sent]","background: #3b82f6; color: white; padding: 2px 6px; border-radius: 3px;",jt.text):console.log("%c[User Speaking...]","color: #3b82f6;",jt.text))});const Me=Array.from(et.values()).sort((jt,Cn)=>jt.timestamp-Cn.timestamp),It=xt.current&&((Ht=Me[Me.length-1])==null?void 0:Ht.name.includes("Agent"))&&!((Sn=Me[Me.length-1])!=null&&Sn.sourceUrl)&&tn.current!==Me.length-1;if(It){tn.current=Me.length,Me[Me.length-1]={...Me[Me.length-1],sourceUrl:xt.current};const jt=Me.filter(er=>!er.isSelf).length-1,Cn=et.get(Oe.segments[jt].id);et.set(Oe.segments[jt].id,bw(Oe.segments[jt],{...Cn,sourceUrl:xt.current},me.audioTrack.participant))}H(Me),Rt(et),It||(xt.current="")},[ke,le,Oe.segments,ut.segments,me.audioTrack,Ve.localParticipant]),G.useEffect(()=>{if(!t||ke!=="text")return;const et=async(It,Ht)=>{var Sn,jt;try{const Cn=await It.readAll(),er=(Sn=Ht.identity)==null?void 0:Sn.includes("agent");console.log(`%c[Transcript - Text] ${er?"Agent":"User"}:`,`color: ${er?"#22c55e":"#3b82f6"}; font-weight: bold;`,Cn),er&&((jt=it.current)==null||jt.play().catch(()=>{}),Lt.open());const Er={message:Cn,isSelf:!er,name:er?"Agent":"You",timestamp:Date.now()+performance.now()%1,...er&&xt.current&&{sourceUrl:xt.current}};xt.current&&(xt.current=""),H(K=>{const Le=new Set;return[...K,Er].filter(Xe=>!Le.has(Xe.timestamp)&&Le.add(Xe.timestamp)).sort((Xe,ot)=>Xe.timestamp-ot.timestamp)})}catch(Cn){console.error("Error reading text stream",Cn)}},Me=le.map(It=>{var jt,Cn,er,Er;const Ht=((jt=It.from)==null?void 0:jt.identity)===Ve.localParticipant.identity,Sn=me.audioTrack?((Cn=It.from)==null?void 0:Cn.identity)===((er=me.audioTrack.participant)==null?void 0:er.identity):!Ht;return{name:((Er=It.from)==null?void 0:Er.name)||(Sn?"Agent":Ht?"You":"Unknown"),isSelf:Ht,message:It.message,timestamp:It.timestamp}});return H(It=>{const Ht=new Set;return[...It,...Me].filter(Sn=>!Ht.has(Sn.timestamp)&&Ht.add(Sn.timestamp)).sort((Sn,jt)=>Sn.timestamp-jt.timestamp)}),t.registerTextStreamHandler("lk.transcription",et),()=>{t.unregisterTextStreamHandler("lk.transcription")}},[t,ke,le,Lt,Ve.localParticipant,me.audioTrack]),G.useEffect(()=>{if(t)return console.log("[RPC] Registering handlers on room connect"),t.registerRpcMethod("send_source_urls",Dn),t.registerRpcMethod("render_component",Wn),t.registerRpcMethod("send_dynamic_data",Gn),console.log("[RPC] Registered: send_source_urls, render_component, send_dynamic_data"),()=>{t.unregisterRpcMethod("send_source_urls"),t.unregisterRpcMethod("render_component"),t.unregisterRpcMethod("send_dynamic_data")}},[t,Dn,Wn,Gn]),G.useEffect(()=>{if(t)return t.on(Ee.ParticipantDisconnected,Ft),t.on(Ee.Disconnected,Ft),()=>{t.off(Ee.ParticipantDisconnected,Ft),t.off(Ee.Disconnected,Ft)}},[Ft,t]),G.useEffect(()=>{if(ht.current&&(ht.current.scrollTop=ht.current.scrollHeight),Ce.length>0){const et=Ce.filter(Me=>Me.message&&!Me.componentType).map(Me=>`${Me.isSelf?"User":"Agent"}: ${Me.message}`).join(`
|
|
426
|
-
`);console.groupCollapsed(`%c[Transcript Summary] ${Ce.filter(Me=>Me.message).length} messages`,"color: #8b5cf6; font-weight: bold;"),console.log(et),console.groupEnd()}},[Ce]),G.useEffect(()=>(it.current=new Audio(V),it.current.preload="auto",()=>{it.current&&(it.current.pause(),it.current.src="",it.current=null)}),[V]),W.jsxs(pW,{theme:I,children:[W.jsxs(sx,{children:[(!$||!Lt.isOpen)&&W.jsx(mu.button,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",stiffness:400,damping:25},"aria-label":"Open call widget",onClick:Lt.toggle,style:{position:X,...J,backgroundColor:N.primaryColor,color:N.primaryTextColor,...(Hi=v==null?void 0:v.modalTrigger)==null?void 0:Hi.styles},className:"ringg_ai-h-14 ringg_ai-w-14 !ringg_ai-rounded-full ringg_ai-flex ringg_ai-items-center ringg_ai-justify-center ringg_ai-shadow ringg_ai-trigger-btn !ringg_ai-z-[9999] hover:ringg_ai-opacity-90 ringg_ai-transition-opacity",children:W.jsx("img",{src:((ea=(Ji=v==null?void 0:v.modalTrigger)==null?void 0:Ji.icon)==null?void 0:ea.url)??"https://assets.ringg.ai/images/icons/widget-phone.svg",alt:"Widget trigger",style:{width:((es=(co=v==null?void 0:v.modalTrigger)==null?void 0:co.icon)==null?void 0:es.size)??25,height:((fo=(ts=v==null?void 0:v.modalTrigger)==null?void 0:ts.icon)==null?void 0:fo.size)??25}})},"trigger-button"),Lt.isOpen&&W.jsxs(mu.div,{ref:bt,initial:{y:"100%",opacity:0,x:oe==="bottom-center"?"-50%":0},animate:{y:0,opacity:1,x:oe==="bottom-center"?"-50%":0},exit:{y:"100%",opacity:0,x:oe==="bottom-center"?"-50%":0},transition:{type:"spring",stiffness:300,damping:28},className:xr("ringg_ai-relative ringg_ai-border ringg_ai-overflow-hidden ringg_ai-shadow-xl !ringg_ai-z-[9999] ringg_ai-w-[95vw] md:ringg_ai-w-[360px]",bn&&"ringg_ai-h-[24.5rem]"),style:{position:"fixed",bottom:"2%",...Fte(oe),...bn?xe:{},maxWidth:"96dvw",maxHeight:"96dvh",backgroundColor:N.backgroundColor,borderColor:N.borderColor,borderRadius:RS(E==null?void 0:E.borderRadius)??N.borderRadius,fontFamily:N.fontFamily,"--widget-primary":N.primaryColor,"--widget-primary-text":N.primaryTextColor,"--widget-bg":N.backgroundColor,"--widget-surface":N.surfaceColor,"--widget-text":N.textColor,"--widget-muted":N.mutedTextColor,"--widget-border":N.borderColor,"--widget-button-radius":ne},children:[bn&&W.jsx(Av,{size:"icon",variant:"ghost","aria-label":"Minimize widget",onClick:Lt.minimize,className:"ringg_ai-absolute !ringg_ai-z-[9999] ringg_ai-top-2.5 ringg_ai-right-12 !ringg_ai-rounded-full ringg_ai-text-gray-500 hover:ringg_ai-text-gray-700",children:W.jsx(iW,{size:20})}),W.jsx(Av,{size:"icon",variant:"ghost","aria-label":bn?"End call":"Close widget",onClick:()=>bn?He(!0):Lt.showFeedback?Be():Lt.minimize(),className:"ringg_ai-absolute !ringg_ai-z-[9999] ringg_ai-top-2.5 ringg_ai-right-2.5 !ringg_ai-rounded-full ringg_ai-text-gray-500 hover:ringg_ai-text-gray-700",children:W.jsx(lW,{size:20})}),W.jsx(UY,{open:ve,onOpenChange:He,containerRef:bt,children:W.jsxs(FY,{children:[W.jsxs(jY,{children:[W.jsxs(VY,{children:["Are you sure you want to end ",ke==="text"?"chat":"call","?"]}),W.jsx(zY,{children:"Your current conversation will be closed and cannot be accessed later."})]}),W.jsxs(BY,{children:[W.jsx(Av,{variant:"outline",onClick:()=>He(!1),style:{borderRadius:ne,borderColor:N.borderColor,backgroundColor:N.surfaceColor,color:N.textColor},children:"Cancel"}),W.jsxs(Av,{onClick:Ft,style:{borderRadius:ne,backgroundColor:N.primaryColor,color:N.primaryTextColor},children:["End ",ke==="text"?"Chat":"Call"]})]})]})}),Lt.showFeedback?W.jsx($Y,{callMode:ke,isSubmitting:Je,feedbackScreenConfig:U,onSubmit:Kt,onSkip:Be}):W.jsxs("div",{className:"ringg_ai-flex ringg_ai-h-full ringg_ai-flex-col",children:[W.jsxs("div",{className:xr("ringg_ai-relative ringg_ai-p-5 ringg_ai-h-full ringg_ai-mb-2 ringg_ai-flex ringg_ai-gap-5 ringg_ai-flex-col",!bn&&"ringg_ai-mt-2"),children:[W.jsx(qY,{isCalling:bn,isLoading:Je,title:l,description:c,logoUrl:R,logoStyles:M}),Ce.length===0&&bn&&W.jsx("div",{className:"ringg_ai-mt-20 ringg_ai-h-full"}),Ce.length>0&&bn&&W.jsx("div",{"data-scrollable":"true",ref:ht,className:"ringg_ai-mt-20 ringg_ai-h-full ringg_ai-overflow-y-auto ringg_ai-flex ringg_ai-flex-col",children:W.jsx("div",{className:"ringg_ai-mt-auto md:ringg_ai-mt-0 ringg_ai-flex ringg_ai-flex-col ringg_ai-gap-2.5",children:Ce.sort((et,Me)=>et.timestamp-Me.timestamp).map((et,Me)=>et.componentType&&et.componentData?W.jsx(nK,{initialComponent:et.componentData,onApiCall:un,onComplete:()=>At(et.componentData.component_id),onSendResponse:ln},`flow_${et.componentData.component_id}_${Me}`):W.jsx(Dte,{itemIndex:Me,message:et},`${et.timestamp}__${Me}`))})}),W.jsx(IY,{buttonConfig:v,callMode:ke,isCalling:bn,onCallEnd:Ft}),z.hasError&&W.jsx("div",{className:"ringg_ai-text-center ringg_ai-text-sm ringg_ai-text-red-500 -ringg_ai-mt-3 -ringg_ai-mb-2",children:z.message}),Nr==="disconnected"&&W.jsx(GW,{callMode:ke,buttonConfig:v,isCalling:bn,isLoading:Je,onCallTrigger:vt}),!bn&&W.jsx("p",{className:"ringg_ai-text-xs ringg_ai-text-center",style:{color:N.mutedTextColor},children:A?Vte(A.text,A.links):W.jsxs(W.Fragment,{children:["By starting call you agree to ",W.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"hover:ringg_ai-underline",style:{color:N.primaryColor},href:"https://www.ringg.ai/privacy",children:"Privacy policy"})," & ",W.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"hover:ringg_ai-underline",style:{color:N.primaryColor},href:"https://www.ringg.ai/terms",children:"T&C"})]})})]}),!bn&&!T&&W.jsx(Ate,{tabs:XG,activeTab:ke,onTabChange:et=>Ge(et)})]})]},"chat-widget")]}),W.jsx(vB,{}),!1]})},Hte=({config:t})=>{const[e]=G.useState(()=>new Gh({dynacast:!0,adaptiveStream:!0}));return
|
|
425
|
+
`))}function h(T,E,R,M){const A=R.enter("tableCell"),U=R.enter("phrasing"),V=R.containerPhrasing(T,{...M,before:s,after:s});return U(),A(),V}function p(T,E){return ree(T,{align:E,alignDelimiters:r,padding:n,stringLength:a})}function v(T,E,R){const M=T.children;let A=-1;const U=[],V=E.enter("table");for(;++A<M.length;)U[A]=b(M[A],E,R);return V(),U}function b(T,E,R){const M=T.children;let A=-1;const U=[],V=E.enter("tableRow");for(;++A<M.length;)U[A]=h(M[A],T,E,R);return V(),U}function k(T,E,R){let M=K5.inlineCode(T,E,R);return R.stack.includes("tableCell")&&(M=M.replace(/\|/g,"\\$&")),M}}function $ee(){return{exit:{taskListCheckValueChecked:Q5,taskListCheckValueUnchecked:Q5,paragraph:Wee}}}function qee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Gee}}}function Q5(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function Wee(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=e.children;let s=-1,l;for(;++s<a.length;){const c=a[s];if(c.type==="paragraph"){l=c;break}}l===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(t)}function Gee(t,e,n,r){const a=t.children[0],s=typeof t.checked=="boolean"&&a&&a.type==="paragraph",l="["+(t.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(l);let h=K5.listItem(t,e,n,{...r,...c.current()});return s&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(v){return v+l}}function Yee(){return[wJ(),UJ(),QJ(),Uee(),$ee()]}function Kee(t){return{extensions:[_J(),FJ(),XJ(),Hee(t),qee()]}}const Zee={tokenize:nte,partial:!0},X5={tokenize:rte,partial:!0},J5={tokenize:ite,partial:!0},eU={tokenize:ate,partial:!0},Qee={tokenize:ote,partial:!0},tU={name:"wwwAutolink",tokenize:ete,previous:rU},nU={name:"protocolAutolink",tokenize:tte,previous:iU},Cu={name:"emailAutolink",tokenize:Jee,previous:aU},kl={};function Xee(){return{text:kl}}let mf=48;for(;mf<123;)kl[mf]=Cu,mf++,mf===58?mf=65:mf===91&&(mf=97);kl[43]=Cu,kl[45]=Cu,kl[46]=Cu,kl[95]=Cu,kl[72]=[Cu,nU],kl[104]=[Cu,nU],kl[87]=[Cu,tU],kl[119]=[Cu,tU];function Jee(t,e,n){const r=this;let a,s;return l;function l(b){return!__(b)||!aU.call(r,r.previous)||E_(r.events)?n(b):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),c(b))}function c(b){return __(b)?(t.consume(b),c):b===64?(t.consume(b),h):n(b)}function h(b){return b===46?t.check(Qee,v,p)(b):b===45||b===95||Sa(b)?(s=!0,t.consume(b),h):v(b)}function p(b){return t.consume(b),a=!0,h}function v(b){return s&&a&&za(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(b)):n(b)}}function ete(t,e,n){const r=this;return a;function a(l){return l!==87&&l!==119||!rU.call(r,r.previous)||E_(r.events)?n(l):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Zee,t.attempt(X5,t.attempt(J5,s),n),n)(l))}function s(l){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(l)}}function tte(t,e,n){const r=this;let a="",s=!1;return l;function l(b){return(b===72||b===104)&&iU.call(r,r.previous)&&!E_(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),a+=String.fromCodePoint(b),t.consume(b),c):n(b)}function c(b){if(za(b)&&a.length<5)return a+=String.fromCodePoint(b),t.consume(b),c;if(b===58){const k=a.toLowerCase();if(k==="http"||k==="https")return t.consume(b),h}return n(b)}function h(b){return b===47?(t.consume(b),s?p:(s=!0,h)):n(b)}function p(b){return b===null||fS(b)||Sr(b)||pf(b)||hS(b)?n(b):t.attempt(X5,t.attempt(J5,v),n)(b)}function v(b){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(b)}}function nte(t,e,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,t.consume(l),a):l===46&&r===3?(t.consume(l),s):n(l)}function s(l){return l===null?n(l):e(l)}}function rte(t,e,n){let r,a,s;return l;function l(p){return p===46||p===95?t.check(eU,h,c)(p):p===null||Sr(p)||pf(p)||p!==45&&hS(p)?h(p):(s=!0,t.consume(p),l)}function c(p){return p===95?r=!0:(a=r,r=void 0),t.consume(p),l}function h(p){return a||r||!s?n(p):e(p)}}function ite(t,e){let n=0,r=0;return a;function a(l){return l===40?(n++,t.consume(l),a):l===41&&r<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?t.check(eU,e,s)(l):l===null||Sr(l)||pf(l)?e(l):(t.consume(l),a)}function s(l){return l===41&&r++,t.consume(l),a}}function ate(t,e,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(t.consume(c),r):c===38?(t.consume(c),s):c===93?(t.consume(c),a):c===60||c===null||Sr(c)||pf(c)?e(c):n(c)}function a(c){return c===null||c===40||c===91||Sr(c)||pf(c)?e(c):r(c)}function s(c){return za(c)?l(c):n(c)}function l(c){return c===59?(t.consume(c),r):za(c)?(t.consume(c),l):n(c)}}function ote(t,e,n){return r;function r(s){return t.consume(s),a}function a(s){return Sa(s)?n(s):e(s)}}function rU(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Sr(t)}function iU(t){return!za(t)}function aU(t){return!(t===47||__(t))}function __(t){return t===43||t===45||t===46||t===95||Sa(t)}function E_(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ste={tokenize:mte,partial:!0};function lte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fte,continuation:{tokenize:hte},exit:pte}},text:{91:{name:"gfmFootnoteCall",tokenize:dte},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ute,resolveTo:cte}}}}function ute(t,e,n){const r=this;let a=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const h=r.events[a][1];if(h.type==="labelImage"){l=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return c;function c(h){if(!l||!l._balanced)return n(h);const p=Ns(r.sliceSerialize({start:l.end,end:r.now()}));return p.codePointAt(0)!==94||!s.includes(p.slice(1))?n(h):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),e(h))}}function cte(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",a,e],["exit",a,e],["enter",s,e],["enter",l,e],["exit",l,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...c),t}function dte(t,e,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return c;function c(b){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?n(b):(t.enter("gfmFootnoteCallMarker"),t.consume(b),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(b){if(s>999||b===93&&!l||b===null||b===91||Sr(b))return n(b);if(b===93){t.exit("chunkString");const k=t.exit("gfmFootnoteCallString");return a.includes(Ns(r.sliceSerialize(k)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(b)}return Sr(b)||(l=!0),s++,t.consume(b),b===92?v:p}function v(b){return b===91||b===92||b===93?(t.consume(b),s++,p):p(b)}}function fte(t,e,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,c;return h;function h(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",v):n(E)}function v(E){if(l>999||E===93&&!c||E===null||E===91||Sr(E))return n(E);if(E===93){t.exit("chunkString");const R=t.exit("gfmFootnoteDefinitionLabelString");return s=Ns(r.sliceSerialize(R)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),k}return Sr(E)||(c=!0),l++,t.consume(E),E===92?b:v}function b(E){return E===91||E===92||E===93?(t.consume(E),l++,v):v(E)}function k(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),a.includes(s)||a.push(s),Vn(t,T,"gfmFootnoteDefinitionWhitespace")):n(E)}function T(E){return e(E)}}function hte(t,e,n){return t.check(wv,e,t.attempt(ste,e,n))}function pte(t){t.exit("gfmFootnoteDefinition")}function mte(t,e,n){const r=this;return Vn(t,a,"gfmFootnoteDefinitionIndent",5);function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?e(s):n(s)}}function gte(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,c){let h=-1;for(;++h<l.length;)if(l[h][0]==="enter"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._close){let p=h;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[h][1].end.offset-l[h][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[h][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const v={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[h][1].end)},b={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[h][1].start)},k=[["enter",v,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",b,c]],T=c.parser.constructs.insideSpan.null;T&&Mo(k,k.length,0,pS(T,l.slice(p+1,h),c)),Mo(k,k.length,0,[["exit",b,c],["enter",l[h][1],c],["exit",l[h][1],c],["exit",v,c]]),Mo(l,p-1,h-p+3,k),h=p+k.length-2;break}}for(h=-1;++h<l.length;)l[h][1].type==="strikethroughSequenceTemporary"&&(l[h][1].type="data");return l}function s(l,c,h){const p=this.previous,v=this.events;let b=0;return k;function k(E){return p===126&&v[v.length-1][1].type!=="characterEscape"?h(E):(l.enter("strikethroughSequenceTemporary"),T(E))}function T(E){const R=Cp(p);if(E===126)return b>1?h(E):(l.consume(E),b++,T);if(b<2&&!n)return h(E);const M=l.exit("strikethroughSequenceTemporary"),A=Cp(E);return M._open=!A||A===2&&!!R,M._close=!R||R===2&&!!A,c(E)}}}class vte{constructor(){this.map=[]}add(e,n,r){yte(this,e,n,r)}consume(e){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push([...e]),e.length=0;let a=r.pop();for(;a;)e.push(...a),a=r.pop();this.map.length=0}}function yte(t,e,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<t.map.length;){if(t.map[a][0]===e){t.map[a][1]+=n,t.map[a][2].push(...r);return}a+=1}t.map.push([e,n,r])}}function bte(t,e){let n=!1;const r=[];for(;e<t.length;){const a=t[e];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function Ste(){return{flow:{null:{name:"table",tokenize:Cte,resolveAll:kte}}}}function Cte(t,e,n){const r=this;let a=0,s=0,l;return c;function c($){let oe=r.events.length-1;for(;oe>-1;){const ke=r.events[oe][1].type;if(ke==="lineEnding"||ke==="linePrefix")oe--;else break}const J=oe>-1?r.events[oe][1].type:null,xe=J==="tableHead"||J==="tableRow"?N:h;return xe===N&&r.parser.lazy[r.now().line]?n($):xe($)}function h($){return t.enter("tableHead"),t.enter("tableRow"),p($)}function p($){return $===124||(l=!0,s+=1),v($)}function v($){return $===null?n($):Bt($)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume($),t.exit("lineEnding"),T):n($):Pn($)?Vn(t,v,"whitespace")($):(s+=1,l&&(l=!1,a+=1),$===124?(t.enter("tableCellDivider"),t.consume($),t.exit("tableCellDivider"),l=!0,v):(t.enter("data"),b($)))}function b($){return $===null||$===124||Sr($)?(t.exit("data"),v($)):(t.consume($),$===92?k:b)}function k($){return $===92||$===124?(t.consume($),b):b($)}function T($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(t.enter("tableDelimiterRow"),l=!1,Pn($)?Vn(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):E($))}function E($){return $===45||$===58?M($):$===124?(l=!0,t.enter("tableCellDivider"),t.consume($),t.exit("tableCellDivider"),R):I($)}function R($){return Pn($)?Vn(t,M,"whitespace")($):M($)}function M($){return $===58?(s+=1,l=!0,t.enter("tableDelimiterMarker"),t.consume($),t.exit("tableDelimiterMarker"),A):$===45?(s+=1,A($)):$===null||Bt($)?j($):I($)}function A($){return $===45?(t.enter("tableDelimiterFiller"),U($)):I($)}function U($){return $===45?(t.consume($),U):$===58?(l=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume($),t.exit("tableDelimiterMarker"),V):(t.exit("tableDelimiterFiller"),V($))}function V($){return Pn($)?Vn(t,j,"whitespace")($):j($)}function j($){return $===124?E($):$===null||Bt($)?!l||a!==s?I($):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e($)):I($)}function I($){return n($)}function N($){return t.enter("tableRow"),ne($)}function ne($){return $===124?(t.enter("tableCellDivider"),t.consume($),t.exit("tableCellDivider"),ne):$===null||Bt($)?(t.exit("tableRow"),e($)):Pn($)?Vn(t,ne,"whitespace")($):(t.enter("data"),X($))}function X($){return $===null||$===124||Sr($)?(t.exit("data"),ne($)):(t.consume($),$===92?se:X)}function se($){return $===92||$===124?(t.consume($),X):X($)}}function kte(t,e){let n=-1,r=!0,a=0,s=[0,0,0,0],l=[0,0,0,0],c=!1,h=0,p,v,b;const k=new vte;for(;++n<t.length;){const T=t[n],E=T[1];T[0]==="enter"?E.type==="tableHead"?(c=!1,h!==0&&(oU(k,e,h,p,v),v=void 0,h=0),p={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},k.add(n,0,[["enter",p,e]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,b=void 0,s=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,v={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},k.add(n,0,[["enter",v,e]])),a=E.type==="tableDelimiterRow"?2:v?3:1):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],b=ES(k,e,s,a,void 0,b),s=[0,0,0,0]),l[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],b=ES(k,e,s,a,void 0,b)),s=l,l=[s[1],n,0,0])):E.type==="tableHead"?(c=!0,h=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=n,s[1]!==0?(l[0]=l[1],b=ES(k,e,s,a,n,b)):l[1]!==0&&(b=ES(k,e,l,a,n,b)),a=0):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(l[3]=n)}for(h!==0&&oU(k,e,h,p,v),k.consume(e.events),n=-1;++n<e.events.length;){const T=e.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=bte(e.events,n))}return t}function ES(t,e,n,r,a,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},Tp(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const h=Tp(e.events,n[1]);if(s={type:l,start:Object.assign({},h),end:Object.assign({},h)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const p=Tp(e.events,n[2]),v=Tp(e.events,n[3]),b={type:c,start:Object.assign({},p),end:Object.assign({},v)};if(t.add(n[2],0,[["enter",b,e]]),r!==2){const k=e.events[n[2]],T=e.events[n[3]];if(k[1].end=Object.assign({},T[1].end),k[1].type="chunkText",k[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,R=n[3]-n[2]-1;t.add(E,R,[])}}t.add(n[3]+1,0,[["exit",b,e]])}return a!==void 0&&(s.end=Object.assign({},Tp(e.events,a)),t.add(a,0,[["exit",s,e]]),s=void 0),s}function oU(t,e,n,r,a){const s=[],l=Tp(e.events,n);a&&(a.end=Object.assign({},l),s.push(["exit",a,e])),r.end=Object.assign({},l),s.push(["exit",r,e]),t.add(n+1,0,s)}function Tp(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const Tte={name:"tasklistCheck",tokenize:wte};function xte(){return{text:{91:Tte}}}function wte(t,e,n){const r=this;return a;function a(h){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(h):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),s)}function s(h){return Sr(h)?(t.enter("taskListCheckValueUnchecked"),t.consume(h),t.exit("taskListCheckValueUnchecked"),l):h===88||h===120?(t.enter("taskListCheckValueChecked"),t.consume(h),t.exit("taskListCheckValueChecked"),l):n(h)}function l(h){return h===93?(t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),c):n(h)}function c(h){return Bt(h)?e(h):Pn(h)?t.check({tokenize:_te},e,n)(h):n(h)}}function _te(t,e,n){return Vn(t,r,"whitespace");function r(a){return a===null?n(a):e(a)}}function Ete(t){return I4([Xee(),lte(),gte(t),Ste(),xte()])}const Rte={};function Pte(t){const e=this,n=t||Rte,r=e.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Ete(n)),s.push(Yee()),l.push(Kee(n))}const Dte=({itemIndex:t,message:e})=>{const n=Zo(),r=WW(e.name),a=r?n.textColor:n.primaryTextColor;return W.jsx("div",{className:xr("ringg_ai-flex ringg_ai-flex-col ringg_ai-items-start ringg_ai-gap-1 ringg_ai-justify-start",r?"ringg_ai-flex-row":"ringg_ai-flex-row-reverse"),children:W.jsx("div",{className:xr("ringg_ai-flex ringg_ai-items-center ringg_ai-justify-start ringg_ai-gap-2 ringg_ai-px-4 ringg_ai-py-2 ringg_ai-rounded-xl ringg_ai-max-w-[90%]",r?"ringg_ai-mr-auto ringg_ai-text-left ringg_ai-rounded-bl-none":"ringg_ai-ml-auto ringg_ai-text-right ringg_ai-rounded-br-none"),style:{backgroundColor:r?n.surfaceColor:n.primaryColor,color:a},children:W.jsxs("div",{className:"ringg_ai-flex ringg_ai-flex-col ringg_ai-gap-2.5 ringg_ai-w-full ringg_ai-overflow-x-auto",children:[W.jsx("div",{className:"ringg_ai-prose ringg_ai-prose-sm ringg_ai-max-w-none [&_p]:ringg_ai-text-sm [&_li]:ringg_ai-text-sm [&_table]:ringg_ai-w-max",style:{"--tw-prose-body":a,"--tw-prose-headings":a,"--tw-prose-bold":a,"--tw-prose-counters":a,"--tw-prose-bullets":a,"--tw-prose-quotes":a,"--tw-prose-code":a,"--tw-prose-th-borders":n.borderColor,"--tw-prose-td-borders":n.borderColor,color:a},children:W.jsx(mJ,{remarkPlugins:[Pte],children:e.message})}),(e==null?void 0:e.sourceUrl)&&W.jsxs("a",{href:e.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"ringg_ai-text-sm ringg_ai-break-all ringg_ai-w-fit ringg_ai-hover:underline",style:{color:r?n.primaryColor:n.primaryTextColor},children:["Source: ",e.sourceUrl]})]})},`${e.name}__${t}`)},`${e.timestamp}__${t}`)};function Ate({tabs:t=[],activeTab:e="voice-call",onTabChange:n}){const r=Zo(),[a,s]=G.useState(e),l=c=>{s(c),n==null||n(c)};return W.jsx("div",{className:"ringg_ai-w-full ringg_ai-border-t",style:{backgroundColor:r.backgroundColor,borderColor:r.borderColor},children:W.jsx("div",{className:"ringg_ai-flex ringg_ai-items-center ringg_ai-px-0",children:t.map(c=>{const h=c.icon,p=a===c.id,v=p?r.primaryColor:r.mutedTextColor;return W.jsxs("button",{onClick:()=>l(c.id),className:xr("ringg_ai-flex ringg_ai-flex-col ringg_ai-items-center ringg_ai-gap-1 ringg_ai-border-t-2 ringg_ai-py-3 ringg_ai-transition-all ringg_ai-duration-200 ringg_ai-flex-1"),style:{borderTopColor:p?r.primaryColor:"transparent"},children:[W.jsx(h,{className:"ringg_ai-w-5 ringg_ai-h-5 ringg_ai-transition-colors",fill:v,style:{color:v}}),W.jsx("span",{className:"ringg_ai-text-xs ringg_ai-font-medium ringg_ai-transition-colors",style:{color:v},children:c.label})]},c.id)})})})}const Ote=Y3("ringg_ai-inline-flex ringg_ai-items-center ringg_ai-justify-center ringg_ai-gap-2 ringg_ai-whitespace-nowrap ringg_ai-rounded-md ringg_ai-text-sm ringg_ai-font-medium ringg_ai-ring-offset-background ringg_ai-transition-colors focus-visible:ringg_ai-outline-none focus-visible:ringg_ai-ring-2 focus-visible:ringg_ai-ring-ring focus-visible:ringg_ai-ring-offset-2 disabled:ringg_ai-pointer-events-none disabled:ringg_ai-opacity-50 [&_svg]:ringg_ai-pointer-events-none [&_svg]:ringg_ai-size-4 [&_svg]:ringg_ai-shrink-0",{variants:{variant:{default:"ringg_ai-bg-primary ringg_ai-text-primary-foreground ringg_ai-shadow hover:ringg_ai-bg-primary/90",destructive:"ringg_ai-bg-destructive ringg_ai-text-destructive-foreground ringg_ai-shadow-sm hover:ringg_ai-bg-destructive/90",outline:"ringg_ai-border ringg_ai-border-input ringg_ai-bg-background ringg_ai-shadow-sm hover:ringg_ai-bg-accent hover:ringg_ai-text-accent-foreground",secondary:"ringg_ai-bg-secondary ringg_ai-text-secondary-foreground ringg_ai-shadow-sm hover:ringg_ai-bg-secondary/80",ghost:"hover:ringg_ai-bg-accent hover:ringg_ai-text-accent-foreground",link:"ringg_ai-text-primary ringg_ai-underline-offset-4 hover:ringg_ai-underline"},size:{default:"ringg_ai-h-9 ringg_ai-px-4 ringg_ai-py-2",sm:"ringg_ai-h-8 ringg_ai-rounded-md ringg_ai-px-3 ringg_ai-text-xs",lg:"ringg_ai-h-10 ringg_ai-rounded-md ringg_ai-px-8",icon:"ringg_ai-h-9 ringg_ai-w-9"}},defaultVariants:{variant:"default",size:"default"}}),Av=G.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...a},s)=>{const l=r?uS:"button";return W.jsx(l,{className:xr(Ote({variant:e,size:n,className:t})),ref:s,...a})});Av.displayName="Button";function Bc(t,e){typeof window<"u"&&window.dispatchEvent(new CustomEvent(t,{detail:e}))}function Mte({callMode:t}){const[e,n]=G.useState(!1),[r,a]=G.useState(!1),[s,l]=G.useState(null),c=G.useRef(!1),h=G.useRef(t);h.current=t;const p=G.useCallback(()=>{c.current||(c.current=!0,n(!0),Bc("ringg:widget_status",{status:"maximised",mode:h.current}))},[]),v=G.useCallback(()=>{c.current=!1,n(!1),Bc("ringg:widget_status",{status:"minimised",mode:h.current})},[]),b=G.useCallback(()=>{a(!1),l(null),v()},[v]),k=G.useCallback(()=>{c.current?v():p()},[p,v]);return G.useMemo(()=>({isOpen:e,showFeedback:r,currentCallId:s,setShowFeedback:a,setCurrentCallId:l,open:p,minimize:v,close:b,toggle:k}),[e,r,s,p,v,b,k])}function Lte({room:t,onError:e}){const[n,r]=G.useState("unknown"),a=G.useRef(e);a.current=e;const s=G.useCallback(async()=>{var h;try{if((h=navigator.permissions)!=null&&h.query){const p=await navigator.permissions.query({name:"microphone"});r(p.state),p.onchange=()=>{r(p.state)}}else try{await navigator.mediaDevices.getUserMedia({audio:!0}),r("granted")}catch{r("denied")}}catch(p){console.error("Error checking microphone permission:",p),r("unknown")}},[]),l=G.useCallback(async()=>{var h;try{const p=await navigator.mediaDevices.getUserMedia({audio:!0});return r("granted"),p.getTracks().forEach(v=>v.stop()),!0}catch(p){return console.error("Error requesting microphone permission:",p),r("denied"),(h=a.current)==null||h.call(a,"Microphone access was denied. Please enable it in your browser settings."),!1}},[]);G.useEffect(()=>{s();const h=()=>{var p;(p=a.current)==null||p.call(a,"Error acquiring microphone permission. Please make sure you grant the necessary permissions in your browser and reload the tab"),r("denied")};return t.on(Ee.MediaDevicesError,h),()=>{t.off(Ee.MediaDevicesError,h)}},[t,s]);const c=n==="granted";return G.useMemo(()=>({state:n,isGranted:c,check:s,request:l}),[n,c,s,l])}function Nte({containerRef:t,enabled:e}){G.useEffect(()=>{const n=t.current;if(!n||!e)return;const r=c=>{const h=n.querySelector('[data-scrollable="true"]');if(!h){c.preventDefault();return}const{scrollTop:p,scrollHeight:v,clientHeight:b}=h,k=p===0&&c.deltaY<0,T=p+b>=v-1&&c.deltaY>0;(k||T)&&c.preventDefault()};let a=0;const s=c=>{a=c.touches[0].clientY},l=c=>{const h=n.querySelector('[data-scrollable="true"]'),p=c.touches[0].clientY,v=a-p;if(!h){c.preventDefault();return}const{scrollTop:b,scrollHeight:k,clientHeight:T}=h,E=b===0&&v<0,R=b+T>=k-1&&v>0;(E||R)&&c.preventDefault()};return n.addEventListener("wheel",r,{passive:!1}),n.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("touchmove",l,{passive:!1}),()=>{n.removeEventListener("wheel",r),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l)}},[e])}const xp={mode:"prod",title:"Ringg AI Support",description:"Ringg AI offers 24/7 voice support to handle your business calls efficiently and professionally",defaultTab:"audio",hideTabSelector:!1,notificationTuneUrl:"https://assets.ringg.ai/audios/misc/widget_notification.mp3"};function R_(t){switch(t){case"dev":return"https://calling-dev.ringg.ai/ca/api/v0";case"stage":return"https://stage-api2.desivocal.com/ca/api/v0";default:return"https://prod-api.ringg.ai/ca/api/v0"}}function Ite(t){switch(t){case"dev":return"wss://ringg-ai-dev-92tubwpz.livekit.cloud";case"stage":return"wss://ringg-ai-ujrjmhgy.livekit.cloud";default:return"wss://ringg-ai-prod-r0vhjzhs.livekit.cloud"}}function Jse(t){return t}const sU={center:{top:0,left:0,right:0,bottom:0,margin:"auto"},"top-left":{top:"2%",left:"2%"},"top-right":{top:"2%",right:"2%"},"bottom-left":{bottom:"2%",left:"2%"},"bottom-right":{bottom:"2%",right:"2%"},"bottom-center":{bottom:"2%",left:"50%"}};function Ute(t){return sU[t]??sU["bottom-right"]}function Fte(t){return t==="bottom-center"?{left:"50%"}:t==="bottom-left"?{left:"2%"}:{right:"2%"}}function RS(t){if(t!==void 0)return typeof t=="number"?`${t}px`:t}function jte(t){return t?{width:RS(t.width),height:RS(t.height),borderRadius:RS(t.borderRadius)}:{}}function Vte(t,e){if(!e)return t;let n=[t];return Object.entries(e).forEach(([r,a])=>{n=n.flatMap((s,l)=>{if(typeof s!="string")return s;const c=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),h=new RegExp(`\\b(${c})\\b`,"g");return s.split(h).map((p,v)=>p===r?W.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"ringg_ai-text-blue-500 hover:ringg_ai-underline",href:a,children:r},`${l}-${v}`):p)})}),n}const zte=({room:t,config:e})=>{var Hi,Ji,ea,co,es,ts,fo;const[n,r]=G.useState({}),a=e,{mode:s=xp.mode,title:l=xp.title,description:c=xp.description,agentId:h,variables:p,buttons:v,xApiKey:b="",defaultTab:k=xp.defaultTab,hideTabSelector:T=xp.hideTabSelector,innerWindowProps:E,logoUrl:R,logoStyles:M,legalDisclaimer:A,feedbackScreen:U,notificationTuneUrl:V=xp.notificationTuneUrl,widgetPosition:j,theme:I}=a,N=WI(I),ne=mw(N.buttonStyle),X=(j==null?void 0:j.triggerPlacement)??"fixed",se=(j==null?void 0:j.triggerAlignment)??"bottom-right",$=(j==null?void 0:j.hideTriggerOnExpand)??!0,oe=(j==null?void 0:j.widgetAlignment)??"bottom-right",J=Ute(se),xe=jte(E),[ke,Ge]=G.useState(k),[Je,je]=G.useState(!1),[ve,He]=G.useState(!1),[z,ee]=G.useState({hasError:!1,message:""}),[Ce,H]=G.useState([]),[Ct,Rt]=G.useState(new Map),ht=G.useRef(null),bt=G.useRef(null),it=G.useRef(null),xt=G.useRef(""),tn=G.useRef(),qn=G.useRef(new Set),_r=G.useRef(null),vr=G.useRef(!1),Xn=G.useRef(new Map),Nr=ex(t),bn=Nr==="connected",Lt=Mte({callMode:ke}),Z=Lte({room:t,onError:et=>ee({hasError:!0,message:et})});Nte({containerRef:bt,enabled:Lt.isOpen});const{chatMessages:le}=$M(),me=hB(),Ve=aB(),ze=HM(),Oe=tx(me.audioTrack||void 0),ut=tx({publication:Ve.microphoneTrack,source:De.Source.Microphone,participant:Ve.localParticipant}),Nt=G.useMemo(()=>ze.find(et=>{var Me;return(Me=et.identity)==null?void 0:Me.includes("agent")}),[ze]),fe=G.useCallback((et,Me)=>{vr.current=!1,console.log("%c[Conversation Started]","background: #22c55e; color: white; padding: 2px 6px; border-radius: 3px;",{mode:et,callId:Me}),Bc("ringg:conversation_status",{status:"started",mode:et,callId:Me})},[]),Re=G.useCallback((et,Me)=>{vr.current||(vr.current=!0,console.log("%c[Conversation Ended]","background: #ef4444; color: white; padding: 2px 6px; border-radius: 3px;",{mode:et,callId:Me}),Bc("ringg:conversation_status",{status:"ended",mode:et,callId:Me}))},[]),vt=G.useCallback(async et=>{if(!(et==="audio"&&!Z.isGranted&&!await Z.request())){je(!0),Ge(et);try{const Me=await fetch(`${R_(s)}/calling/webcall`,{method:"POST",body:JSON.stringify({agent_id:h,custom_args_values:p,media_type:et}),headers:{"Content-Type":"application/json","X-API-KEY":b}}),It=await Me.json();if(!Me.ok)throw new Error((It==null?void 0:It.message)||"Failed to make call");It!=null&&It.call_id&&Lt.setCurrentCallId(It.call_id),await t.connect(Ite(s),It==null?void 0:It.user_token),et==="audio"&&await t.localParticipant.setMicrophoneEnabled(!0),fe(et,It.call_id),ee({hasError:!1,message:""})}catch(Me){ee({hasError:!0,message:Me.message})}finally{je(!1)}}},[t,s,h,p,b,Z,Lt,fe]),Ft=G.useCallback(async()=>{je(!0);try{Lt.currentCallId&&Re(ke,Lt.currentCallId),H([]),Rt(new Map),qn.current=new Set,xt.current="",tn.current=void 0,t.disconnect(),He(!1),Lt.setShowFeedback(!0),Lt.open()}catch(et){ee({hasError:!0,message:"Error ending call: "+et.message})}finally{je(!1)}},[t,ke,Lt,Re]),Kt=G.useCallback(async(et,Me)=>{if(!Lt.currentCallId){Lt.close();return}je(!0);try{await fetch(`${R_(s)}/calling/${Lt.currentCallId}/feedback`,{method:"POST",body:JSON.stringify({rating:et,comment:Me}),headers:{"Content-Type":"application/json","X-API-KEY":b}}),Bc("ringg:feedback_status",{status:"submitted",callId:Lt.currentCallId,rating:et})}catch(It){console.error("Error submitting feedback:",It)}finally{je(!1),Lt.close()}},[s,b,Lt]),Be=G.useCallback(()=>{Lt.currentCallId&&Bc("ringg:feedback_status",{status:"skipped",callId:Lt.currentCallId}),Lt.close()},[Lt]),ct=G.useCallback(et=>{var It;const Me={name:"Agent",message:"",isSelf:!1,timestamp:Date.now()+Math.random(),componentType:et.component_type,componentData:et};H(Ht=>[...Ht,Me]),Bc("ringg:calendar_booking",{status:"shown",componentId:et.component_id}),(It=it.current)==null||It.play().catch(()=>{}),Lt.open()},[Lt]),At=G.useCallback(et=>{qn.current.add(et),Bc("ringg:calendar_booking",{status:"confirmed",componentId:et,message:"Flow completed"})},[]),ln=G.useCallback(async(et,Me)=>{const It=Xn.current.get(et);if(!It){console.warn(`[RPC] No pending response found for component: ${et}`);return}if(!Nt){console.warn("[RPC] No agent participant found to send response to");return}const{name:Ht,originalConfig:Sn}=It,jt="receive_dynamic_data";let Cn;if(Ht==="calendar"){const Er=Me.step_data&&Me.step_data.slot_id;Cn=(Array.isArray(Sn)?Sn:[]).find(Xe=>Xe.id===Er)||{id:Er,datetime:Me.step_data&&Me.step_data.slot_datetime}}else if(Ht==="form")Cn=Me.step_data||Me.all_data;else if(Ht==="buttons"){const Er=Me.step_data&&Me.step_data.selected_button;Cn=(Array.isArray(Sn)?Sn:[]).find(Xe=>Xe.id===Er)||{id:Er}}else Cn=Me;const er=JSON.stringify({componant_type:`receive_component_${Ht}`,component_id:et,componant_data:Cn});try{console.log(`[RPC] Sending ${jt}:`,er);const Er=await Ve.localParticipant.performRpc({destinationIdentity:Nt.identity,method:jt,payload:er});console.log(`[RPC] Response from ${jt}:`,Er),Xn.current.delete(et)}catch(Er){console.error(`[RPC] Error sending ${jt}:`,Er)}},[Nt,Ve.localParticipant]),En=G.useMemo(()=>null,[]),un=G.useCallback(async(et,Me,It)=>(await fetch(Me.startsWith("http")?Me:`${R_(s)}${Me}`,{method:et,body:JSON.stringify(It),headers:{"Content-Type":"application/json","X-API-KEY":b}})).json(),[s,b,bn,En]),Dn=G.useCallback(async et=>{try{const Me=JSON.parse(et.payload);return Array.isArray(Me.source_urls)?xt.current=Me.source_urls.join(", "):Me.source_url&&(xt.current=Me.source_url),JSON.stringify({status:"received"})}catch(Me){throw console.error("Failed to parse RPC payload:",Me),new Error("Invalid payload for send_source_urls")}},[]),Wn=G.useCallback(async et=>{try{console.log("Received dynamic data:",et.payload);const Me=JSON.parse(et.payload);return Me.component_type&&Me.component_id&&ct(Me),JSON.stringify({status:"received"})}catch(Me){throw console.error("Failed to parse component payload:",Me),new Error("Invalid component payload")}},[ct]),Jn=G.useCallback((et,Me)=>{const It=`${et}_${Date.now()}`,Ht=Me.componant_config||Me.component_config;if(et==="calendar"){const Sn=Array.isArray(Ht)?Ht:[];return{component_type:"calendar_booking",component_id:It,data:{available_slots:Sn.map(jt=>({id:jt.id,datetime:jt.datetime})),timezone:Me.timezone||"UTC",title:Me.title||"Select a time slot"},actions:{on_select:{method:"POST",endpoint:"/mock/calendar",payload:{selected_slot_id:"{slot_id}"}}}}}return et==="form"?{component_type:"form",component_id:It,data:{title:Me.title||"Form",description:Me.description,fields:Array.isArray(Ht)?Ht:[],submit_label:Me.submit_label},actions:{on_submit:{method:"POST",endpoint:"/mock/form",payload:{form_data:"{form_data}"}}}}:et==="buttons"?{component_type:"buttons",component_id:It,data:{title:Me.title,buttons:Array.isArray(Ht)?Ht:[]}}:et==="confirmation"?{component_type:"confirmation",component_id:It,data:{title:Me.title||"Confirmed",message:Me.message||"",icon:Me.icon||"success",details:Me.details}}:Me.component_type&&Me.component_id?Me:null},[]),Gn=G.useCallback(async et=>{try{const Me=JSON.parse(et.payload);console.log("[RPC] Received send_dynamic_data:",Me);const It=Me.componant_type||Me.component_type;if(!It)return console.warn("[RPC] No componant_type in payload"),JSON.stringify({status:"error",message:"No componant_type provided"});const Ht=It.replace("render_component_","");console.log(`[RPC] Routing to component: ${Ht}`);const Sn=Jn(Ht,Me);return Sn?(Xn.current.set(Sn.component_id,{name:Ht,originalConfig:Me.componant_config||Me.component_config}),ct(Sn),JSON.stringify({status:"received",component_id:Sn.component_id})):(console.warn(`[RPC] Unknown component type: ${Ht}`),JSON.stringify({status:"error",message:`Unknown component type: ${Ht}`}))}catch(Me){throw console.error("[RPC] Failed to parse send_dynamic_data payload:",Me),new Error("Invalid send_dynamic_data payload")}},[ct,Jn]);G.useEffect(()=>{_r.current=ct},[ct]);const In=G.useRef(Lt.open);return In.current=Lt.open,G.useEffect(()=>{},[]),G.useEffect(()=>{var Ht,Sn;if(!t||ke!=="audio")return;const et=new Map(Ct);me.audioTrack&&Oe.segments.forEach(jt=>{const Cn=et.get(jt.id),er=bw(jt,Cn,me.audioTrack.participant);et.set(jt.id,er),jt.text&&jt.text!==(Cn==null?void 0:Cn.message)&&(jt.final?console.log("%c[Agent Message Complete]","background: #22c55e; color: white; padding: 2px 6px; border-radius: 3px;",jt.text):console.log("%c[Agent Speaking...]","color: #22c55e;",jt.text))}),ut.segments.forEach(jt=>{const Cn=et.get(jt.id),er=bw(jt,Cn,Ve.localParticipant);et.set(jt.id,er),jt.text&&jt.text!==(Cn==null?void 0:Cn.message)&&(jt.final?console.log("%c[User Message Sent]","background: #3b82f6; color: white; padding: 2px 6px; border-radius: 3px;",jt.text):console.log("%c[User Speaking...]","color: #3b82f6;",jt.text))});const Me=Array.from(et.values()).sort((jt,Cn)=>jt.timestamp-Cn.timestamp),It=xt.current&&((Ht=Me[Me.length-1])==null?void 0:Ht.name.includes("Agent"))&&!((Sn=Me[Me.length-1])!=null&&Sn.sourceUrl)&&tn.current!==Me.length-1;if(It){tn.current=Me.length,Me[Me.length-1]={...Me[Me.length-1],sourceUrl:xt.current};const jt=Me.filter(er=>!er.isSelf).length-1,Cn=et.get(Oe.segments[jt].id);et.set(Oe.segments[jt].id,bw(Oe.segments[jt],{...Cn,sourceUrl:xt.current},me.audioTrack.participant))}H(Me),Rt(et),It||(xt.current="")},[ke,le,Oe.segments,ut.segments,me.audioTrack,Ve.localParticipant]),G.useEffect(()=>{if(!t||ke!=="text")return;const et=async(It,Ht)=>{var Sn,jt;try{const Cn=await It.readAll(),er=(Sn=Ht.identity)==null?void 0:Sn.includes("agent");console.log(`%c[Transcript - Text] ${er?"Agent":"User"}:`,`color: ${er?"#22c55e":"#3b82f6"}; font-weight: bold;`,Cn),er&&((jt=it.current)==null||jt.play().catch(()=>{}),Lt.open());const Er={message:Cn,isSelf:!er,name:er?"Agent":"You",timestamp:Date.now()+performance.now()%1,...er&&xt.current&&{sourceUrl:xt.current}};xt.current&&(xt.current=""),H(K=>{const Le=new Set;return[...K,Er].filter(Xe=>!Le.has(Xe.timestamp)&&Le.add(Xe.timestamp)).sort((Xe,ot)=>Xe.timestamp-ot.timestamp)})}catch(Cn){console.error("Error reading text stream",Cn)}},Me=le.map(It=>{var jt,Cn,er,Er;const Ht=((jt=It.from)==null?void 0:jt.identity)===Ve.localParticipant.identity,Sn=me.audioTrack?((Cn=It.from)==null?void 0:Cn.identity)===((er=me.audioTrack.participant)==null?void 0:er.identity):!Ht;return{name:((Er=It.from)==null?void 0:Er.name)||(Sn?"Agent":Ht?"You":"Unknown"),isSelf:Ht,message:It.message,timestamp:It.timestamp}});return H(It=>{const Ht=new Set;return[...It,...Me].filter(Sn=>!Ht.has(Sn.timestamp)&&Ht.add(Sn.timestamp)).sort((Sn,jt)=>Sn.timestamp-jt.timestamp)}),t.registerTextStreamHandler("lk.transcription",et),()=>{t.unregisterTextStreamHandler("lk.transcription")}},[t,ke,le,Lt,Ve.localParticipant,me.audioTrack]),G.useEffect(()=>{if(t)return console.log("[RPC] Registering handlers on room connect"),t.registerRpcMethod("send_source_urls",Dn),t.registerRpcMethod("render_component",Wn),t.registerRpcMethod("send_dynamic_data",Gn),console.log("[RPC] Registered: send_source_urls, render_component, send_dynamic_data"),()=>{t.unregisterRpcMethod("send_source_urls"),t.unregisterRpcMethod("render_component"),t.unregisterRpcMethod("send_dynamic_data")}},[t,Dn,Wn,Gn]),G.useEffect(()=>{if(t)return t.on(Ee.ParticipantDisconnected,Ft),t.on(Ee.Disconnected,Ft),()=>{t.off(Ee.ParticipantDisconnected,Ft),t.off(Ee.Disconnected,Ft)}},[Ft,t]),G.useEffect(()=>{if(ht.current&&(ht.current.scrollTop=ht.current.scrollHeight),Ce.length>0){const et=Ce.filter(Me=>Me.message&&!Me.componentType).map(Me=>`${Me.isSelf?"User":"Agent"}: ${Me.message}`).join(`
|
|
426
|
+
`);console.groupCollapsed(`%c[Transcript Summary] ${Ce.filter(Me=>Me.message).length} messages`,"color: #8b5cf6; font-weight: bold;"),console.log(et),console.groupEnd()}},[Ce]),G.useEffect(()=>(it.current=new Audio(V),it.current.preload="auto",()=>{it.current&&(it.current.pause(),it.current.src="",it.current=null)}),[V]),W.jsxs(pW,{theme:I,children:[W.jsxs(sx,{children:[(!$||!Lt.isOpen)&&W.jsx(mu.button,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",stiffness:400,damping:25},"aria-label":"Open call widget",onClick:Lt.toggle,style:{position:X,...J,backgroundColor:N.primaryColor,color:N.primaryTextColor,...(Hi=v==null?void 0:v.modalTrigger)==null?void 0:Hi.styles},className:"ringg_ai-h-14 ringg_ai-w-14 !ringg_ai-rounded-full ringg_ai-flex ringg_ai-items-center ringg_ai-justify-center ringg_ai-shadow ringg_ai-trigger-btn !ringg_ai-z-[9999] hover:ringg_ai-opacity-90 ringg_ai-transition-opacity",children:W.jsx("img",{src:((ea=(Ji=v==null?void 0:v.modalTrigger)==null?void 0:Ji.icon)==null?void 0:ea.url)??"https://assets.ringg.ai/images/icons/widget-phone.svg",alt:"Widget trigger",style:{width:((es=(co=v==null?void 0:v.modalTrigger)==null?void 0:co.icon)==null?void 0:es.size)??25,height:((fo=(ts=v==null?void 0:v.modalTrigger)==null?void 0:ts.icon)==null?void 0:fo.size)??25}})},"trigger-button"),Lt.isOpen&&W.jsxs(mu.div,{ref:bt,initial:{y:"100%",opacity:0,x:oe==="bottom-center"?"-50%":0},animate:{y:0,opacity:1,x:oe==="bottom-center"?"-50%":0},exit:{y:"100%",opacity:0,x:oe==="bottom-center"?"-50%":0},transition:{type:"spring",stiffness:300,damping:28},className:xr("ringg_ai-relative ringg_ai-border ringg_ai-overflow-hidden ringg_ai-shadow-xl !ringg_ai-z-[9999] ringg_ai-w-[95vw] md:ringg_ai-w-[360px]",bn&&"ringg_ai-h-[24.5rem]"),style:{position:"fixed",bottom:"2%",...Fte(oe),...bn?xe:{},maxWidth:"96dvw",maxHeight:"96dvh",backgroundColor:N.backgroundColor,borderColor:N.borderColor,borderRadius:RS(E==null?void 0:E.borderRadius)??N.borderRadius,fontFamily:N.fontFamily,"--widget-primary":N.primaryColor,"--widget-primary-text":N.primaryTextColor,"--widget-bg":N.backgroundColor,"--widget-surface":N.surfaceColor,"--widget-text":N.textColor,"--widget-muted":N.mutedTextColor,"--widget-border":N.borderColor,"--widget-button-radius":ne},children:[bn&&W.jsx(Av,{size:"icon",variant:"ghost","aria-label":"Minimize widget",onClick:Lt.minimize,className:"ringg_ai-absolute !ringg_ai-z-[9999] ringg_ai-top-2.5 ringg_ai-right-12 !ringg_ai-rounded-full ringg_ai-text-gray-500 hover:ringg_ai-text-gray-700",children:W.jsx(iW,{size:20})}),W.jsx(Av,{size:"icon",variant:"ghost","aria-label":bn?"End call":"Close widget",onClick:()=>bn?He(!0):Lt.showFeedback?Be():Lt.minimize(),className:"ringg_ai-absolute !ringg_ai-z-[9999] ringg_ai-top-2.5 ringg_ai-right-2.5 !ringg_ai-rounded-full ringg_ai-text-gray-500 hover:ringg_ai-text-gray-700",children:W.jsx(lW,{size:20})}),W.jsx(UY,{open:ve,onOpenChange:He,containerRef:bt,children:W.jsxs(FY,{children:[W.jsxs(jY,{children:[W.jsxs(VY,{children:["Are you sure you want to end ",ke==="text"?"chat":"call","?"]}),W.jsx(zY,{children:"Your current conversation will be closed and cannot be accessed later."})]}),W.jsxs(BY,{children:[W.jsx(Av,{variant:"outline",onClick:()=>He(!1),style:{borderRadius:ne,borderColor:N.borderColor,backgroundColor:N.surfaceColor,color:N.textColor},children:"Cancel"}),W.jsxs(Av,{onClick:Ft,style:{borderRadius:ne,backgroundColor:N.primaryColor,color:N.primaryTextColor},children:["End ",ke==="text"?"Chat":"Call"]})]})]})}),Lt.showFeedback?W.jsx($Y,{callMode:ke,isSubmitting:Je,feedbackScreenConfig:U,onSubmit:Kt,onSkip:Be}):W.jsxs("div",{className:"ringg_ai-flex ringg_ai-h-full ringg_ai-flex-col",children:[W.jsxs("div",{className:xr("ringg_ai-relative ringg_ai-p-5 ringg_ai-h-full ringg_ai-mb-2 ringg_ai-flex ringg_ai-gap-5 ringg_ai-flex-col",!bn&&"ringg_ai-mt-2"),children:[W.jsx(qY,{isCalling:bn,isLoading:Je,title:l,description:c,logoUrl:R,logoStyles:M}),Ce.length===0&&bn&&W.jsx("div",{className:"ringg_ai-mt-20 ringg_ai-h-full"}),Ce.length>0&&bn&&W.jsx("div",{"data-scrollable":"true",ref:ht,className:"ringg_ai-mt-20 ringg_ai-h-full ringg_ai-overflow-y-auto ringg_ai-flex ringg_ai-flex-col",children:W.jsx("div",{className:"ringg_ai-mt-auto md:ringg_ai-mt-0 ringg_ai-flex ringg_ai-flex-col ringg_ai-gap-2.5",children:Ce.sort((et,Me)=>et.timestamp-Me.timestamp).map((et,Me)=>et.componentType&&et.componentData?W.jsx(nK,{initialComponent:et.componentData,onApiCall:un,onComplete:()=>At(et.componentData.component_id),onSendResponse:ln},`flow_${et.componentData.component_id}_${Me}`):W.jsx(Dte,{itemIndex:Me,message:et},`${et.timestamp}__${Me}`))})}),W.jsx(IY,{buttonConfig:v,callMode:ke,isCalling:bn,onCallEnd:Ft}),z.hasError&&W.jsx("div",{className:"ringg_ai-text-center ringg_ai-text-sm ringg_ai-text-red-500 -ringg_ai-mt-3 -ringg_ai-mb-2",children:z.message}),Nr==="disconnected"&&W.jsx(GW,{callMode:ke,buttonConfig:v,isCalling:bn,isLoading:Je,onCallTrigger:vt}),!bn&&W.jsx("p",{className:"ringg_ai-text-xs ringg_ai-text-center",style:{color:N.mutedTextColor},children:A?Vte(A.text,A.links):W.jsxs(W.Fragment,{children:["By starting call you agree to ",W.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"hover:ringg_ai-underline",style:{color:N.primaryColor},href:"https://www.ringg.ai/privacy",children:"Privacy policy"})," & ",W.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"hover:ringg_ai-underline",style:{color:N.primaryColor},href:"https://www.ringg.ai/terms",children:"T&C"})]})})]}),!bn&&!T&&W.jsx(Ate,{tabs:XG,activeTab:ke,onTabChange:et=>Ge(et)})]})]},"chat-widget")]}),W.jsx(vB,{}),!1]})},Bte="1.0.20-alpha.44",Hte=({config:t})=>{const[e]=G.useState(()=>new Gh({dynacast:!0,adaptiveStream:!0}));return G.useEffect(()=>{console.log(`%c[Ringg CDN] v${Bte} initialized`,"background: #7c3aed; color: white; padding: 2px 8px; border-radius: 4px;"),console.log("[Ringg CDN] Config:",t)},[t]),W.jsx(XT.Provider,{value:e,children:W.jsx(zte,{config:t,room:e})})};{const t="ringg_ai_container";(function(e,n){function r(a){console.log("%c[Ringg CDN] loadAgent called","background: #22c55e; color: white; padding: 2px 8px; border-radius: 4px;",a);let s=n.getElementById(t);s||(s=n.createElement("div"),s.id=t,n.body.appendChild(s)),yg.createRoot(s).render(W.jsx(ir.StrictMode,{children:W.jsx(Hte,{config:a})}))}e.loadAgent=r})(window,document)}});
|